OpenSenseAction / poligrain

Simplify common tasks for working with point, line and gridded sensor data, focusing on rainfall observations.
https://poligrain.readthedocs.io
BSD 3-Clause "New" or "Revised" License
2 stars 10 forks source link

Add testing and linting of notebooks to CI #11

Closed cchwala closed 5 months ago

cchwala commented 5 months ago

Add pytest run to CI for notebooks using nbmake and also run ruff linting.

codecov[bot] commented 5 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (b98404b) 100.00% compared to head (4d900ae) 100.00%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #11 +/- ## ========================================= Coverage 100.00% 100.00% ========================================= Files 2 2 Lines 20 20 ========================================= Hits 20 20 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

cchwala commented 5 months ago

CI now fails for Windows... 🙈

ERROR: file or directory not found: docs/notebooks/*ipynb
cchwala commented 5 months ago

I tried many things to successfully run to run notebook tests also for Windows (see last commits...), but I could not get it to work.

Some ideas I tried are from this stackoverflow answer and the comments there, plus some variations.

I now dropped the test of the notebook for Windows, since it is IMO enough to test the notebooks on Linux and MacOS (actually one OS would be enough I guess) because our actual code is tested also on Windows and it is enough to just assure that the notebooks work in general, checking that there is nothing wrong with a missing dataset etc...

cchwala commented 5 months ago

I now also added linting of notebooks via ruff, see last commit 🚀