pytroll / pyresample

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

Add missing meta keyword arguments on all dask map_blocks calls #556

Closed djhoese closed 5 months ago

djhoese commented 8 months ago

Without the meta= keyword argument to da.map_blocks dask will call the mapped function with fake/representative arguments to try to determine what the returned array and dtype are. This PR adds this kwarg to avoid this unnecessary execution of the function.

This very likely won't have any effect on performance, but it helps with debugging and is an unnecessary call if you forget it.

codecov[bot] commented 5 months ago

Codecov Report

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

Comparison is base (fa3771b) 93.99% compared to head (9ef274f) 93.99%. Report is 1 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #556 +/- ## ======================================= Coverage 93.99% 93.99% ======================================= Files 92 92 Lines 13777 13777 ======================================= Hits 12950 12950 Misses 827 827 ``` | [Flag](https://app.codecov.io/gh/pytroll/pyresample/pull/556/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/556/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pytroll) | `93.99% <100.00%> (ø)` | | 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 5 months ago

Coverage Status

coverage: 93.656%. remained the same when pulling 9ef274fc3f0f46af92d7972b47e5a45eb711c479 on djhoese:bugfix-dask-meta into fedb68090ae2ec97da9a20261ae7aa7eb879a563 on pytroll:main.