Skip to content

Run combined coverage of all Python versions in the pre-push tox hook - #1027

Merged
mauvilsa merged 1 commit into
mainfrom
pre-push-coverage
Oct 28, 2026
Merged

mauvilsa merged 1 commit into
mainfrom
pre-push-coverage

Conversation

@mauvilsa

Copy link
Copy Markdown
Owner

What does this PR do?

Makes the pre-push hooks produce a coverage report combined from all supported Python versions, in a single tox run. Previously tox ran all versions without coverage, a separate hook ran the tests again to get coverage for only the current Python version, and a full coverage report needed yet another manual tox run.

The combined report is shown in the terminal, listing only files below 100%, and is also written as html. A warning is printed if coverage is below 100%, but only when all supported Python versions ran, so that contributors without every version installed don't get a misleading warning. The separate coverage hook, the tox coverage label and the manual steps in the contributing guide are removed, since they are no longer needed.

Before submitting

  • Did you read the contributing guideline?
  • If you used a coding agent, did you fully understand and validate all generated code and ensure it follows the contributing guidelines?
  • Did you update the documentation? (readme and public docstrings)
  • [n/a] Did you write unit tests such that there is 100% coverage on related code? (required for bug fixes and new features)
  • Did you verify that new and existing tests pass locally?
  • [n/a] If this is a bug fix, did you verify that the tests fail without the code fix?
  • Did you make sure that all changes preserve backward compatibility?
  • Did you update the CHANGELOG including a pull request link? (not for typos, docs, test updates, or minor internal changes/refactors)

@mauvilsa mauvilsa added the refactor Improvements to the quality of the code label Oct 28, 2026
@mauvilsa
mauvilsa deployed to sonarcloud October 28, 2026 05:35 — with GitHub Actions Active
@sonarqubecloud

Copy link
Copy Markdown

@greptile-apps

greptile-apps Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no actionable issues were found.

Summary

Combines coverage from the tox test runs in the pre-push hook.

  • Pre-push tests now create one coverage report across Python versions.

Acknowledged intent: mauvilsa explicitly limits the warning to complete Python runs so contributors with missing interpreters do not receive a misleading warning.

Reviews (1) · Last reviewed commit: "Run combined coverage of all Python vers..." · Reviewed by Greptile

@codecov

codecov Bot commented Oct 28, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (c4b5435) to head (a88c03a).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff            @@
##              main     #1027   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           27        27           
  Lines        10018     10018           
=========================================
  Hits         10018     10018           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

@mauvilsa
mauvilsa merged commit 7e2152c into main Oct 28, 2026
36 checks passed
@mauvilsa
mauvilsa deleted the pre-push-coverage branch October 28, 2026 05:38

This branch was successfully deployed

1 active deployment
sonarcloud — a88c03ae Deployed Oct 28, 2026 by mauvilsa via sonarcloud #1014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactor Improvements to the quality of the code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant