pytroll / satpy

Python package for earth-observing satellite data processing
http://satpy.readthedocs.org/en/latest/
GNU General Public License v3.0
1.06k stars 292 forks source link

add import rioxarray where readers actually need them #2824

Closed ludwigVonKoopa closed 3 months ago

ludwigVonKoopa commented 3 months ago

some readers use rasterio engine from xarray, but it actually use rioxarray in the backend, without stating it in the dependencies (see https://github.com/pydata/xarray/issues/7831).

It should be a xarray problems, and in the PR they tend to agree to udpate the message without stating explicitly which exact dependency is problematic (which I understand).

So importing rioxarray in the reader file seems the best compromise : It complain with an ModuleNotFoundError, which is easier to understand why it doesn't work and how to correct that.

ludwigVonKoopa commented 3 months ago

deleted rioxarray dependencies for geotiff writer, and standardized the noqa statement

codecov[bot] commented 3 months ago

Codecov Report

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

Project coverage is 95.94%. Comparing base (417c768) to head (76e6b82). Report is 356 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #2824 +/- ## ========================================== - Coverage 95.94% 95.94% -0.01% ========================================== Files 366 366 Lines 53613 53506 -107 ========================================== - Hits 51441 51334 -107 Misses 2172 2172 ``` | [Flag](https://app.codecov.io/gh/pytroll/satpy/pull/2824/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pytroll) | Coverage Δ | | |---|---|---| | [behaviourtests](https://app.codecov.io/gh/pytroll/satpy/pull/2824/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pytroll) | `4.04% <0.00%> (+<0.01%)` | :arrow_up: | | [unittests](https://app.codecov.io/gh/pytroll/satpy/pull/2824/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pytroll) | `96.03% <100.00%> (-0.01%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pytroll#carryforward-flags-in-the-pull-request-comment) to find out more.

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

coveralls commented 3 months ago

Pull Request Test Coverage Report for Build 9561417619

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details


Totals Coverage Status
Change from base Build 9513521871: 0.0%
Covered Lines: 51563
Relevant Lines: 53689

💛 - Coveralls
djhoese commented 3 months ago

Thanks @ludwigVonKoopa!