REQ - Guide for using environment variables

Open
#172 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

  • #174 by @Photon101 — closed without merging

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Documentation
Clarity
Mostly clear
Activity status
Stale
Tech stack
r
Domain
documentation

Research direction

Review the use cases in this issue and the related issue #86 before locating the repository's documentation structure. The guide should cover project or personal .Renviron files, Sys.getenv(), and when keyring or readLines() is more appropriate, with clear guidance for avoiding committed secrets. Done means the documented practices address the stated scenarios and alternatives.

Written by the indexing model from the issue text.

Description

new doc

Is your feature request related to a problem? Please describe.
Inspired by this question (and mainly @rmccreath 's response): @bevthewitch - Can PHS GItHub members view a private PHS GitHub repo?.

The issue of mostly shareable code containing small bits of confi / potentially confi info, e.g. an API key.

Describe what you'd like
A guide explaining and setting best practice for storing and using environment variables, e.g. using the .Renviron (project or personal as required), and Sys.getenv() to retrieve sensitive info at execution without having it verbatim in code and therefore commitable by version control.

Describe alternatives you've considered
Environment variables are a good solution, in certain cases, {keyring} may be better as it also provides encryption. Similarly, saving a text file to disk and using readLines() might also be appropriate for data that needs to be used by a few PHS staff.

Additional context
Somewhat related to #86 but has a different set of usecases.

Dominant language
No language data
Stars
7
Forks
5
Avg merge
20h 45m
Merged PRs (30d)
2

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Public-Health-Scotland/technical-docs

All issues in Public-Health-Scotland/technical-docs

Similar issues

More Documentation issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.