-
-
Notifications
You must be signed in to change notification settings - Fork 379
Configure coveragepy to separate importables&pths #3367
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
Configure coveragepy to separate importables&pths #3367
Conversation
A5rocks
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense to me! Hopefully this works.
| source = ["src", "**/site-packages"] | ||
| attrs-plugin = [ | ||
| "tests/_trio_check_attrs_aliases.py", | ||
| "_trio_check_attrs_aliases.py", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Huh, why this? I guess this is necessary to merge the importable with the file under tests/?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, I took wild a guess after you said that it's "installed" separately that this might've been something that you thought wasn't working in the past. I realized it's not installed but imported through an absolute path due to PYTHONPATH being set. And so I figured it would likely confuse the path mapper so I added an explicit one.
I haven't actually tested it locally even, just wanted to see what the PR would produce. Maybe it'd work even w/o this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FWIW, looking at one of the codecov uploads (https://storage.googleapis.com/codecov-production/shelter/github/python-trio%3A%3A%3A%3Atrio/ffe7261e66a3f7af53e9671c9fc06e2342d3bda6/de0c6baf-a91a-4026-bc82-3382eb60fda8.txt?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=GOOG1EJOGFN2JQ4OCTGA2MU5AEIT7OT5Z7HTFOAN2SPG4NWSN2UJYOY5U6LZQ%2F20251206%2Fus-west2%2Fs3%2Faws4_request&X-Amz-Date=20251206T014925Z&X-Amz-Expires=30&X-Amz-SignedHeaders=host&X-Amz-Signature=4623e30cb5fbffcc5f205f54c40f2a8bb795d3b626d339e6763848ec2038497f), it contains <class name="_trio_check_attrs_aliases.py" filename="tests/_trio_check_attrs_aliases.py" complexity="0" line-rate="1" branch-rate="1"> so Codecov doesn't have a problem mapping it back to the repo.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3367 +/- ##
====================================================
+ Coverage 99.98454% 100.00000% +0.01546%
====================================================
Files 128 128
Lines 19407 19407
Branches 1318 1318
====================================================
+ Hits 19404 19407 +3
+ Misses 1 0 -1
+ Partials 2 0 -2 🚀 New features to boost your workflow:
|
Fixes #3314.