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

MNT: Update coverage config #1338

Merged
merged 4 commits into from
Jul 9, 2024
Merged

Conversation

effigies
Copy link
Member

@effigies effigies commented Jul 8, 2024

Added global exclusions to target the following cases:

  • Typing-specific code that will not be reached by runtime
  • __repr__. We can test them if it matters, but it usually won't, so don't need to incentivize contributors to add pointless tests.
  • Code unreachable in tests (if 0:, if __name__ == '__main__')
  • Abstract methods (explicitly marked or using raise NotImplementedError)

This allows us to remove # pragma: no cover comments, which should prevent these cropping up when new chunks of code start with a copy-paste.

Also, I'm removing the exclusion of tests, following https://nedbatchelder.com/blog/202008/you_should_include_your_tests_in_coverage.html.

Remove ignored entry, add excludes for patterns that are unreachable or
reasonable not to test.
Remove outdated pytest version cap while we're here.
Copy link

codecov bot commented Jul 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.32%. Comparing base (30a5f3f) to head (ee1c9c4).
Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1338      +/-   ##
==========================================
+ Coverage   92.20%   95.32%   +3.12%     
==========================================
  Files          98      207     +109     
  Lines       12398    29084   +16686     
  Branches     2556     4863    +2307     
==========================================
+ Hits        11431    27724   +16293     
- Misses        644      927     +283     
- Partials      323      433     +110     

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

@effigies
Copy link
Member Author

effigies commented Jul 8, 2024

I think this should be uncontroversial. Will wait until tomorrow to merge in case anybody wants to look this over.

@effigies effigies merged commit 08f5c44 into nipy:master Jul 9, 2024
49 checks passed
@effigies effigies deleted the mnt/coverage-fixes branch July 9, 2024 12:32
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.

1 participant