diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..f10862a --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/.env diff --git a/README.md b/README.md index 196c656..e84410f 100644 --- a/README.md +++ b/README.md @@ -20,29 +20,9 @@ To install: conda activate straw2analysis ``` -2. Follow [the instructions](https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#saving-environment-variables) to set DB_PASSWORD as the environment variable. - - In short, use: - - ```shell - cd $CONDA_PREFIX - mkdir -p ./etc/conda/activate.d - mkdir -p ./etc/conda/deactivate.d - touch ./etc/conda/activate.d/env_vars.sh - touch ./etc/conda/deactivate.d/env_vars.sh - ``` - and then edit `./etc/conda/activate.d/env_vars.sh` as follows: +2. Provide an .env file to be used by `python-dotenv` which should be placed in the top folder of the application + and should have the form: - ```bash - #!/bin/sh - - export DB_PASSWORD='database-password' ``` - - and `./etc/conda/deactivate.d/env_vars.sh` as follows: - - ```bash - #!/bin/sh - - unset DB_PASSWORD + DB_PASSWORD=database-password ``` \ No newline at end of file diff --git a/config/environment.yml b/config/environment.yml index 3f3370b..5f6df2a 100644 --- a/config/environment.yml +++ b/config/environment.yml @@ -10,4 +10,4 @@ dependencies: - mypy - pre-commit - psycopg2 - - python-dotenv + - python-dotenv \ No newline at end of file