xarray icon indicating copy to clipboard operation
xarray copied to clipboard

Coverage shows reduced value since mypy flag was added

Open headtr1ck opened this issue 3 years ago • 1 comments

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 avatar Oct 07 '22 12:10 headtr1ck

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?

headtr1ck avatar Oct 07 '22 21:10 headtr1ck

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?

jhamman avatar Jun 21 '23 15:06 jhamman

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.

headtr1ck avatar Jun 21 '23 19:06 headtr1ck