Dependencies
Backend dependencies are managed with uv. Uv (with the current configuration) 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 Organisatie in a production-like environmentrequirements/ci.txt:base.txt+ any testing/CI tools to guard the quality of Open Organisatierequirements/dev.txt:ci.txt+ developer tools only installed in a local environment to develop Open Organisatie itself
Adding a backend dependency
Sometimes new features require new dependencies that aren’t used yet in this project.
Open
requirements/base.inAdd the dependency in the right logical group
Run
./bin/compile_dependencies.shCommit the three changed
requirements/*.txtfiles
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 --upgrade-package django(substitute with appropriate package name)Commit the changed
requirements/*.txtfiles
This works for base, ci and dev dependencies.
Note
You can constraint versions, such as --upgrade-package django~=5.4.0 to get the latest
patch version, or --upgrade-package djangorestframework<3.13 for example.