MrMustard icon indicating copy to clipboard operation
MrMustard copied to clipboard

Fixing codecoverage

Open SamFerracin opened this issue 9 months ago • 3 comments

Context: A few open PRs are failing because of indirect changes in the coverage of three files, all of which are unrelated to the given PRs. Here, I either add tests (where I know how to test) or # pragma: no cover to the problematic lines

SamFerracin avatar May 07 '24 13:05 SamFerracin

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 87.63%. Comparing base (680bf64) to head (6f2ae27).

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #395      +/-   ##
===========================================
+ Coverage    87.44%   87.63%   +0.18%     
===========================================
  Files           81       81              
  Lines         6142     6129      -13     
===========================================
  Hits          5371     5371              
+ Misses         771      758      -13     
Files Coverage Δ
mrmustard/training/trainer.py 100.00% <ø> (+10.75%) :arrow_up:

... and 2 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 680bf64...6f2ae27. Read the comment docs.

codecov[bot] avatar May 07 '24 14:05 codecov[bot]

I think codecov is wrong....

Tried running tests locally with prints inserted where codecov claims to be not covered, it is actually hitting those lines.

zeyueN avatar May 10 '24 19:05 zeyueN

I think codecov is wrong....

Tried running tests locally with prints inserted where codecov claims to be not covered, it is actually hitting those lines.

Mmmh interesting.. So what would you suggest we do? We could force this in with #pragma no cover?

SamFerracin avatar May 10 '24 19:05 SamFerracin