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

feat(R client): read from DELPHI_EPIDATA_KEY #1232

Closed
wants to merge 1 commit into from
Closed

Conversation

dshemetov
Copy link
Contributor

This should make CI integrations easier, by allowing us to set the env var to a secret. Also mimics behavior in epidatr.

Summary:

  • read API key from DELPHI_EPIDATA_KEY env var by default, else None
    • don't disturb the existing read from "epidata.auth" R option

Prerequisites:

  • Unless it is a documentation hotfix it should be merged against the dev branch
  • Branch is up-to-date with the branch to be merged with, i.e. dev
  • Build is successful
  • Code is cleaned up and formatted

@dshemetov dshemetov requested a review from krivard July 11, 2023 23:01
@sonarcloud
Copy link

sonarcloud bot commented Jul 11, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@krivard krivard requested a review from melange396 July 11, 2023 23:04
Copy link
Contributor

@krivard krivard left a comment

Choose a reason for hiding this comment

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

👍 seems fine but I want george's thoughts too

if we keep it, please update the corresponding docs

@dshemetov dshemetov changed the base branch from dev to ds/auth July 11, 2023 23:22
@melange396
Copy link
Collaborator

(note: im not really at all familiar with R test processes/procedures, but im presuming theyre something like the tests we use with the python code in this repository)

if the motivation is to be able to provide a secret API Key for CI tests, theres no need: those tests dont use production data or services, and we can insert any old "test" key into the local test database during the pre-test setups.

if using environment variables (for secrets) is a standard paradigm for R clients and/or packages, id say go for it, but that getOption() looks like it achieves that already.

@dshemetov
Copy link
Contributor Author

dshemetov commented Jul 13, 2023

Yea, I'm just mimicking the convention of other packages - the R installers, for example, automatically pull out your GITHUB_PAT from your env vars, and so does the aws.s3 R module. And even broader than R, the aws cli does the same, so I figured this is an ⭐ "industry-standard" ⭐ thing ™️

@dshemetov
Copy link
Contributor Author

No need

@dshemetov dshemetov closed this Jul 13, 2023
@dshemetov dshemetov deleted the ds/auth2 branch July 13, 2023 21:00
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