diff --git a/docs/conf.py b/docs/conf.py index 95a07363..56ae1f02 100755 --- a/docs/conf.py +++ b/docs/conf.py @@ -19,10 +19,15 @@ # absolute, like shown here. # import os -import warnings import sys +from pathlib import Path sys.path.insert(0, os.path.abspath('..')) +if os.environ.get('READTHEDOCS') and 'ESMFMKFILE' not in os.environ: + # RTD doesn't activate the env, and esmpy depends on a env var set there + # We assume the `os` package is in {ENV}/lib/pythonX.X/os.py + # See conda-forge/esmf-feedstock#91 and readthedocs/readthedocs.org#4067 + os.environ['ESMFMKFILE'] = str(Path(os.__file__).parent.parent / 'esmf.mk') import xscen # noqa import xarray # noqa diff --git a/environment-dev.yml b/environment-dev.yml index 1afcab4d..5d6e6c4e 100644 --- a/environment-dev.yml +++ b/environment-dev.yml @@ -5,32 +5,33 @@ dependencies: # Don't forget to sync the changes here with environment.yml! # Some pins here are meant to accelerate conda and might not be related to real needs # Main packages + - cartopy - cftime - clisops - - xarray - - xclim >=0.37 - - xesmf >=0.6.3 - # 2022-12-12: ESMpy 8.3.1 and 8.4.0 are incompatible with newest xesmf - - esmpy <=8.2 - dask + - fsspec - geopandas - - pandas - - rechunker - - shapely - - pyyaml + - h5netcdf - intake - intake-esm >=2022.9.18 - # This ensures that the correct numpy is installed as of 2022-07-15. - - numba >=0.55.2 - # Plotting - - cartopy - matplotlib - - nc-time-axis >=1.3.1 - # IO - - h5netcdf - netCDF4 - - pyarrow >=1.0.0 # For lighter in-memory catalogs + - numpy + - pandas + - pyyaml + - rechunker + - shapely + - xarray + - xclim >=0.37 + - xesmf >=0.7 - zarr + # To avoid bugs + # See https://github.com/esmf-org/esmf/issues/115 + # we add this "dependency" so the following pip install doesn't install anything else than xscen + - pytest-json-report + # Opt + - nc-time-axis >=1.3.1 + - pyarrow >=1.0.0 # For lighter in-memory catalogs # Dev - bumpversion - ipykernel diff --git a/environment.yml b/environment.yml index a4480c16..74186e46 100644 --- a/environment.yml +++ b/environment.yml @@ -1,34 +1,35 @@ name: xscen channels: - conda-forge - - defaults dependencies: - python >=3.8 - # FIXME: These entries require versions # Don't forget to sync the changes here with environment-dev.yml! # Main packages + - cartopy - cftime - clisops - dask - # 2022-12-12: ESMpy 8.3.1 and 8.4.0 are incompatible with newest xesmf - - esmpy <=8.2 + - fsspec - geopandas + - h5netcdf + - intake + - intake-esm >=2022.9.18 + - matplotlib + - netCDF4 + - numpy - pandas + - pyyaml - rechunker - shapely - xarray - xclim >=0.37 - - xesmf >=0.6.2 - - pyyaml - - intake - - intake-esm >=2022.9.18 - # Plotting - - cartopy - - matplotlib - - nc-time-axis >=1.3.1 - # IO - - h5py - - netCDF4 - - pyarrow + - xesmf >=0.7 - zarr + # To avoid bugs + # See https://github.com/esmf-org/esmf/issues/115 + # we add this "dependency" so the following pip install doesn't install anything else than xscen + - pytest-json-report + # Opt + - nc-time-axis >=1.3.1 + - pyarrow >=1.0.0 - pip diff --git a/setup.py b/setup.py index d1bad3ee..b05997b4 100644 --- a/setup.py +++ b/setup.py @@ -31,7 +31,7 @@ "dask", "fsspec", "geopandas", - "h5py", + "h5netcdf", "intake", "intake-esm>=2022.9.18", "matplotlib", @@ -43,7 +43,7 @@ "shapely", "xarray", "xclim>=0.37", - "xesmf>=0.6.2", # This is not available on pypi. + "xesmf>=0.7", # This is not available on pypi. "zarr", ]