pytest-uv 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (95) hide show
  1. pytest_uv-0.1.0/.claude/CLAUDE.md +10 -0
  2. pytest_uv-0.1.0/.claude/rules/agent-skills.md +29 -0
  3. pytest_uv-0.1.0/.claude/rules/envs.md +35 -0
  4. pytest_uv-0.1.0/.claude/rules/plugin-hooks.md +34 -0
  5. pytest_uv-0.1.0/.claude/rules/writing-tests.md +19 -0
  6. pytest_uv-0.1.0/.claude/skills/release/SKILL.md +43 -0
  7. pytest_uv-0.1.0/.claude/skills/review/SKILL.md +61 -0
  8. pytest_uv-0.1.0/.claude/skills/ship/SKILL.md +30 -0
  9. pytest_uv-0.1.0/.claude-plugin/marketplace.json +16 -0
  10. pytest_uv-0.1.0/.claude-plugin/plugin.json +19 -0
  11. pytest_uv-0.1.0/.codex-plugin/plugin.json +27 -0
  12. pytest_uv-0.1.0/.cursor-plugin/plugin.json +21 -0
  13. pytest_uv-0.1.0/.github/CODEOWNERS +1 -0
  14. pytest_uv-0.1.0/.github/ISSUE_TEMPLATE/bug_report.yml +47 -0
  15. pytest_uv-0.1.0/.github/ISSUE_TEMPLATE/config.yml +8 -0
  16. pytest_uv-0.1.0/.github/ISSUE_TEMPLATE/feature_request.yml +33 -0
  17. pytest_uv-0.1.0/.github/dependabot.yml +33 -0
  18. pytest_uv-0.1.0/.github/pull_request_template.md +20 -0
  19. pytest_uv-0.1.0/.github/release.yml +14 -0
  20. pytest_uv-0.1.0/.github/workflows/ci.yml +135 -0
  21. pytest_uv-0.1.0/.github/workflows/claude-review.yml +51 -0
  22. pytest_uv-0.1.0/.github/workflows/docs.yml +62 -0
  23. pytest_uv-0.1.0/.github/workflows/release.yml +92 -0
  24. pytest_uv-0.1.0/.gitignore +12 -0
  25. pytest_uv-0.1.0/.mdformat.toml +2 -0
  26. pytest_uv-0.1.0/.pre-commit-config.yaml +50 -0
  27. pytest_uv-0.1.0/AGENTS.md +146 -0
  28. pytest_uv-0.1.0/CHANGELOG.md +30 -0
  29. pytest_uv-0.1.0/CONTRIBUTING.md +73 -0
  30. pytest_uv-0.1.0/LICENSE +21 -0
  31. pytest_uv-0.1.0/Makefile +53 -0
  32. pytest_uv-0.1.0/PKG-INFO +144 -0
  33. pytest_uv-0.1.0/README.md +110 -0
  34. pytest_uv-0.1.0/REVIEW.md +62 -0
  35. pytest_uv-0.1.0/SECURITY.md +21 -0
  36. pytest_uv-0.1.0/action/versions.py +75 -0
  37. pytest_uv-0.1.0/action.yml +80 -0
  38. pytest_uv-0.1.0/context7.json +27 -0
  39. pytest_uv-0.1.0/docs/alternatives/index.md +32 -0
  40. pytest_uv-0.1.0/docs/alternatives/vs-nox.md +75 -0
  41. pytest_uv-0.1.0/docs/alternatives/vs-shell-loop.md +61 -0
  42. pytest_uv-0.1.0/docs/alternatives/vs-tox.md +78 -0
  43. pytest_uv-0.1.0/docs/alternatives/vs-xdist.md +56 -0
  44. pytest_uv-0.1.0/docs/faq.md +100 -0
  45. pytest_uv-0.1.0/docs/guide/debugging.md +79 -0
  46. pytest_uv-0.1.0/docs/guide/environments.md +125 -0
  47. pytest_uv-0.1.0/docs/guide/isolation.md +63 -0
  48. pytest_uv-0.1.0/docs/guide/version-specific-tests.md +83 -0
  49. pytest_uv-0.1.0/docs/guide/versions.md +95 -0
  50. pytest_uv-0.1.0/docs/index.md +52 -0
  51. pytest_uv-0.1.0/docs/installation.md +62 -0
  52. pytest_uv-0.1.0/docs/motivation.md +59 -0
  53. pytest_uv-0.1.0/docs/quickstart.md +179 -0
  54. pytest_uv-0.1.0/docs/recipes/agents.md +83 -0
  55. pytest_uv-0.1.0/docs/recipes/ci.md +161 -0
  56. pytest_uv-0.1.0/docs/reference/cli.md +72 -0
  57. pytest_uv-0.1.0/docs/reference/configuration.md +92 -0
  58. pytest_uv-0.1.0/examples/README.md +13 -0
  59. pytest_uv-0.1.0/examples/dependency-groups/README.md +38 -0
  60. pytest_uv-0.1.0/examples/dependency-groups/pyproject.toml +30 -0
  61. pytest_uv-0.1.0/examples/dependency-groups/src/roman/__init__.py +43 -0
  62. pytest_uv-0.1.0/examples/dependency-groups/tests/test_roman.py +24 -0
  63. pytest_uv-0.1.0/examples/dependency-groups/uv.lock +274 -0
  64. pytest_uv-0.1.0/examples/github-actions/.github/workflows/tests.yml +33 -0
  65. pytest_uv-0.1.0/examples/github-actions/README.md +25 -0
  66. pytest_uv-0.1.0/examples/minimal/README.md +34 -0
  67. pytest_uv-0.1.0/examples/minimal/pyproject.toml +21 -0
  68. pytest_uv-0.1.0/examples/minimal/src/chunks/__init__.py +24 -0
  69. pytest_uv-0.1.0/examples/minimal/tests/test_chunks.py +19 -0
  70. pytest_uv-0.1.0/examples/minimal/uv.lock +129 -0
  71. pytest_uv-0.1.0/pyproject.toml +83 -0
  72. pytest_uv-0.1.0/scripts/changelog_section.sh +8 -0
  73. pytest_uv-0.1.0/skills/pytest-uv/SKILL.md +75 -0
  74. pytest_uv-0.1.0/skills/pytest-uv-ci/SKILL.md +125 -0
  75. pytest_uv-0.1.0/skills/pytest-uv-debug/SKILL.md +115 -0
  76. pytest_uv-0.1.0/skills/pytest-uv-setup/SKILL.md +149 -0
  77. pytest_uv-0.1.0/src/pytest_uv/__init__.py +5 -0
  78. pytest_uv-0.1.0/src/pytest_uv/_lock.py +49 -0
  79. pytest_uv-0.1.0/src/pytest_uv/_version.py +24 -0
  80. pytest_uv-0.1.0/src/pytest_uv/envs.py +370 -0
  81. pytest_uv-0.1.0/src/pytest_uv/plugin.py +241 -0
  82. pytest_uv-0.1.0/src/pytest_uv/resolver.py +123 -0
  83. pytest_uv-0.1.0/tests/__init__.py +0 -0
  84. pytest_uv-0.1.0/tests/conftest.py +18 -0
  85. pytest_uv-0.1.0/tests/fixtures/sample_project/pyproject.toml +11 -0
  86. pytest_uv-0.1.0/tests/fixtures/sample_project/src/mylib/__init__.py +7 -0
  87. pytest_uv-0.1.0/tests/fixtures/sample_project/tests/test_mylib.py +16 -0
  88. pytest_uv-0.1.0/tests/fixtures/sample_project/tests/test_versions.py +38 -0
  89. pytest_uv-0.1.0/tests/test_envs.py +393 -0
  90. pytest_uv-0.1.0/tests/test_integration.py +177 -0
  91. pytest_uv-0.1.0/tests/test_plugin.py +268 -0
  92. pytest_uv-0.1.0/tests/test_resolver.py +120 -0
  93. pytest_uv-0.1.0/tests/test_smoke_multiversion.py +31 -0
  94. pytest_uv-0.1.0/uv.lock +290 -0
  95. pytest_uv-0.1.0/zensical.toml +146 -0
@@ -0,0 +1,10 @@
1
+ # Claude Code instructions
2
+
3
+ @../AGENTS.md
4
+
5
+ ## Claude-specific
6
+
7
+ - Maintainer skills live in `.claude/skills/`: `/review` before handing a branch back,
8
+ `/ship` to finish one, `/release` to prepare a release.
9
+ - Path-scoped rules in `.claude/rules/` load when you read a matching file.
10
+ - In a sibling git worktree, start Claude Code in that worktree so its rules apply.
@@ -0,0 +1,29 @@
1
+ ---
2
+ paths:
3
+ - "skills/**"
4
+ - ".claude-plugin/**"
5
+ - ".codex-plugin/**"
6
+ - ".cursor-plugin/**"
7
+ - "context7.json"
8
+ ---
9
+
10
+ # Agent Skills and plugin manifests
11
+
12
+ `skills/<name>/SKILL.md` are the Agent Skills users install with
13
+ `/plugin marketplace add jirikuncar/pytest-uv` and `/plugin install pytest-uv@pytest-uv`
14
+ (Claude Code), or through `.codex-plugin/` and `.cursor-plugin/`.
15
+
16
+ - Frontmatter holds only `name` and `description` (the Agent Skills spec fields), so the
17
+ skills also load outside Claude Code. `name` equals the directory name.
18
+ - The `description` says what the skill does and when to use it, with the words a user
19
+ would type; it is all an agent sees before loading the skill.
20
+ - Commands are complete and copy-pasteable, and match the current CLI, config keys and
21
+ error messages in `src/pytest_uv/`. A behaviour change updates the skills in the same
22
+ commit.
23
+ - The four manifests and `context7.json` describe the same plugin. `version` appears
24
+ in each `plugin.json` (not in the marketplace entry) and equals the release tag
25
+ without `v`; bump them together (`.claude/skills/release`).
26
+ - `context7.json` `rules` are short facts for agents using pytest-uv, not instructions
27
+ about this repository.
28
+ - Validate after editing: `claude plugin validate --strict .` and
29
+ `python -m json.tool <file>` for each JSON file.
@@ -0,0 +1,35 @@
1
+ ---
2
+ paths:
3
+ - "src/pytest_uv/envs.py"
4
+ - "src/pytest_uv/resolver.py"
5
+ - "tests/test_envs.py"
6
+ - "tests/test_resolver.py"
7
+ ---
8
+
9
+ # Building venvs and calling uv
10
+
11
+ Check every uv flag against `uv <command> --help` of the uv version CI uses; uv
12
+ renames and removes flags between minor releases.
13
+
14
+ - Project `.venv` is off limits. Every venv starts with
15
+ `uv venv --clear --python <ver> <venv>`. Lockfile:
16
+ `UV_PROJECT_ENVIRONMENT=<venv> uv sync --frozen --python <ver> <sync-args>`, with the
17
+ variable passed in `env=` of that subprocess only, never `os.environ`, and
18
+ `VIRTUAL_ENV` removed from that env. No lockfile:
19
+ `uv pip install --python <venv python> <install-args>`.
20
+ - A probe (`<venv python> -I -c ...`) records the full version, `sys.path` and which of
21
+ pytest, xdist and pytest_uv are missing; only missing ones are installed, so a
22
+ project's own pinned versions win.
23
+ - All paths come from `config.rootpath`: `pyproject.toml`, `uv.lock`, `venv-dir`.
24
+ - Capture uv's stdout and stderr. On a non-zero exit raise `pytest.UsageError` with the
25
+ command and uv's stderr; with `-v`, stream the output instead of capturing it.
26
+ - Stamp file `.pytest-uv-stamp` in each venv: JSON with `fingerprint`, the full Python
27
+ version and `sys_path`. Add any new input that changes the installed packages to the
28
+ fingerprint, with a test that the venv rebuilds when it changes.
29
+ - Versions are prepared in parallel (one thread each); each venv takes
30
+ `<venv-dir>/.py<version>.lock` before its stamp is read or the venv built, so two
31
+ pytest runs on the same tree don't race. The stamp is written last.
32
+ - Resolver `auto`: `uv python list --only-installed --output-format json`, CPython
33
+ final releases only (no free-threaded, no pre-release), filtered by `requires-python`.
34
+ - Unit tests mock `subprocess.run` and assert on the exact argv and `env`; real uv
35
+ calls go in `integration` tests under `timeout`.
@@ -0,0 +1,34 @@
1
+ ---
2
+ paths:
3
+ - "src/pytest_uv/plugin.py"
4
+ - "tests/test_plugin.py"
5
+ ---
6
+
7
+ # Plugin hooks and xdist
8
+
9
+ pytest-uv drives xdist through options, not its internals. Read the xdist source for
10
+ the installed version (`.venv/lib/python*/site-packages/xdist/`) before changing how
11
+ the two interact; don't rely on memory.
12
+
13
+ - Hook order: xdist's `pytest_cmdline_main` runs before any `pytest_configure`, and its
14
+ `pytest_configure` is `trylast`. Ours is `tryfirst` and sets `config.option.tx` and
15
+ `config.option.dist = "each"` before xdist reads them.
16
+ - With `--python-versions`, `-n`/`--numprocesses` (except `-n 0`), `--tx`, `--pdb`, a
17
+ `--dist` other than `each`, and a disabled xdist raise `pytest.UsageError`. The
18
+ message starts with `pytest-uv:`, names the option and says what to do instead.
19
+ - `--collect-only` resolves versions but builds no venvs.
20
+ - The first statement of `pytest_configure` is the worker guard
21
+ (`hasattr(config, "workerinput")`). Every hook that should run on the controller only
22
+ needs the same guard.
23
+ - Worker data travels through `workerinput` (set in `pytest_configure_node`), which
24
+ must stay JSON-serialisable (execnet): strings, numbers, lists, dicts.
25
+ - Worker isolation rewrites `xdist.workermanage._sys_path` in place per node in
26
+ `pytest_configure_node` (controller script dir and `PYTHONPATH` entries, then the
27
+ venv's recorded `sys_path`) and restores it in `pytest_unconfigure`. It relies on a
28
+ private xdist name: a new xdist release must be checked against it. Any change here
29
+ needs the integration test that imports a third-party module on each worker and
30
+ checks it resolves under that worker's `sys.prefix`.
31
+ - The `python_version` fixture returns `"3.13"` on a pytest-uv worker and `None`
32
+ otherwise; the report header lists the versions on the controller only.
33
+ - `--pdb` stays incompatible: xdist rejects it in distribution mode. Point users at
34
+ running the venv's interpreter directly (`skills/pytest-uv-debug`).
@@ -0,0 +1,19 @@
1
+ ---
2
+ paths:
3
+ - "tests/**"
4
+ ---
5
+
6
+ # Writing tests
7
+
8
+ - Unit tests (no marker) mock subprocesses and run in well under a second in total.
9
+ Anything that runs `uv` or starts workers is `@pytest.mark.integration`.
10
+ - Integration tests copy `tests/fixtures/sample_project/` to `tmp_path` and run pytest
11
+ there in a subprocess, under a timeout, with `--python-versions` limited to versions
12
+ CI installs (see `.github/workflows/`).
13
+ - To call `pytest_configure` with a mock config, delete `workerinput` from the
14
+ `MagicMock` first, or the worker guard returns early and the test passes vacuously.
15
+ - A test must not depend on another having run, on the working directory or on
16
+ environment variables; use `tmp_path` and `monkeypatch`.
17
+ - Assert on behaviour users see (argv passed to uv, the `UsageError` message, the tx
18
+ specs, test outcomes per worker), not on private helpers' return values.
19
+ - No `time.sleep`, no skipped or xfailed test to get CI green.
@@ -0,0 +1,43 @@
1
+ ---
2
+ name: release
3
+ description: Prepare the next pytest-uv release - pick the version, bump the plugin manifests, draft release notes from the commits since the last tag. Never tags or publishes.
4
+ disable-model-invocation: true
5
+ ---
6
+
7
+ # Prepare a release
8
+
9
+ The package version comes from the git tag (hatch-vcs). Pushing a `v*` tag runs
10
+ `.github/workflows/release.yml`, which tests, builds, publishes to PyPI through trusted
11
+ publishing and creates the GitHub release.
12
+
13
+ 1. Last tag and what changed since:
14
+ ```bash
15
+ git fetch --tags origin
16
+ last=$(git describe --tags --abbrev=0 2>/dev/null || git rev-list --max-parents=0 HEAD)
17
+ git log --oneline "$last"..origin/main
18
+ ```
19
+ 1. Version: before 1.0, a breaking change (removed option, changed default, new error
20
+ for a previously accepted command) bumps the minor version, anything else the patch.
21
+ Ask when unclear.
22
+ 1. Bump the manifests to `X.Y.Z` and check they agree:
23
+ ```bash
24
+ uv run python -c 'import json, sys
25
+ for path in sys.argv[2:]:
26
+ data = json.load(open(path))
27
+ data["version"] = sys.argv[1]
28
+ open(path, "w").write(json.dumps(data, indent=2) + "\n")
29
+ ' X.Y.Z .claude-plugin/plugin.json .codex-plugin/plugin.json .cursor-plugin/plugin.json
30
+ grep -h '"version"' .claude-plugin/plugin.json .codex-plugin/plugin.json .cursor-plugin/plugin.json
31
+ claude plugin validate --strict .
32
+ ```
33
+ Add the previous tag to `previousVersions` in `context7.json`.
34
+ 1. Check that `skills/`, `docs/` and `context7.json` rules still match the CLI and
35
+ config keys in `src/pytest_uv/`.
36
+ 1. Add a `## [X.Y.Z] - YYYY-MM-DD` section and its link to `CHANGELOG.md`: highlights,
37
+ breaking changes with the migration, features, fixes. Leave out CI, test and
38
+ dependency-only commits. The release workflow publishes that section as the GitHub
39
+ release notes (`scripts/changelog_section.sh X.Y.Z`).
40
+ 1. Commit the bump on a branch, run the unit tests and pre-commit on the changed files,
41
+ and hand over. The maintainer tags (`git tag vX.Y.Z && git push origin vX.Y.Z`).
42
+
43
+ Never create or push a tag, publish to PyPI, or create a GitHub release yourself.
@@ -0,0 +1,61 @@
1
+ ---
2
+ name: review
3
+ description: Review a pytest-uv branch, diff or pull request for correctness against REVIEW.md and the AGENTS.md invariants. Use for self-review before handing work back, or when asked to review a branch or PR.
4
+ ---
5
+
6
+ # Review a pytest-uv branch
7
+
8
+ Review as someone who did not write the change: start from the branch name, not the
9
+ author's summary.
10
+
11
+ ## 1. Scope
12
+
13
+ ```bash
14
+ git fetch origin main
15
+ base=$(git merge-base origin/main HEAD)
16
+ git log --oneline "$base"..HEAD
17
+ git diff --stat "$base"
18
+ git status --short
19
+ ```
20
+
21
+ Read [REVIEW.md](../../../REVIEW.md) and the invariants in
22
+ [AGENTS.md](../../../AGENTS.md). Flag files that don't belong in the diff
23
+ (`.pytest-uv/`, `dist/`, lockfile churn unrelated to the change).
24
+
25
+ ## 2. Read
26
+
27
+ Read each changed function whole, with its callers, and the same code at `$base`. For
28
+ `plugin.py` changes, read the xdist hooks they interact with in
29
+ `.venv/lib/python*/site-packages/xdist/`. For `envs.py`, check each uv flag against
30
+ `uv <command> --help`.
31
+
32
+ ## 3. Try to break it
33
+
34
+ For every REVIEW.md item that applies, write the input that would break the change and
35
+ run it. Scratch projects go in a temp dir, never in the repo.
36
+
37
+ ```bash
38
+ uv run pytest tests/test_envs.py -k <name>
39
+ timeout 60 uv run pytest tests/test_smoke_multiversion.py --python-versions=3.12,3.13 -v
40
+ cp -r tests/fixtures/sample_project /tmp/review-sample && cd /tmp/review-sample && \
41
+ timeout 300 uv run --project <repo> pytest --python-versions 3.12,3.13 -v
42
+ ```
43
+
44
+ Useful inputs: a project with and without `uv.lock`; running from a subdirectory; a
45
+ stale `.pytest-uv/` from the previous release; `-n 2` and `--dist load` in `addopts`;
46
+ a version uv doesn't have installed; two pytest runs at once on the same tree.
47
+
48
+ Check claims in commit messages ("no behaviour change", timings) against what you ran.
49
+
50
+ ## 4. Report
51
+
52
+ Don't edit the branch. Findings, most severe first:
53
+
54
+ ```text
55
+ Important | Nit | Unverified path:line one-sentence defect
56
+ Input: the project, config or command
57
+ Got: what happens Expected: what should
58
+ Fix: the smallest change
59
+ ```
60
+
61
+ End with one line on what you checked and found fine.
@@ -0,0 +1,30 @@
1
+ ---
2
+ name: ship
3
+ description: Finish a pytest-uv branch - merge the latest main, run the affected tests and pre-commit on changed files, self-review with a separate agent, then fast-forward main. Opens a pull request only when called with `pr`.
4
+ disable-model-invocation: true
5
+ ---
6
+
7
+ # Ship a branch
8
+
9
+ Argument `pr`: open a pull request instead of pushing to main.
10
+
11
+ 1. **Sync.** `git fetch origin main`, then `git merge origin/main`. Never rebase a
12
+ pushed branch, never force push.
13
+ 1. **Test.** Only what the diff affects: the unit tests for each changed module, and
14
+ for changes under `src/` the smoke test
15
+ (`timeout 60 uv run pytest tests/test_smoke_multiversion.py --python-versions=3.12,3.13 -v`).
16
+ Run the integration test that covers the change if there is one.
17
+ 1. **Lint.** `uv run pre-commit run --files $(git diff --name-only origin/main...HEAD)`.
18
+ 1. **Docs.** User-visible change: `docs/` and the matching `skills/*/SKILL.md` are
19
+ updated; AGENTS.md if an invariant or command changed.
20
+ 1. **Review.** Start a separate agent with the branch name and the
21
+ [`review` skill](../review/SKILL.md) only. Fix every Important finding; list skipped
22
+ ones with a reason.
23
+ 1. **Push.** Stage named paths, check `git status`, commit, then
24
+ `git push origin HEAD:main`. The push must fast-forward; if it is rejected, main
25
+ moved: go back to step 1.
26
+ 1. **PR** (only with `pr`): `git push -u origin <branch>` and `gh pr create`; disclose the
27
+ agent in the description.
28
+
29
+ Report: commit, what main brought in, tests run, review findings fixed and skipped,
30
+ and the pushed SHA or PR link.
@@ -0,0 +1,16 @@
1
+ {
2
+ "name": "pytest-uv",
3
+ "owner": {
4
+ "name": "Jiri Kuncar",
5
+ "email": "jiri.kuncar@gmail.com"
6
+ },
7
+ "description": "Agent Skills for pytest-uv: run a pytest suite on several Python versions with uv and pytest-xdist, set it up in a project and in CI, and debug version-specific failures.",
8
+ "plugins": [
9
+ {
10
+ "name": "pytest-uv",
11
+ "source": "./",
12
+ "description": "Agent Skills for pytest-uv: run a pytest suite on several Python versions with uv and pytest-xdist, set it up in a project and in CI, and debug version-specific failures.",
13
+ "category": "testing"
14
+ }
15
+ ]
16
+ }
@@ -0,0 +1,19 @@
1
+ {
2
+ "name": "pytest-uv",
3
+ "version": "0.1.0",
4
+ "description": "Agent Skills for pytest-uv: run a pytest suite on several Python versions with uv and pytest-xdist, set it up in a project and in CI, and debug version-specific failures.",
5
+ "author": {
6
+ "name": "Jiri Kuncar",
7
+ "email": "jiri.kuncar@gmail.com"
8
+ },
9
+ "homepage": "https://jirikuncar.github.io/pytest-uv/",
10
+ "repository": "https://github.com/jirikuncar/pytest-uv",
11
+ "license": "MIT",
12
+ "keywords": [
13
+ "pytest",
14
+ "uv",
15
+ "python",
16
+ "testing",
17
+ "pytest-xdist"
18
+ ]
19
+ }
@@ -0,0 +1,27 @@
1
+ {
2
+ "name": "pytest-uv",
3
+ "version": "0.1.0",
4
+ "description": "Agent Skills for pytest-uv: run a pytest suite on several Python versions with uv and pytest-xdist, set it up in a project and in CI, and debug version-specific failures.",
5
+ "author": {
6
+ "name": "Jiri Kuncar",
7
+ "email": "jiri.kuncar@gmail.com"
8
+ },
9
+ "homepage": "https://jirikuncar.github.io/pytest-uv/",
10
+ "repository": "https://github.com/jirikuncar/pytest-uv",
11
+ "license": "MIT",
12
+ "keywords": [
13
+ "pytest",
14
+ "uv",
15
+ "python",
16
+ "testing",
17
+ "pytest-xdist"
18
+ ],
19
+ "skills": "./skills/",
20
+ "interface": {
21
+ "displayName": "pytest-uv",
22
+ "shortDescription": "Run pytest on several Python versions with uv",
23
+ "developerName": "Jiri Kuncar",
24
+ "category": "Coding",
25
+ "websiteURL": "https://jirikuncar.github.io/pytest-uv/"
26
+ }
27
+ }
@@ -0,0 +1,21 @@
1
+ {
2
+ "name": "pytest-uv",
3
+ "version": "0.1.0",
4
+ "description": "Agent Skills for pytest-uv: run a pytest suite on several Python versions with uv and pytest-xdist, set it up in a project and in CI, and debug version-specific failures.",
5
+ "author": {
6
+ "name": "Jiri Kuncar",
7
+ "email": "jiri.kuncar@gmail.com"
8
+ },
9
+ "homepage": "https://jirikuncar.github.io/pytest-uv/",
10
+ "repository": "https://github.com/jirikuncar/pytest-uv",
11
+ "license": "MIT",
12
+ "keywords": [
13
+ "pytest",
14
+ "uv",
15
+ "python",
16
+ "testing",
17
+ "pytest-xdist"
18
+ ],
19
+ "displayName": "pytest-uv",
20
+ "skills": "./skills/"
21
+ }
@@ -0,0 +1 @@
1
+ * @jirikuncar
@@ -0,0 +1,47 @@
1
+ name: Bug report
2
+ description: pytest-uv fails to prepare an environment, runs tests on the wrong Python, or crashes.
3
+ labels: [bug]
4
+ body:
5
+ - type: textarea
6
+ id: description
7
+ attributes:
8
+ label: Description
9
+ description: What happened and what you expected instead.
10
+ validations:
11
+ required: true
12
+ - type: textarea
13
+ id: reproduction
14
+ attributes:
15
+ label: Reproduction
16
+ description: The command you ran, your `[tool.pytest-uv]` config, and whether the project has a `uv.lock`.
17
+ render: markdown
18
+ validations:
19
+ required: true
20
+ - type: textarea
21
+ id: output
22
+ attributes:
23
+ label: Output
24
+ description: Full pytest output, run with `-v`.
25
+ render: text
26
+ - type: input
27
+ id: versions
28
+ attributes:
29
+ label: Versions
30
+ description: Output of `uv --version` and `uv run pytest --version`, and the pytest-uv and pytest-xdist versions.
31
+ validations:
32
+ required: true
33
+ - type: input
34
+ id: environment
35
+ attributes:
36
+ label: Environment
37
+ description: OS and the Python versions you passed to `--python-versions`.
38
+ - type: dropdown
39
+ id: ai
40
+ attributes:
41
+ label: AI disclosure
42
+ description: Was this report written with an AI tool? See CONTRIBUTING.md.
43
+ options:
44
+ - "No"
45
+ - "Yes, and I verified the reproduction myself"
46
+ validations:
47
+ required: true
@@ -0,0 +1,8 @@
1
+ blank_issues_enabled: false
2
+ contact_links:
3
+ - name: Security vulnerability
4
+ url: https://github.com/jirikuncar/pytest-uv/security/advisories/new
5
+ about: Report vulnerabilities privately, not as issues.
6
+ - name: Documentation
7
+ url: https://jirikuncar.github.io/pytest-uv/
8
+ about: Usage and configuration.
@@ -0,0 +1,33 @@
1
+ name: Feature request
2
+ description: Suggest a new option, configuration key or integration.
3
+ labels: [enhancement]
4
+ body:
5
+ - type: textarea
6
+ id: problem
7
+ attributes:
8
+ label: Problem
9
+ description: What you are trying to do and why pytest-uv does not support it today.
10
+ validations:
11
+ required: true
12
+ - type: textarea
13
+ id: proposal
14
+ attributes:
15
+ label: Proposal
16
+ description: Desired behavior, with the command line or `[tool.pytest-uv]` config you would use.
17
+ validations:
18
+ required: true
19
+ - type: textarea
20
+ id: alternatives
21
+ attributes:
22
+ label: Alternatives
23
+ description: Workarounds or other designs you considered.
24
+ - type: dropdown
25
+ id: ai
26
+ attributes:
27
+ label: AI disclosure
28
+ description: Was this request written with an AI tool? See CONTRIBUTING.md.
29
+ options:
30
+ - "No"
31
+ - "Yes, and I reviewed it myself"
32
+ validations:
33
+ required: true
@@ -0,0 +1,33 @@
1
+ version: 2
2
+
3
+ updates:
4
+ - package-ecosystem: github-actions
5
+ directory: /
6
+ schedule:
7
+ interval: weekly
8
+ cooldown:
9
+ default-days: 7
10
+ groups:
11
+ github-actions:
12
+ patterns: ["*"]
13
+
14
+ - package-ecosystem: uv
15
+ directory: /
16
+ schedule:
17
+ interval: weekly
18
+ cooldown:
19
+ default-days: 7
20
+ groups:
21
+ python:
22
+ patterns: ["*"]
23
+ update-types: [minor, patch]
24
+
25
+ - package-ecosystem: pre-commit
26
+ directory: /
27
+ schedule:
28
+ interval: weekly
29
+ cooldown:
30
+ default-days: 7
31
+ groups:
32
+ pre-commit:
33
+ patterns: ["*"]
@@ -0,0 +1,20 @@
1
+ ## Summary
2
+
3
+ <!-- What changed and why. Link the issue: Fixes #123 -->
4
+
5
+ ## Tests
6
+
7
+ <!-- Unit or integration tests added or updated; how you verified the change. -->
8
+
9
+ ## AI disclosure
10
+
11
+ <!-- See CONTRIBUTING.md#ai-assisted-contributions. -->
12
+
13
+ - [ ] No AI assistance beyond single-line autocomplete
14
+ - [ ] AI-assisted: <!-- tool and what it was used for -->
15
+
16
+ ## Checklist
17
+
18
+ - [ ] `make lint` passes
19
+ - [ ] `make test` passes, and `make test-integration` if `src/` changed
20
+ - [ ] User-visible changes are documented in `docs/`
@@ -0,0 +1,14 @@
1
+ changelog:
2
+ categories:
3
+ - title: Breaking changes
4
+ labels: [breaking]
5
+ - title: Features
6
+ labels: [enhancement]
7
+ - title: Bug fixes
8
+ labels: [bug]
9
+ - title: Documentation
10
+ labels: [documentation]
11
+ - title: Dependencies
12
+ labels: [dependencies]
13
+ - title: Other changes
14
+ labels: ["*"]
@@ -0,0 +1,135 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ workflow_call:
8
+ workflow_dispatch:
9
+
10
+ permissions:
11
+ contents: read
12
+
13
+ concurrency:
14
+ group: ci-${{ github.event_name == 'pull_request' && github.ref || github.run_id }}
15
+ cancel-in-progress: ${{ github.event_name == 'pull_request' }}
16
+
17
+ jobs:
18
+ lint:
19
+ name: Lint
20
+ runs-on: ubuntu-latest
21
+ timeout-minutes: 10
22
+ steps:
23
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
24
+ with:
25
+ persist-credentials: false
26
+ - uses: astral-sh/setup-uv@36300bab3f61b84e19f32b6bd26b7897f3c7e951 # v10.4.2
27
+ - run: uv sync --locked
28
+ - run: uv run pre-commit run --all-files --show-diff-on-failure
29
+
30
+ # Dogfoods the repository's own action: one job runs every supported version.
31
+ unit:
32
+ name: Unit (all supported Pythons)
33
+ runs-on: ubuntu-latest
34
+ timeout-minutes: 15
35
+ steps:
36
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
37
+ with:
38
+ persist-credentials: false
39
+ - uses: ./ # zizmor: ignore[self-repository] root action: the $/ form for the repository root is undocumented
40
+ with:
41
+ python-versions: auto
42
+ pytest-args: -m "not integration" -v
43
+
44
+ action:
45
+ name: Action (${{ matrix.os }})
46
+ runs-on: ${{ matrix.os }}
47
+ timeout-minutes: 15
48
+ strategy:
49
+ fail-fast: false
50
+ matrix:
51
+ os: [ubuntu-latest, macos-latest]
52
+ steps:
53
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
54
+ with:
55
+ persist-credentials: false
56
+ - id: example
57
+ uses: ./ # zizmor: ignore[self-repository]
58
+ with:
59
+ working-directory: examples/minimal
60
+ pytest-args: -v
61
+ - name: Check the resolved versions
62
+ shell: bash
63
+ env:
64
+ VERSIONS: ${{ steps.example.outputs.python-versions }}
65
+ run: test -n "$VERSIONS" && echo "$VERSIONS"
66
+
67
+ integration:
68
+ name: Integration (${{ matrix.os }})
69
+ runs-on: ${{ matrix.os }}
70
+ timeout-minutes: 15
71
+ strategy:
72
+ fail-fast: false
73
+ matrix:
74
+ os: [ubuntu-latest, macos-latest]
75
+ defaults:
76
+ run:
77
+ shell: bash
78
+ steps:
79
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
80
+ with:
81
+ persist-credentials: false
82
+ - uses: astral-sh/setup-uv@36300bab3f61b84e19f32b6bd26b7897f3c7e951 # v10.4.2
83
+ - run: uv python install 3.12 3.13
84
+ - run: uv sync --locked --python 3.13
85
+ - name: Run integration tests
86
+ timeout-minutes: 10
87
+ run: uv run pytest -m integration -v
88
+ - name: Run smoke test across versions
89
+ timeout-minutes: 5
90
+ run: uv run pytest tests/test_smoke_multiversion.py --python-versions=3.12,3.13 -v
91
+
92
+ # Windows support is not verified yet: this job is not part of the required check.
93
+ windows:
94
+ name: Windows (experimental)
95
+ runs-on: windows-latest
96
+ timeout-minutes: 20
97
+ continue-on-error: true
98
+ defaults:
99
+ run:
100
+ shell: bash
101
+ steps:
102
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
103
+ with:
104
+ persist-credentials: false
105
+ - uses: ./ # zizmor: ignore[self-repository]
106
+ with:
107
+ working-directory: examples/minimal
108
+ pytest-args: -v
109
+ - run: uv sync --locked --python 3.13
110
+ - name: Run integration tests
111
+ timeout-minutes: 10
112
+ run: uv run pytest -m integration -v
113
+
114
+ package:
115
+ name: Package
116
+ runs-on: ubuntu-latest
117
+ timeout-minutes: 10
118
+ steps:
119
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
120
+ with:
121
+ persist-credentials: false
122
+ fetch-depth: 0
123
+ - uses: astral-sh/setup-uv@36300bab3f61b84e19f32b6bd26b7897f3c7e951 # v10.4.2
124
+ - run: make build
125
+
126
+ # The one check to require in branch protection.
127
+ ci:
128
+ name: CI
129
+ if: always()
130
+ needs: [lint, unit, action, integration, package]
131
+ runs-on: ubuntu-latest
132
+ steps:
133
+ - env:
134
+ FAILED: ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }}
135
+ run: test "$FAILED" = false