Skip to content

Migrate from pip/pip-tools to uv#1788

Draft
Simrayz wants to merge 3 commits intomainfrom
chore/use-uv-for-environment-management
Draft

Migrate from pip/pip-tools to uv#1788
Simrayz wants to merge 3 commits intomainfrom
chore/use-uv-for-environment-management

Conversation

@Simrayz
Copy link
Contributor

@Simrayz Simrayz commented Feb 17, 2026

Scope and purpose

Fixes #1787.

Replaces pip, pip-tools, and venv with uv across CI, Docker, tox, and local dev setup.

This pull request

  • adds/changes/removes a dependency

Contributor Checklist

  • Added a changelog fragment for towncrier
  • Added/changed documentation, including updates to the user manual if feature flow or UI is considerably changed
  • Linted/formatted the code with ruff and djLint, easiest by using pre-commit
  • The first line of the commit message continues the sentence "If applied, this commit will ...", starts with a capital letter, does not end with punctuation and is 50 characters or less long. See our how-to

@Simrayz Simrayz added dependencies Run `tox -r` before testing locally, dependencies have changed DevEx documentation Improvements or additions to documentation labels Feb 17, 2026
@Simrayz Simrayz self-assigned this Feb 17, 2026
@github-actions
Copy link

github-actions bot commented Feb 17, 2026

Test results

    6 files    888 suites   1m 54s ⏱️
  697 tests   696 ✅ 1 💤 0 ❌
4 182 runs  4 176 ✅ 6 💤 0 ❌

Results for commit 5354f74.

♻️ This comment has been updated with latest results.

@Simrayz Simrayz added the nonews No news fragment is necessary for this PR (e.g. refactoring, cleanups, workflow/development changes) label Feb 17, 2026
@codecov
Copy link

codecov bot commented Feb 17, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.57%. Comparing base (8f8a393) to head (5354f74).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1788   +/-   ##
=======================================
  Coverage   82.57%   82.57%           
=======================================
  Files         137      137           
  Lines        6552     6552           
=======================================
  Hits         5410     5410           
  Misses       1142     1142           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Simrayz Simrayz force-pushed the chore/use-uv-for-environment-management branch from a4172e5 to 66a9689 Compare February 17, 2026 11:44
@Simrayz Simrayz removed the nonews No news fragment is necessary for this PR (e.g. refactoring, cleanups, workflow/development changes) label Feb 17, 2026
@Simrayz Simrayz force-pushed the chore/use-uv-for-environment-management branch from 66a9689 to 421d983 Compare February 17, 2026 11:47
@Simrayz Simrayz force-pushed the chore/use-uv-for-environment-management branch from 421d983 to 5354f74 Compare February 17, 2026 11:48
@sonarqubecloud
Copy link

---------------------

To generate a secret key to be used in the `cmd.sh` file one can use
To generate a secret key to be used in the `.env` file one can use
Copy link
Contributor

@hmpf hmpf Feb 18, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How would I run with multiple sets of environment variables?

I don't use .env today, because I regularly use two different sets of environment variables, and frequently three when testing something.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair point :) My reasoning was to try to avoid creating custom "cmd.sh" script files instead of using the uv tooling. I can look into how we can support switching between different environments.

Comment on lines 59 to 73
dev = [
"django-debug-toolbar",
"coverage",
"django-extensions",
"ruff",
"djlint",
"ipython",
"pre-commit",
"pydotplus",
"python-dotenv",
"towncrier",
"unittest-xml-reporting",
"werkzeug",
"tox>=4",
"build", # for debugging builds/installs
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It will probably be possible to switch to dependency groups instead, at least for dev.

Comment on lines -174 to -175
We recommend using virtualenv or virtualenvwrapper to create
a place to stash Argus' dependencies.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will still need to be able to use virtualenvwrapper because I need to switch between different sets of dependencies...

Comment on lines +59 to +60
uv pip compile --no-strip-extras --output-file requirements-django52.txt {posargs} pyproject.toml requirements/django52.txt constraints.txt
uv pip compile --no-strip-extras --output-file requirements-django60.txt {posargs} pyproject.toml requirements/django60.txt constraints.txt
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Phew! Multiple lock-files are important, oh yes.

Comment on lines +7 to +8
The repo has a ``Makefile`` to help with development. The rules depend on having
``uv`` installed.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The repo has a ``Makefile`` to help with development. The rules depend on having
``uv`` installed.
The repo has a ``Makefile`` to help with development. Some of the rules depend on having
``uv`` installed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Run `tox -r` before testing locally, dependencies have changed DevEx documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Migrate from pip/pip-tools to uv

2 participants

Comments