pytroll / pyresample

Geospatial image resampling in Python
http://pyresample.readthedocs.org
GNU Lesser General Public License v3.0
348 stars 94 forks source link

Add attrs to future swath definition #578

Closed mraspaud closed 7 months ago

mraspaud commented 8 months ago

This PR adds attrs to the future swath definition.

djhoese commented 8 months ago

You brought up nprocs on slack, do we want to deprecate that with a warning in the old class?

mraspaud commented 8 months ago

I don't know. On one hand, we should encourage users to go over to dask, but on the other hand, maybe that's a showstopper for some (I have not heard of such myself though)?

djhoese commented 8 months ago

I think it is more of the nprocs on __init__ being a problem. Having it in other places is fine (although could be refactored to be presented differently). For example, getting coordinates or reprojecting or whatever, then nprocs makes sense as a convenience to say "do it with multiple cores, whatever that means". I don't think dask is usually a show stopper, but it may be an unnecessary dependency in some users eyes. Especially if it becomes a hard requirement when users are totally fine doing everything in numpy land.

Side note: nprocs could maybe be a global setting in pyresample.config to hide it away.

codecov[bot] commented 7 months ago

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (eaf8367) 94.05% compared to head (5b05353) 94.01%. Report is 42 commits behind head on main.

Files Patch % Lines
pyresample/future/geometry/swath.py 95.45% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #578 +/- ## ========================================== - Coverage 94.05% 94.01% -0.04% ========================================== Files 90 92 +2 Lines 13575 13836 +261 ========================================== + Hits 12768 13008 +240 - Misses 807 828 +21 ``` | [Flag](https://app.codecov.io/gh/pytroll/pyresample/pull/578/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pytroll) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/pytroll/pyresample/pull/578/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pytroll) | `94.01% <98.07%> (-0.04%)` | :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 7 months ago

Coverage Status

coverage: 93.676% (+0.03%) from 93.649% when pulling 5b05353ec51f18ced1ca1a51971d4ee12fe961a4 on mraspaud:add-attrs-to-swath-def into eaf8367a0554cb43c570caaf0e311bf1f3e8c17d on pytroll:main.