You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Apparently random fluctuations in coverage via CodeCov? #3752
I would need to go back over some (ideally merged) pull requests to check, but my strong impression compared to when we ran TravisCI/CircleCI/AppVeyor to now with GitHub Actions/CircleCI/AppVeyor, the unit test coverage reported via CodeCov is much more random.
So, it that really the case?
If so, how can we fix it? One hypothesis is that CodeCov is reporting before all the CI tests have finished? e.g. If it only waits for at least one GitHub Actions report, rather than all the GitHub Actions reports?
I think this happened with my pull request #3733 also. There were two CI errors, but neither of them seemed to be at all related to the code I wrote. One of them was this CodeCov error.
It might be sensible to start looking purely at the coverage data locally on your own computer (without CodeCov or CircleCI or AppVeyor or GitHub Actions). Does re-running the same set of tests show fluctuating coverage? If so, can you narrow it down to specific test files or even test methods? Anything using random data is a candidate.
For online testing, you should be able to setup your own CodeCov account for a forked repository, and try pushing data there. One hypothesis is that uploading the data is failing at random (not that I have checked the logs in any details to rule this out).
@peterjc I played around with codecov on a personal project last night and I have a few hypotheses. My first thought is that there are two coverage.xml files being generated--one by appveyor, the other by circle--and only one is shown in the PR comment. This is just a guess at this point though and should not take much time to confirm/deny.
I'll take your advice on running coverage locally and seeing if the coverage fluctuates. I'll also read chapter 21 of the Biopython tutorial but if there's any high-level concepts about the tests in CircleCI vs tests in AppVeyor you can tell me, I'm sure it'd be helpful.
Some of the individual tests do use random data (graph plotting comes to mind - as that one very rarely fails as a result of 'bad' data), so I expect a little noise. Those examples in the tests could be replaced with fixed data.
But we're seeing lots of noise. Your idea that it might be down to only seeing one of the CI system's results not all of them is worth exploring...
In answer to @erik-whiting's question on #3792, there will be (significant) differences between different test jobs due to them being run with different dependencies (both Python libraries and command line tools). We would ideally test with and without each optional dependency - but adding more dependencies costs us both setup time and run time. This has been a balancing act (coverage vs run time, both to avoid hard limits and for speedy feedback).
Activity
seanrjohnson commentedon Sep 24, 2021
I think this happened with my pull request #3733 also. There were two CI errors, but neither of them seemed to be at all related to the code I wrote. One of them was this CodeCov error.
erik-whiting commentedon Nov 12, 2021
@peterjc can I take a run at this one? If so, can you tell me the significance of the tests ran in CircleCI vs AppVeyor?
I think I can figure this out on my personal fork but it might involve writing out instructions for a maintainer.
peterjc commentedon Nov 14, 2021
It might be sensible to start looking purely at the coverage data locally on your own computer (without CodeCov or CircleCI or AppVeyor or GitHub Actions). Does re-running the same set of tests show fluctuating coverage? If so, can you narrow it down to specific test files or even test methods? Anything using random data is a candidate.
For online testing, you should be able to setup your own CodeCov account for a forked repository, and try pushing data there. One hypothesis is that uploading the data is failing at random (not that I have checked the logs in any details to rule this out).
Are we simply seeing https://about.codecov.io/blog/codecov-uploader-deprecation-plan/ which has a solution?
erik-whiting commentedon Nov 14, 2021
@peterjc I played around with codecov on a personal project last night and I have a few hypotheses. My first thought is that there are two
coverage.xmlfiles being generated--one by appveyor, the other by circle--and only one is shown in the PR comment. This is just a guess at this point though and should not take much time to confirm/deny.I'll take your advice on running
coveragelocally and seeing if the coverage fluctuates. I'll also read chapter 21 of the Biopython tutorial but if there's any high-level concepts about the tests in CircleCI vs tests in AppVeyor you can tell me, I'm sure it'd be helpful.peterjc commentedon Nov 14, 2021
Some of the individual tests do use random data (graph plotting comes to mind - as that one very rarely fails as a result of 'bad' data), so I expect a little noise. Those examples in the tests could be replaced with fixed data.
But we're seeing lots of noise. Your idea that it might be down to only seeing one of the CI system's results not all of them is worth exploring...
peterjc commentedon Nov 18, 2021
In answer to @erik-whiting's question on #3792, there will be (significant) differences between different test jobs due to them being run with different dependencies (both Python libraries and command line tools). We would ideally test with and without each optional dependency - but adding more dependencies costs us both setup time and run time. This has been a balancing act (coverage vs run time, both to avoid hard limits and for speedy feedback).
Currently https://github.com/biopython/biopython/blob/master/.appveyor.yml uses the same dependencies for both 32 and 64 bit Python (basically just
numpyas the sole hard requirement), so those two jobs would probably give (near) identical coverage.CircleCI https://github.com/biopython/biopython/blob/master/.circleci/config.yml currently only runs one set of tests, but with a longer list of dependencies (
numpy scipy mmtf-python mysqlclient mysql-connector-python rdflib networkx matplotlib reportlab).GitHub actions uses https://github.com/biopython/biopython/blob/master/ci-dependencies.txt (which in hindsight I might prefer be under https://github.com/biopython/biopython/tree/master/.github/workflows as it is not used elsewhere), currently
numpy matplotlib mmtf-python mysqlclient mysql-connector-python networkx rdflib reportlab scipy(i.e. as above plusreportlabI think).Looking back to the TravisCI days, as per https://github.com/biopython/biopython/blob/biopython-179/.travis-tox.ini#L58 we used to deliberately run a different Python dependency mix on different versions of python - plus a lot of non-Python tools like NCBI BLAST+ via apt-get (see #3797).
So leaving aside other sources of variation, GitHub actions coverage will be higher than CircleCI, which will be higher than AppVeyor.
peterjc commentedon May 8, 2024
Right now codecov is broken - I think they changed their upload mechanism or something.
Drop CodeCov from CI (wasn't working)
Drop CodeCov from CI (wasn't working) (#4723)