pytroll / pyresample

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

Refactor the area loading internal function #451

Closed mraspaud closed 2 years ago

mraspaud commented 2 years ago

~This PR adds the possibility to create an area definition from a yaml string. So create_area_def_from_dict and create_area_def_from_yaml utility functions were added.~

This PR refactors the area loading a little.

gerritholl commented 2 years ago

How is this different from load_area_from_string?

mraspaud commented 2 years ago

it probably isn't, I wasn't aware it existed :) I'll have a look

mraspaud commented 2 years ago

Sorry about that @gerritholl , I was so sure this didn't exist already. Anyway, I removed the meat of this and just left the small refactoring.

djhoese commented 2 years ago

Regarding the test failures:

This has to do with new versions of setuptools. I would think we should be fine, but obviously things aren't working. It looks like there has been a patch release of setuptools since the last CI run here. It may be worth restarting them @mraspaud but I wanted to see what you thought. I can't tell from the output what version of setuptools was used in the test install. Or I wonder if this requires a new version of versioneer.

djhoese commented 2 years ago

Ah, there was a versioneer release to fix it: https://github.com/python-versioneer/python-versioneer/releases/tag/0.23

mraspaud commented 2 years ago

Updated versioneer, let's see how it goes

codecov[bot] commented 2 years ago

Codecov Report

Merging #451 (f44e616) into main (df76244) will increase coverage by 0.00%. The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main     #451   +/-   ##
=======================================
  Coverage   94.28%   94.28%           
=======================================
  Files          68       69    +1     
  Lines       12361    12369    +8     
=======================================
+ Hits        11654    11662    +8     
  Misses        707      707           
Flag Coverage Δ
unittests 94.28% <100.00%> (+<0.01%) :arrow_up:

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

Impacted Files Coverage Δ
pyresample/test/test_utils.py 100.00% <ø> (ø)
pyresample/area_config.py 90.65% <100.00%> (+0.10%) :arrow_up:
pyresample/test/test_area_config.py 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

coveralls commented 2 years ago

Coverage Status

Coverage increased (+0.004%) to 94.129% when pulling f44e616a75e97b5f2f352b936294af51232ab44b on mraspaud:feature-area-def-from-yaml into df76244fded7011ef09269b921c6fee981319a92 on pytroll:main.