Skip to content

Use specific env variables#96

Open
rkrug wants to merge 2 commits into
ropenscilabs:mainfrom
rkrug:use_specific_env_variables
Open

Use specific env variables#96
rkrug wants to merge 2 commits into
ropenscilabs:mainfrom
rkrug:use_specific_env_variables

Conversation

@rkrug

@rkrug rkrug commented Dec 11, 2023

Copy link
Copy Markdown

The code now checks if the environmental variables

- ZENOODO_TOKEN
- ZENODO_SANDBOX_TOKEN
- FIGSHARE_TOKEN

are set and reads these. If they are not set, it uses the heuristic algorithm included before.

@Rafnuss

Rafnuss commented Jan 10, 2025

Copy link
Copy Markdown

Nice, this quite an annoying missing piece in the documentation. Can I ask why not using keyring? Seems like it's quite popular to manage such token? Or maybe not?

@mpadge

mpadge commented Jan 13, 2025

Copy link
Copy Markdown
Member

@Rafnuss Main reason that credential-management systems are not used here is because they are often difficult to use within containerized environments such as Dockerfiles. Direct use of environment variables offers greater flexibility for using this package in a range of computational environments.

And @rkrug sorry that I forgot about this PR. You still interested in moving ahead with it?

@rkrug

rkrug commented Jan 13, 2025

Copy link
Copy Markdown
Author

No worries.

Yes please - I am not using deposits at the moment, but I will use it again. And using these specific names for the end variables would make the handling more robust.

@mpadge mpadge left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @rkrug, and apologies again for leaving this hanging so long. With that minor improvement, it should be good to merge.

Comment thread R/tokens.R
e <- Sys.getenv("FIGSHARE_TOKEN")
}

if (e == "") {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (e == "") {
if (!nzchar (e)) {

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.

3 participants