Dependencies
Backend dependencies are managed with pip-tools. pip-compile (part of pip-tools) takes
*.in
files with version constraints, and outputs the entire transitive dependency
tree to *.txt
files.
The backend dependencies are layered:
requirements/base.txt
: the minimal set of packages that is needed to run Open Zaak in a production-like environmentrequirements/ci.txt
:base.txt
+ any testing/CI tools to guard the quality of Open Zaakrequirements/dev.txt
:ci.txt
+ developer tools only installed in a local environment to develop Open Zaak itself
Adding a backend dependency
Sometimes new features require new dependencies that aren’t used yet in this project.
Open
requirements/base.in
Add the dependency in the right logical group
Run
./bin/compile_dependencies.sh
Commit the three changed
requirements/*.txt
files
For CI or development dependencies you add them to requirements/test-tools.in
or
requirements/dev.in
respectively.
Upgrading a backend dependency
It happens that existing backend dependencies need to be upgraded (bugfixes, security
releases…). This is also done through ./bin/compile_dependencies.sh
. Any extra
arguments supplied are forwarded to the underlying pip-compile
calls.
Determine which package needs to be upgraded, for example Django
run
./bin/compile_dependencies.sh -P django
(substitute with appropriate package name)Commit the changed
requirements/*.txt
files
This works for base, ci and dev dependencies.
Note
You can constraint versions, such as -P django~=2.2.0
to get the latest
patch version, or -P djangorestframework<3.13
for example.