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

Coverage shows reduced value since mypy flag was added #7141

Closed
headtr1ck opened this issue Oct 7, 2022 · 3 comments · Fixed by #7142
Closed

Coverage shows reduced value since mypy flag was added #7141

headtr1ck opened this issue Oct 7, 2022 · 3 comments · Fixed by #7142
Labels
CI Continuous Integration tools

Comments

@headtr1ck
Copy link
Collaborator

What is your issue?

The coverage was reduced from ~94% to ~68% after merging #7126
See https://app.codecov.io/gh/pydata/xarray or our badge

I think this is because the unittests never included the tests directory while mypy does. And codecov uses the sum of both coverage reports to come up with its number.

Adding the flag to the badge also does not seem to help?

Not sure how or even if that is possible to solve, maybe we need to ask in codecov?

@headtr1ck headtr1ck added the needs triage Issue that has not been reviewed by xarray team member label Oct 7, 2022
@headtr1ck headtr1ck mentioned this issue Oct 7, 2022
1 task
@headtr1ck headtr1ck added CI Continuous Integration tools and removed needs triage Issue that has not been reviewed by xarray team member labels Oct 7, 2022
@headtr1ck
Copy link
Collaborator Author

The PR doesn't really help.
In the codecov website under flags the percentages are correctly displayed but in the mixed coverage the tests are still included leading to only 68% coverage (unittests do not cover themself obviously)...

Also adding the flag tag in the badge url in the README does not work, is that a bug?

@jhamman
Copy link
Member

jhamman commented Jun 21, 2023

Perhaps we should revert the mypy addition to our coverage config? Seems like there is generally week support for mypy coverage.

Also, we should be able to skip the tests directory in our coverage report, right?

@headtr1ck
Copy link
Collaborator Author

Also, we should be able to skip the tests directory in our coverage report, right?

I tried this in the linked PR, but it did not work.

I'm fine with removing mypy from the coverage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI Continuous Integration tools
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants