fourfront
fourfront copied to clipboard
Manage development.ini and test.ini outside of source control
This PR is conceptually identical to cgap-portal PR 637 but with the fix already incorporated that we later ended up needing as cgap-portal PR 642.
This change is intended only to affect developers who are doing local testing (e.g., make test
or a call to pytest
) that would use test.ini
or who are doing local deploys (e.g., make deploy1
) that would use development.ini
.
This is technically a breaking change, in that it may affect developer scripts, but this should not affect production builds or GA, so we've agreed to only bump the minor version, not the major version. Nevertheless, you should report problems in production, GA, or docker management if you see them.**
Prior to this change, development.ini
and test.ini
were in source control. This PR changes this so that what's in source control is development.ini.template
and test.ini.template
. There is a command introduced, prepare-local-dev
that you can run to create a development.ini
and test.ini
. Once the file exists, the prepare-local-dev
command will not touch it, so you can do other edits as well without concern that they will get checked in. The primary change that this command does is to make a local environment of fourfront-devlocal-<yourusername>
or fourfront-test-<yourusername>
so that testing and debugging that you do locally will be in an environment that does not collide with other users. You can give a --env
argument to prepare-local-dev
to use a different name, though it's probably easier to just edit the resulting file.
Note to reviewers (especially @willronchetti): The test.ini
case is a little weird because some things in that file are ignored. We might want to make it so that conftest_settings.py
somehow pulls data from there or is consistent with there or figure out why they diverge and how to describe when to use one or the other.