Update freeze-requirements command for parity with admin and API - #447
Merged
Conversation
We compile 2 different requirements files: - `requirements.txt` - `requirements_for_test.txt` In order to know how to resolve dependencies when compiling these files we need to look at `uv.toml`, which is copied from utils. In order to get utils we: 1. compiled `requirements.in` into `requirements.txt` 2. installed the dependencies (including utils) from `requirements.txt` This means that at step 1 we were using whatever version of `uv.toml` was in the working dir. We then go on to compile `requirements_for_test.txt` with (potentially) a different version of `uv.toml`. This commit makes it so that installing the specified version of utils is the first step, before doing any compiling.
It produces a lot of output which fills the terminal. Often I want to do `make bump-utils freeze-requirements` but have to do a lot of scrolling back to see the useful output of `bump-utils`. Running `uv pip sync` also produces some output about which packages have changed, so I don’t think we need similar output from the `compile` command. Doing this now while I’m going through each `Makefile`.
This is controlled by `uv.toml` now: https://github.com/alphagov/document-download-api/blob/2841cf593153564e3cfa98e51fde429855549513/uv.toml#L3 Having it in here sometimes adds it to the flags the command is called with: https://github.com/alphagov/notifications-admin/blob/361cae1084526ce3485ed9fc4b0ef120690d1c2f/requirements.txt#L2 And when this is removed it causes confusion: alphagov/notifications-template-preview#994 (review) So lets not have it in the flags.
kr8n3r
approved these changes
Aug 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See individual commits for details