From 69e908dd55debea39c62aa11794212b123f83f95 Mon Sep 17 00:00:00 2001 From: lwjohnst Date: Sun, 27 Sep 2026 17:26:22 +0200 Subject: [PATCH] =?UTF-8?q?chore:=20=E2=99=BB=EF=B8=8F=20add=20env=20examp?= =?UTF-8?q?le=20file?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.example | 1 + .gitignore | 1 + src/questionnaire_data/common/dotenv.py | 4 +++- 3 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 .env.example diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..d24e358 --- /dev/null +++ b/.env.example @@ -0,0 +1 @@ +REDCAP_OPEN_API_KEY= diff --git a/.gitignore b/.gitignore index eb3eac4..e182fe0 100644 --- a/.gitignore +++ b/.gitignore @@ -20,6 +20,7 @@ venv/ ENV/ env.bak/ venv.bak/ +!.env.example # Python specific content venv diff --git a/src/questionnaire_data/common/dotenv.py b/src/questionnaire_data/common/dotenv.py index 19bfc62..7bd4591 100644 --- a/src/questionnaire_data/common/dotenv.py +++ b/src/questionnaire_data/common/dotenv.py @@ -6,6 +6,8 @@ def load_env_vars() -> None: First, env vars are loaded from the shared project folder on GenomeDK. Then, they are overwritten by values from the local .env file (if this exists). + Otherwise it will use the default, though empty, `.env.example`. """ - load_dotenv("/faststorage/project/sdca-dpnext-study/env/.quest-env") + load_dotenv(".env.example") + load_dotenv("/faststorage/project/sdca-dpnext-study/env/.quest-env", override=True) load_dotenv(".env", override=True)