Skip to content

Commit

Permalink
Merge pull request #426 from ocefpaf/patch_xarray_erddapy_4_pandas_2
Browse files Browse the repository at this point in the history
patch both xarray and erddapy for pandas 2.0
  • Loading branch information
jaimergp authored Apr 5, 2023
2 parents fe47862 + 56ec5a3 commit 2f1df76
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
14 changes: 14 additions & 0 deletions recipe/gen_patch_json.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import tqdm
import re
import requests
import packaging.version
import pkg_resources

from get_license_family import get_license_family
Expand Down Expand Up @@ -1594,6 +1595,19 @@ def _gen_new_index_per_key(repodata, subdir, index_key):
if record_name == "xarray" and record["version"] == "0.19.0":
_replace_pin("python >=3.6", "python >=3.7", deps, record)

# Xarray <=2023.2.0 doesn't support pandas 2.0.
# https://github.com/pydata/xarray/issues/7716
if record_name == "xarray" and packaging.version.Version(record["version"]) <= packaging.version.Version("2023.1.0"):
_replace_pin("pandas >=1.3", "pandas >=1.3,<2a0", deps, record)

if record_name == "xarray" and packaging.version.Version(record["version"]) == packaging.version.Version("2023.2.0"):
_replace_pin("pandas >=1.4", "pandas >=1.4,<2a0", deps, record)

# erddapy <=1.3 doesn't support pandas 2.0.
# https://github.com/ioos/erddapy/issues/299
if record_name == "erddapy" and packaging.version.Version(record["version"]) < packaging.version.Version("1.3"):
_replace_pin("pandas >=0.20.3", "pandas >=0.20.3,<2a0", deps, record)

# Rioxarray 0.14.0 dropped Python 3.8 and rasterio 1.1, need to patch
# first build to use a minimum of Python 3.9 and rasterio 1.2
# See https://github.com/conda-forge/rioxarray-feedstock/pull/70
Expand Down
1 change: 1 addition & 0 deletions recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ requirements:
- requests
- tqdm
- license-expression
- packaging
host:
run:

Expand Down

0 comments on commit 2f1df76

Please sign in to comment.