To get started contributing you need to have Docker installed. From here, you should be able to complete most things with Docker and the provided Makefile.
Just run make
to start the docker containers, install dependencies, copy the env file, and migrate the database.
If you prefer to start the project without using the Makefile
, you will need to make sure that dependencies are installed, all of the containers are running, the .env
file is present, and the database is migrated and seeded.
Use the Makefile
make test
Or
- Exec into the app container
docker-compose exec app bash
- Run pytest
pytest
I use pip-tools to help manage dependencies.
requirements.in
is the file which contains the project's base required dependencies and is the file to which you would add more dependencies.
pip-compile
will produce your requirements.txt, with all the dependencies (and all underlying dependencies) pinned.
- Add dependency to
requirements.in
echo "pytest" >> requirements.in
- Run
pip-compile
make compile
- Rebuild containers to install dependencies from the updated
requirements.txt
make build
By rebuilding, we don't have to install the new dependencies each time we start the containers and the image will be updated for the next time start the app.
- Upgrade using
pip-compile
through theMakefile
make upgrade dep=pytest
- Rebuild containers to install dependencies from the updated
requirements.txt
make build
If you need more complex updating control, exec into app container
docker-compose exec app bash
Follow pip-tools
documentation for updating requirements