Dependencies
Dependency Policy
The mataroa project has an unusually strict yet usually unclear dependency policy.
Vague rules include:
- No third-party Django apps.
- All Python / PyPI packages should be individually vetted.
- Packages should be published from community-trusted organisations or developers.
- Packages should be actively maintained (though not necessarily actively developed).
- Packages should hold a high quality of coding practices.
- No JavaScript libraries / dependencies.
Current list of top-level PyPI dependencies (source at requirements.in):
Adding a new dependency
After approving a dependency, the process to add it is:
- Assuming a venv is activated and
requirements.dev.txt
are installed. - Add new dependency in
requirements.in
. - Run
pip-compile
to generaterequirements.txt
- Run
pip install -r requirements.txt
Upgrading dependencies
When a new Django version is out it’s a good idea to upgrade everything.
Steps:
- Assuming a venv is activated and
requirements.dev.txt
are installed. - Run
pip-compile -U
to generate an upgradedrequirements.txt
. - Run
git diff requirements.txt
and spot non-patch level vesion bumps. - Examine release notes of each one.
- Unless something comes up, make sure tests and smoke tests pass.
- Deploy new dependency versions.