raphaelquast / EOmaps

A library to create interactive maps of geographical datasets
https://eomaps.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
339 stars 25 forks source link

Testing warnings #227

Closed banesullivan closed 8 months ago

banesullivan commented 10 months ago

I'm a little concerned by the high number of warnings in the tests (~1300) from this CI run. While it appears many of these are the same warnings being thrown over and over leading to this high number, it would be good to track down each of these warnings to get a grasp on what issues are present and if any of them can be addressed directly in EOmaps.

From parsing the logs, this is the list I got (may have missed some):

One easy win might be to filter out the DownloadWarning with the following pytest configuration in the pyproject.toml (get's it down to 903 warnings for me)

[tool.pytest.ini_options]
filterwarnings = [
    "ignore:DownloadWarning",
]
raphaelquast commented 10 months ago

@banesullivan Thank you very much for opening this detailed issue!

I had a quick look where the extremely large number of warnings is coming from and realized that almost all warnings relate to the numpy DeprecationWarning about conversion of an array with ndim>0 to scalar.

This warning is ultimately related to the way how PyProj handles 1-element arrays as discussed here: https://github.com/pyproj4/pyproj/issues/1307.

raphaelquast commented 10 months ago

PyProj devs confirmed that the numpy-warning can safely be ignored (which will get rid of ~900 of the warnings). I've implemented a filter for all other warnings that can be ignored and now I'm down to 81 warnings (on latest run) again!

I'll report back once I find the time to check the remaining warnings!

yeelauren commented 9 months ago

Pasting the latest results from my test run in case it's helpful:

=========================================== short test summary info ============================================
FAILED tests/test_plot_shapes.py::TestPlotShapes::test_contour - AttributeError: 'NoneType' object has no attribute 'dpi'
=========================== 1 failed, 93 passed, 911 warnings in 2320.22s (0:38:40) ============================
raphaelquast commented 9 months ago

@yeelauren this seems to be a run from an outdated dev branch? The most recent test-suite contains 100 tests and currently finishes with 22 warnings on python 3.11 (see here)

raphaelquast commented 8 months ago

OK, latest test-suite is now at 123 tests and down to 17 warnings of which I consider only 1 as critical.
Therefore I've decided to close this issue for now. Feel free to re-open if you think it's still relevant!