Skip to content
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

chore: exclude if TYPE_CHECKING: lines from coverage reporting #556

Merged
merged 3 commits into from
Dec 10, 2024

Conversation

rich-iannone
Copy link
Member

This addresses a pyOpenSci reviewer comment related to test coverage reporting. The recommendation was to exclude if TYPE_CHECKING: lines from coverage reporting since the condition is always False at runtime. This is done here globally through the addition of a .coveragerc file.

Fixes: #547

Copy link

codecov bot commented Dec 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.64%. Comparing base (fdd43e3) to head (f4a702d).
Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #556      +/-   ##
==========================================
+ Coverage   89.79%   90.64%   +0.84%     
==========================================
  Files          45       45              
  Lines        5431     5355      -76     
==========================================
- Hits         4877     4854      -23     
+ Misses        554      501      -53     

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

@rich-iannone
Copy link
Member Author

rich-iannone commented Dec 10, 2024

I can verify that this does work. Here is the coverage report for this PR:

image

This is main:

image

@rich-iannone rich-iannone marked this pull request as ready for review December 10, 2024 15:00
@rich-iannone rich-iannone changed the title chore: create .coveragerc with lines to exclude chore: exclude if TYPE_CHECKING: lines from coverage reporting Dec 10, 2024
@rich-iannone rich-iannone requested a review from machow December 10, 2024 15:35
@machow machow merged commit c2acdbe into main Dec 10, 2024
12 of 14 checks passed
@rich-iannone rich-iannone deleted the chore-exclude-type-checking-coverage branch December 10, 2024 15:44
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.

[pyOpenSci review] exclude TYPE_CHECKING statement from coverage report
2 participants