seagrid.download.optional#
Download packages that a “clean” install of seagrid leaves out.
A normal install includes everything. When one of these packages stops
installing or breaks, leave it out with uv’s dependency exclusion (see
Installation). seagrid still imports, and only
the sources that need the package fail, with an ImportError that
names it.
Examples
>>> from seagrid.download import optional
>>> sorted(optional.PACKAGES)
['copernicusmarine', 'earthaccess', 'pyhdf']
>>> isinstance(optional.status(), dict)
True
Module Attributes
Package name -> the sources that need it. |
Functions
|
Return the error raised when an optional download package is not installed. |
|
Return which optional download packages are installed. |
- seagrid.download.optional.PACKAGES: dict[str, str] = {'copernicusmarine': 'the Copernicus Marine sources (cmems_globgc, glorys_carb, ostia, smoc)', 'earthaccess': 'the NASA Earthdata sources (avhrr, modis_a, mur25, olci, seawifs, viirs)', 'pyhdf': 'the CAFE primary production source (HDF4 files)'}#
Package name -> the sources that need it.
- seagrid.download.optional.missing(package)[source]#
Return the error raised when an optional download package is not installed.
- Parameters:
- Returns:
ImportError– With a message naming the package, the sources that need it and how to install it.- Return type:
Examples
>>> print(missing("pyhdf")) pyhdf is not installed; it is needed by the CAFE primary production ...