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

Fix code coverage #432

Merged
merged 9 commits into from
Nov 10, 2023
Merged

Fix code coverage #432

merged 9 commits into from
Nov 10, 2023

Conversation

flying-sheep
Copy link
Member

@flying-sheep flying-sheep commented Nov 10, 2023

PR Checklist

Description of changes

  • Changing things so CI fails when coverage collection failed (0%) or upload failed
  • Switch to run coverage directly instead of using pytest-cov

Technical details

Using pytest-cov can sometimes cause problems since it initializes its machinery after pytest has started doing its thing. coverage run will work in those circumstances.

Of course that means that pytest can’t prevent adding the current working directory to PYTHONPATH unless the project uses the src layout. Experimentally switching the project to src layout worked, but I think that’s out of scope for this PR.

Additional context

@flying-sheep flying-sheep changed the title Add codecov logging and function check Fix code coverage Nov 10, 2023
Copy link

codecov bot commented Nov 10, 2023

Codecov Report

Merging #432 (bd30b11) into main (9f96549) will increase coverage by 58.23%.
The diff coverage is n/a.

❗ Current head bd30b11 differs from pull request most recent head 5943625. Consider uploading reports for the commit 5943625 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##            main     #432       +/-   ##
==========================================
+ Coverage   0.00%   58.23%   +58.23%     
==========================================
  Files         40       40               
  Lines       4899     4899               
==========================================
+ Hits           0     2853     +2853     
+ Misses      4899     2046     -2853     

see 39 files with indirect coverage changes

@github-actions github-actions bot added the bug Something isn't working label Nov 10, 2023
@flying-sheep flying-sheep marked this pull request as ready for review November 10, 2023 12:23
@flying-sheep flying-sheep marked this pull request as draft November 10, 2023 12:29
@flying-sheep flying-sheep marked this pull request as ready for review November 10, 2023 13:04
Copy link
Member

@Zethson Zethson left a comment

Choose a reason for hiding this comment

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

Thank you very much!

@Zethson Zethson merged commit af09b16 into main Nov 10, 2023
7 checks passed
@flying-sheep flying-sheep deleted the fix-codecov branch November 10, 2023 13:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

codecov not working anymore
2 participants