Remove unnecessary dependencies as "hard" requirements (PyPI and conda-forge)
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:
https://github.com/pytroll/satpy/blob/9030005a17bab9eac90662b4a0a7650b327999fe/pyproject.toml#L8-L25
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.
I can imagine this could be problematic for "works out-of-the-box" experience, when we already have some users that choke on "why to I need install X to read format Y"...
Yes...but maybe if most dependencies are optional then they'll just get used to it 🤷♂️
I propose the new hard requirements will be (including numbers):
"platformdirs",
"dask[array]>=2025.10.0",
"donfig",
"numpy>=2.0",
"pooch",
"pyproj>=2.2",
"pyresample>=1.34.0",
"pyyaml>=5.1",
"trollsift",
"xarray>=2025.10.1",
Which means removing the below which I personally would put in various tiers of importance (1 being most important). I was torn on pooch being included above, but I decided to keep it as a hard requirement.
Tier 1
"pillow",
"trollimage>=1.24",
The question is if Scene.show is a builtin "has to work" functionality and if so then these have to be hard requirements. Or at least trollimage does (which will have the PIL requirement).
Tier 2
Used for specific functionality. Zarr is primarily used for caching.
"pyorbital",
"zarr",
Tier 3
Used by specific features. The packaging package seems to be used for its Version class and only in CF-related code to check the xarray version. Pykdtree is nearest kdtree resampling only. It is the default resampler so maybe it should be higher up in the tier list but I don't know.
"packaging",
"pykdtree",