Skip to content

Remove unnecessary dependencies as "hard" requirements (PyPI and conda-forge) #3212

@djhoese

Description

@djhoese

Feature Request

Is your feature request related to a problem? Please describe.
As mentioned in #3123, I have at least one case where I only need a small subset of functionality from Satpy: no composites, no resampling, and only a reader and writer dependency on NetCDF. At the time of writing the dependency list is:

satpy/pyproject.toml

Lines 8 to 25 in 9030005

dependencies = [
"platformdirs",
"dask[array]>=0.17.1",
"donfig",
"numpy>=1.21",
"packaging",
"pillow",
"pooch",
"pykdtree",
"pyorbital",
"pyproj>=2.2",
"pyresample>=1.24.0",
"pyyaml>=5.1",
"trollimage>=1.24",
"trollsift",
"xarray>=0.14.1",
"zarr",
]

This means for my use case I could probably drop pillow, pooch, pykdtree, pyorbital, trollimage, and zarr. Pyresample would only be used for geometry objects (AreaDefinition), but further customization of that dependency sounds too difficult at the moment.

Describe the solution you'd like
I'd like to remove some of the above listed dependencies as hard requirements both in the pyproject.toml dependencies list and also the conda-forge package. The conda-forge package also goes as far as requiring h5py and netcdf4 and pyspectral as a "convenience". Additionally, trollimage requires rasterio and dask to be used on conda-forge which may be a little much, but my above suggestion is to remove trollimage as a hard dependency so maybe that's OK for now.

For PyPI there isn't much we can do except define "extras". For conda-forge it would be possible to have a "base" package of Satpy with minimal dependencies:

https://conda-forge.org/docs/maintainer/knowledge_base/#multi-output-recipes

Describe any changes to existing user workflow
Are there any backwards compatibility concerns? Changes to the build process? Additional dependencies?

Yes. This is a huge backwards incompatibility and should be reserved for the Satpy 1.0 release.

Additional context
Have you considered any alternative solutions or is there anything else that would help describe your request.

My current workaround is to install Satpy and then force-remove the packages I don't need to save space.

Metadata

Metadata

Labels

No labels
No labels

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions