Skip to content

feat: add optional use-tox-uv input to the testing workflows - #1329

Open
etollaw wants to merge 1 commit into
tektronix:mainfrom
etollaw:feat/354-optional-tox-uv
Open

etollaw wants to merge 1 commit into
tektronix:mainfrom
etollaw:feat/354-optional-tox-uv

Conversation

@etollaw

@etollaw etollaw commented Nov 19, 2026 •

Copy link
Copy Markdown

Proposed changes

Adds an optional use-tox-uv input (boolean, default false) to _reusable-test-code.yml and _reusable-test-docs.yml. When it's true, each tox install step also installs tox-uv, so tox creates environments and installs packages with uv.

Following the discussion on #354, the caveat is documented rather than worked around: environments created by tox-uv have no pip, so a tox config that overrides install_command with a pip command fails with No module named pip. This repo's own override is removed, as suggested there.

Addresses #354

  • .github/workflows/_reusable-test-code.yml, _reusable-test-docs.yml: new use-tox-uv input; the install steps append tox-uv when it's true (python -m pip install tox${{ inputs.use-tox-uv && ' tox-uv' || '' }}).
  • workflows/test-code.md, workflows/test-docs.md: the input in the Inputs table and Example, plus a note on the install_command caveat (remove the override, or set uv_seed = true).
  • pyproject.toml: removed the install_command override.
  • .github/workflows/test-code.yml: use-tox-uv: true, so this PR's CI runs the tox-uv path. test-docs.yml keeps the default, so the existing path still runs.
  • CHANGELOG.md: Unreleased Added and Changed entries.
  • doc_config/known_words.txt: added uv. The strict-mode docs spellcheck failed on it in the new docs text.

The README isn't changed: it lists each workflow with a link to its page under workflows/, and inputs are documented on those pages, so the new input is documented in workflows/test-code.md and workflows/test-docs.md.

Testing

Local, macOS, Python 3.13.18, tox 4.67.13, tox-uv 1.37.7:

# main + tox-uv added to the install (what the issue asks for)
.tox/tests/bin/python: No module named pip
  tests: FAIL code 1

# this branch, plain tox
31 passed, 2 deselected
  tests: OK

# this branch, + tox-uv (no uv_seed)
31 passed, 2 deselected
  tests: OK

# this branch
tox -ve docs,doctests   ->  docs: OK, doctests: OK
pre-commit run --all-files  ->  exit 0

The same No module named pip failure on main + tox-uv, on GitHub's ubuntu, macos and windows runners: https://github.com/etollaw/python-package-ci-cd/actions/runs/42998863934 (a reproduction branch on my fork).

Not run locally: the test-general job on windows and macos runners, and the workflow expression itself. Both run in this PR's CI.

AI disclosure: I used Claude Code to help reproduce the issue, make these edits, run the checks above, and draft this description. I reviewed the diff and the output before posting.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Functionality update (non-breaking change which updates or changes existing functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • CI/CD update (an update to the CI/CD workflows, scripts, and/or configurations)
  • Documentation update (an update to enhance the user experience when reading through the docs)

Checklist

  • I have followed the guidelines in the CONTRIBUTING document
  • I have signed the CLA
  • I have checked to ensure there aren't other open Pull Requests for the same update/change
  • I have created (or updated) an Issue to track the status of this update/change and updated the link in this PR description (see above in the Proposed changes section) using the wording Addresses #<issue_number>
  • I have performed a self-review of my code
  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas. No comments added: the one expression is described in the input's description and the docs.
  • Basic linting passes locally with my changes
  • I have added necessary documentation (if appropriate)
  • I have updated the Changelog with a brief description of my changes

…flows

Add a `use-tox-uv` boolean input (default false) to
`_reusable-test-code.yml` and `_reusable-test-docs.yml`. When true, the
install steps add `tox-uv` alongside tox.

Document the input and the caveat that environments created by tox-uv
have no pip, so a tox config that overrides `install_command` with a pip
command fails with "No module named pip".

Remove this repo's own `install_command` override, which isn't needed
and broke under tox-uv, and turn `use-tox-uv` on in `test-code.yml` so
CI exercises the new path.

Closes tektronix#354
@etollaw
etollaw requested a review from a team as a code owner November 19, 2026 04:53
@CLAassistant

CLAassistant commented Nov 19, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

Comment thread CHANGELOG.md
`<repository-name>-create-and-scan-sbom.spdx.json`) and
`<repository-name>-production-sbom.spdx.json` (production SBOM, previously
`<repository-name>-create-and-scan-sbom-2.spdx.json`).
- Removed this repository's tox `install_command` override, which isn't needed and doesn't work in environments created by `tox-uv`.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This really isn't necessary, anyone reading the changelog doesn't really need to know about this level of testing change for the package since it doesn't affect users.

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants