CSHS-CWRA / RavenPy

A Python wrapper to setup and run the hydrologic modelling framework Raven
https://ravenpy.readthedocs.io
MIT License
25 stars 5 forks source link

Improve Code Coverage #330

Open Zeitsperre opened 7 months ago

Zeitsperre commented 7 months ago

Description

Our code coverage is hovering at around 82% (https://coveralls.io/github/CSHS-CWRA/RavenPy). It would be nice to have this number a bit higher, in advance of RavenPy v0.13.

richardarsenault commented 6 months ago

I would like to help, but the link above (Coveralls) shows no source-code or indication of which lines are not hit in the test series. Any other way to check this?

Zeitsperre commented 6 months ago

@richardarsenault The easiest way to see what lines are being hit is to check the Coveralls action in a Pull Request (or simply see what the status for master is to get an idea: https://coveralls.io/github/CSHS-CWRA/RavenPy?branch=master)

It seems as though Coveralls doesn't report coverage status anymore. I'll see where the issue is with the lack of reporting.

richardarsenault commented 6 months ago

Hi, yeah I tried that and I get this, which I guess is what you are referring to? Basically I can't see which lines are being hit.

image

Zeitsperre commented 6 months ago

@richardarsenault

Sorry for the wait! I've stabilized the tests a bit more so that the builds will fail less often. This should help with ensuring that all the builds are sent to Coveralls and you are able to access the full reports.

If you're still not seeing the proper information, let me know again here. As a total last resort, you can try simply using the reporting feature of pytest-cov: https://pytest-cov.readthedocs.io/en/latest/reporting.html

richardarsenault commented 6 months ago

Hi @Zeitsperre,

Yea, still getting the same thing, can't see source files. Do I need special privileges to see these?

I can try and see the pytest-cov but it'll have to be in a few weeks to have time to get back into the setup!

richardarsenault commented 6 months ago

I found this in the settings, not sure if related? image

Maybe it is not able to access source files?

Zeitsperre commented 6 months ago

That's so strange. When I go on the site (https://coveralls.io/github/CSHS-CWRA/RavenPy), I can see everything perfectly fine:

image

I've raised your privileges on RavenPy (on GitHub). Maybe it's the case that only Administrators/Maintainers can see this information? I'll keep looking around.

Zeitsperre commented 6 months ago

@richardarsenault Have you logged into Coveralls?

image

richardarsenault commented 6 months ago

Well this is an embarrassment. I was not logged in... However I was also not logged in for the xhydro repo and I could see the files, so that is strange. In any case, I can see them now and will be able to contribute soon. Thanks!