I believe that it's best practice to seperate the two to avoid hard coding and code sharing of token. Something like this would be great:
keyring::key_set_with_value(
service = "ZENODO_PAT", # Service name (matches the environment variable)
password = "<your_token>" # Replace with your actual Zenodo token
)
zenodo <- ZenodoManager$new(
token = keyring::key_get(service = "ZENODO_PAT"), # Use this as default value
logger = "INFO"
)
See https://github.com/bluegreen-labs/ecmwfr/blob/master/R/wf_set_key.R for instance.
I believe that it's best practice to seperate the two to avoid hard coding and code sharing of token. Something like this would be great:
See https://github.com/bluegreen-labs/ecmwfr/blob/master/R/wf_set_key.R for instance.