-
Notifications
You must be signed in to change notification settings - Fork 1.9k
chore(dev): Move from pip compile/install
to uv sync
#30572
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Summary
Overall, this PR transitions dependency management from the legacy requirements.txt system to a modern, lockfile-based approach using pyproject.toml and uv sync across development, CI, and Docker environments.
- Updated .devcontainer/Dockerfile and Dockerfile to install uv and run "uv sync" with proper flags.
- Modified multiple GitHub workflows (e.g., .github/workflows/ci-backend.yml, benchmark.yml, and ci-turbo.yml) to use "uv sync --frozen" and highlighted potential caching issues.
- Adjusted dependency guidelines in .cursor/rules/django-python.mdc to recommend "uv sync" and "uv add PACKAGE".
- Removed legacy dependency files (requirements.txt, requirements.in, requirements-dev.txt).
23 file(s) reviewed, 2 comment(s)
Edit PR Review Bot Settings | Greptile
Size Change: +6 B (0%) Total Size: 9.96 MB ℹ️ View Unchanged
|
b3d30fb
to
05e3198
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you get this working and passing tests, then you have my blessing
@@ -30,8 +30,6 @@ jobs: | |||
- uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 # v4 | |||
with: | |||
python-version: '3.8' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shall we increase this?
i guess you could argue not to change too much until we get it working but 3.8 🤯
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here the version actually doesn't matter, because it's just for running the HobbyTester Python script, and the actual deployment all happens in a remote DigitalOcean droplet
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
well, i will be happy to stop looking up the pip compile command every time i need it 😅 🚀
once CI is green we should smash this in
The two test failures are expected:
|
pip compile/install
to uv sync
Problem
requirements.txt is the barbarian's way of managing dependencies – no locking, no clear way to handle dev dependencies, while pyproject.toml is the modern (and PEP-approved) format for dependencies.
Its simplest to use with uv. The
uv sync
command does it all:.venv/
, even installing the right version of Python if it's specified with--python
.uv.lock
lockfile if anything has changed.--no-dev
.Changes
Moved all the deps into
pyproject.toml
.requirements{,-dev}.{txt,in}
are no more.Moved to
uv sync
across: Dockerfiles, Actions workflows, Flox activation.pip install
is no more.