Skip to content

Commit bf8009a

Browse files
feanilclaude
andcommitted
feat: update Makefile to use uv lock/sync
Replaces pip-compile targets with uv equivalents: - compile-requirements: runs uv lock (generates lockfile without upgrading) - upgrade: writes constraints via edx_lint write_uv_constraints first, then runs uv lock --upgrade - requirements: runs uv sync --group dev (installs project in editable mode automatically, no separate pip install -e . needed) Removes PIP_COMPILE variable, piptools target, and all pip-sync usage. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 7928bc5 commit bf8009a

1 file changed

Lines changed: 8 additions & 26 deletions

File tree

backend/Makefile

Lines changed: 8 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -32,39 +32,21 @@ docs: ## generate Sphinx HTML documentation, including API docs
3232
tox -e docs
3333
$(BROWSER)docs/_build/html/index.html
3434

35-
# Define PIP_COMPILE_OPTS=-v to get more information during make upgrade.
36-
PIP_COMPILE = pip-compile $(PIP_COMPILE_OPTS)
37-
38-
compile-requirements: export CUSTOM_COMPILE_COMMAND=make upgrade
39-
compile-requirements: piptools ## compile the requirements/*.txt files with the latest packages satisfying requirements/*.in
40-
pip-compile -v ${PIP_COMPILE_OPTS} --allow-unsafe --rebuild -o requirements/pip-tools.txt requirements/pip-tools.in
41-
pip install -qr requirements/pip-tools.txt
42-
$(PIP_COMPILE) -c requirements/constraints.txt -o requirements/base.txt requirements/base.in
43-
$(PIP_COMPILE) -o requirements/test.txt requirements/test.in
44-
$(PIP_COMPILE) -o requirements/doc.txt requirements/doc.in
45-
$(PIP_COMPILE) -o requirements/quality.txt requirements/quality.in
46-
$(PIP_COMPILE) -o requirements/ci.txt requirements/ci.in
47-
$(PIP_COMPILE) -o requirements/dev.txt requirements/dev.in
48-
# Let tox control the Django version for tests
49-
sed '/^[dD]jango==/d' requirements/test.txt > requirements/test.tmp
50-
mv requirements/test.tmp requirements/test.txt
51-
52-
upgrade: piptools ## update the requirements/*.txt files with the latest packages satisfying requirements/*.in
53-
$(MAKE) compile-requirements PIP_COMPILE_OPTS="--upgrade"
35+
compile-requirements: ## generate the uv.lock file without upgrading packages
36+
uv lock
37+
38+
upgrade: ## upgrade all packages in uv.lock and sync constraints from edx-lint
39+
uv run --with edx-lint edx_lint write_uv_constraints pyproject.toml
40+
uv lock --upgrade
5441

5542
quality: ## check coding style with pycodestyle and pylint
5643
tox -e quality
5744

5845
pii_check: ## check for PII annotations on all Django models
5946
tox -e pii_check
6047

61-
piptools: ## install pinned version of pip-compile and pip-sync
62-
# pip install -r requirements/pip-tools.txt
63-
64-
requirements: clean_tox piptools ## install development environment requirements
65-
pip-sync -q requirements/dev.txt requirements/private.*
66-
# So that the plugin entrypoints are installed and loaded correctly.
67-
pip install -e .
48+
requirements: clean_tox ## install development environment requirements
49+
uv sync --group dev
6850

6951
test: clean ## run tests in the current virtualenv
7052
pytest

0 commit comments

Comments
 (0)