Skip to content

Commit

Permalink
Merge pull request #140 from Ouranosinc/fix-envs
Browse files Browse the repository at this point in the history
Uniformize environments and update dependencies
  • Loading branch information
aulemahal authored Jan 17, 2023
2 parents 36a3ed1 + 7c1cbf6 commit a1f3957
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 36 deletions.
7 changes: 6 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
35 changes: 18 additions & 17 deletions environment-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
33 changes: 17 additions & 16 deletions environment.yml
Original file line number Diff line number Diff line change
@@ -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
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"dask",
"fsspec",
"geopandas",
"h5py",
"h5netcdf",
"intake",
"intake-esm>=2022.9.18",
"matplotlib",
Expand All @@ -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",
]

Expand Down

0 comments on commit a1f3957

Please sign in to comment.