Support reading env vars from .env files#59
Conversation
Codecov Report
@@ Coverage Diff @@
## master #59 +/- ##
=========================================
- Coverage 2.03% 1.79% -0.24%
=========================================
Files 3 3
Lines 638 834 +196
Branches 97 167 +70
=========================================
+ Hits 13 15 +2
- Misses 625 800 +175
- Partials 0 19 +19
Continue to review full report at Codecov.
|
| ``.env`` file. By default, environment | ||
| variables are loaded from the first file named | ||
| "``.env``" found by searching from the current | ||
| directory upwards. |
There was a problem hiding this comment.
I just setup a $PWD.env file with secrets and which I source before running...
We need a big fat warning here though -- in datalad mode or just with pure git users might commit and leak it. Conscientious of the problem user can configure .gitignore or add it to git-annex while annotating with metadata to not distribute with default datalad push or publish commands, but it should be for user to decide...
| directory upwards. | |
| directory upwards. WARNING: Placing in the same directory | |
| as output whenever output is to be committed to git must be done | |
| with care: either specify the file to be excluded in ``.gitignore`` or | |
| place it under git-annex control and set it up with all necessary | |
| provisions to avoid public sharing. |
tune to your liking
|
ok, let's proceed and be optimistic that we do not facilitate someone leaking the secrets. Might be worth adding somewhere in the docs that it is advisable to mint dedicated tokens with only Read-only permissions (or even more limited in set of queries needed to be supported) whenever possible. |
I'm tired of having to always export
APPVEYOR_TOKENwhen testing tinuous on the datalad repo. This PR allows env vars to be set via a de facto standard file.