-
Notifications
You must be signed in to change notification settings - Fork 305
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update add_overlay to make use of the full pycoast capabilities #934
Conversation
After thinking more about this, I think new_img = orig_img.pil_apply(_burn_overlays)(*args, **kwargs) ( |
if overlays is None: | ||
# fill with sensible defaults | ||
general_params = {'outline': color or (0, 0, 0), | ||
'width': width or 0.5} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are these sensible defaults not the defaults in pycoast?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Haha good question :) I just took what we had before in this method
Codecov Report
@@ Coverage Diff @@
## master #934 +/- ##
=========================================
+ Coverage 85.41% 86.2% +0.79%
=========================================
Files 172 174 +2
Lines 26046 26791 +745
=========================================
+ Hits 22246 23094 +848
+ Misses 3800 3697 -103
Continue to review full report at Codecov.
|
@@ -5,7 +5,7 @@ env: | |||
- PYTHON_VERSION=$TRAVIS_PYTHON_VERSION | |||
- NUMPY_VERSION=stable | |||
- MAIN_CMD='python setup.py' | |||
- CONDA_DEPENDENCIES='xarray!=0.13.0 dask distributed toolz Cython sphinx cartopy pillow matplotlib scipy pyyaml pyproj pyresample coveralls coverage codecov behave netcdf4 h5py h5netcdf gdal rasterio imageio pyhdf mock libtiff pycoast pydecorate geoviews zarr six' | |||
- CONDA_DEPENDENCIES='xarray!=0.13.0 dask distributed toolz Cython sphinx cartopy pillow matplotlib scipy pyyaml pyproj pyresample coveralls coverage codecov behave netcdf4 h5py h5netcdf gdal rasterio imageio pyhdf mock libtiff geoviews zarr six' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are these being implicitly installed with the test commands? Shouldn't these be added to the PIP_DEPENDENCIES?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, they are mocked now, so they aren't needed anymore for the tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh interesting. Do we want them to be mocked?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think for unit tests they should. But I also think we should have system tests (running every night) what would use actual pycoast and pydecorate to make sure compatibility isn't broken.
IMHO this has the following advantages:
- we can continue having passing tests (and thus continue developping) even when an external lib changes its API
- unit tests install and run faster
- unit tests don't need to know the internals of the external lib, so it keeps the testing code cleaner
BUT as said above, we then need to run system tests to make sure the whole system still works.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My only remaining question besides the comment I just made a second ago is whether or not an issue should be made to move the logical defaults to pycoast? Otherwise LGTM.
I'll make an issue, thanks for reviewing so fast ! |
This requires pytroll/pycoast#32 and pytroll/trollimage#57 to be merged and released
flake8 satpy