Conversation
zsimic
commented
Feb 7, 2026
- Updated tests with latest setuptools (more aggressive warnings to ignore)
- Test with py3.14
- Regenerated legacy tests baseline
- Bumped GH actions
- Use ruff instead of black+flake8
There was a problem hiding this comment.
Pull request overview
This PR modernizes the project’s test/lint/release tooling and refreshes scenario baselines to match newer packaging behavior (setuptools warnings), while updating CI to newer Python versions and switching coverage reporting providers.
Changes:
- Update local/CI test matrix (incl. Python 3.14) and refresh scenario golden files/baselines.
- Replace black/flake8/bandit with ruff and adjust tox/CI workflows (incl. uv-based setup).
- Misc internal refactors and test harness changes to reduce warning noise and stabilize outputs.
Reviewed changes
Copilot reviewed 48 out of 52 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
tox.ini |
Updates envlist, pytest invocation, replaces flake8/black/bandit with ruff, adds scenario regen command. |
pyproject.toml |
Adds ruff configuration and simplifies build-system requirements. |
.github/workflows/tests.yml |
Updates CI matrix (adds 3.14), switches to uv/tox-uv, changes coverage upload to Coveralls, adds concurrency. |
.github/workflows/release.yml |
Updates release workflow to uv-based build and newer Python version for publishing. |
tests/conftest.py |
Refactors test helpers: new output/warnings capture approach and in/out-of-process setup.py invocation split. |
tests/scenarios.py |
Reworks scenario runner to support regen vs replay, improves path normalization and git invocation behavior. |
tests/test_scenarios.py |
Wraps scenario run in output capture and adds a basic Scenario.__repr__ assertion. |
tests/test_commands.py |
Switches test harness to invoke_setup_py, tightens docstring formatting, adds an extra version bump error case. |
tests/test_versioning.py |
Tightens exception types/messages, updates snapshot/version-file assertions, updates expectations around version bump output. |
tests/test_model.py |
Adds unit test for get_pip() and simplifies a few context manager usages. |
tests/test_license.py |
Uses setupmeta.license module import path directly for license detection tests. |
tests/test_content.py |
Minor refactor (dict literal) and changes which() test target to python3. |
tests/__init__.py |
Docstring formatting update. |
tests/sample/setup.py |
Removes blank line in sample setup.py. |
tests/pydev-wrapper.sh |
Removes legacy wrapper script used for old PyCharm workaround. |
setupmeta/__init__.py |
Refactors subprocess execution/capture logic, removes older testing/windows branches, and minor style cleanups. |
setupmeta/model.py |
Refactors imports, extracts PKG-INFO canonicalization constants, modernizes get_pip() implementation. |
setupmeta/versioning.py |
Updates versioning parsing/aliases, refactors formatting, and adjusts bump flow. |
setupmeta/scm.py |
Adjusts capture behavior for scenario runs during commit-tag operations. |
setupmeta/commands.py |
Moves to setuptools SetupError, refactors formatting logic and clean command configuration. |
setupmeta/hook.py |
Switches from distutils to setuptools distribution hook references and improves warning stacklevel. |
setupmeta/content.py |
Docstring formatting cleanup. |
setupmeta/license.py |
Avoids shadowing built-in name license during iteration. |
setup.py |
Minor subprocess lint annotation + argument dict formatting; adds Python 3.14 classifier. |
docs/contributing.rst |
Updates tox example env and removes mention of removed security tox env. |
README.rst |
Switches coverage badge from Codecov to Coveralls. |
HISTORY.rst |
Adds 3.9.0 release notes and Coveralls reference link. |
examples/via-cfg/setup.py |
Removes blank line formatting. |
examples/single/setup.py |
Removes blank line formatting. |
examples/hierarchical/setup.py |
Removes blank line formatting. |
examples/direct/setup.py |
Removes blank line formatting. |
examples/direct/tests/README.md |
Removes note file from example tests folder. |
tests/scenarios/via_req_files/setup.py |
Adds py_modules to avoid “no packages/py_modules” warning in baseline. |
tests/scenarios/via_req_files/expected.txt |
Regenerated expected output to include py_modules. |
tests/scenarios/simple-src/setup.py |
Removes blank line formatting. |
tests/scenarios/readmes/setup.py |
Adds versioning="dev" and py_modules to stabilize scenario output. |
tests/scenarios/readmes/expected.txt |
Regenerated expected output reflecting snapshot versioning and module list. |
tests/scenarios/pinned/setup.py |
Import formatting cleanup. |
tests/scenarios/packaged/setup.py |
Removes blank line formatting. |
tests/scenarios/disabled/setup.py |
Removes blank line formatting. |
tests/scenarios/complex-reqs/setup.py |
Removes blank line formatting. |
tests/scenarios/bogus/setup.py |
Adjusts unused parameter name for lint. |
tests/scenarios/bogus/expected.txt |
Regenerated expected output (warning/output changes). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
tests/scenarios.py
Outdated
| from setupmeta.content import load_contents | ||
|
|
||
| if __name__ == "__main__": | ||
| if __name__ == "__main__": # pragma: no cover |
There was a problem hiding this comment.
- Can you
python -m tests.scenarios ...to run this inside its package, and remove this branch? - Can you cover this with a
python -m coverage run ...instead of silencing it? Otherwise, I'd rather see the uncovered line left to remind future-us to fix this.
There was a problem hiding this comment.
Thanks for pointing these out! I was fishing for cleanup in tests/ folder, and these markers helped me there with that, but forgot to remove them as they're not needed (code coverage for tests/ not tracked). I've cleaned them up now, and added a replay ... test as well (you're right: very easy to add).
pragma: no cover carries a useful signal: "this is not code that is worth covering".
In this case it's about refreshing the tests baseline, it's used only when iterating (and changing the baseline, which is not often).
Pros:
- can search for "pragma: no cover", convenient
- signal that the code there is "not worth covering"
- when coverage is "close enough" to 100% (like in setupmeta's case: 23 out of ~1900 statements marked as such), it allows to make any drop in coverage easily "pop" / stand out -> "hey, it's not 100% anymore, can you check?", and keep the signal strong by either adding tests or intently marking them as indeed "not worth covering"
Cons:
- can be "misused" (but everything can)
thatch
left a comment
There was a problem hiding this comment.
This PR is impossible to review properly because it contains so many unrelated changes. In the future can you split it up, even if it's just by groups of files (tox, then gha, then test regen, etc)?