Repository navigation
Enable code coverage with Codecov - #65
Merged
Merged
Conversation
Add a `coverage` nox session that runs pytest with pytest-cov and writes coverage.xml, configure coverage.py in pyproject.toml, run the session for Python 3.12 on Ubuntu in CI so the existing Codecov upload step is triggered, and add an informational Codecov configuration. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
namurphy
commented
Oct 6, 2026
Comment on lines
+8
to
+13
| project: | ||
| default: | ||
| informational: true # report coverage without failing checks | ||
| patch: | ||
| default: | ||
| informational: true |
Member
Author
There was a problem hiding this comment.
We'll probably want to adjust these later so that checks fail if either the coverage goes down by a non-negligible amount, or if coverage falls below a floor value. That can lead to some erroneous failures, but is generally helpful.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
coveragenox session (e.g.,nox -s coverage-3.12) that runs pytest with--covand writescoverage.xml. It uses the editable install fromuv syncso that file paths in the report point tosrc/.pytest-covto thetestdependency group and updateuv.lock.[tool.coverage]inpyproject.toml: branch coverage,source_pkgs = ["pyfaradaycup"], path mapping, and exclusions for lines likeif TYPE_CHECKING:.tests-3.12tocoverage-3.12. This triggers the existing Codecov upload step, which runs for any session whose name containscov..github/codecov.ymlso that Codecov status checks are informational and never fail a PR.Running
nox -s coverage-3.12locally reports 55% coverage.Manual steps after merging
PlasmaPy/pyfaradaycupon https://app.codecov.io. This requires the Codecov GitHub App to be installed for the PlasmaPy organization.CODECOV_TOKEN.README.md.🤖 Generated with Claude Code