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

Attempt to fix coverage report #1071

Closed
wants to merge 41 commits into from
Closed

Attempt to fix coverage report #1071

wants to merge 41 commits into from

Conversation

bdraco
Copy link
Member

@bdraco bdraco commented Aug 31, 2024

No description provided.

.github/workflows/ci-cd.yml Outdated Show resolved Hide resolved
Copy link

codecov bot commented Aug 31, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.89%. Comparing base (3d5ce65) to head (b36c251).
Report is 345 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff             @@
##           master    #1071       +/-   ##
===========================================
+ Coverage   62.40%   92.89%   +30.49%     
===========================================
  Files          38       26       -12     
  Lines        6626     4295     -2331     
  Branches      356      356               
===========================================
- Hits         4135     3990      -145     
+ Misses       2464      279     -2185     
+ Partials       27       26        -1     
Flag Coverage Δ
CI-GHA 92.87% <ø> (+30.49%) ⬆️
MyPy 25.67% <ø> (ø)
OS-Linux 99.25% <ø> (ø)
OS-Windows 99.58% <ø> (ø)
OS-macOS 99.02% <ø> (ø)
Py-3.10.11 98.90% <ø> (ø)
Py-3.10.14 99.10% <ø> (ø)
Py-3.11.9 99.10% <ø> (ø)
Py-3.12.5 99.10% <ø> (ø)
Py-3.13.0-rc.1 99.10% <ø> (ø)
Py-3.8.10 98.87% <ø> (ø)
Py-3.8.18 99.07% <ø> (ø)
Py-3.9.13 98.87% <ø> (ø)
Py-3.9.19 99.07% <ø> (ø)
Py-pypy7.3.11 99.39% <ø> (ø)
Py-pypy7.3.16 99.42% <ø> (ø)
VM-macos-latest 99.02% <ø> (ø)
VM-ubuntu-latest 99.25% <ø> (ø)
VM-windows-latest 99.58% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@webknjaz
Copy link
Member

@bdraco during previous debugging sessions I established that it's fault of the Codecov action v4 and v3 works just fine. Coverage.py is configured correctly but Codecov misinterprets the file paths for the reports made by pytest (but not those produced by MyPy).

@webknjaz
Copy link
Member

Anyway, I've been meaning to compose a bug report for Codecov but need to find old experimental PRs and comments where I documented the difference exactly. Perhaps, you'll add your own discoveries to that.

@bdraco
Copy link
Member Author

bdraco commented Aug 31, 2024

pytest.ini Outdated
@@ -23,9 +23,9 @@ addopts =
-p pytest_cov

# `pytest-cov`:
--cov
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FTR, pytest-cov usually behaves more correctly with this setting and most of the config happening in coverage.py. Besides, the idea is that if any other tools use coverage.py directly, they'd be able to rely on the same config. This is the principle I apply to all the integrated tooling.

I'd like this pattern to remain in place.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm going to revert all the unneeded changes once I get things working (well.. if I get things working)

Copy link
Member

@webknjaz webknjaz Aug 31, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay. Just postpone merging until my final review. I synchronize the configs to have the same shape across repos, so I want to make sure the end result fits within the structure I got for that.

Copy link
Member Author

@bdraco bdraco Sep 1, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately I can't get it to work without this change

Everything else I've attempted changes the package back to "." in coverage.xml

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've gone so far as to dump the internal coverage options and make sure they are the same and it still changes it back to "."

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If what you're saying is correct, we should probably tell Ned about the bug...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You gave me an idea.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bdraco try this #1074

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm going to bed now, but feel free to merge it if you think that it is a proper fix.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just saw your comment as I was deep in debugging. 🤦

@webknjaz webknjaz self-requested a review August 31, 2024 23:42
@bdraco bdraco closed this in #1074 Sep 1, 2024
@bdraco bdraco deleted the coverage_report branch September 27, 2024 01:21
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.

2 participants