intake / intake-stac

Intake interface to STAC data catalogs
https://intake-stac.readthedocs.io/en/latest/
BSD 2-Clause "Simplified" License
110 stars 25 forks source link

remove skimage dependency #40

Closed jhamman closed 4 years ago

jhamman commented 4 years ago

closes #30

cc @scottyhq

scottyhq commented 4 years ago

thanks @jhamman - at some point we should consider a separate pull request to remove the dependency from intake-array https://github.com/intake/intake-xarray/blob/c01f328d6157d1ba88c93ab6681834ea4c7c70b8/intake_xarray/image.py#L60

jhamman commented 4 years ago

thanks @jhamman - at some point we should consider a separate pull request to remove the dependency from intake-array https://github.com/intake/intake-xarray/blob/c01f328d6157d1ba88c93ab6681834ea4c7c70b8/intake_xarray/image.py#L60

I don't think this is a hard dependency but I do think they'll want to keep this as an optional-dependency.

trevorskaggs commented 4 years ago

@jhamman Was doing your walkthrough of intake-stac and seems that this removal might have borked the walkthrough a little! Without the dependency in place, line 2 in this section barks at ya: image

/Library/Python/3.7/site-packages/intake_xarray/image.py in reader(file, chunks, imread, preprocess, coerce_shape)
    146 
    147     if not imread:
--> 148         from skimage.io import imread
    149 
    150     with file as f:

ModuleNotFoundError: No module named 'skimage'

pip install scikit-image fixed her right up though!

jhamman commented 4 years ago

Hi @trevorskaggs - thanks for pointing this out. Intake-xarray uses scikit-image for png data sources. We've gone back and forth a few times here trying to decide what to list as hard dependencies. Right now, we're just listing sat-stac and intake-xarray, leaving it up to the user to decide on optional dependencies. I'm starting to see the value of adding some documentation outlining what a common set of optional deps may be.