Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support sandbox-based controls for license, grant, community #118

Closed
wants to merge 1 commit into from

Conversation

ThierryO
Copy link

I'm creating a unit test for my upload_zenodo() function using https://sandbox.zenodo.org. However some methods of ZenodoRec require access to https://zenodo.org. I don't want to give my unit test functions access to https://zenodo.org.

This PR allows to pass a ZenodoManager object. The default behaviour is unchanged (use the default ZenodoManager pointing to https://zenodo.org).

@eblondel eblondel changed the title some ZenodoRecord functions gain a zen argument Support sandbox-based controls for license, grant, community Mar 22, 2023
eblondel added a commit that referenced this pull request Mar 22, 2023
eblondel added a commit that referenced this pull request Mar 22, 2023
@eblondel
Copy link
Owner

@ThierryO i've looked at this proposal. Thanks for spotting out this need to control licenses, grants and communities, this is really useful to improve the code. On this PR however I've opted for a different approach to make it more readable and easily usable, which consists in enabling a sandbox boolean argument in ZenodoManager, and propagate it through the methods setLicense, addGrand, addCommunity.

@ThierryO
Copy link
Author

I still get an authentication error using ZenodoRecord$setLicense("GPL-3.0", sandbox = TRUE).

It looks like sandbox = TRUE does not update private$url.

private$url = url

@eblondel eblondel closed this in 41c14a9 Mar 28, 2023
@ThierryO ThierryO deleted the manager branch March 30, 2023 17:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants