Skip to content

Conversation

@jrasko
Copy link
Contributor

@jrasko jrasko commented Dec 5, 2025

Description

I just noticed that the code coverage displayed by codecov is not correct. Currently, we run our tests in three stages in the pipeline:

  1. Tests without pytorch and pypsa (which are most of the tests)
  2. Pypsa Tests
  3. Pytorch tests

But we only upload the coverage report of step 3 to codecov.
This PR runs all tests in step three, which produces a correct coverage report with the disadvantage of a longer program runtime

It would also be possible to create three different reports and to merge them (see this stack overflow question), but this requires another dependency

Checklist

  • Consent to release this PR's code under the GNU Affero General Public License v3.0

@jrasko jrasko requested a review from a team December 5, 2025 16:13
@codecov
Copy link

codecov bot commented Dec 5, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.31%. Comparing base (108dedc) to head (ecf1ee5).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##             main     #702       +/-   ##
===========================================
+ Coverage   45.61%   81.31%   +35.69%     
===========================================
  Files          54       54               
  Lines        8032     8032               
===========================================
+ Hits         3664     6531     +2867     
+ Misses       4368     1501     -2867     
Flag Coverage Δ
pytest 81.31% <ø> (+35.69%) ⬆️

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.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Member

@maurerle maurerle left a comment

Choose a reason for hiding this comment

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

Great, this was introduced in #670 but was wrong.
Thanks!

@maurerle maurerle merged commit 54b9349 into main Dec 5, 2025
9 checks passed
@maurerle maurerle deleted the full-coverage-report branch December 5, 2025 17:30
@maurerle
Copy link
Member

maurerle commented Dec 5, 2025

Btw what is codecov doing if not warning about this here..???
#670 (comment)
Sure, codebase lost 30% coverage sets a green mark

@jrasko jrasko mentioned this pull request Dec 8, 2025
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.

3 participants