Closed rafa-guedes closed 4 months ago
And perhaps the same for scikit-learn
!
Hi @rafa-guedes,
Glad you find Herbie useful. Yes, this is something I have thought about too, but never bothered to do it since I use Cartopy all the time. I wondered how long it would take before someone said something when I added scikit-learn as a new dependency; didn't take long 😆
Yes, I'd be open to a PR if you want to take a stab at it. Keeping it super simple with try/except statements should be good. Perhaps even matplotlib could be optional?
[ ] Edit pyproject.toml
to something like this
dependencies = [
- "cartopy",
"cfgrib",
- "matplotlib",
"metpy",
"numpy",
"pandas",
"pygrib",
- "scikit-learn",
"toml",
"xarray",
]
[project.optional-dependencies]
+ extras = ["cartopy", "matplotlib", "scikit-learn"]
Thanks for providing this very useful library. I was wondering if you would consider making cartopy an optional dependency instead of a required one. Cartopy is a relatively large dependency which fails to build easily in some systems, and it is not required if one only requires the data access capability in the library. It looks like cartopy is used in the hrrr_zarr.py and accessors.py modules, perhaps some try/except conditional import in those modules with an appropriate exception message indicating the required dependency needs to be installed could work? I'm happy to submit a pull request if you think this is helpful.