diff --git a/herbie/__init__.py b/herbie/__init__.py index 07277612..053e416e 100644 --- a/herbie/__init__.py +++ b/herbie/__init__.py @@ -205,3 +205,4 @@ def template(self): from herbie.fast import FastHerbie from herbie.latest import HerbieLatest, HerbieWait from herbie.wgrib2 import wgrib2 +from herbie.accessors import HerbieAccessor diff --git a/herbie/core.py b/herbie/core.py index 8b378abb..2c0db599 100644 --- a/herbie/core.py +++ b/herbie/core.py @@ -37,17 +37,7 @@ # NOTE: The config dict values are retrieved from __init__ and read # from the file ${HOME}/.config/herbie/config.toml # Path is imported from __init__ because it has my custom methods. - -try: - # Load custom xarray accessors - import herbie.accessors # noqa: F401 -except Exception: - warnings.warn( - "herbie xarray accessors could not be imported." - "Probably missing a dependency like MetPy." - "If you want to use these functions, try" - "`pip install metpy`" - ) +# Load custom xarray accessors log = logging.getLogger(__name__) diff --git a/pyproject.toml b/pyproject.toml index cc7385cc..6b8bac6b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -33,6 +33,7 @@ dependencies = [ "cfgrib>=0.9.15", "numpy>=2.2.1", "pandas>=2.2.3", + "pyproj>=3.7.0", "requests>=2.23.3", "toml>=0.10.2", # TODO: Drop in favor of tomllib when Python >=3.11 is required. "xarray>=2025.1.1", diff --git a/requirements.txt b/requirements.txt index 2932dfdb..38cf9e4d 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,6 +4,7 @@ matplotlib metpy numpy pandas +pyproj pygrib scikit-learn toml