experiment: use uv and dependency-groups in build pipelines#14122
Open
RonnyPfannschmidt wants to merge 2 commits into
Open
experiment: use uv and dependency-groups in build pipelines#14122RonnyPfannschmidt wants to merge 2 commits into
RonnyPfannschmidt wants to merge 2 commits into
Conversation
02b004f to
4d21d6f
Compare
d18014f to
ccefa12
Compare
This is an experimental change to modernize the build infrastructure: - Add uv.lock for reproducible dependency resolution - Migrate from optional-dependencies to dependency-groups (PEP 735) - Configure tox to use tox-uv for faster dependency installation - Update all GitHub Actions workflows to install tox-uv - Update minimum version pins to sensible modern values: - iniconfig>=2, packaging>=24, pygments>=2.15, tomli>=2 - attrs>=23.1, hypothesis>=6.75, numpy>=1.26, pytest-xdist>=3.5 - coverage>=7.5, pexpect>=4.9, pre-commit>=4 - Remove py library from dev deps (pytest vendors its own minimal version) Usage: uv sync --group dev # Install with dev dependencies uv run pytest # Run tests uvx --with tox-uv tox # Run tox with uv backend Co-authored-by: Cursor AI <ai@cursor.sh> Co-authored-by: Anthropic Claude <claude@anthropic.com>
The PEP 735 dependency group is a superset of the old optional extra and nothing in the repo references pytest[dev] anymore. Co-authored-by: Cursor AI <ai@cursor.sh> Co-authored-by: Anthropic Claude Opus 4 <claude@anthropic.com>
ccefa12 to
d2ec5d4
Compare
There was a problem hiding this comment.
Pull request overview
This PR experiments with modernizing pytest’s build/dev infrastructure by adopting uv lockfiles and PEP 735 dependency groups, and integrating tox-uv into CI to speed up environment creation and installs.
Changes:
- Add a
uv.locklockfile and define adevdependency group inpyproject.toml. - Switch tox environments to use
dependency_groups(and addtox-uv) instead of thedevextra. - Update GitHub Actions workflows to install
tox-uvalongsidetox.
Reviewed changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
uv.lock |
Adds a uv lockfile capturing resolved dependencies and markers for the repo. |
tox.ini |
Migrates tox env dependency management to dependency_groups and introduces tox-uv. |
pyproject.toml |
Updates core dependency minimums and introduces [dependency-groups].dev. |
.github/workflows/update-plugin-list.yml |
Installs tox-uv in the workflow runner before invoking tox. |
.github/workflows/test.yml |
Installs tox-uv in CI before running tox test jobs. |
.github/workflows/prepare-release-pr.yml |
Installs tox-uv before running the release-prep tox env. |
.github/workflows/doc-check-links.yml |
Installs tox-uv before running docs linkcheck via tox. |
.github/workflows/deploy.yml |
Installs tox-uv before running the release-notes tox env. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| changedir = testing/plugins_integration | ||
| dependency_groups = | ||
| deps = -rtesting/plugins_integration/requirements.txt | ||
| allowlist_externals = pip |
Comment on lines
+67
to
+86
| [dependency-groups] | ||
| dev = [ | ||
| # Core test dependencies | ||
| "argcomplete", | ||
| "asynctest; python_version<'3.11'", | ||
| "attrs>=23.1", | ||
| # Test execution and coverage | ||
| "coverage>=7.5", | ||
| "hypothesis>=6.75", | ||
| "mock", | ||
| "numpy>=1.26", | ||
| "pexpect>=4.9", | ||
| "pytest-xdist>=3.5", | ||
| # Additional test dependencies | ||
| "pyyaml", | ||
| "requests", | ||
| "setuptools", | ||
| "xmlschema", | ||
| ] | ||
|
|
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.
Experiment to modernize build infrastructure:
Usage:
uv sync --group dev && uv run pytest