From 8d4170bd72198aa7554292e09e9f6ab6db0590f3 Mon Sep 17 00:00:00 2001 From: Josh Thomas Date: Mon, 5 Aug 2024 10:20:45 -0400 Subject: [PATCH] constrain extra requirements files to main `requirements.txt` (#280) --- CHANGELOG.md | 4 ++++ src/django_twc_project/.just/documentation.just | 2 +- src/django_twc_project/.just/python.just.jinja | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d20edcfb..d9137ed3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## [Unreleased] +### Changed + +- Add `--constraint requirements.txt` to the compiling of the two extra requirements files, to constrain the dependencies to the versions specified in the primary requirements file. + ## [2024.43] ### Fixed diff --git a/src/django_twc_project/.just/documentation.just b/src/django_twc_project/.just/documentation.just index 93d2495b..7727ef77 100644 --- a/src/django_twc_project/.just/documentation.just +++ b/src/django_twc_project/.just/documentation.just @@ -21,7 +21,7 @@ install *ARGS: # Generate documentation requirements [no-cd] lock *ARGS: - $python -m uv pip compile pyproject.toml --output-file docs/requirements.txt --generate-hashes --extra docs {{ ARGS }} + $python -m uv pip compile pyproject.toml --output-file docs/requirements.txt --generate-hashes --extra docs --constraint requirements.txt {{ ARGS }} # Serve documentation locally [no-cd] diff --git a/src/django_twc_project/.just/python.just.jinja b/src/django_twc_project/.just/python.just.jinja index cc303417..54ea25ef 100644 --- a/src/django_twc_project/.just/python.just.jinja +++ b/src/django_twc_project/.just/python.just.jinja @@ -37,7 +37,7 @@ install *ARGS: [no-cd] lock *ARGS: $python -m uv pip compile pyproject.toml --output-file requirements.txt --generate-hashes {% raw %}{{ ARGS }}{% endraw %} - $python -m uv pip compile pyproject.toml --output-file requirements.dev.txt --generate-hashes --extra dev {% raw %}{{ ARGS }}{% endraw %} + $python -m uv pip compile pyproject.toml --output-file requirements.dev.txt --generate-hashes --extra dev --constraint requirements.txt {% raw %}{{ ARGS }}{% endraw %} # Run tests using pytest within the 'app' container, with optional arguments [no-cd]