-
Notifications
You must be signed in to change notification settings - Fork 27
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
Ignore conftest.py in code coverage #387
Labels
CI
Continuous Integration
Comments
Good idea! I'd be glad to review a PR with these changes. |
chuckwondo
added a commit
to chuckwondo/VirtualiZarr
that referenced
this issue
Jan 24, 2025
In addition, make it easier for produce coverage report locally by adding pytest config options to pyproject.toml. This also produces consistent results between local runs and runs in CI, and adds a term-missing report for human readability, both for local runs as well as in CI, so it show up in the logs. Fixes zarr-developers#387
2 tasks
chuckwondo
added a commit
to chuckwondo/VirtualiZarr
that referenced
this issue
Jan 25, 2025
In addition, make it easier for produce coverage report locally by adding pytest config options to pyproject.toml. This also produces consistent results between local runs and runs in CI, and adds a term-missing report for human readability, both for local runs as well as in CI, so it show up in the logs. Fixes zarr-developers#387
Thanks @maxrjones. Please see #388 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently,
.github/codecov.yml
ignoresvirtualizarr/tests
, as it should, but it should also ignore the top levelconftest.py
file. By not ignoring it, we are very slightly inflating our coverage by about 1% (from ~78% to ~79%).This isn't egregious, but the difference could mean erroneously reaching our target when we actually are not reaching it, thus potentially passing coverage when it should fail.
Further, we should add a
.coveragerc
file so that users locally running tests will see coverage properly reported as well, with the following contents:This duplicates the information in the "ignore" section in
.github/codecov.yml
file, but the pytest-cov plugin cannot make use of that file, as it is specific to GitHub workflows. However, it is a very small duplication of information, and is very likely to remain unchanged.The text was updated successfully, but these errors were encountered: