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

Use editable install to fix coverage #2460

Merged
merged 2 commits into from
Nov 20, 2023
Merged

Use editable install to fix coverage #2460

merged 2 commits into from
Nov 20, 2023

Conversation

maxnoe
Copy link
Member

@maxnoe maxnoe commented Nov 17, 2023

No description provided.

Copy link

codecov bot commented Nov 17, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (49ab82b) 60.60% compared to head (5ee0e9b) 87.96%.
Report is 2 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##             main    #2460       +/-   ##
===========================================
+ Coverage   60.60%   87.96%   +27.35%     
===========================================
  Files           3      231      +228     
  Lines          33    19768    +19735     
===========================================
+ Hits           20    17388    +17368     
- Misses         13     2380     +2367     

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

@maxnoe maxnoe marked this pull request as ready for review November 17, 2023 13:22
@maxnoe
Copy link
Member Author

maxnoe commented Nov 17, 2023

Using the editable install fixed coverage.py being able to associate the coverage report with the source files, so now we have correctly working coverage reports again.

Please review @Tobychev @LukasNickel

The muon fit fix is temporary, a proper fix is under investigation in #2425

@Tobychev
Copy link
Contributor

Tobychev commented Nov 17, 2023

I don't understand what the problem being solved is, nor why doing an editable install would matter. I don't even understand why the muon test needs to be patched in this PR, so I don't think I can provide a meaningful review.

@maxnoe
Copy link
Member Author

maxnoe commented Nov 17, 2023

I don't understand what the problem being solved is

Codecov reports coverage of 60% on 30 lines, because it doesn't recognize the file paths being tested because we run the tests in a temporary directory using the package installed into the prefix of the python installation.

See: https://app.codecov.io/gh/cta-observatory/ctapipe/

why doing an editable install would matter.

Doing an editable install means the installation is just creating symlinks to the checked out repository, which means that codecov can link the executed code to the source files correctly.

I don't even understand why the muon test needs to be patched in this PR

To be honest, me neither. The test started failing after I added the -e and I fixed it to see if the coverage was ok after I got the tests to run using the editable install, which it does now, see:

https://app.codecov.io/gh/cta-observatory/ctapipe/pull/2460/indirect-changes

@maxnoe maxnoe merged commit 596b783 into main Nov 20, 2023
15 of 16 checks passed
@maxnoe maxnoe deleted the fix_codecov branch November 20, 2023 10:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants