Skip to content

change coverage options to match github build steps #622

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

MattShirley
Copy link
Collaborator

Modify pyproject.toml to support coverage options closer aligned to the GitHub build steps:

test = "pytest {args}"
cov = "coverage run --source servicex/ -m pytest tests && coverage report"
cov-html = "coverage run --source servicex/ -m pytest tests && coverage html"```

Copy link

codecov bot commented Jul 14, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.49%. Comparing base (196629e) to head (3ccbcd2).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #622   +/-   ##
=======================================
  Coverage   96.49%   96.49%           
=======================================
  Files          29       29           
  Lines        1939     1939           
=======================================
  Hits         1871     1871           
  Misses         68       68           
Flag Coverage Δ
unittests 96.49% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

…into mshirley/hatch-change-coverage-parameters
@ponyisi
Copy link
Collaborator

ponyisi commented Jul 15, 2025

@MattShirley any idea why this seems to reduce the number of tested lines?

@MattShirley
Copy link
Collaborator Author

MattShirley commented Jul 15, 2025

@MattShirley any idea why this seems to reduce the number of tested lines?

It looks like it's because I had previously set branch = true in the coverage config.

[tool.coverage.run]
source = ["servicex"]
omit = [
    "*/tests/*",
    "*/test_*",
]

This option tests all flows of a conditional statement, so we might want to enable that for the code coverage GH Actions. https://coverage.readthedocs.io/en/latest/branch.html

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