Closed johnbaldwin closed 2 years ago
Issue #1 pytest failes because devsite/devsite/.env does not exist
devsite/devsite/.env
Running pytest fails with the following:
$ pytest /home/jbaldwin/.pyenv/versions/3.5.10/envs/figpy35/lib/python3.5/site-packages/environ/environ.py:630: UserWarning: /home/jbaldwin/work/appsembler/ws/figures/devsite/devsite/.env doesn't exist - if you're not configuring your environment separately, create one. "environment separately, create one." % env_file)
Tox does work. Tox calling pytest works because tox defines environment variables that the devsite settings file expects. These enviroment var
The package used is here: https://github.com/joke2k/django-environ
It is unfortunate that the package seems to not be actively maintained. However, we use it only for Figures devsite and not in production.
Issue #2: There is not a default Open edX release defined. This can be seen if one creates an empty devsite/devsite/.env file.
The .env file loads environment variables that are then read in the devsite settings.py and test_settings.py files
.env
settings.py
test_settings.py
There are options to fix this (here are just some):
test.env
django-environ
TODO: dig into the options and choose
I believe I fixed this with https://github.com/appsembler/figures/pull/443 (it works on my computer ;))
Issue #1 pytest failes because
devsite/devsite/.env
does not existRunning pytest fails with the following:
Tox does work. Tox calling pytest works because tox defines environment variables that the devsite settings file expects. These enviroment var
The package used is here: https://github.com/joke2k/django-environ
It is unfortunate that the package seems to not be actively maintained. However, we use it only for Figures devsite and not in production.
Issue #2: There is not a default Open edX release defined. This can be seen if one creates an empty
devsite/devsite/.env
file.The
.env
file loads environment variables that are then read in the devsitesettings.py
andtest_settings.py
filesThere are options to fix this (here are just some):
.env
file with a default Open edX releasetest_settings.py
, use atest.env
filedjango-environ
and implement an alternate strategy for setting environment variablesTODO: dig into the options and choose