Skip to content

Seperating setting up the token and creating the manager #172

Description

@Rafnuss

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions