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

Update codecov coverage config file #672

Merged
merged 6 commits into from Jan 15, 2021
Merged

Update codecov coverage config file #672

merged 6 commits into from Jan 15, 2021

Conversation

CasperWA
Copy link
Member

@CasperWA CasperWA commented Jan 15, 2021

Properly set threshold.

This is implemented with reference to https://github.com/aiidateam/aiida-optimade/blob/develop/.codecov.yml, which seems to work for this PR. (Project coverage decrease of 0.16 % and it's still accepted, only the patch coverage is not accepted due to a difference of more than 0.5 % than from what is expected).

Properly set threshold.
@CasperWA CasperWA requested a review from ml-evs January 15, 2021 13:57
@ml-evs
Copy link
Member

ml-evs commented Jan 15, 2021

This is one of the many incantations I've tried to get this working in the past, so good luck...

@ml-evs
Copy link
Member

ml-evs commented Jan 15, 2021

I'd suggest adding a random function somewhere in the code that would break the coverage in a separate commit to test that this actually does anything.

@codecov
Copy link

codecov bot commented Jan 15, 2021

Codecov Report

Merging #672 (99c0f97) into master (1160b88) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #672   +/-   ##
=======================================
  Coverage   93.30%   93.30%           
=======================================
  Files          61       61           
  Lines        3300     3300           
=======================================
  Hits         3079     3079           
  Misses        221      221           
Flag Coverage Δ
project 93.30% <ø> (ø)
validator 66.06% <ø> (ø)

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


Continue to review full report at Codecov.

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

@CasperWA
Copy link
Member Author

e16222e adds enough non-covered lines to decrease the overall coverage of the code by 0.12 %. But it's still listed as a pass, since this is below 0.5 % 👍
The patch fails since it's expected to hit 93.30 %, but only hit 20.00 % (a difference of 73.30 %, much more than 0.5 %) so that's fair enough.

@CasperWA
Copy link
Member Author

Note: The documentation on how to fill out the config file is here.

@CasperWA
Copy link
Member Author

From this line it seems the fetch depth should be set differently as well.

@CasperWA
Copy link
Member Author

I think will work out, so I'll remove the temporary commit (resulting in no code changes) and then it should all be fine.

Last question though. Since I renamed the "project" status to "project/optimade", should we rename the flag from project to optimade as well? Or maybe just keep it so that the history on codecov persists?

Also, as a summary, I have set all the thresholds to 1%, except for patch, which is set to 5%. Is this fine?

Use `paths` is codecov config instead of running extra pytest only for
validator.
Set thresholds to 1%.
Set patch threshold to 5%.
Rename the status of the project flag to optimade.
Copy link
Member

@ml-evs ml-evs left a comment

Choose a reason for hiding this comment

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

Thanks for this @CasperWA, definitely a better way of doing things. I'm happy with these thresholds, we can always tweak them again if need be.

@ml-evs ml-evs merged commit 5fb7590 into master Jan 15, 2021
@ml-evs ml-evs deleted the add_back_codecov branch January 15, 2021 15:26
@ml-evs ml-evs added the CI Continuous Integration - GitHub Actions issues (NOT related to the repository Action) label Jan 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI Continuous Integration - GitHub Actions issues (NOT related to the repository Action)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants