pytroll / trollflow2

Next generation Trollflow. Trollflow is for batch-processing satellite data using Satpy
https://trollflow2.readthedocs.org/
GNU General Public License v3.0
10 stars 15 forks source link

Use scene properties instead of .attrs where needed #137

Closed pnuu closed 2 years ago

pnuu commented 2 years ago

In Satpy the Scene object no longer have metadata in the .attrs dictionary. This PR replaces that usage by collecting the relevant items from the .start_time, .end_time and .sensor_names attributes/properties where required.

The required Satpy version is set to >=0.32.0 to be certain .sensor_names attribute is present.

codecov[bot] commented 2 years ago

Codecov Report

Merging #137 (0bc72aa) into main (d00d2e0) will increase coverage by 0.24%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #137      +/-   ##
==========================================
+ Coverage   95.16%   95.40%   +0.24%     
==========================================
  Files          11       11              
  Lines        2296     2331      +35     
==========================================
+ Hits         2185     2224      +39     
+ Misses        111      107       -4     
Flag Coverage Δ
unittests 95.40% <100.00%> (+0.24%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
trollflow2/plugins/__init__.py 92.80% <100.00%> (+0.84%) :arrow_up:
trollflow2/tests/test_trollflow2.py 99.45% <100.00%> (+0.01%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update d00d2e0...0bc72aa. Read the comment docs.

gerritholl commented 2 years ago

Thanks for the quick work! We'll try it out. My only worry is that the unit tests still rely on mocking the interface with Satpy, such that next time the Satpy scene object changes its API, it won't be caught by those tests…