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
The coverage tool we use is currently not working since it's actually looking at the coverage of the tests (i.e. if the tests are tested). The initial solution was simple (change --cov to --cov=src), but the way we setup our tests is that we don't do relative imports of the code under huggingface_hub, but rather we install huggingface_hub and then run the tests. That means that we're really interested in the coverage of the locally installed huggingface_hub,
Making it work is somewhat possible but starts to be hacky (we need to set up .coveragerc pointing to huggingface_hub), but then pytest will look at the coverage of all the files even if we're only interested in a group of files (e.g. we have independent test coverage runs for repository, hub mixin, keras, fastai), so the approach above would not work very nice. I also face the issue that it seems codecov might not share the report for source_package). Locally you can try
Following up on PR #976 that disables the coverage in tests.
It would be good to re-enable and fix it properly. Potential fixes have been mentioned here (internal url) and here (internal url).
Originally from @osanseviero :
and from @adrinjalali :
Finally, an example of misleading codecov intervention: https://github.com/huggingface/huggingface_hub/pull/904/files
The text was updated successfully, but these errors were encountered: