Skip to content

Refreshed test baseline, modernized setup#94

Merged
zsimic merged 6 commits intomainfrom
modernize
Feb 8, 2026
Merged

Refreshed test baseline, modernized setup#94
zsimic merged 6 commits intomainfrom
modernize

Conversation

@zsimic
Copy link
Collaborator

@zsimic 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

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.

from setupmeta.content import load_contents

if __name__ == "__main__":
if __name__ == "__main__": # pragma: no cover
Copy link
Member

Choose a reason for hiding this comment

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

  1. Can you python -m tests.scenarios ... to run this inside its package, and remove this branch?
  2. 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.

Copy link
Collaborator Author

@zsimic zsimic Feb 7, 2026

Choose a reason for hiding this comment

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

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)

Copy link
Member

@thatch thatch left a comment

Choose a reason for hiding this comment

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

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)?

@zsimic zsimic merged commit 4449053 into main Feb 8, 2026
15 checks passed
@zsimic zsimic deleted the modernize branch February 8, 2026 01:43
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.

2 participants