From 406c04793797d69bf9d34cc8e28367d4751ddd15 Mon Sep 17 00:00:00 2001 From: Vecko <36369090+VeckoTheGecko@users.noreply.github.com> Date: Fri, 12 Sep 2025 18:26:08 +0200 Subject: [PATCH 01/89] Move xarray badge to top --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e7c168d8f0d..d8ac9983d68 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,6 @@ # xarray: N-D labeled arrays and datasets +[![Xarray](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/pydata/xarray/refs/heads/main/doc/badge.json)](https://xarray.dev) [![CI](https://github.com/pydata/xarray/actions/workflows/ci.yaml/badge.svg?branch=main)](https://github.com/pydata/xarray/actions/workflows/ci.yaml?query=branch%3Amain) [![Code coverage](https://codecov.io/gh/pydata/xarray/branch/main/graph/badge.svg?flag=unittests)](https://codecov.io/gh/pydata/xarray) [![Docs](https://readthedocs.org/projects/xray/badge/?version=latest)](https://docs.xarray.dev/) @@ -12,7 +13,6 @@ [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.598201.svg)](https://doi.org/10.5281/zenodo.598201) [![Examples on binder](https://img.shields.io/badge/launch-binder-579ACA.svg?logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFkAAABZCAMAAABi1XidAAAB8lBMVEX///9XmsrmZYH1olJXmsr1olJXmsrmZYH1olJXmsr1olJXmsrmZYH1olL1olJXmsr1olJXmsrmZYH1olL1olJXmsrmZYH1olJXmsr1olL1olJXmsrmZYH1olL1olJXmsrmZYH1olL1olL0nFf1olJXmsrmZYH1olJXmsq8dZb1olJXmsrmZYH1olJXmspXmspXmsr1olL1olJXmsrmZYH1olJXmsr1olL1olJXmsrmZYH1olL1olLeaIVXmsrmZYH1olL1olL1olJXmsrmZYH1olLna31Xmsr1olJXmsr1olJXmsrmZYH1olLqoVr1olJXmsr1olJXmsrmZYH1olL1olKkfaPobXvviGabgadXmsqThKuofKHmZ4Dobnr1olJXmsr1olJXmspXmsr1olJXmsrfZ4TuhWn1olL1olJXmsqBi7X1olJXmspZmslbmMhbmsdemsVfl8ZgmsNim8Jpk8F0m7R4m7F5nLB6jbh7jbiDirOEibOGnKaMhq+PnaCVg6qWg6qegKaff6WhnpKofKGtnomxeZy3noG6dZi+n3vCcpPDcpPGn3bLb4/Mb47UbIrVa4rYoGjdaIbeaIXhoWHmZYHobXvpcHjqdHXreHLroVrsfG/uhGnuh2bwj2Hxk17yl1vzmljzm1j0nlX1olL3AJXWAAAAbXRSTlMAEBAQHx8gICAuLjAwMDw9PUBAQEpQUFBXV1hgYGBkcHBwcXl8gICAgoiIkJCQlJicnJ2goKCmqK+wsLC4usDAwMjP0NDQ1NbW3Nzg4ODi5+3v8PDw8/T09PX29vb39/f5+fr7+/z8/Pz9/v7+zczCxgAABC5JREFUeAHN1ul3k0UUBvCb1CTVpmpaitAGSLSpSuKCLWpbTKNJFGlcSMAFF63iUmRccNG6gLbuxkXU66JAUef/9LSpmXnyLr3T5AO/rzl5zj137p136BISy44fKJXuGN/d19PUfYeO67Znqtf2KH33Id1psXoFdW30sPZ1sMvs2D060AHqws4FHeJojLZqnw53cmfvg+XR8mC0OEjuxrXEkX5ydeVJLVIlV0e10PXk5k7dYeHu7Cj1j+49uKg7uLU61tGLw1lq27ugQYlclHC4bgv7VQ+TAyj5Zc/UjsPvs1sd5cWryWObtvWT2EPa4rtnWW3JkpjggEpbOsPr7F7EyNewtpBIslA7p43HCsnwooXTEc3UmPmCNn5lrqTJxy6nRmcavGZVt/3Da2pD5NHvsOHJCrdc1G2r3DITpU7yic7w/7Rxnjc0kt5GC4djiv2Sz3Fb2iEZg41/ddsFDoyuYrIkmFehz0HR2thPgQqMyQYb2OtB0WxsZ3BeG3+wpRb1vzl2UYBog8FfGhttFKjtAclnZYrRo9ryG9uG/FZQU4AEg8ZE9LjGMzTmqKXPLnlWVnIlQQTvxJf8ip7VgjZjyVPrjw1te5otM7RmP7xm+sK2Gv9I8Gi++BRbEkR9EBw8zRUcKxwp73xkaLiqQb+kGduJTNHG72zcW9LoJgqQxpP3/Tj//c3yB0tqzaml05/+orHLksVO+95kX7/7qgJvnjlrfr2Ggsyx0eoy9uPzN5SPd86aXggOsEKW2Prz7du3VID3/tzs/sSRs2w7ovVHKtjrX2pd7ZMlTxAYfBAL9jiDwfLkq55Tm7ifhMlTGPyCAs7RFRhn47JnlcB9RM5T97ASuZXIcVNuUDIndpDbdsfrqsOppeXl5Y+XVKdjFCTh+zGaVuj0d9zy05PPK3QzBamxdwtTCrzyg/2Rvf2EstUjordGwa/kx9mSJLr8mLLtCW8HHGJc2R5hS219IiF6PnTusOqcMl57gm0Z8kanKMAQg0qSyuZfn7zItsbGyO9QlnxY0eCuD1XL2ys/MsrQhltE7Ug0uFOzufJFE2PxBo/YAx8XPPdDwWN0MrDRYIZF0mSMKCNHgaIVFoBbNoLJ7tEQDKxGF0kcLQimojCZopv0OkNOyWCCg9XMVAi7ARJzQdM2QUh0gmBozjc3Skg6dSBRqDGYSUOu66Zg+I2fNZs/M3/f/Grl/XnyF1Gw3VKCez0PN5IUfFLqvgUN4C0qNqYs5YhPL+aVZYDE4IpUk57oSFnJm4FyCqqOE0jhY2SMyLFoo56zyo6becOS5UVDdj7Vih0zp+tcMhwRpBeLyqtIjlJKAIZSbI8SGSF3k0pA3mR5tHuwPFoa7N7reoq2bqCsAk1HqCu5uvI1n6JuRXI+S1Mco54YmYTwcn6Aeic+kssXi8XpXC4V3t7/ADuTNKaQJdScAAAAAElFTkSuQmCC)](https://mybinder.org/v2/gh/pydata/xarray/main?urlpath=lab/tree/doc/examples/weather-data.ipynb) [![Twitter](https://img.shields.io/twitter/follow/xarray_dev?style=social)](https://x.com/xarray_dev) -[![image](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/pydata/xarray/refs/heads/main/doc/badge.json)](https://xarray.dev) **xarray** (pronounced "ex-array", formerly known as **xray**) is an open source project and Python package that makes working with labelled multi-dimensional arrays From f16d02c96e882276eeca2b7ece232c343e9f7bb4 Mon Sep 17 00:00:00 2001 From: Vecko <36369090+VeckoTheGecko@users.noreply.github.com> Date: Fri, 12 Sep 2025 18:46:29 +0200 Subject: [PATCH 02/89] DOC: Add Pixi badge --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index d8ac9983d68..14d621aabf7 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ # xarray: N-D labeled arrays and datasets [![Xarray](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/pydata/xarray/refs/heads/main/doc/badge.json)](https://xarray.dev) +[![Powered by Pixi](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/prefix-dev/pixi/main/assets/badge/v0.json)](https://pixi.sh) [![CI](https://github.com/pydata/xarray/actions/workflows/ci.yaml/badge.svg?branch=main)](https://github.com/pydata/xarray/actions/workflows/ci.yaml?query=branch%3Amain) [![Code coverage](https://codecov.io/gh/pydata/xarray/branch/main/graph/badge.svg?flag=unittests)](https://codecov.io/gh/pydata/xarray) [![Docs](https://readthedocs.org/projects/xray/badge/?version=latest)](https://docs.xarray.dev/) From c4573dfcb343966b4bc94ca569fe926a4630f3f1 Mon Sep 17 00:00:00 2001 From: Vecko <36369090+VeckoTheGecko@users.noreply.github.com> Date: Fri, 12 Sep 2025 19:15:11 +0200 Subject: [PATCH 03/89] Add pixi environment - Using the bare-minimum.yml requirements file to act as a starting point to build the composable environments - Add pixi.lock to gitignore (no need to commit lock files in library repos) - Update .gitattributes (automatically done by pixi) - Configure xarray as source dependency with dynamic versioning --- .gitattributes | 2 ++ .gitignore | 4 ++++ pixi.toml | 35 +++++++++++++++++++++++++++++++++++ 3 files changed, 41 insertions(+) create mode 100644 pixi.toml diff --git a/.gitattributes b/.gitattributes index 7a79ddd6b0b..3c57696a336 100644 --- a/.gitattributes +++ b/.gitattributes @@ -2,3 +2,5 @@ doc/whats-new.rst merge=union # allow installing from git archives .git_archival.txt export-subst +# SCM syntax highlighting & preventing 3-way merges +pixi.lock merge=binary linguist-language=YAML linguist-generated=true diff --git a/.gitignore b/.gitignore index 19dceefd192..bb2b49c2cd4 100644 --- a/.gitignore +++ b/.gitignore @@ -91,3 +91,7 @@ doc/videos-gallery.txt uv.lock mypy_report/ xarray-docs/ + +# pixi environments +.pixi +pixi.lock diff --git a/pixi.toml b/pixi.toml new file mode 100644 index 00000000000..774516f39c4 --- /dev/null +++ b/pixi.toml @@ -0,0 +1,35 @@ +[project] +preview = ["pixi-build"] +channels = ["conda-forge", "nodefaults"] +platforms = ["win-64", "linux-64", "osx-64", "osx-arm64"] + +[tasks] + +[dependencies] +python = "3.11.*" +coveralls = "*" +pip = "*" +pytest = "*" +pytest-asyncio = "*" +pytest-cov = "*" +pytest-env = "*" +pytest-mypy-plugins = "*" +pytest-timeout = "*" +pytest-xdist = "*" +numpy = "1.26.*" +packaging = "24.1.*" +pandas = "2.2.*" + +git = "*" # needed for dynamic versioning + + +[package] +name = "xarray" +version = "dynamic" # dynamic versioning needs better support in pixi https://github.com/prefix-dev/pixi/issues/2923#issuecomment-2598460666 . Putting `version = "dynamic"` here for now until pixi recommends something else. + +[package.build] +backend = { name = "pixi-build-python", version = "==0.3.2" } + +[package.host-dependencies] +setuptools = "*" +setuptools_scm = "*" From 577cf181912fb3b921d6a4b4c4dcf14912a32cd5 Mon Sep 17 00:00:00 2001 From: Vecko <36369090+VeckoTheGecko@users.noreply.github.com> Date: Fri, 12 Sep 2025 20:00:37 +0200 Subject: [PATCH 04/89] Split dependencies into features and define environments --- pixi.toml | 38 ++++++++++++++++++++++++++++++++------ 1 file changed, 32 insertions(+), 6 deletions(-) diff --git a/pixi.toml b/pixi.toml index 774516f39c4..725ea488c91 100644 --- a/pixi.toml +++ b/pixi.toml @@ -3,12 +3,36 @@ preview = ["pixi-build"] channels = ["conda-forge", "nodefaults"] platforms = ["win-64", "linux-64", "osx-64", "osx-arm64"] + [tasks] +test = { cmd = "pytest" } + +[tasks.test-all] +depends-on = [ + { task = "test", environment = "test" }, + { task = "test", environment = "test-bare-min" }, +] + +[environments] +test = { features = ["test"], solve-group = "test" } +test-bare-min = { features = ["test", "minimal"], solve-group = "test" } +pre-commit = { features = ["pre-commit"], no-default-feature = true } [dependencies] +python = "*" +numpy = "*" +pandas = "*" + +packaging = "24.1.*" #? Can be removed? +git = "*" # needed for dynamic versioning + +[feature.minimal.dependencies] python = "3.11.*" -coveralls = "*" -pip = "*" +numpy = "1.26.*" +pandas = "2.2.*" + + +[feature.test.dependencies] pytest = "*" pytest-asyncio = "*" pytest-cov = "*" @@ -16,11 +40,13 @@ pytest-env = "*" pytest-mypy-plugins = "*" pytest-timeout = "*" pytest-xdist = "*" -numpy = "1.26.*" -packaging = "24.1.*" -pandas = "2.2.*" +coveralls = "*" + +[feature.pre-commit.dependencies] +pre-commit = "*" -git = "*" # needed for dynamic versioning +[feature.pre-commit.tasks] +pre-commit = { cmd = "pre-commit run --all-files" } [package] From 33d4a1431c80040438fb9839ea65df56294a4b71 Mon Sep 17 00:00:00 2001 From: Vecko <36369090+VeckoTheGecko@users.noreply.github.com> Date: Fri, 12 Sep 2025 20:10:40 +0200 Subject: [PATCH 05/89] Copy requriements file to new folder for requirement linting --- .github/workflows/ci-additional.yaml | 4 +- ci/requirement-linting/bare-minimum.yml | 18 +++++++++ ci/requirement-linting/min-all-deps.yml | 54 +++++++++++++++++++++++++ 3 files changed, 74 insertions(+), 2 deletions(-) create mode 100644 ci/requirement-linting/bare-minimum.yml create mode 100644 ci/requirement-linting/min-all-deps.yml diff --git a/.github/workflows/ci-additional.yaml b/.github/workflows/ci-additional.yaml index bb5a1217c18..251856540ed 100644 --- a/.github/workflows/ci-additional.yaml +++ b/.github/workflows/ci-additional.yaml @@ -319,10 +319,10 @@ jobs: uses: xarray-contrib/minimum-dependency-versions@e2ac8ff0a76e8603d8536ef5d64743a375961ce9 # v0.1.1 with: policy: ci/policy.yaml - environment-paths: ci/requirements/min-all-deps.yml + environment-paths: ci/requirement-linting/min-all-deps.yml - name: Bare minimum versions policy uses: xarray-contrib/minimum-dependency-versions@e2ac8ff0a76e8603d8536ef5d64743a375961ce9 # v0.1.1 with: policy: ci/policy.yaml - environment-paths: ci/requirements/bare-minimum.yml + environment-paths: ci/requirement-linting/bare-minimum.yml diff --git a/ci/requirement-linting/bare-minimum.yml b/ci/requirement-linting/bare-minimum.yml new file mode 100644 index 00000000000..5ba31759969 --- /dev/null +++ b/ci/requirement-linting/bare-minimum.yml @@ -0,0 +1,18 @@ +name: xarray-tests #! keep this file in sync with pixi.toml +channels: + - conda-forge + - nodefaults +dependencies: + - python=3.11 + - coveralls + - pip + - pytest + - pytest-asyncio + - pytest-cov + - pytest-env + - pytest-mypy-plugins + - pytest-timeout + - pytest-xdist + - numpy=1.26 + - packaging=24.1 + - pandas=2.2 diff --git a/ci/requirement-linting/min-all-deps.yml b/ci/requirement-linting/min-all-deps.yml new file mode 100644 index 00000000000..4f90228294b --- /dev/null +++ b/ci/requirement-linting/min-all-deps.yml @@ -0,0 +1,54 @@ +name: xarray-tests #! keep this file in sync with pixi.toml +channels: + - conda-forge + - nodefaults +dependencies: + # MINIMUM VERSIONS POLICY: see doc/user-guide/installing.rst + # Run ci/min_deps_check.py to verify that this file respects the policy. + # When upgrading python, numpy, or pandas, must also change + # doc/user-guide/installing.rst, doc/user-guide/plotting.rst and setup.py. + - python=3.11 + - array-api-strict=1.1 # dependency for testing the array api compat + - boto3=1.34 + - bottleneck=1.4 + - cartopy=0.23 + - cftime=1.6 + - coveralls + - dask-core=2024.6 + - distributed=2024.6 + - flox=0.9 + - h5netcdf=1.3 + # h5py and hdf5 tend to cause conflicts + # for e.g. hdf5 1.12 conflicts with h5py=3.1 + # prioritize bumping other packages instead + - h5py=3.11 + - hdf5=1.14 + - hypothesis + - iris=3.9 + - lxml=5.1 # Optional dep of pydap + - matplotlib-base=3.8 + - nc-time-axis=1.4 + # netcdf follows a 1.major.minor[.patch] convention + # (see https://github.com/Unidata/netcdf4-python/issues/1090) + - netcdf4=1.6 + - numba=0.60 + - numbagg=0.8 + - numpy=1.26 + - packaging=24.1 + - pandas=2.2 + - pint=0.24 + - pip + - pydap=3.5.0 + - pytest + - pytest-asyncio + - pytest-cov + - pytest-env + - pytest-mypy-plugins + - pytest-timeout + - pytest-xdist + - rasterio=1.3 + - scipy=1.13 + - seaborn=0.13 + - sparse=0.15 + - toolz=0.12 + - zarr=2.18 From 2bd86055e1c778e16f8d5dfb4459bc5a41830b0b Mon Sep 17 00:00:00 2001 From: Vecko <36369090+VeckoTheGecko@users.noreply.github.com> Date: Fri, 12 Sep 2025 20:13:06 +0200 Subject: [PATCH 06/89] Remove testing, 'pip', and 'packaging' dependencies from requirements files Already ported to pixi --- ci/requirements/all-but-dask.yml | 9 --------- ci/requirements/all-but-numba.yml | 9 --------- ci/requirements/bare-min-and-scipy.yml | 8 -------- ci/requirements/bare-minimum.yml | 8 -------- ci/requirements/doc.yml | 2 -- ci/requirements/environment-3.14.yml | 9 --------- ci/requirements/environment-windows-3.14.yml | 9 --------- ci/requirements/environment-windows.yml | 9 --------- ci/requirements/environment.yml | 9 --------- ci/requirements/min-all-deps.yml | 8 -------- 10 files changed, 80 deletions(-) diff --git a/ci/requirements/all-but-dask.yml b/ci/requirements/all-but-dask.yml index 65780d91949..7331aa7c259 100644 --- a/ci/requirements/all-but-dask.yml +++ b/ci/requirements/all-but-dask.yml @@ -22,18 +22,9 @@ dependencies: - numba - numbagg - numpy - - packaging - pandas - pint>=0.22 - - pip - pydap - - pytest - - pytest-asyncio - - pytest-cov - - pytest-env - - pytest-mypy-plugins - - pytest-timeout - - pytest-xdist - rasterio - scipy - seaborn diff --git a/ci/requirements/all-but-numba.yml b/ci/requirements/all-but-numba.yml index 23c38cc8267..bcc39d2066b 100644 --- a/ci/requirements/all-but-numba.yml +++ b/ci/requirements/all-but-numba.yml @@ -32,21 +32,12 @@ dependencies: # - numexpr # - sparse - opt_einsum - - packaging - pandas # - pint>=0.22 - - pip - pooch - pre-commit - pyarrow # pandas raises a deprecation warning without this, breaking doctests - pydap - - pytest - - pytest-asyncio - - pytest-cov - - pytest-env - - pytest-mypy-plugins - - pytest-timeout - - pytest-xdist - rasterio - scipy - seaborn diff --git a/ci/requirements/bare-min-and-scipy.yml b/ci/requirements/bare-min-and-scipy.yml index d4a61586d82..c0ef4d3f6db 100644 --- a/ci/requirements/bare-min-and-scipy.yml +++ b/ci/requirements/bare-min-and-scipy.yml @@ -5,14 +5,6 @@ channels: dependencies: - python=3.11 - coveralls - - pip - - pytest - - pytest-asyncio - - pytest-cov - - pytest-env - - pytest-mypy-plugins - - pytest-timeout - - pytest-xdist - numpy=1.26 - packaging=24.1 - pandas=2.2 diff --git a/ci/requirements/bare-minimum.yml b/ci/requirements/bare-minimum.yml index 777ff09b3e6..8bfe52eae08 100644 --- a/ci/requirements/bare-minimum.yml +++ b/ci/requirements/bare-minimum.yml @@ -5,14 +5,6 @@ channels: dependencies: - python=3.11 - coveralls - - pip - - pytest - - pytest-asyncio - - pytest-cov - - pytest-env - - pytest-mypy-plugins - - pytest-timeout - - pytest-xdist - numpy=1.26 - packaging=24.1 - pandas=2.2 diff --git a/ci/requirements/doc.yml b/ci/requirements/doc.yml index 64ea08b73ff..b5ac089cad0 100644 --- a/ci/requirements/doc.yml +++ b/ci/requirements/doc.yml @@ -24,10 +24,8 @@ dependencies: - netcdf4 - numba - numpy>=2.2 - - packaging - pandas - pooch - - pip - pre-commit - pyarrow - pydata-sphinx-theme diff --git a/ci/requirements/environment-3.14.yml b/ci/requirements/environment-3.14.yml index d4d47d85536..06778cfd7e4 100644 --- a/ci/requirements/environment-3.14.yml +++ b/ci/requirements/environment-3.14.yml @@ -27,22 +27,13 @@ dependencies: - numexpr - numpy - opt_einsum - - packaging - pandas - pandas-stubs<=2.2.3.241126 # https://github.com/pydata/xarray/issues/10110 # - pint>=0.22 - - pip - pooch - pre-commit - pyarrow # pandas raises a deprecation warning without this, breaking doctests - pydap - - pytest - - pytest-asyncio - - pytest-cov - - pytest-env - - pytest-mypy-plugins - - pytest-timeout - - pytest-xdist - rasterio - scipy - seaborn diff --git a/ci/requirements/environment-windows-3.14.yml b/ci/requirements/environment-windows-3.14.yml index e86d57beb95..0aaf5dbf40b 100644 --- a/ci/requirements/environment-windows-3.14.yml +++ b/ci/requirements/environment-windows-3.14.yml @@ -23,21 +23,12 @@ dependencies: # - numba # - numbagg - numpy - - packaging - pandas - pandas-stubs<=2.2.3.241126 # https://github.com/pydata/xarray/issues/10110 # - pint>=0.22 - - pip - pre-commit - pyarrow # importing dask.dataframe raises an ImportError without this - pydap - - pytest - - pytest-asyncio - - pytest-cov - - pytest-env - - pytest-mypy-plugins - - pytest-timeout - - pytest-xdist - rasterio - scipy - seaborn diff --git a/ci/requirements/environment-windows.yml b/ci/requirements/environment-windows.yml index 7c0d4dd9231..ebfd7dd2f95 100644 --- a/ci/requirements/environment-windows.yml +++ b/ci/requirements/environment-windows.yml @@ -23,21 +23,12 @@ dependencies: - numba - numbagg - numpy - - packaging - pandas - pandas-stubs<=2.2.3.241126 # https://github.com/pydata/xarray/issues/10110 # - pint>=0.22 - - pip - pre-commit - pyarrow # importing dask.dataframe raises an ImportError without this - pydap - - pytest - - pytest-asyncio - - pytest-cov - - pytest-env - - pytest-mypy-plugins - - pytest-timeout - - pytest-xdist - rasterio - scipy - seaborn diff --git a/ci/requirements/environment.yml b/ci/requirements/environment.yml index f56b2bc1d1c..b59251bba92 100644 --- a/ci/requirements/environment.yml +++ b/ci/requirements/environment.yml @@ -28,23 +28,14 @@ dependencies: - numexpr - numpy>=2.2 - opt_einsum - - packaging - pandas - pandas-stubs<=2.2.3.241126 # https://github.com/pydata/xarray/issues/10110 # - pint>=0.22 - - pip - pooch - pre-commit - pyarrow # pandas raises a deprecation warning without this, breaking doctests - pydap - pydap-server - - pytest - - pytest-asyncio - - pytest-cov - - pytest-env - - pytest-mypy-plugins - - pytest-timeout - - pytest-xdist - rasterio - scipy - seaborn diff --git a/ci/requirements/min-all-deps.yml b/ci/requirements/min-all-deps.yml index add738630f1..8d7a39c0d48 100644 --- a/ci/requirements/min-all-deps.yml +++ b/ci/requirements/min-all-deps.yml @@ -37,15 +37,7 @@ dependencies: - packaging=24.1 - pandas=2.2 - pint=0.24 - - pip - pydap=3.5.0 - - pytest - - pytest-asyncio - - pytest-cov - - pytest-env - - pytest-mypy-plugins - - pytest-timeout - - pytest-xdist - rasterio=1.3 - scipy=1.13 - seaborn=0.13 From 40f78bc5487bd7aca791cd50f5780298329a1d56 Mon Sep 17 00:00:00 2001 From: Vecko <36369090+VeckoTheGecko@users.noreply.github.com> Date: Fri, 12 Sep 2025 20:16:53 +0200 Subject: [PATCH 07/89] Remove numpy from environment files Already migrated to pixi --- ci/requirements/all-but-dask.yml | 1 - ci/requirements/all-but-numba.yml | 1 - ci/requirements/bare-min-and-scipy.yml | 1 - ci/requirements/bare-minimum.yml | 1 - ci/requirements/doc.yml | 1 - ci/requirements/environment-3.14.yml | 1 - ci/requirements/environment-windows-3.14.yml | 1 - ci/requirements/environment-windows.yml | 1 - ci/requirements/environment.yml | 1 - ci/requirements/min-all-deps.yml | 1 - 10 files changed, 10 deletions(-) diff --git a/ci/requirements/all-but-dask.yml b/ci/requirements/all-but-dask.yml index 7331aa7c259..90d16f2c1f5 100644 --- a/ci/requirements/all-but-dask.yml +++ b/ci/requirements/all-but-dask.yml @@ -21,7 +21,6 @@ dependencies: - netcdf4 - numba - numbagg - - numpy - pandas - pint>=0.22 - pydap diff --git a/ci/requirements/all-but-numba.yml b/ci/requirements/all-but-numba.yml index bcc39d2066b..97818cca264 100644 --- a/ci/requirements/all-but-numba.yml +++ b/ci/requirements/all-but-numba.yml @@ -4,7 +4,6 @@ channels: - nodefaults dependencies: # Pin a "very new numpy" (updated Sept 24, 2024) - - numpy>=2.2 - aiobotocore - array-api-strict<2.4 - boto3 diff --git a/ci/requirements/bare-min-and-scipy.yml b/ci/requirements/bare-min-and-scipy.yml index c0ef4d3f6db..f6bf84b4022 100644 --- a/ci/requirements/bare-min-and-scipy.yml +++ b/ci/requirements/bare-min-and-scipy.yml @@ -5,7 +5,6 @@ channels: dependencies: - python=3.11 - coveralls - - numpy=1.26 - packaging=24.1 - pandas=2.2 - scipy=1.13 diff --git a/ci/requirements/bare-minimum.yml b/ci/requirements/bare-minimum.yml index 8bfe52eae08..bcfaa11cb9c 100644 --- a/ci/requirements/bare-minimum.yml +++ b/ci/requirements/bare-minimum.yml @@ -5,6 +5,5 @@ channels: dependencies: - python=3.11 - coveralls - - numpy=1.26 - packaging=24.1 - pandas=2.2 diff --git a/ci/requirements/doc.yml b/ci/requirements/doc.yml index b5ac089cad0..6f39eecfa7e 100644 --- a/ci/requirements/doc.yml +++ b/ci/requirements/doc.yml @@ -23,7 +23,6 @@ dependencies: - ncdata - netcdf4 - numba - - numpy>=2.2 - pandas - pooch - pre-commit diff --git a/ci/requirements/environment-3.14.yml b/ci/requirements/environment-3.14.yml index 06778cfd7e4..66ed1d2ff46 100644 --- a/ci/requirements/environment-3.14.yml +++ b/ci/requirements/environment-3.14.yml @@ -25,7 +25,6 @@ dependencies: # - numba # - numbagg - numexpr - - numpy - opt_einsum - pandas - pandas-stubs<=2.2.3.241126 # https://github.com/pydata/xarray/issues/10110 diff --git a/ci/requirements/environment-windows-3.14.yml b/ci/requirements/environment-windows-3.14.yml index 0aaf5dbf40b..9b5432c6c76 100644 --- a/ci/requirements/environment-windows-3.14.yml +++ b/ci/requirements/environment-windows-3.14.yml @@ -22,7 +22,6 @@ dependencies: - netcdf4 # - numba # - numbagg - - numpy - pandas - pandas-stubs<=2.2.3.241126 # https://github.com/pydata/xarray/issues/10110 # - pint>=0.22 diff --git a/ci/requirements/environment-windows.yml b/ci/requirements/environment-windows.yml index ebfd7dd2f95..be53aa38a6e 100644 --- a/ci/requirements/environment-windows.yml +++ b/ci/requirements/environment-windows.yml @@ -22,7 +22,6 @@ dependencies: - netcdf4 - numba - numbagg - - numpy - pandas - pandas-stubs<=2.2.3.241126 # https://github.com/pydata/xarray/issues/10110 # - pint>=0.22 diff --git a/ci/requirements/environment.yml b/ci/requirements/environment.yml index b59251bba92..d8d02e868e6 100644 --- a/ci/requirements/environment.yml +++ b/ci/requirements/environment.yml @@ -26,7 +26,6 @@ dependencies: - numba - numbagg - numexpr - - numpy>=2.2 - opt_einsum - pandas - pandas-stubs<=2.2.3.241126 # https://github.com/pydata/xarray/issues/10110 diff --git a/ci/requirements/min-all-deps.yml b/ci/requirements/min-all-deps.yml index 8d7a39c0d48..9fad3f9da13 100644 --- a/ci/requirements/min-all-deps.yml +++ b/ci/requirements/min-all-deps.yml @@ -33,7 +33,6 @@ dependencies: - netcdf4=1.6 - numba=0.60 - numbagg=0.8 - - numpy=1.26 - packaging=24.1 - pandas=2.2 - pint=0.24 From e59d27d2fabf4b57a0bdb4f5eec6a01b141a59f6 Mon Sep 17 00:00:00 2001 From: Vecko <36369090+VeckoTheGecko@users.noreply.github.com> Date: Fri, 12 Sep 2025 20:23:52 +0200 Subject: [PATCH 08/89] Add typing task and environment Update requirements files to remove deps handled by Pixi --- ci/requirements/environment-3.14.yml | 1 - ci/requirements/environment-windows-3.14.yml | 1 - ci/requirements/environment-windows.yml | 1 - ci/requirements/environment.yml | 2 -- pixi.toml | 9 +++++++++ 5 files changed, 9 insertions(+), 5 deletions(-) diff --git a/ci/requirements/environment-3.14.yml b/ci/requirements/environment-3.14.yml index 66ed1d2ff46..4a74306c761 100644 --- a/ci/requirements/environment-3.14.yml +++ b/ci/requirements/environment-3.14.yml @@ -27,7 +27,6 @@ dependencies: - numexpr - opt_einsum - pandas - - pandas-stubs<=2.2.3.241126 # https://github.com/pydata/xarray/issues/10110 # - pint>=0.22 - pooch - pre-commit diff --git a/ci/requirements/environment-windows-3.14.yml b/ci/requirements/environment-windows-3.14.yml index 9b5432c6c76..c6e4ef089c4 100644 --- a/ci/requirements/environment-windows-3.14.yml +++ b/ci/requirements/environment-windows-3.14.yml @@ -23,7 +23,6 @@ dependencies: # - numba # - numbagg - pandas - - pandas-stubs<=2.2.3.241126 # https://github.com/pydata/xarray/issues/10110 # - pint>=0.22 - pre-commit - pyarrow # importing dask.dataframe raises an ImportError without this diff --git a/ci/requirements/environment-windows.yml b/ci/requirements/environment-windows.yml index be53aa38a6e..cfba821c887 100644 --- a/ci/requirements/environment-windows.yml +++ b/ci/requirements/environment-windows.yml @@ -23,7 +23,6 @@ dependencies: - numba - numbagg - pandas - - pandas-stubs<=2.2.3.241126 # https://github.com/pydata/xarray/issues/10110 # - pint>=0.22 - pre-commit - pyarrow # importing dask.dataframe raises an ImportError without this diff --git a/ci/requirements/environment.yml b/ci/requirements/environment.yml index d8d02e868e6..84a11ebd31a 100644 --- a/ci/requirements/environment.yml +++ b/ci/requirements/environment.yml @@ -20,7 +20,6 @@ dependencies: - iris - lxml # Optional dep of pydap - matplotlib-base - - mypy==1.18.1 - nc-time-axis - netcdf4 - numba @@ -28,7 +27,6 @@ dependencies: - numexpr - opt_einsum - pandas - - pandas-stubs<=2.2.3.241126 # https://github.com/pydata/xarray/issues/10110 # - pint>=0.22 - pooch - pre-commit diff --git a/pixi.toml b/pixi.toml index 725ea488c91..5f3defb18b0 100644 --- a/pixi.toml +++ b/pixi.toml @@ -16,6 +16,7 @@ depends-on = [ [environments] test = { features = ["test"], solve-group = "test" } test-bare-min = { features = ["test", "minimal"], solve-group = "test" } +typing = { features = ["mypy"] } pre-commit = { features = ["pre-commit"], no-default-feature = true } [dependencies] @@ -42,6 +43,14 @@ pytest-timeout = "*" pytest-xdist = "*" coveralls = "*" +[feature.mypy.dependencies] +mypy = "==1.18.1" +lxml = "*" +pandas-stubs = "<=2.2.3.241126" # https://github.com/pydata/xarray/issues/10110 + +[feature.mypy.tasks] +mypy = "mypy --install-types --non-interactive --cobertura-xml-report mypy_report" + [feature.pre-commit.dependencies] pre-commit = "*" From 618870baebc5f56c263b45de4edad5bf3114636b Mon Sep 17 00:00:00 2001 From: Vecko <36369090+VeckoTheGecko@users.noreply.github.com> Date: Fri, 12 Sep 2025 20:27:49 +0200 Subject: [PATCH 09/89] Remove pandas from environment files Handled by pixi --- ci/requirements/all-but-dask.yml | 3 +-- ci/requirements/all-but-numba.yml | 3 +-- ci/requirements/bare-min-and-scipy.yml | 3 +-- ci/requirements/bare-minimum.yml | 1 - ci/requirements/doc.yml | 3 +-- ci/requirements/environment-3.14.yml | 3 +-- ci/requirements/environment-windows-3.14.yml | 1 - ci/requirements/environment-windows.yml | 3 +-- ci/requirements/environment.yml | 3 +-- ci/requirements/min-all-deps.yml | 3 +-- 10 files changed, 8 insertions(+), 18 deletions(-) diff --git a/ci/requirements/all-but-dask.yml b/ci/requirements/all-but-dask.yml index 90d16f2c1f5..b2526b9ecc1 100644 --- a/ci/requirements/all-but-dask.yml +++ b/ci/requirements/all-but-dask.yml @@ -21,8 +21,7 @@ dependencies: - netcdf4 - numba - numbagg - - pandas - - pint>=0.22 + - pint>=0.22 - pydap - rasterio - scipy diff --git a/ci/requirements/all-but-numba.yml b/ci/requirements/all-but-numba.yml index 97818cca264..b8d13a61d06 100644 --- a/ci/requirements/all-but-numba.yml +++ b/ci/requirements/all-but-numba.yml @@ -31,8 +31,7 @@ dependencies: # - numexpr # - sparse - opt_einsum - - pandas - # - pint>=0.22 + # - pint>=0.22 - pooch - pre-commit - pyarrow # pandas raises a deprecation warning without this, breaking doctests diff --git a/ci/requirements/bare-min-and-scipy.yml b/ci/requirements/bare-min-and-scipy.yml index f6bf84b4022..78b0107b20b 100644 --- a/ci/requirements/bare-min-and-scipy.yml +++ b/ci/requirements/bare-min-and-scipy.yml @@ -6,5 +6,4 @@ dependencies: - python=3.11 - coveralls - packaging=24.1 - - pandas=2.2 - - scipy=1.13 + - scipy=1.13 diff --git a/ci/requirements/bare-minimum.yml b/ci/requirements/bare-minimum.yml index bcfaa11cb9c..58f4e61ba57 100644 --- a/ci/requirements/bare-minimum.yml +++ b/ci/requirements/bare-minimum.yml @@ -6,4 +6,3 @@ dependencies: - python=3.11 - coveralls - packaging=24.1 - - pandas=2.2 diff --git a/ci/requirements/doc.yml b/ci/requirements/doc.yml index 6f39eecfa7e..a98803dc4a6 100644 --- a/ci/requirements/doc.yml +++ b/ci/requirements/doc.yml @@ -23,8 +23,7 @@ dependencies: - ncdata - netcdf4 - numba - - pandas - - pooch + - pooch - pre-commit - pyarrow - pydata-sphinx-theme diff --git a/ci/requirements/environment-3.14.yml b/ci/requirements/environment-3.14.yml index 4a74306c761..8e4061505f4 100644 --- a/ci/requirements/environment-3.14.yml +++ b/ci/requirements/environment-3.14.yml @@ -26,8 +26,7 @@ dependencies: # - numbagg - numexpr - opt_einsum - - pandas - # - pint>=0.22 + # - pint>=0.22 - pooch - pre-commit - pyarrow # pandas raises a deprecation warning without this, breaking doctests diff --git a/ci/requirements/environment-windows-3.14.yml b/ci/requirements/environment-windows-3.14.yml index c6e4ef089c4..9746e791ef5 100644 --- a/ci/requirements/environment-windows-3.14.yml +++ b/ci/requirements/environment-windows-3.14.yml @@ -22,7 +22,6 @@ dependencies: - netcdf4 # - numba # - numbagg - - pandas # - pint>=0.22 - pre-commit - pyarrow # importing dask.dataframe raises an ImportError without this diff --git a/ci/requirements/environment-windows.yml b/ci/requirements/environment-windows.yml index cfba821c887..c608b13c5c5 100644 --- a/ci/requirements/environment-windows.yml +++ b/ci/requirements/environment-windows.yml @@ -22,8 +22,7 @@ dependencies: - netcdf4 - numba - numbagg - - pandas - # - pint>=0.22 + # - pint>=0.22 - pre-commit - pyarrow # importing dask.dataframe raises an ImportError without this - pydap diff --git a/ci/requirements/environment.yml b/ci/requirements/environment.yml index 84a11ebd31a..1d47c9f7231 100644 --- a/ci/requirements/environment.yml +++ b/ci/requirements/environment.yml @@ -26,8 +26,7 @@ dependencies: - numbagg - numexpr - opt_einsum - - pandas - # - pint>=0.22 + # - pint>=0.22 - pooch - pre-commit - pyarrow # pandas raises a deprecation warning without this, breaking doctests diff --git a/ci/requirements/min-all-deps.yml b/ci/requirements/min-all-deps.yml index 9fad3f9da13..c19b59f53bd 100644 --- a/ci/requirements/min-all-deps.yml +++ b/ci/requirements/min-all-deps.yml @@ -34,8 +34,7 @@ dependencies: - numba=0.60 - numbagg=0.8 - packaging=24.1 - - pandas=2.2 - - pint=0.24 + - pint=0.24 - pydap=3.5.0 - rasterio=1.3 - scipy=1.13 From 1d8a93cb44bc6041fa577d451a70efc3e10cc9e8 Mon Sep 17 00:00:00 2001 From: Vecko <36369090+VeckoTheGecko@users.noreply.github.com> Date: Fri, 12 Sep 2025 20:29:02 +0200 Subject: [PATCH 10/89] Remove pre-commit from environment files Handled by pixi --- ci/requirements/all-but-numba.yml | 1 - ci/requirements/doc.yml | 1 - ci/requirements/environment-3.14.yml | 1 - ci/requirements/environment-windows-3.14.yml | 1 - ci/requirements/environment-windows.yml | 1 - ci/requirements/environment.yml | 1 - 6 files changed, 6 deletions(-) diff --git a/ci/requirements/all-but-numba.yml b/ci/requirements/all-but-numba.yml index b8d13a61d06..3885fc29829 100644 --- a/ci/requirements/all-but-numba.yml +++ b/ci/requirements/all-but-numba.yml @@ -33,7 +33,6 @@ dependencies: - opt_einsum # - pint>=0.22 - pooch - - pre-commit - pyarrow # pandas raises a deprecation warning without this, breaking doctests - pydap - rasterio diff --git a/ci/requirements/doc.yml b/ci/requirements/doc.yml index a98803dc4a6..51a7d49c8f6 100644 --- a/ci/requirements/doc.yml +++ b/ci/requirements/doc.yml @@ -24,7 +24,6 @@ dependencies: - netcdf4 - numba - pooch - - pre-commit - pyarrow - pydata-sphinx-theme - pyproj diff --git a/ci/requirements/environment-3.14.yml b/ci/requirements/environment-3.14.yml index 8e4061505f4..d84b7aba6ff 100644 --- a/ci/requirements/environment-3.14.yml +++ b/ci/requirements/environment-3.14.yml @@ -28,7 +28,6 @@ dependencies: - opt_einsum # - pint>=0.22 - pooch - - pre-commit - pyarrow # pandas raises a deprecation warning without this, breaking doctests - pydap - rasterio diff --git a/ci/requirements/environment-windows-3.14.yml b/ci/requirements/environment-windows-3.14.yml index 9746e791ef5..fa35bdebe51 100644 --- a/ci/requirements/environment-windows-3.14.yml +++ b/ci/requirements/environment-windows-3.14.yml @@ -23,7 +23,6 @@ dependencies: # - numba # - numbagg # - pint>=0.22 - - pre-commit - pyarrow # importing dask.dataframe raises an ImportError without this - pydap - rasterio diff --git a/ci/requirements/environment-windows.yml b/ci/requirements/environment-windows.yml index c608b13c5c5..cf6bdae2a5f 100644 --- a/ci/requirements/environment-windows.yml +++ b/ci/requirements/environment-windows.yml @@ -23,7 +23,6 @@ dependencies: - numba - numbagg # - pint>=0.22 - - pre-commit - pyarrow # importing dask.dataframe raises an ImportError without this - pydap - rasterio diff --git a/ci/requirements/environment.yml b/ci/requirements/environment.yml index 1d47c9f7231..e03655a4cd6 100644 --- a/ci/requirements/environment.yml +++ b/ci/requirements/environment.yml @@ -28,7 +28,6 @@ dependencies: - opt_einsum # - pint>=0.22 - pooch - - pre-commit - pyarrow # pandas raises a deprecation warning without this, breaking doctests - pydap - pydap-server From 1bbfbe08b3cdb30a8a44b668cb40e6503df28195 Mon Sep 17 00:00:00 2001 From: Vecko <36369090+VeckoTheGecko@users.noreply.github.com> Date: Fri, 12 Sep 2025 20:37:01 +0200 Subject: [PATCH 11/89] Remove typing related packages from environment files Handled by pixi --- ci/requirements/all-but-dask.yml | 4 +--- ci/requirements/all-but-numba.yml | 1 - ci/requirements/bare-min-and-scipy.yml | 1 - ci/requirements/bare-minimum.yml | 1 - ci/requirements/doc.yml | 3 +-- ci/requirements/environment-3.14.yml | 11 ----------- ci/requirements/environment-windows-3.14.yml | 11 ----------- ci/requirements/environment-windows.yml | 11 ----------- ci/requirements/environment.yml | 13 ------------- ci/requirements/min-all-deps.yml | 2 -- pixi.toml | 17 +++++++++++++++++ 11 files changed, 19 insertions(+), 56 deletions(-) diff --git a/ci/requirements/all-but-dask.yml b/ci/requirements/all-but-dask.yml index b2526b9ecc1..19c21d79197 100644 --- a/ci/requirements/all-but-dask.yml +++ b/ci/requirements/all-but-dask.yml @@ -9,13 +9,11 @@ dependencies: - bottleneck - cartopy - cftime - - coveralls - flox - h5netcdf - h5py - hdf5 - - hypothesis - - lxml # Optional dep of pydap + - lxml # Optional dep of pydap - matplotlib-base - nc-time-axis - netcdf4 diff --git a/ci/requirements/all-but-numba.yml b/ci/requirements/all-but-numba.yml index 3885fc29829..0333c9df71b 100644 --- a/ci/requirements/all-but-numba.yml +++ b/ci/requirements/all-but-numba.yml @@ -17,7 +17,6 @@ dependencies: - h5netcdf - h5py - hdf5 - - hypothesis - iris - lxml # Optional dep of pydap - matplotlib-base diff --git a/ci/requirements/bare-min-and-scipy.yml b/ci/requirements/bare-min-and-scipy.yml index 78b0107b20b..abfc985e1fa 100644 --- a/ci/requirements/bare-min-and-scipy.yml +++ b/ci/requirements/bare-min-and-scipy.yml @@ -4,6 +4,5 @@ channels: - nodefaults dependencies: - python=3.11 - - coveralls - packaging=24.1 - scipy=1.13 diff --git a/ci/requirements/bare-minimum.yml b/ci/requirements/bare-minimum.yml index 58f4e61ba57..5f4ee99a3dd 100644 --- a/ci/requirements/bare-minimum.yml +++ b/ci/requirements/bare-minimum.yml @@ -4,5 +4,4 @@ channels: - nodefaults dependencies: - python=3.11 - - coveralls - packaging=24.1 diff --git a/ci/requirements/doc.yml b/ci/requirements/doc.yml index 51a7d49c8f6..706655d85e2 100644 --- a/ci/requirements/doc.yml +++ b/ci/requirements/doc.yml @@ -10,8 +10,7 @@ dependencies: - cfgrib - kerchunk - dask-core - - hypothesis - - h5netcdf + - h5netcdf - ipykernel - ipywidgets # silence nbsphinx warning - ipython diff --git a/ci/requirements/environment-3.14.yml b/ci/requirements/environment-3.14.yml index d84b7aba6ff..4a89825feed 100644 --- a/ci/requirements/environment-3.14.yml +++ b/ci/requirements/environment-3.14.yml @@ -16,7 +16,6 @@ dependencies: - h5netcdf - h5py - hdf5 - - hypothesis - iris - lxml # Optional dep of pydap - matplotlib-base @@ -35,17 +34,7 @@ dependencies: - seaborn # - sparse - toolz - - types-colorama - - types-docutils - - types-psutil - - types-Pygments - - types-python-dateutil - - types-pytz - - types-PyYAML - - types-setuptools - typing_extensions - zarr - pip: - jax # no way to get cpu-only jaxlib from conda if gpu is present - - types-defusedxml - - types-pexpect diff --git a/ci/requirements/environment-windows-3.14.yml b/ci/requirements/environment-windows-3.14.yml index fa35bdebe51..a2a08e3c256 100644 --- a/ci/requirements/environment-windows-3.14.yml +++ b/ci/requirements/environment-windows-3.14.yml @@ -14,7 +14,6 @@ dependencies: - h5netcdf - h5py - hdf5 - - hypothesis - iris - lxml # Optional dep of pydap - matplotlib-base @@ -30,16 +29,6 @@ dependencies: - seaborn # - sparse - toolz - - types-colorama - - types-docutils - - types-psutil - - types-Pygments - - types-python-dateutil - - types-pytz - - types-PyYAML - - types-setuptools - typing_extensions - zarr - pip: - - types-defusedxml - - types-pexpect diff --git a/ci/requirements/environment-windows.yml b/ci/requirements/environment-windows.yml index cf6bdae2a5f..ef2aeccc370 100644 --- a/ci/requirements/environment-windows.yml +++ b/ci/requirements/environment-windows.yml @@ -14,7 +14,6 @@ dependencies: - h5netcdf - h5py - hdf5 - - hypothesis - iris - lxml # Optional dep of pydap - matplotlib-base @@ -30,16 +29,6 @@ dependencies: - seaborn - sparse - toolz - - types-colorama - - types-docutils - - types-psutil - - types-Pygments - - types-python-dateutil - - types-pytz - - types-PyYAML - - types-setuptools - typing_extensions - zarr - pip: - - types-defusedxml - - types-pexpect diff --git a/ci/requirements/environment.yml b/ci/requirements/environment.yml index e03655a4cd6..958ed858eb6 100644 --- a/ci/requirements/environment.yml +++ b/ci/requirements/environment.yml @@ -16,7 +16,6 @@ dependencies: - h5netcdf - h5py - hdf5 - - hypothesis - iris - lxml # Optional dep of pydap - matplotlib-base @@ -36,19 +35,7 @@ dependencies: - seaborn - sparse - toolz - - types-colorama - - types-docutils - - types-psutil - - types-Pygments - - types-python-dateutil - - types-pytz - - types-PyYAML - - types-requests - - types-setuptools - - types-openpyxl - typing_extensions - zarr - pip: - jax # no way to get cpu-only jaxlib from conda if gpu is present - - types-defusedxml - - types-pexpect diff --git a/ci/requirements/min-all-deps.yml b/ci/requirements/min-all-deps.yml index c19b59f53bd..a8bbbee93c2 100644 --- a/ci/requirements/min-all-deps.yml +++ b/ci/requirements/min-all-deps.yml @@ -13,7 +13,6 @@ dependencies: - bottleneck=1.4 - cartopy=0.23 - cftime=1.6 - - coveralls - dask-core=2024.6 - distributed=2024.6 - flox=0.9 @@ -23,7 +22,6 @@ dependencies: # prioritize bumping other packages instead - h5py=3.11 - hdf5=1.14 - - hypothesis - iris=3.9 - lxml=5.1 # Optional dep of pydap - matplotlib-base=3.8 diff --git a/pixi.toml b/pixi.toml index 5f3defb18b0..65617521feb 100644 --- a/pixi.toml +++ b/pixi.toml @@ -45,8 +45,25 @@ coveralls = "*" [feature.mypy.dependencies] mypy = "==1.18.1" +hypothesis = "*" lxml = "*" pandas-stubs = "<=2.2.3.241126" # https://github.com/pydata/xarray/issues/10110 +types-colorama = "*" +types-docutils = "*" +types-psutil = "*" +types-Pygments = "*" +types-python-dateutil = "*" +types-pytz = "*" +types-PyYAML = "*" +types-requests = "*" +types-setuptools = "*" +types-openpyxl = "*" +typing_extensions = "*" + +[feature.mypy.pypi-dependencies] +types-defusedxml = "*" +types-pexpect = "*" + [feature.mypy.tasks] mypy = "mypy --install-types --non-interactive --cobertura-xml-report mypy_report" From 71f1ce9de75af0ac07cb082ab37c2aaec1fd15fe Mon Sep 17 00:00:00 2001 From: Vecko <36369090+VeckoTheGecko@users.noreply.github.com> Date: Fri, 12 Sep 2025 20:39:14 +0200 Subject: [PATCH 12/89] Remove 'pacakaging' package from environment files Handled by pixi --- ci/requirements/bare-min-and-scipy.yml | 1 - ci/requirements/bare-minimum.yml | 1 - ci/requirements/min-all-deps.yml | 1 - 3 files changed, 3 deletions(-) diff --git a/ci/requirements/bare-min-and-scipy.yml b/ci/requirements/bare-min-and-scipy.yml index abfc985e1fa..26b11674366 100644 --- a/ci/requirements/bare-min-and-scipy.yml +++ b/ci/requirements/bare-min-and-scipy.yml @@ -4,5 +4,4 @@ channels: - nodefaults dependencies: - python=3.11 - - packaging=24.1 - scipy=1.13 diff --git a/ci/requirements/bare-minimum.yml b/ci/requirements/bare-minimum.yml index 5f4ee99a3dd..66bd458c09f 100644 --- a/ci/requirements/bare-minimum.yml +++ b/ci/requirements/bare-minimum.yml @@ -4,4 +4,3 @@ channels: - nodefaults dependencies: - python=3.11 - - packaging=24.1 diff --git a/ci/requirements/min-all-deps.yml b/ci/requirements/min-all-deps.yml index a8bbbee93c2..0f227bf76fa 100644 --- a/ci/requirements/min-all-deps.yml +++ b/ci/requirements/min-all-deps.yml @@ -31,7 +31,6 @@ dependencies: - netcdf4=1.6 - numba=0.60 - numbagg=0.8 - - packaging=24.1 - pint=0.24 - pydap=3.5.0 - rasterio=1.3 From b3c3a2a08b5993a7c8bddf810bfd4e1c36c5d06f Mon Sep 17 00:00:00 2001 From: Vecko <36369090+VeckoTheGecko@users.noreply.github.com> Date: Fri, 12 Sep 2025 20:50:09 +0200 Subject: [PATCH 13/89] Remove backend related packages from environment files Handled by pixi --- ci/requirements/all-but-dask.yml | 7 ------- ci/requirements/all-but-numba.yml | 8 -------- ci/requirements/doc.yml | 6 +----- ci/requirements/environment-3.14.yml | 8 -------- ci/requirements/environment-windows-3.14.yml | 8 -------- ci/requirements/environment-windows.yml | 8 -------- ci/requirements/environment.yml | 9 --------- ci/requirements/min-all-deps.yml | 7 ------- pixi.toml | 20 ++++++++++++++++++++ 9 files changed, 21 insertions(+), 60 deletions(-) diff --git a/ci/requirements/all-but-dask.yml b/ci/requirements/all-but-dask.yml index 19c21d79197..93c7896289f 100644 --- a/ci/requirements/all-but-dask.yml +++ b/ci/requirements/all-but-dask.yml @@ -5,26 +5,19 @@ channels: dependencies: - aiobotocore - array-api-strict<2.4 - - boto3 - bottleneck - cartopy - cftime - flox - - h5netcdf - - h5py - - hdf5 - lxml # Optional dep of pydap - matplotlib-base - nc-time-axis - - netcdf4 - numba - numbagg - pint>=0.22 - - pydap - rasterio - scipy - seaborn - sparse - toolz - typing_extensions - - zarr diff --git a/ci/requirements/all-but-numba.yml b/ci/requirements/all-but-numba.yml index 0333c9df71b..e0234209280 100644 --- a/ci/requirements/all-but-numba.yml +++ b/ci/requirements/all-but-numba.yml @@ -6,22 +6,16 @@ dependencies: # Pin a "very new numpy" (updated Sept 24, 2024) - aiobotocore - array-api-strict<2.4 - - boto3 - bottleneck - cartopy - cftime - dask-core - distributed - flox - - fsspec - - h5netcdf - - h5py - - hdf5 - iris - lxml # Optional dep of pydap - matplotlib-base - nc-time-axis - - netcdf4 # numba, sparse, numbagg, numexpr often conflicts with newer versions of numpy. # This environment helps us test xarray with the latest versions # of numpy @@ -33,10 +27,8 @@ dependencies: # - pint>=0.22 - pooch - pyarrow # pandas raises a deprecation warning without this, breaking doctests - - pydap - rasterio - scipy - seaborn - toolz - typing_extensions - - zarr diff --git a/ci/requirements/doc.yml b/ci/requirements/doc.yml index 706655d85e2..6726d5aead7 100644 --- a/ci/requirements/doc.yml +++ b/ci/requirements/doc.yml @@ -4,13 +4,11 @@ channels: - conda-forge - nodefaults dependencies: - - python - bottleneck - cartopy - cfgrib - kerchunk - dask-core - - h5netcdf - ipykernel - ipywidgets # silence nbsphinx warning - ipython @@ -20,9 +18,8 @@ dependencies: - matplotlib-base - nbsphinx - ncdata - - netcdf4 - numba - - pooch + - pooch - pyarrow - pydata-sphinx-theme - pyproj @@ -41,7 +38,6 @@ dependencies: - sphinx-remove-toctrees - sphinxext-opengraph - sphinxext-rediraffe - - zarr - pip: # relative to this file. Needs to be editable to be accepted. - -e ../.. diff --git a/ci/requirements/environment-3.14.yml b/ci/requirements/environment-3.14.yml index 4a89825feed..586571d3cfc 100644 --- a/ci/requirements/environment-3.14.yml +++ b/ci/requirements/environment-3.14.yml @@ -5,22 +5,16 @@ channels: dependencies: - aiobotocore - array-api-strict<2.4 - - boto3 - bottleneck - cartopy - cftime - dask-core - distributed - flox - - fsspec - - h5netcdf - - h5py - - hdf5 - iris - lxml # Optional dep of pydap - matplotlib-base - nc-time-axis - - netcdf4 # - numba # - numbagg - numexpr @@ -28,13 +22,11 @@ dependencies: # - pint>=0.22 - pooch - pyarrow # pandas raises a deprecation warning without this, breaking doctests - - pydap - rasterio - scipy - seaborn # - sparse - toolz - typing_extensions - - zarr - pip: - jax # no way to get cpu-only jaxlib from conda if gpu is present diff --git a/ci/requirements/environment-windows-3.14.yml b/ci/requirements/environment-windows-3.14.yml index a2a08e3c256..8394e9a5174 100644 --- a/ci/requirements/environment-windows-3.14.yml +++ b/ci/requirements/environment-windows-3.14.yml @@ -3,32 +3,24 @@ channels: - conda-forge dependencies: - array-api-strict<2.4 - - boto3 - bottleneck - cartopy - cftime - dask-core - distributed - flox - - fsspec - - h5netcdf - - h5py - - hdf5 - iris - lxml # Optional dep of pydap - matplotlib-base - nc-time-axis - - netcdf4 # - numba # - numbagg # - pint>=0.22 - pyarrow # importing dask.dataframe raises an ImportError without this - - pydap - rasterio - scipy - seaborn # - sparse - toolz - typing_extensions - - zarr - pip: diff --git a/ci/requirements/environment-windows.yml b/ci/requirements/environment-windows.yml index ef2aeccc370..0916a1aa8d8 100644 --- a/ci/requirements/environment-windows.yml +++ b/ci/requirements/environment-windows.yml @@ -3,32 +3,24 @@ channels: - conda-forge dependencies: - array-api-strict<2.4 - - boto3 - bottleneck - cartopy - cftime - dask-core - distributed - flox - - fsspec - - h5netcdf - - h5py - - hdf5 - iris - lxml # Optional dep of pydap - matplotlib-base - nc-time-axis - - netcdf4 - numba - numbagg # - pint>=0.22 - pyarrow # importing dask.dataframe raises an ImportError without this - - pydap - rasterio - scipy - seaborn - sparse - toolz - typing_extensions - - zarr - pip: diff --git a/ci/requirements/environment.yml b/ci/requirements/environment.yml index 958ed858eb6..b89f40c7dbc 100644 --- a/ci/requirements/environment.yml +++ b/ci/requirements/environment.yml @@ -5,22 +5,16 @@ channels: dependencies: - aiobotocore - array-api-strict<2.4 - - boto3 - bottleneck - cartopy - cftime - dask-core - distributed - flox - - fsspec - - h5netcdf - - h5py - - hdf5 - iris - lxml # Optional dep of pydap - matplotlib-base - nc-time-axis - - netcdf4 - numba - numbagg - numexpr @@ -28,14 +22,11 @@ dependencies: # - pint>=0.22 - pooch - pyarrow # pandas raises a deprecation warning without this, breaking doctests - - pydap - - pydap-server - rasterio - scipy - seaborn - sparse - toolz - typing_extensions - - zarr - pip: - jax # no way to get cpu-only jaxlib from conda if gpu is present diff --git a/ci/requirements/min-all-deps.yml b/ci/requirements/min-all-deps.yml index 0f227bf76fa..c2a270d3253 100644 --- a/ci/requirements/min-all-deps.yml +++ b/ci/requirements/min-all-deps.yml @@ -9,33 +9,26 @@ dependencies: # doc/user-guide/installing.rst, doc/user-guide/plotting.rst and setup.py. - python=3.11 - array-api-strict=1.1 # dependency for testing the array api compat - - boto3=1.34 - bottleneck=1.4 - cartopy=0.23 - cftime=1.6 - dask-core=2024.6 - distributed=2024.6 - flox=0.9 - - h5netcdf=1.3 # h5py and hdf5 tend to cause conflicts # for e.g. hdf5 1.12 conflicts with h5py=3.1 # prioritize bumping other packages instead - - h5py=3.11 - - hdf5=1.14 - iris=3.9 - lxml=5.1 # Optional dep of pydap - matplotlib-base=3.8 - nc-time-axis=1.4 # netcdf follows a 1.major.minor[.patch] convention # (see https://github.com/Unidata/netcdf4-python/issues/1090) - - netcdf4=1.6 - numba=0.60 - numbagg=0.8 - pint=0.24 - - pydap=3.5.0 - rasterio=1.3 - scipy=1.13 - seaborn=0.13 - sparse=0.15 - toolz=0.12 - - zarr=2.18 diff --git a/pixi.toml b/pixi.toml index 65617521feb..ac95655e240 100644 --- a/pixi.toml +++ b/pixi.toml @@ -14,8 +14,11 @@ depends-on = [ ] [environments] +# Testing test = { features = ["test"], solve-group = "test" } test-bare-min = { features = ["test", "minimal"], solve-group = "test" } + +# Extra typing = { features = ["mypy"] } pre-commit = { features = ["pre-commit"], no-default-feature = true } @@ -32,6 +35,22 @@ python = "3.11.*" numpy = "1.26.*" pandas = "2.2.*" +[feature.backends.dependencies] +# files +h5netcdf = "*" +h5py = "*" +hdf5 = "*" +netcdf4 = "*" +zarr = "*" + +# opendap +pydap = "*" +pydap-server = "*" + +# s3 +boto3 = "*" +fsspec = "*" + [feature.test.dependencies] pytest = "*" @@ -43,6 +62,7 @@ pytest-timeout = "*" pytest-xdist = "*" coveralls = "*" + [feature.mypy.dependencies] mypy = "==1.18.1" hypothesis = "*" From e3781e6f6037cc71485ec1d3f35c088afc4c35f1 Mon Sep 17 00:00:00 2001 From: Vecko <36369090+VeckoTheGecko@users.noreply.github.com> Date: Fri, 12 Sep 2025 20:58:26 +0200 Subject: [PATCH 14/89] Remove performance related packages from environment files Handled by pixi --- ci/requirements/all-but-dask.yml | 4 ---- ci/requirements/all-but-numba.yml | 7 +------ ci/requirements/doc.yml | 4 ---- ci/requirements/environment-3.14.yml | 8 +------- ci/requirements/environment-windows-3.14.yml | 4 ---- ci/requirements/environment-windows.yml | 6 ------ ci/requirements/environment.yml | 8 -------- ci/requirements/min-all-deps.yml | 7 +------ pixi.toml | 10 ++++++++++ 9 files changed, 13 insertions(+), 45 deletions(-) diff --git a/ci/requirements/all-but-dask.yml b/ci/requirements/all-but-dask.yml index 93c7896289f..81a0b410f9d 100644 --- a/ci/requirements/all-but-dask.yml +++ b/ci/requirements/all-but-dask.yml @@ -5,15 +5,11 @@ channels: dependencies: - aiobotocore - array-api-strict<2.4 - - bottleneck - cartopy - cftime - - flox - lxml # Optional dep of pydap - matplotlib-base - nc-time-axis - - numba - - numbagg - pint>=0.22 - rasterio - scipy diff --git a/ci/requirements/all-but-numba.yml b/ci/requirements/all-but-numba.yml index e0234209280..03f51351ed1 100644 --- a/ci/requirements/all-but-numba.yml +++ b/ci/requirements/all-but-numba.yml @@ -6,12 +6,9 @@ dependencies: # Pin a "very new numpy" (updated Sept 24, 2024) - aiobotocore - array-api-strict<2.4 - - bottleneck - cartopy - cftime - - dask-core - distributed - - flox - iris - lxml # Optional dep of pydap - matplotlib-base @@ -23,10 +20,8 @@ dependencies: # - numbagg # - numexpr # - sparse - - opt_einsum - # - pint>=0.22 + # - pint>=0.22 - pooch - - pyarrow # pandas raises a deprecation warning without this, breaking doctests - rasterio - scipy - seaborn diff --git a/ci/requirements/doc.yml b/ci/requirements/doc.yml index 6726d5aead7..3f66fc6c918 100644 --- a/ci/requirements/doc.yml +++ b/ci/requirements/doc.yml @@ -4,11 +4,9 @@ channels: - conda-forge - nodefaults dependencies: - - bottleneck - cartopy - cfgrib - kerchunk - - dask-core - ipykernel - ipywidgets # silence nbsphinx warning - ipython @@ -18,9 +16,7 @@ dependencies: - matplotlib-base - nbsphinx - ncdata - - numba - pooch - - pyarrow - pydata-sphinx-theme - pyproj - rich # for Zarr tree() diff --git a/ci/requirements/environment-3.14.yml b/ci/requirements/environment-3.14.yml index 586571d3cfc..d631fba143f 100644 --- a/ci/requirements/environment-3.14.yml +++ b/ci/requirements/environment-3.14.yml @@ -5,23 +5,17 @@ channels: dependencies: - aiobotocore - array-api-strict<2.4 - - bottleneck - cartopy - cftime - - dask-core - distributed - - flox - iris - lxml # Optional dep of pydap - matplotlib-base - nc-time-axis # - numba # - numbagg - - numexpr - - opt_einsum - # - pint>=0.22 + # - pint>=0.22 - pooch - - pyarrow # pandas raises a deprecation warning without this, breaking doctests - rasterio - scipy - seaborn diff --git a/ci/requirements/environment-windows-3.14.yml b/ci/requirements/environment-windows-3.14.yml index 8394e9a5174..f8651c48092 100644 --- a/ci/requirements/environment-windows-3.14.yml +++ b/ci/requirements/environment-windows-3.14.yml @@ -3,12 +3,9 @@ channels: - conda-forge dependencies: - array-api-strict<2.4 - - bottleneck - cartopy - cftime - - dask-core - distributed - - flox - iris - lxml # Optional dep of pydap - matplotlib-base @@ -16,7 +13,6 @@ dependencies: # - numba # - numbagg # - pint>=0.22 - - pyarrow # importing dask.dataframe raises an ImportError without this - rasterio - scipy - seaborn diff --git a/ci/requirements/environment-windows.yml b/ci/requirements/environment-windows.yml index 0916a1aa8d8..cc79fd81b86 100644 --- a/ci/requirements/environment-windows.yml +++ b/ci/requirements/environment-windows.yml @@ -3,20 +3,14 @@ channels: - conda-forge dependencies: - array-api-strict<2.4 - - bottleneck - cartopy - cftime - - dask-core - distributed - - flox - iris - lxml # Optional dep of pydap - matplotlib-base - nc-time-axis - - numba - - numbagg # - pint>=0.22 - - pyarrow # importing dask.dataframe raises an ImportError without this - rasterio - scipy - seaborn diff --git a/ci/requirements/environment.yml b/ci/requirements/environment.yml index b89f40c7dbc..b74cbc17d00 100644 --- a/ci/requirements/environment.yml +++ b/ci/requirements/environment.yml @@ -5,23 +5,15 @@ channels: dependencies: - aiobotocore - array-api-strict<2.4 - - bottleneck - cartopy - cftime - - dask-core - distributed - - flox - iris - lxml # Optional dep of pydap - matplotlib-base - nc-time-axis - - numba - - numbagg - - numexpr - - opt_einsum # - pint>=0.22 - pooch - - pyarrow # pandas raises a deprecation warning without this, breaking doctests - rasterio - scipy - seaborn diff --git a/ci/requirements/min-all-deps.yml b/ci/requirements/min-all-deps.yml index c2a270d3253..a11e8ef1065 100644 --- a/ci/requirements/min-all-deps.yml +++ b/ci/requirements/min-all-deps.yml @@ -9,12 +9,9 @@ dependencies: # doc/user-guide/installing.rst, doc/user-guide/plotting.rst and setup.py. - python=3.11 - array-api-strict=1.1 # dependency for testing the array api compat - - bottleneck=1.4 - cartopy=0.23 - cftime=1.6 - - dask-core=2024.6 - distributed=2024.6 - - flox=0.9 # h5py and hdf5 tend to cause conflicts # for e.g. hdf5 1.12 conflicts with h5py=3.1 # prioritize bumping other packages instead @@ -24,9 +21,7 @@ dependencies: - nc-time-axis=1.4 # netcdf follows a 1.major.minor[.patch] convention # (see https://github.com/Unidata/netcdf4-python/issues/1090) - - numba=0.60 - - numbagg=0.8 - - pint=0.24 + - pint=0.24 - rasterio=1.3 - scipy=1.13 - seaborn=0.13 diff --git a/pixi.toml b/pixi.toml index ac95655e240..026b987c0cf 100644 --- a/pixi.toml +++ b/pixi.toml @@ -51,6 +51,16 @@ pydap-server = "*" boto3 = "*" fsspec = "*" +[feature.performance.dependencies] +flox = "*" +bottleneck = "*" +numexpr = "*" +pyarrow = "*" +dask-core = "*" +opt_einsum = "*" +numba = "*" +numbagg = "*" + [feature.test.dependencies] pytest = "*" From 47cc4d8f70385ef201036174779c8479dbf24ef4 Mon Sep 17 00:00:00 2001 From: Vecko <36369090+VeckoTheGecko@users.noreply.github.com> Date: Fri, 12 Sep 2025 20:59:31 +0200 Subject: [PATCH 15/89] Remove s3 related package from environment files Handled by pixi --- ci/requirements/all-but-dask.yml | 1 - ci/requirements/all-but-numba.yml | 1 - ci/requirements/environment-3.14.yml | 1 - ci/requirements/environment.yml | 1 - pixi.toml | 1 + 5 files changed, 1 insertion(+), 4 deletions(-) diff --git a/ci/requirements/all-but-dask.yml b/ci/requirements/all-but-dask.yml index 81a0b410f9d..b1c5253d6b6 100644 --- a/ci/requirements/all-but-dask.yml +++ b/ci/requirements/all-but-dask.yml @@ -3,7 +3,6 @@ channels: - conda-forge - nodefaults dependencies: - - aiobotocore - array-api-strict<2.4 - cartopy - cftime diff --git a/ci/requirements/all-but-numba.yml b/ci/requirements/all-but-numba.yml index 03f51351ed1..fb65a0a1b0c 100644 --- a/ci/requirements/all-but-numba.yml +++ b/ci/requirements/all-but-numba.yml @@ -4,7 +4,6 @@ channels: - nodefaults dependencies: # Pin a "very new numpy" (updated Sept 24, 2024) - - aiobotocore - array-api-strict<2.4 - cartopy - cftime diff --git a/ci/requirements/environment-3.14.yml b/ci/requirements/environment-3.14.yml index d631fba143f..5a644a60d60 100644 --- a/ci/requirements/environment-3.14.yml +++ b/ci/requirements/environment-3.14.yml @@ -3,7 +3,6 @@ channels: - conda-forge - nodefaults dependencies: - - aiobotocore - array-api-strict<2.4 - cartopy - cftime diff --git a/ci/requirements/environment.yml b/ci/requirements/environment.yml index b74cbc17d00..bce545ef05c 100644 --- a/ci/requirements/environment.yml +++ b/ci/requirements/environment.yml @@ -3,7 +3,6 @@ channels: - conda-forge - nodefaults dependencies: - - aiobotocore - array-api-strict<2.4 - cartopy - cftime diff --git a/pixi.toml b/pixi.toml index 026b987c0cf..cf19e3e9390 100644 --- a/pixi.toml +++ b/pixi.toml @@ -50,6 +50,7 @@ pydap-server = "*" # s3 boto3 = "*" fsspec = "*" +aiobotocore = "*" [feature.performance.dependencies] flox = "*" From c3df2747c4f3f8c4d87ca1407dcd564af6b09801 Mon Sep 17 00:00:00 2001 From: Vecko <36369090+VeckoTheGecko@users.noreply.github.com> Date: Fri, 12 Sep 2025 21:06:59 +0200 Subject: [PATCH 16/89] Remove various packages from environment files and migrate to pixi --- ci/requirements/all-but-dask.yml | 8 +------- ci/requirements/all-but-numba.yml | 4 ---- ci/requirements/bare-min-and-scipy.yml | 1 - ci/requirements/doc.yml | 2 -- ci/requirements/environment-3.14.yml | 4 ---- ci/requirements/environment-windows-3.14.yml | 4 ---- ci/requirements/environment-windows.yml | 5 ----- ci/requirements/environment.yml | 5 ----- ci/requirements/min-all-deps.yml | 6 ------ pixi.toml | 12 ++++++++++++ 10 files changed, 13 insertions(+), 38 deletions(-) diff --git a/ci/requirements/all-but-dask.yml b/ci/requirements/all-but-dask.yml index b1c5253d6b6..99af26306ee 100644 --- a/ci/requirements/all-but-dask.yml +++ b/ci/requirements/all-but-dask.yml @@ -3,16 +3,10 @@ channels: - conda-forge - nodefaults dependencies: - - array-api-strict<2.4 - cartopy - - cftime - lxml # Optional dep of pydap - matplotlib-base - nc-time-axis - - pint>=0.22 - - rasterio - - scipy + - rasterio - seaborn - - sparse - - toolz - typing_extensions diff --git a/ci/requirements/all-but-numba.yml b/ci/requirements/all-but-numba.yml index fb65a0a1b0c..b30d433ae56 100644 --- a/ci/requirements/all-but-numba.yml +++ b/ci/requirements/all-but-numba.yml @@ -4,9 +4,7 @@ channels: - nodefaults dependencies: # Pin a "very new numpy" (updated Sept 24, 2024) - - array-api-strict<2.4 - cartopy - - cftime - distributed - iris - lxml # Optional dep of pydap @@ -22,7 +20,5 @@ dependencies: # - pint>=0.22 - pooch - rasterio - - scipy - seaborn - - toolz - typing_extensions diff --git a/ci/requirements/bare-min-and-scipy.yml b/ci/requirements/bare-min-and-scipy.yml index 26b11674366..66bd458c09f 100644 --- a/ci/requirements/bare-min-and-scipy.yml +++ b/ci/requirements/bare-min-and-scipy.yml @@ -4,4 +4,3 @@ channels: - nodefaults dependencies: - python=3.11 - - scipy=1.13 diff --git a/ci/requirements/doc.yml b/ci/requirements/doc.yml index 3f66fc6c918..b47766f0a3c 100644 --- a/ci/requirements/doc.yml +++ b/ci/requirements/doc.yml @@ -20,10 +20,8 @@ dependencies: - pydata-sphinx-theme - pyproj - rich # for Zarr tree() - - scipy - seaborn - setuptools - - sparse - sphinx-autosummary-accessors - sphinx-copybutton - sphinx-design diff --git a/ci/requirements/environment-3.14.yml b/ci/requirements/environment-3.14.yml index 5a644a60d60..7786bc885de 100644 --- a/ci/requirements/environment-3.14.yml +++ b/ci/requirements/environment-3.14.yml @@ -3,9 +3,7 @@ channels: - conda-forge - nodefaults dependencies: - - array-api-strict<2.4 - cartopy - - cftime - distributed - iris - lxml # Optional dep of pydap @@ -16,10 +14,8 @@ dependencies: # - pint>=0.22 - pooch - rasterio - - scipy - seaborn # - sparse - - toolz - typing_extensions - pip: - jax # no way to get cpu-only jaxlib from conda if gpu is present diff --git a/ci/requirements/environment-windows-3.14.yml b/ci/requirements/environment-windows-3.14.yml index f8651c48092..52287446794 100644 --- a/ci/requirements/environment-windows-3.14.yml +++ b/ci/requirements/environment-windows-3.14.yml @@ -2,9 +2,7 @@ name: xarray-tests channels: - conda-forge dependencies: - - array-api-strict<2.4 - cartopy - - cftime - distributed - iris - lxml # Optional dep of pydap @@ -14,9 +12,7 @@ dependencies: # - numbagg # - pint>=0.22 - rasterio - - scipy - seaborn # - sparse - - toolz - typing_extensions - pip: diff --git a/ci/requirements/environment-windows.yml b/ci/requirements/environment-windows.yml index cc79fd81b86..74fb0d07529 100644 --- a/ci/requirements/environment-windows.yml +++ b/ci/requirements/environment-windows.yml @@ -2,9 +2,7 @@ name: xarray-tests channels: - conda-forge dependencies: - - array-api-strict<2.4 - cartopy - - cftime - distributed - iris - lxml # Optional dep of pydap @@ -12,9 +10,6 @@ dependencies: - nc-time-axis # - pint>=0.22 - rasterio - - scipy - seaborn - - sparse - - toolz - typing_extensions - pip: diff --git a/ci/requirements/environment.yml b/ci/requirements/environment.yml index bce545ef05c..a7f3671d7b0 100644 --- a/ci/requirements/environment.yml +++ b/ci/requirements/environment.yml @@ -3,9 +3,7 @@ channels: - conda-forge - nodefaults dependencies: - - array-api-strict<2.4 - cartopy - - cftime - distributed - iris - lxml # Optional dep of pydap @@ -14,10 +12,7 @@ dependencies: # - pint>=0.22 - pooch - rasterio - - scipy - seaborn - - sparse - - toolz - typing_extensions - pip: - jax # no way to get cpu-only jaxlib from conda if gpu is present diff --git a/ci/requirements/min-all-deps.yml b/ci/requirements/min-all-deps.yml index a11e8ef1065..fcfa0ad9c3e 100644 --- a/ci/requirements/min-all-deps.yml +++ b/ci/requirements/min-all-deps.yml @@ -8,9 +8,7 @@ dependencies: # When upgrading python, numpy, or pandas, must also change # doc/user-guide/installing.rst, doc/user-guide/plotting.rst and setup.py. - python=3.11 - - array-api-strict=1.1 # dependency for testing the array api compat - cartopy=0.23 - - cftime=1.6 - distributed=2024.6 # h5py and hdf5 tend to cause conflicts # for e.g. hdf5 1.12 conflicts with h5py=3.1 @@ -21,9 +19,5 @@ dependencies: - nc-time-axis=1.4 # netcdf follows a 1.major.minor[.patch] convention # (see https://github.com/Unidata/netcdf4-python/issues/1090) - - pint=0.24 - rasterio=1.3 - - scipy=1.13 - seaborn=0.13 - - sparse=0.15 - - toolz=0.12 diff --git a/pixi.toml b/pixi.toml index cf19e3e9390..edbe16b47aa 100644 --- a/pixi.toml +++ b/pixi.toml @@ -62,6 +62,18 @@ opt_einsum = "*" numba = "*" numbagg = "*" +[feature.extras.dependencies] +# array +array-api-strict = "<2.4" +sparse = "*" + +# algorithms +scipy = "*" +toolz = "*" + +# other +cftime = "*" +pint = "*" [feature.test.dependencies] pytest = "*" From 5b201774570f084d7ab977e8fc9bc1414ed5c92f Mon Sep 17 00:00:00 2001 From: Vecko <36369090+VeckoTheGecko@users.noreply.github.com> Date: Fri, 12 Sep 2025 21:08:20 +0200 Subject: [PATCH 17/89] Remove 'typing_extensions' package from environment files Handled by pixi --- ci/requirements/all-but-dask.yml | 1 - ci/requirements/all-but-numba.yml | 1 - ci/requirements/environment-3.14.yml | 1 - ci/requirements/environment-windows-3.14.yml | 1 - ci/requirements/environment-windows.yml | 1 - ci/requirements/environment.yml | 1 - 6 files changed, 6 deletions(-) diff --git a/ci/requirements/all-but-dask.yml b/ci/requirements/all-but-dask.yml index 99af26306ee..9ad08852105 100644 --- a/ci/requirements/all-but-dask.yml +++ b/ci/requirements/all-but-dask.yml @@ -9,4 +9,3 @@ dependencies: - nc-time-axis - rasterio - seaborn - - typing_extensions diff --git a/ci/requirements/all-but-numba.yml b/ci/requirements/all-but-numba.yml index b30d433ae56..0adda6de3af 100644 --- a/ci/requirements/all-but-numba.yml +++ b/ci/requirements/all-but-numba.yml @@ -21,4 +21,3 @@ dependencies: - pooch - rasterio - seaborn - - typing_extensions diff --git a/ci/requirements/environment-3.14.yml b/ci/requirements/environment-3.14.yml index 7786bc885de..99038c4b9f7 100644 --- a/ci/requirements/environment-3.14.yml +++ b/ci/requirements/environment-3.14.yml @@ -16,6 +16,5 @@ dependencies: - rasterio - seaborn # - sparse - - typing_extensions - pip: - jax # no way to get cpu-only jaxlib from conda if gpu is present diff --git a/ci/requirements/environment-windows-3.14.yml b/ci/requirements/environment-windows-3.14.yml index 52287446794..dd8ec5d6a64 100644 --- a/ci/requirements/environment-windows-3.14.yml +++ b/ci/requirements/environment-windows-3.14.yml @@ -14,5 +14,4 @@ dependencies: - rasterio - seaborn # - sparse - - typing_extensions - pip: diff --git a/ci/requirements/environment-windows.yml b/ci/requirements/environment-windows.yml index 74fb0d07529..b82c631649c 100644 --- a/ci/requirements/environment-windows.yml +++ b/ci/requirements/environment-windows.yml @@ -11,5 +11,4 @@ dependencies: # - pint>=0.22 - rasterio - seaborn - - typing_extensions - pip: diff --git a/ci/requirements/environment.yml b/ci/requirements/environment.yml index a7f3671d7b0..4865061a25f 100644 --- a/ci/requirements/environment.yml +++ b/ci/requirements/environment.yml @@ -13,6 +13,5 @@ dependencies: - pooch - rasterio - seaborn - - typing_extensions - pip: - jax # no way to get cpu-only jaxlib from conda if gpu is present From fdaa381838f2d1f821fe243045a771249d1f239b Mon Sep 17 00:00:00 2001 From: Vecko <36369090+VeckoTheGecko@users.noreply.github.com> Date: Fri, 12 Sep 2025 21:09:19 +0200 Subject: [PATCH 18/89] Remove 'rasterio' package from environment files Handled by pixi --- ci/requirements/all-but-dask.yml | 3 +-- ci/requirements/all-but-numba.yml | 1 - ci/requirements/environment-3.14.yml | 1 - ci/requirements/environment-windows-3.14.yml | 1 - ci/requirements/environment-windows.yml | 1 - ci/requirements/environment.yml | 1 - ci/requirements/min-all-deps.yml | 1 - pixi.toml | 1 + 8 files changed, 2 insertions(+), 8 deletions(-) diff --git a/ci/requirements/all-but-dask.yml b/ci/requirements/all-but-dask.yml index 9ad08852105..1893b6e3e48 100644 --- a/ci/requirements/all-but-dask.yml +++ b/ci/requirements/all-but-dask.yml @@ -7,5 +7,4 @@ dependencies: - lxml # Optional dep of pydap - matplotlib-base - nc-time-axis - - rasterio - - seaborn + - seaborn diff --git a/ci/requirements/all-but-numba.yml b/ci/requirements/all-but-numba.yml index 0adda6de3af..4afc07c62fe 100644 --- a/ci/requirements/all-but-numba.yml +++ b/ci/requirements/all-but-numba.yml @@ -19,5 +19,4 @@ dependencies: # - sparse # - pint>=0.22 - pooch - - rasterio - seaborn diff --git a/ci/requirements/environment-3.14.yml b/ci/requirements/environment-3.14.yml index 99038c4b9f7..f533d93061b 100644 --- a/ci/requirements/environment-3.14.yml +++ b/ci/requirements/environment-3.14.yml @@ -13,7 +13,6 @@ dependencies: # - numbagg # - pint>=0.22 - pooch - - rasterio - seaborn # - sparse - pip: diff --git a/ci/requirements/environment-windows-3.14.yml b/ci/requirements/environment-windows-3.14.yml index dd8ec5d6a64..b877bb6379b 100644 --- a/ci/requirements/environment-windows-3.14.yml +++ b/ci/requirements/environment-windows-3.14.yml @@ -11,7 +11,6 @@ dependencies: # - numba # - numbagg # - pint>=0.22 - - rasterio - seaborn # - sparse - pip: diff --git a/ci/requirements/environment-windows.yml b/ci/requirements/environment-windows.yml index b82c631649c..2928c4ceada 100644 --- a/ci/requirements/environment-windows.yml +++ b/ci/requirements/environment-windows.yml @@ -9,6 +9,5 @@ dependencies: - matplotlib-base - nc-time-axis # - pint>=0.22 - - rasterio - seaborn - pip: diff --git a/ci/requirements/environment.yml b/ci/requirements/environment.yml index 4865061a25f..a132a71fe10 100644 --- a/ci/requirements/environment.yml +++ b/ci/requirements/environment.yml @@ -11,7 +11,6 @@ dependencies: - nc-time-axis # - pint>=0.22 - pooch - - rasterio - seaborn - pip: - jax # no way to get cpu-only jaxlib from conda if gpu is present diff --git a/ci/requirements/min-all-deps.yml b/ci/requirements/min-all-deps.yml index fcfa0ad9c3e..835bfd0f592 100644 --- a/ci/requirements/min-all-deps.yml +++ b/ci/requirements/min-all-deps.yml @@ -19,5 +19,4 @@ dependencies: - nc-time-axis=1.4 # netcdf follows a 1.major.minor[.patch] convention # (see https://github.com/Unidata/netcdf4-python/issues/1090) - - rasterio=1.3 - seaborn=0.13 diff --git a/pixi.toml b/pixi.toml index edbe16b47aa..cf248781c5d 100644 --- a/pixi.toml +++ b/pixi.toml @@ -42,6 +42,7 @@ h5py = "*" hdf5 = "*" netcdf4 = "*" zarr = "*" +rasterio = "*" # opendap pydap = "*" From 1062701e944607ee9bbb1b99eae0375286f67b33 Mon Sep 17 00:00:00 2001 From: Vecko <36369090+VeckoTheGecko@users.noreply.github.com> Date: Fri, 12 Sep 2025 21:12:42 +0200 Subject: [PATCH 19/89] Remove 'distributed' and 'lxml' package from environment files Handled by pixi --- ci/requirements/all-but-dask.yml | 3 +-- ci/requirements/all-but-numba.yml | 2 -- ci/requirements/environment-3.14.yml | 2 -- ci/requirements/environment-windows-3.14.yml | 2 -- ci/requirements/environment-windows.yml | 2 -- ci/requirements/environment.yml | 2 -- ci/requirements/min-all-deps.yml | 1 - pixi.toml | 2 ++ 8 files changed, 3 insertions(+), 13 deletions(-) diff --git a/ci/requirements/all-but-dask.yml b/ci/requirements/all-but-dask.yml index 1893b6e3e48..e3d6b3517c9 100644 --- a/ci/requirements/all-but-dask.yml +++ b/ci/requirements/all-but-dask.yml @@ -4,7 +4,6 @@ channels: - nodefaults dependencies: - cartopy - - lxml # Optional dep of pydap - matplotlib-base - nc-time-axis - - seaborn + - seaborn diff --git a/ci/requirements/all-but-numba.yml b/ci/requirements/all-but-numba.yml index 4afc07c62fe..b4a21fd0bd7 100644 --- a/ci/requirements/all-but-numba.yml +++ b/ci/requirements/all-but-numba.yml @@ -5,9 +5,7 @@ channels: dependencies: # Pin a "very new numpy" (updated Sept 24, 2024) - cartopy - - distributed - iris - - lxml # Optional dep of pydap - matplotlib-base - nc-time-axis # numba, sparse, numbagg, numexpr often conflicts with newer versions of numpy. diff --git a/ci/requirements/environment-3.14.yml b/ci/requirements/environment-3.14.yml index f533d93061b..626eb4dcb9d 100644 --- a/ci/requirements/environment-3.14.yml +++ b/ci/requirements/environment-3.14.yml @@ -4,9 +4,7 @@ channels: - nodefaults dependencies: - cartopy - - distributed - iris - - lxml # Optional dep of pydap - matplotlib-base - nc-time-axis # - numba diff --git a/ci/requirements/environment-windows-3.14.yml b/ci/requirements/environment-windows-3.14.yml index b877bb6379b..1eca4557343 100644 --- a/ci/requirements/environment-windows-3.14.yml +++ b/ci/requirements/environment-windows-3.14.yml @@ -3,9 +3,7 @@ channels: - conda-forge dependencies: - cartopy - - distributed - iris - - lxml # Optional dep of pydap - matplotlib-base - nc-time-axis # - numba diff --git a/ci/requirements/environment-windows.yml b/ci/requirements/environment-windows.yml index 2928c4ceada..eb05ca178d4 100644 --- a/ci/requirements/environment-windows.yml +++ b/ci/requirements/environment-windows.yml @@ -3,9 +3,7 @@ channels: - conda-forge dependencies: - cartopy - - distributed - iris - - lxml # Optional dep of pydap - matplotlib-base - nc-time-axis # - pint>=0.22 diff --git a/ci/requirements/environment.yml b/ci/requirements/environment.yml index a132a71fe10..61cad344c69 100644 --- a/ci/requirements/environment.yml +++ b/ci/requirements/environment.yml @@ -4,9 +4,7 @@ channels: - nodefaults dependencies: - cartopy - - distributed - iris - - lxml # Optional dep of pydap - matplotlib-base - nc-time-axis # - pint>=0.22 diff --git a/ci/requirements/min-all-deps.yml b/ci/requirements/min-all-deps.yml index 835bfd0f592..d8c8d7d1781 100644 --- a/ci/requirements/min-all-deps.yml +++ b/ci/requirements/min-all-deps.yml @@ -14,7 +14,6 @@ dependencies: # for e.g. hdf5 1.12 conflicts with h5py=3.1 # prioritize bumping other packages instead - iris=3.9 - - lxml=5.1 # Optional dep of pydap - matplotlib-base=3.8 - nc-time-axis=1.4 # netcdf follows a 1.major.minor[.patch] convention diff --git a/pixi.toml b/pixi.toml index cf248781c5d..98c5e308aba 100644 --- a/pixi.toml +++ b/pixi.toml @@ -46,6 +46,7 @@ rasterio = "*" # opendap pydap = "*" +lxml = "*" # Optional dep of pydap pydap-server = "*" # s3 @@ -62,6 +63,7 @@ dask-core = "*" opt_einsum = "*" numba = "*" numbagg = "*" +distributed = "*" [feature.extras.dependencies] # array From 72b65da04a6782588301b41fa6bd1af9a2dec41a Mon Sep 17 00:00:00 2001 From: Vecko <36369090+VeckoTheGecko@users.noreply.github.com> Date: Fri, 12 Sep 2025 21:15:26 +0200 Subject: [PATCH 20/89] Remove plotting related packages from environment files Handled by pixi --- ci/requirements/all-but-dask.yml | 4 ---- ci/requirements/all-but-numba.yml | 4 ---- ci/requirements/doc.yml | 3 --- ci/requirements/environment-3.14.yml | 4 ---- ci/requirements/environment-windows-3.14.yml | 4 ---- ci/requirements/environment-windows.yml | 4 ---- ci/requirements/environment.yml | 4 ---- ci/requirements/min-all-deps.yml | 4 ---- pixi.toml | 6 ++++++ 9 files changed, 6 insertions(+), 31 deletions(-) diff --git a/ci/requirements/all-but-dask.yml b/ci/requirements/all-but-dask.yml index e3d6b3517c9..afca69aa095 100644 --- a/ci/requirements/all-but-dask.yml +++ b/ci/requirements/all-but-dask.yml @@ -3,7 +3,3 @@ channels: - conda-forge - nodefaults dependencies: - - cartopy - - matplotlib-base - - nc-time-axis - - seaborn diff --git a/ci/requirements/all-but-numba.yml b/ci/requirements/all-but-numba.yml index b4a21fd0bd7..93da18f4a8a 100644 --- a/ci/requirements/all-but-numba.yml +++ b/ci/requirements/all-but-numba.yml @@ -4,10 +4,7 @@ channels: - nodefaults dependencies: # Pin a "very new numpy" (updated Sept 24, 2024) - - cartopy - iris - - matplotlib-base - - nc-time-axis # numba, sparse, numbagg, numexpr often conflicts with newer versions of numpy. # This environment helps us test xarray with the latest versions # of numpy @@ -17,4 +14,3 @@ dependencies: # - sparse # - pint>=0.22 - pooch - - seaborn diff --git a/ci/requirements/doc.yml b/ci/requirements/doc.yml index b47766f0a3c..15db06c9793 100644 --- a/ci/requirements/doc.yml +++ b/ci/requirements/doc.yml @@ -4,7 +4,6 @@ channels: - conda-forge - nodefaults dependencies: - - cartopy - cfgrib - kerchunk - ipykernel @@ -13,14 +12,12 @@ dependencies: - iris - jupyter_client - jupyter_sphinx - - matplotlib-base - nbsphinx - ncdata - pooch - pydata-sphinx-theme - pyproj - rich # for Zarr tree() - - seaborn - setuptools - sphinx-autosummary-accessors - sphinx-copybutton diff --git a/ci/requirements/environment-3.14.yml b/ci/requirements/environment-3.14.yml index 626eb4dcb9d..a99f2b06c7b 100644 --- a/ci/requirements/environment-3.14.yml +++ b/ci/requirements/environment-3.14.yml @@ -3,15 +3,11 @@ channels: - conda-forge - nodefaults dependencies: - - cartopy - iris - - matplotlib-base - - nc-time-axis # - numba # - numbagg # - pint>=0.22 - pooch - - seaborn # - sparse - pip: - jax # no way to get cpu-only jaxlib from conda if gpu is present diff --git a/ci/requirements/environment-windows-3.14.yml b/ci/requirements/environment-windows-3.14.yml index 1eca4557343..84fc6ded68c 100644 --- a/ci/requirements/environment-windows-3.14.yml +++ b/ci/requirements/environment-windows-3.14.yml @@ -2,13 +2,9 @@ name: xarray-tests channels: - conda-forge dependencies: - - cartopy - iris - - matplotlib-base - - nc-time-axis # - numba # - numbagg # - pint>=0.22 - - seaborn # - sparse - pip: diff --git a/ci/requirements/environment-windows.yml b/ci/requirements/environment-windows.yml index eb05ca178d4..06117c1cff3 100644 --- a/ci/requirements/environment-windows.yml +++ b/ci/requirements/environment-windows.yml @@ -2,10 +2,6 @@ name: xarray-tests channels: - conda-forge dependencies: - - cartopy - iris - - matplotlib-base - - nc-time-axis # - pint>=0.22 - - seaborn - pip: diff --git a/ci/requirements/environment.yml b/ci/requirements/environment.yml index 61cad344c69..f875541b162 100644 --- a/ci/requirements/environment.yml +++ b/ci/requirements/environment.yml @@ -3,12 +3,8 @@ channels: - conda-forge - nodefaults dependencies: - - cartopy - iris - - matplotlib-base - - nc-time-axis # - pint>=0.22 - pooch - - seaborn - pip: - jax # no way to get cpu-only jaxlib from conda if gpu is present diff --git a/ci/requirements/min-all-deps.yml b/ci/requirements/min-all-deps.yml index d8c8d7d1781..f8193da4844 100644 --- a/ci/requirements/min-all-deps.yml +++ b/ci/requirements/min-all-deps.yml @@ -8,14 +8,10 @@ dependencies: # When upgrading python, numpy, or pandas, must also change # doc/user-guide/installing.rst, doc/user-guide/plotting.rst and setup.py. - python=3.11 - - cartopy=0.23 - distributed=2024.6 # h5py and hdf5 tend to cause conflicts # for e.g. hdf5 1.12 conflicts with h5py=3.1 # prioritize bumping other packages instead - iris=3.9 - - matplotlib-base=3.8 - - nc-time-axis=1.4 # netcdf follows a 1.major.minor[.patch] convention # (see https://github.com/Unidata/netcdf4-python/issues/1090) - - seaborn=0.13 diff --git a/pixi.toml b/pixi.toml index 98c5e308aba..0accce64c62 100644 --- a/pixi.toml +++ b/pixi.toml @@ -65,6 +65,12 @@ numba = "*" numbagg = "*" distributed = "*" +[feature.plotting.dependencies] +cartopy = "*" +matplotlib-base = "*" +nc-time-axis = "*" +seaborn = "*" + [feature.extras.dependencies] # array array-api-strict = "<2.4" From 56f84f1eee4038288b8f19c42e004edfb8b1f0fa Mon Sep 17 00:00:00 2001 From: Vecko <36369090+VeckoTheGecko@users.noreply.github.com> Date: Fri, 12 Sep 2025 21:17:45 +0200 Subject: [PATCH 21/89] Remove 'iris' and 'pooch' package from environment files Handled by pixi --- ci/requirements/all-but-numba.yml | 2 -- ci/requirements/doc.yml | 2 -- ci/requirements/environment-3.14.yml | 2 -- ci/requirements/environment-windows-3.14.yml | 1 - ci/requirements/environment-windows.yml | 3 +-- ci/requirements/environment.yml | 4 +--- pixi.toml | 4 ++++ 7 files changed, 6 insertions(+), 12 deletions(-) diff --git a/ci/requirements/all-but-numba.yml b/ci/requirements/all-but-numba.yml index 93da18f4a8a..743ae6bb9dc 100644 --- a/ci/requirements/all-but-numba.yml +++ b/ci/requirements/all-but-numba.yml @@ -4,7 +4,6 @@ channels: - nodefaults dependencies: # Pin a "very new numpy" (updated Sept 24, 2024) - - iris # numba, sparse, numbagg, numexpr often conflicts with newer versions of numpy. # This environment helps us test xarray with the latest versions # of numpy @@ -13,4 +12,3 @@ dependencies: # - numexpr # - sparse # - pint>=0.22 - - pooch diff --git a/ci/requirements/doc.yml b/ci/requirements/doc.yml index 15db06c9793..978fec66ac6 100644 --- a/ci/requirements/doc.yml +++ b/ci/requirements/doc.yml @@ -9,12 +9,10 @@ dependencies: - ipykernel - ipywidgets # silence nbsphinx warning - ipython - - iris - jupyter_client - jupyter_sphinx - nbsphinx - ncdata - - pooch - pydata-sphinx-theme - pyproj - rich # for Zarr tree() diff --git a/ci/requirements/environment-3.14.yml b/ci/requirements/environment-3.14.yml index a99f2b06c7b..0b7b1891532 100644 --- a/ci/requirements/environment-3.14.yml +++ b/ci/requirements/environment-3.14.yml @@ -3,11 +3,9 @@ channels: - conda-forge - nodefaults dependencies: - - iris # - numba # - numbagg # - pint>=0.22 - - pooch # - sparse - pip: - jax # no way to get cpu-only jaxlib from conda if gpu is present diff --git a/ci/requirements/environment-windows-3.14.yml b/ci/requirements/environment-windows-3.14.yml index 84fc6ded68c..7010ea32cd5 100644 --- a/ci/requirements/environment-windows-3.14.yml +++ b/ci/requirements/environment-windows-3.14.yml @@ -2,7 +2,6 @@ name: xarray-tests channels: - conda-forge dependencies: - - iris # - numba # - numbagg # - pint>=0.22 diff --git a/ci/requirements/environment-windows.yml b/ci/requirements/environment-windows.yml index 06117c1cff3..437a8c96f5b 100644 --- a/ci/requirements/environment-windows.yml +++ b/ci/requirements/environment-windows.yml @@ -2,6 +2,5 @@ name: xarray-tests channels: - conda-forge dependencies: - - iris - # - pint>=0.22 + # - pint>=0.22 - pip: diff --git a/ci/requirements/environment.yml b/ci/requirements/environment.yml index f875541b162..686d333d619 100644 --- a/ci/requirements/environment.yml +++ b/ci/requirements/environment.yml @@ -3,8 +3,6 @@ channels: - conda-forge - nodefaults dependencies: - - iris - # - pint>=0.22 - - pooch + # - pint>=0.22 - pip: - jax # no way to get cpu-only jaxlib from conda if gpu is present diff --git a/pixi.toml b/pixi.toml index 0accce64c62..0d07147e79c 100644 --- a/pixi.toml +++ b/pixi.toml @@ -80,9 +80,13 @@ sparse = "*" scipy = "*" toolz = "*" +# tutorial +pooch = "*" + # other cftime = "*" pint = "*" +iris = "*" [feature.test.dependencies] pytest = "*" From e3eaaa80deab27bc72d3cf72e3515e03c4a2b087 Mon Sep 17 00:00:00 2001 From: Vecko <36369090+VeckoTheGecko@users.noreply.github.com> Date: Fri, 12 Sep 2025 21:21:53 +0200 Subject: [PATCH 22/89] Remove 'jax' package from environment files Handled by pixi --- ci/requirements/environment.yml | 2 -- pixi.toml | 4 ++++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ci/requirements/environment.yml b/ci/requirements/environment.yml index 686d333d619..a9182769c67 100644 --- a/ci/requirements/environment.yml +++ b/ci/requirements/environment.yml @@ -4,5 +4,3 @@ channels: - nodefaults dependencies: # - pint>=0.22 - - pip: - - jax # no way to get cpu-only jaxlib from conda if gpu is present diff --git a/pixi.toml b/pixi.toml index 0d07147e79c..33d6b1d39ac 100644 --- a/pixi.toml +++ b/pixi.toml @@ -65,6 +65,10 @@ numba = "*" numbagg = "*" distributed = "*" +[feature.performance.pypi-dependencies] +jax = "*" + + [feature.plotting.dependencies] cartopy = "*" matplotlib-base = "*" From 3d75cbe05ea316c0f3f266a73309e75761fdc2f5 Mon Sep 17 00:00:00 2001 From: Vecko <36369090+VeckoTheGecko@users.noreply.github.com> Date: Fri, 12 Sep 2025 21:23:15 +0200 Subject: [PATCH 23/89] Delete bodies of empty environment files --- ci/requirements/all-but-dask.yml | 5 ----- ci/requirements/all-but-numba.yml | 14 -------------- ci/requirements/bare-min-and-scipy.yml | 6 ------ ci/requirements/bare-minimum.yml | 6 ------ ci/requirements/environment-3.14.yml | 11 ----------- ci/requirements/environment-windows-3.14.yml | 9 --------- ci/requirements/environment-windows.yml | 6 ------ ci/requirements/environment.yml | 6 ------ ci/requirements/min-all-deps.yml | 17 ----------------- 9 files changed, 80 deletions(-) delete mode 100644 ci/requirements/min-all-deps.yml diff --git a/ci/requirements/all-but-dask.yml b/ci/requirements/all-but-dask.yml index afca69aa095..e69de29bb2d 100644 --- a/ci/requirements/all-but-dask.yml +++ b/ci/requirements/all-but-dask.yml @@ -1,5 +0,0 @@ -name: xarray-tests -channels: - - conda-forge - - nodefaults -dependencies: diff --git a/ci/requirements/all-but-numba.yml b/ci/requirements/all-but-numba.yml index 743ae6bb9dc..e69de29bb2d 100644 --- a/ci/requirements/all-but-numba.yml +++ b/ci/requirements/all-but-numba.yml @@ -1,14 +0,0 @@ -name: xarray-tests -channels: - - conda-forge - - nodefaults -dependencies: - # Pin a "very new numpy" (updated Sept 24, 2024) - # numba, sparse, numbagg, numexpr often conflicts with newer versions of numpy. - # This environment helps us test xarray with the latest versions - # of numpy - # - numba - # - numbagg - # - numexpr - # - sparse - # - pint>=0.22 diff --git a/ci/requirements/bare-min-and-scipy.yml b/ci/requirements/bare-min-and-scipy.yml index 66bd458c09f..e69de29bb2d 100644 --- a/ci/requirements/bare-min-and-scipy.yml +++ b/ci/requirements/bare-min-and-scipy.yml @@ -1,6 +0,0 @@ -name: xarray-tests -channels: - - conda-forge - - nodefaults -dependencies: - - python=3.11 diff --git a/ci/requirements/bare-minimum.yml b/ci/requirements/bare-minimum.yml index 66bd458c09f..e69de29bb2d 100644 --- a/ci/requirements/bare-minimum.yml +++ b/ci/requirements/bare-minimum.yml @@ -1,6 +0,0 @@ -name: xarray-tests -channels: - - conda-forge - - nodefaults -dependencies: - - python=3.11 diff --git a/ci/requirements/environment-3.14.yml b/ci/requirements/environment-3.14.yml index 0b7b1891532..e69de29bb2d 100644 --- a/ci/requirements/environment-3.14.yml +++ b/ci/requirements/environment-3.14.yml @@ -1,11 +0,0 @@ -name: xarray-tests -channels: - - conda-forge - - nodefaults -dependencies: - # - numba - # - numbagg - # - pint>=0.22 - # - sparse - - pip: - - jax # no way to get cpu-only jaxlib from conda if gpu is present diff --git a/ci/requirements/environment-windows-3.14.yml b/ci/requirements/environment-windows-3.14.yml index 7010ea32cd5..e69de29bb2d 100644 --- a/ci/requirements/environment-windows-3.14.yml +++ b/ci/requirements/environment-windows-3.14.yml @@ -1,9 +0,0 @@ -name: xarray-tests -channels: - - conda-forge -dependencies: - # - numba - # - numbagg - # - pint>=0.22 - # - sparse - - pip: diff --git a/ci/requirements/environment-windows.yml b/ci/requirements/environment-windows.yml index 437a8c96f5b..e69de29bb2d 100644 --- a/ci/requirements/environment-windows.yml +++ b/ci/requirements/environment-windows.yml @@ -1,6 +0,0 @@ -name: xarray-tests -channels: - - conda-forge -dependencies: - # - pint>=0.22 - - pip: diff --git a/ci/requirements/environment.yml b/ci/requirements/environment.yml index a9182769c67..e69de29bb2d 100644 --- a/ci/requirements/environment.yml +++ b/ci/requirements/environment.yml @@ -1,6 +0,0 @@ -name: xarray-tests -channels: - - conda-forge - - nodefaults -dependencies: - # - pint>=0.22 diff --git a/ci/requirements/min-all-deps.yml b/ci/requirements/min-all-deps.yml deleted file mode 100644 index f8193da4844..00000000000 --- a/ci/requirements/min-all-deps.yml +++ /dev/null @@ -1,17 +0,0 @@ -name: xarray-tests -channels: - - conda-forge - - nodefaults -dependencies: - # MINIMUM VERSIONS POLICY: see doc/user-guide/installing.rst - # Run ci/min_deps_check.py to verify that this file respects the policy. - # When upgrading python, numpy, or pandas, must also change - # doc/user-guide/installing.rst, doc/user-guide/plotting.rst and setup.py. - - python=3.11 - - distributed=2024.6 - # h5py and hdf5 tend to cause conflicts - # for e.g. hdf5 1.12 conflicts with h5py=3.1 - # prioritize bumping other packages instead - - iris=3.9 - # netcdf follows a 1.major.minor[.patch] convention - # (see https://github.com/Unidata/netcdf4-python/issues/1090) From 9f39ee654908b7fa4c730a001d38b1e6d86a0b03 Mon Sep 17 00:00:00 2001 From: Vecko <36369090+VeckoTheGecko@users.noreply.github.com> Date: Fri, 12 Sep 2025 21:27:06 +0200 Subject: [PATCH 24/89] Port doc dependencies to pixi.toml --- ci/requirements/doc.yml | 32 -------------------------------- pixi.toml | 25 +++++++++++++++++++++++++ 2 files changed, 25 insertions(+), 32 deletions(-) delete mode 100644 ci/requirements/doc.yml diff --git a/ci/requirements/doc.yml b/ci/requirements/doc.yml deleted file mode 100644 index 978fec66ac6..00000000000 --- a/ci/requirements/doc.yml +++ /dev/null @@ -1,32 +0,0 @@ -name: xarray-docs -channels: - # Don't change to pkgs/main, as it causes random timeouts in readthedocs - - conda-forge - - nodefaults -dependencies: - - cfgrib - - kerchunk - - ipykernel - - ipywidgets # silence nbsphinx warning - - ipython - - jupyter_client - - jupyter_sphinx - - nbsphinx - - ncdata - - pydata-sphinx-theme - - pyproj - - rich # for Zarr tree() - - setuptools - - sphinx-autosummary-accessors - - sphinx-copybutton - - sphinx-design - - sphinx-inline-tabs - - sphinx>=6,<8 - - sphinxcontrib-mermaid - - sphinxcontrib-srclinks - - sphinx-remove-toctrees - - sphinxext-opengraph - - sphinxext-rediraffe - - pip: - # relative to this file. Needs to be editable to be accepted. - - -e ../.. diff --git a/pixi.toml b/pixi.toml index 33d6b1d39ac..543810f47b5 100644 --- a/pixi.toml +++ b/pixi.toml @@ -102,6 +102,31 @@ pytest-timeout = "*" pytest-xdist = "*" coveralls = "*" +[feature.doc.dependencies] +cfgrib = "*" +kerchunk = "*" +ipykernel = "*" +ipywidgets = "*" # silence nbsphinx warning +ipython = '*' +jupyter_client = '*' +jupyter_sphinx = '*' +nbsphinx = '*' +ncdata = '*' +pydata-sphinx-theme = "*" +pyproj = "*" +rich = "*" # for Zarr tree() +setuptools = "*" +sphinx-autosummary-accessors = "*" +sphinx-copybutton = "*" +sphinx-design = "*" +sphinx-inline-tabs = "*" +sphinx = ">=6,<8" +sphinxcontrib-mermaid = "*" +sphinxcontrib-srclinks = "*" +sphinx-remove-toctrees = "*" +sphinxext-opengraph = "*" +sphinxext-rediraffe = "*" + [feature.mypy.dependencies] mypy = "==1.18.1" From 833c647a339179c7225e601050ef29f2df334b6d Mon Sep 17 00:00:00 2001 From: Vecko <36369090+VeckoTheGecko@users.noreply.github.com> Date: Fri, 12 Sep 2025 21:29:35 +0200 Subject: [PATCH 25/89] Add xarray as source dependency to pixi --- pixi.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pixi.toml b/pixi.toml index 543810f47b5..3e565775607 100644 --- a/pixi.toml +++ b/pixi.toml @@ -30,6 +30,9 @@ pandas = "*" packaging = "24.1.*" #? Can be removed? git = "*" # needed for dynamic versioning +[pypi-dependencies] +xarray = { path = ".", editable = true } + [feature.minimal.dependencies] python = "3.11.*" numpy = "1.26.*" From baee394cb1580caf7c9d8f6fec6b6a2ef2f4c48e Mon Sep 17 00:00:00 2001 From: Vecko <36369090+VeckoTheGecko@users.noreply.github.com> Date: Fri, 12 Sep 2025 21:39:17 +0200 Subject: [PATCH 26/89] Add new environments and tasks --- pixi.toml | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/pixi.toml b/pixi.toml index 3e565775607..c8dc22a156a 100644 --- a/pixi.toml +++ b/pixi.toml @@ -9,17 +9,32 @@ test = { cmd = "pytest" } [tasks.test-all] depends-on = [ - { task = "test", environment = "test" }, + { task = "test", environment = "test-default" }, { task = "test", environment = "test-bare-min" }, + { task = "test", environment = "test-all-deps" }, ] [environments] # Testing -test = { features = ["test"], solve-group = "test" } +test-default = { features = ["test"], solve-group = "test" } +test-all-deps = { features = [ + "test", + "backends", + "performance", + "plotting", + "extras", +], solve-group = "test" } test-bare-min = { features = ["test", "minimal"], solve-group = "test" } # Extra typing = { features = ["mypy"] } +doc = { features = [ + "doc", + "backends", + "performance", + "plotting", + "extras", +], solve-group = "doc" } pre-commit = { features = ["pre-commit"], no-default-feature = true } [dependencies] @@ -34,6 +49,7 @@ git = "*" # needed for dynamic versioning xarray = { path = ".", editable = true } [feature.minimal.dependencies] +# minimal versions python = "3.11.*" numpy = "1.26.*" pandas = "2.2.*" From 04e667a6d499b20faf2901dfc141462081b21fa2 Mon Sep 17 00:00:00 2001 From: Vecko <36369090+VeckoTheGecko@users.noreply.github.com> Date: Tue, 16 Sep 2025 17:11:09 +0200 Subject: [PATCH 27/89] Move `test` task to `test` feature --- pixi.toml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/pixi.toml b/pixi.toml index c8dc22a156a..d863a5406dc 100644 --- a/pixi.toml +++ b/pixi.toml @@ -3,10 +3,6 @@ preview = ["pixi-build"] channels = ["conda-forge", "nodefaults"] platforms = ["win-64", "linux-64", "osx-64", "osx-arm64"] - -[tasks] -test = { cmd = "pytest" } - [tasks.test-all] depends-on = [ { task = "test", environment = "test-default" }, @@ -121,6 +117,9 @@ pytest-timeout = "*" pytest-xdist = "*" coveralls = "*" +[feature.test.tasks] +test = { cmd = "pytest" } + [feature.doc.dependencies] cfgrib = "*" kerchunk = "*" From 4a0e6924c4082b4b225dbd4e5c17e5e201c0f645 Mon Sep 17 00:00:00 2001 From: Vecko <36369090+VeckoTheGecko@users.noreply.github.com> Date: Tue, 16 Sep 2025 17:13:28 +0200 Subject: [PATCH 28/89] Move pydap-server to linux dependency --- pixi.toml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pixi.toml b/pixi.toml index d863a5406dc..752e1bf3bb7 100644 --- a/pixi.toml +++ b/pixi.toml @@ -44,6 +44,9 @@ git = "*" # needed for dynamic versioning [pypi-dependencies] xarray = { path = ".", editable = true } +[target.linux-64.dependencies] +pydap-server = "*" + [feature.minimal.dependencies] # minimal versions python = "3.11.*" @@ -61,8 +64,7 @@ rasterio = "*" # opendap pydap = "*" -lxml = "*" # Optional dep of pydap -pydap-server = "*" +lxml = "*" # Optional dep of pydap # s3 boto3 = "*" From 5048c40db30db0d37c81db49f42ab9ba032b1c2c Mon Sep 17 00:00:00 2001 From: Vecko <36369090+VeckoTheGecko@users.noreply.github.com> Date: Wed, 17 Sep 2025 13:54:49 +0200 Subject: [PATCH 29/89] Move cfgrib to pypi dep --- pixi.toml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pixi.toml b/pixi.toml index 752e1bf3bb7..74d98bc8b6c 100644 --- a/pixi.toml +++ b/pixi.toml @@ -123,7 +123,6 @@ coveralls = "*" test = { cmd = "pytest" } [feature.doc.dependencies] -cfgrib = "*" kerchunk = "*" ipykernel = "*" ipywidgets = "*" # silence nbsphinx warning @@ -147,6 +146,9 @@ sphinx-remove-toctrees = "*" sphinxext-opengraph = "*" sphinxext-rediraffe = "*" +[feature.doc.pypi-dependencies] +cfgrib = "*" # pypi dep because of https://github.com/prefix-dev/pixi/issues/3032#issuecomment-3302638043 + [feature.mypy.dependencies] mypy = "==1.18.1" From fccd392c21ec1158b840e8d4fb0b30b2ca77a87a Mon Sep 17 00:00:00 2001 From: Vecko <36369090+VeckoTheGecko@users.noreply.github.com> Date: Fri, 19 Sep 2025 20:04:49 +0200 Subject: [PATCH 30/89] Add workflow for caching-pixi-lock https://github.com/marketplace/actions/setup-pixi#only-save-caches-on-main --- .github/workflows/benchmarks.yml | 15 ++++++++ .github/workflows/cache-pixi-lock.yml | 49 +++++++++++++++++++++++++++ .github/workflows/ci.yaml | 17 +++++++++- 3 files changed, 80 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/cache-pixi-lock.yml diff --git a/.github/workflows/benchmarks.yml b/.github/workflows/benchmarks.yml index 90c3aff8531..66a26de2cf4 100644 --- a/.github/workflows/benchmarks.yml +++ b/.github/workflows/benchmarks.yml @@ -9,7 +9,10 @@ env: PR_HEAD_LABEL: ${{ github.event.pull_request.head.label }} jobs: + cache-pixi-lock: + uses: ./.github/workflows/cache-pixi-lock.yml benchmark: + needs: cache-pixi-lock if: ${{ contains( github.event.pull_request.labels.*.name, 'run-benchmark') && github.event_name == 'pull_request' || contains( github.event.pull_request.labels.*.name, 'topic-performance') && github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' }} name: Linux runs-on: ubuntu-latest @@ -24,6 +27,18 @@ jobs: with: fetch-depth: 0 + - name: Restore cached pixi lockfile + uses: actions/cache/restore@v4 + id: restore-pixi-lock + with: + path: | + pixi.lock + key: ${{ needs.cache-pixi-lock.outputs.cache-id }} + - uses: prefix-dev/setup-pixi@v0.9.0 + with: + cache: true + cache-write: ${{ github.event_name == 'push' && github.ref_name == 'main' }} + - name: Set up conda environment uses: mamba-org/setup-micromamba@v2 with: diff --git a/.github/workflows/cache-pixi-lock.yml b/.github/workflows/cache-pixi-lock.yml new file mode 100644 index 00000000000..48fa1b72b5f --- /dev/null +++ b/.github/workflows/cache-pixi-lock.yml @@ -0,0 +1,49 @@ +name: Generate and cache Pixi lockfile + +on: + workflow_call: + outputs: + cache-id: + description: "The lock file contents" + value: ${{ jobs.cache-pixi-lock.outputs.cache-id }} + +jobs: + cache-pixi-lock: + name: Generate output + runs-on: ubuntu-latest + outputs: + cache-id: ${{ steps.restore.outputs.cache-primary-key }} + steps: + - uses: actions/checkout@v5 + with: + fetch-depth: 0 + sparse-checkout: pixi.toml + - name: Get current date + id: date + run: echo "date=$(date +'%Y-%m-%d')" >> "$GITHUB_OUTPUT" + - uses: actions/cache/restore@v4 + id: restore + with: + path: | + pixi.lock + key: ${{ steps.date.outputs.date }}_${{hashFiles('pixi.toml')}} + - uses: prefix-dev/setup-pixi@v0.9.0 + if: ${{ !steps.restore.outputs.cache-hit }} + with: + pixi-version: v0.49.0 + run-install: false + - name: Run pixi lock + if: ${{ !steps.restore.outputs.cache-hit }} + run: pixi lock + - uses: actions/cache/save@v4 + if: ${{ !steps.restore.outputs.cache-hit }} + id: cache + with: + path: | + pixi.lock + key: ${{ steps.restore.outputs.cache-primary-key }} + - name: Upload pixi.lock + uses: actions/upload-artifact@v4 + with: + name: pixi-lock + path: pixi.lock diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 414d5ad2549..c0707002f3a 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -32,10 +32,13 @@ jobs: id: detect-trigger with: keyword: "[skip-ci]" + + cache-pixi-lock: + uses: ./.github/workflows/cache-pixi-lock.yml test: name: ${{ matrix.os }} py${{ matrix.python-version }} ${{ matrix.env }} runs-on: ${{ matrix.os }} - needs: detect-ci-trigger + needs: [detect-ci-trigger, cache-pixi-lock] if: needs.detect-ci-trigger.outputs.triggered == 'false' defaults: run: @@ -82,6 +85,18 @@ jobs: - uses: actions/checkout@v5 with: fetch-depth: 0 # Fetch all history for all branches and tags. + - name: Restore cached pixi lockfile + uses: actions/cache/restore@v4 + id: restore-pixi-lock + with: + path: | + pixi.lock + key: ${{ needs.cache-pixi-lock.outputs.cache-id }} + - uses: prefix-dev/setup-pixi@v0.9.0 + with: + cache: true + cache-write: ${{ github.event_name == 'push' && github.ref_name == 'main' }} + - name: Set environment variables run: | echo "TODAY=$(date +'%Y-%m-%d')" >> $GITHUB_ENV From 677c1145029f482af171377189c080d70e3537b1 Mon Sep 17 00:00:00 2001 From: Vecko <36369090+VeckoTheGecko@users.noreply.github.com> Date: Wed, 24 Sep 2025 18:47:14 +0200 Subject: [PATCH 31/89] Add pixi task: doc --- pixi.toml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pixi.toml b/pixi.toml index 74d98bc8b6c..97eadda5000 100644 --- a/pixi.toml +++ b/pixi.toml @@ -27,6 +27,7 @@ typing = { features = ["mypy"] } doc = { features = [ "doc", "backends", + "test", "performance", "plotting", "extras", @@ -117,6 +118,7 @@ pytest-env = "*" pytest-mypy-plugins = "*" pytest-timeout = "*" pytest-xdist = "*" +hypothesis = "*" coveralls = "*" [feature.test.tasks] @@ -149,6 +151,9 @@ sphinxext-rediraffe = "*" [feature.doc.pypi-dependencies] cfgrib = "*" # pypi dep because of https://github.com/prefix-dev/pixi/issues/3032#issuecomment-3302638043 +[feature.doc.tasks] +doc = { cmd = "make clean && make html", cwd = "doc" } + [feature.mypy.dependencies] mypy = "==1.18.1" From 868f5738c14a6b077f921b94d485006ec48666c9 Mon Sep 17 00:00:00 2001 From: Vecko <36369090+VeckoTheGecko@users.noreply.github.com> Date: Wed, 24 Sep 2025 18:52:14 +0200 Subject: [PATCH 32/89] Update RTD to use Pixi https://docs.readthedocs.com/platform/stable/build-customization.html#install-dependencies-with-pixi --- .readthedocs.yaml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 57f93911f5d..ade46ca04ac 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -6,17 +6,18 @@ sphinx: build: os: ubuntu-lts-latest - tools: - python: mambaforge-latest jobs: + create_environment: + - asdf plugin add pixi + - asdf install pixi latest + - asdf global pixi latest post_checkout: - (git --no-pager log --pretty="tformat:%s" -1 | grep -vqF "[skip-rtd]") || exit 183 - git fetch --unshallow || true pre_install: - git update-index --assume-unchanged doc/conf.py ci/requirements/doc.yml - -conda: - environment: ci/requirements/doc.yml + install: + - pixi install -e doc formats: - htmlzip From a8d067b35a36929d1bc0db2f349e40ea4aa41a46 Mon Sep 17 00:00:00 2001 From: Vecko <36369090+VeckoTheGecko@users.noreply.github.com> Date: Wed, 24 Sep 2025 19:36:19 +0200 Subject: [PATCH 33/89] Remove 'run --all-files' from pre-commit task Allowing people to also install hooks etc if they want --- pixi.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pixi.toml b/pixi.toml index 97eadda5000..90b9eb0dea5 100644 --- a/pixi.toml +++ b/pixi.toml @@ -184,7 +184,7 @@ mypy = "mypy --install-types --non-interactive --cobertura-xml-report mypy_repor pre-commit = "*" [feature.pre-commit.tasks] -pre-commit = { cmd = "pre-commit run --all-files" } +pre-commit = { cmd = "pre-commit" } [package] From 10ea078a7b2b1e9ab35da80d3ece7dfd6e107bdc Mon Sep 17 00:00:00 2001 From: Vecko <36369090+VeckoTheGecko@users.noreply.github.com> Date: Wed, 24 Sep 2025 19:53:19 +0200 Subject: [PATCH 34/89] Add all-but-dask and all-but-numba envs Trying to reach parity with ci.yaml --- pixi.toml | 44 ++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 40 insertions(+), 4 deletions(-) diff --git a/pixi.toml b/pixi.toml index 90b9eb0dea5..6bf66ef332d 100644 --- a/pixi.toml +++ b/pixi.toml @@ -13,10 +13,30 @@ depends-on = [ [environments] # Testing test-default = { features = ["test"], solve-group = "test" } +test-all-but-numba = { features = [ + "py313", + "test", + "backends", + "performance", + "dask", + "plotting", + "extras", +], solve-group = "test" } +test-all-but-dask = { features = [ + "py312", + "test", + "backends", + "performance", + "numba", + "plotting", + "extras", +], solve-group = "test" } test-all-deps = { features = [ "test", "backends", "performance", + "numba", + "dask", "plotting", "extras", ], solve-group = "test" } @@ -54,6 +74,15 @@ python = "3.11.*" numpy = "1.26.*" pandas = "2.2.*" +[feature.py311.dependencies] +python = "3.11.*" + +[feature.py312.dependencies] +python = "3.12.*" + +[feature.py313.dependencies] +python = "3.13.*" + [feature.backends.dependencies] # files h5netcdf = "*" @@ -72,16 +101,20 @@ boto3 = "*" fsspec = "*" aiobotocore = "*" +[feature.numba.dependencies] +numba = "*" +numbagg = "*" + +[feature.dask.dependencies] +dask = "*" +distributed = "*" + [feature.performance.dependencies] flox = "*" bottleneck = "*" numexpr = "*" pyarrow = "*" -dask-core = "*" opt_einsum = "*" -numba = "*" -numbagg = "*" -distributed = "*" [feature.performance.pypi-dependencies] jax = "*" @@ -93,6 +126,9 @@ matplotlib-base = "*" nc-time-axis = "*" seaborn = "*" +[feature.annotate-ci-failures.pypi-dependencies] +pytest-github-actions-annotate-failures = "*" + [feature.extras.dependencies] # array array-api-strict = "<2.4" From 066219a2e0b741b87ad21080454578c3c2bc7b72 Mon Sep 17 00:00:00 2001 From: Vecko <36369090+VeckoTheGecko@users.noreply.github.com> Date: Fri, 31 Oct 2025 16:19:53 +0100 Subject: [PATCH 35/89] Update cache-pixi-lock https://github.com/Parcels-code/Parcels/pull/2343 https://github.com/Parcels-code/Parcels/pull/2351 --- .github/workflows/cache-pixi-lock.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cache-pixi-lock.yml b/.github/workflows/cache-pixi-lock.yml index 48fa1b72b5f..1614cd582d6 100644 --- a/.github/workflows/cache-pixi-lock.yml +++ b/.github/workflows/cache-pixi-lock.yml @@ -2,6 +2,9 @@ name: Generate and cache Pixi lockfile on: workflow_call: + inputs: + pixi-version: + type: string outputs: cache-id: description: "The lock file contents" @@ -17,7 +20,7 @@ jobs: - uses: actions/checkout@v5 with: fetch-depth: 0 - sparse-checkout: pixi.toml + submodules: recursive - name: Get current date id: date run: echo "date=$(date +'%Y-%m-%d')" >> "$GITHUB_OUTPUT" @@ -30,7 +33,7 @@ jobs: - uses: prefix-dev/setup-pixi@v0.9.0 if: ${{ !steps.restore.outputs.cache-hit }} with: - pixi-version: v0.49.0 + pixi-version: ${{ inputs.pixi-version }} run-install: false - name: Run pixi lock if: ${{ !steps.restore.outputs.cache-hit }} From 73875c66a7183a01f952d88b8df4339def47d8d5 Mon Sep 17 00:00:00 2001 From: Vecko <36369090+VeckoTheGecko@users.noreply.github.com> Date: Fri, 31 Oct 2025 16:27:24 +0100 Subject: [PATCH 36/89] ci.yaml : update set env vars to remove windows section --- .github/workflows/ci.yaml | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index c0707002f3a..d887f9079d5 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -101,14 +101,7 @@ jobs: run: | echo "TODAY=$(date +'%Y-%m-%d')" >> $GITHUB_ENV - if [[ ${{ matrix.os }} == windows* ]] ; - then - if [[ ${{ matrix.python-version }} != "3.14" ]]; then - echo "CONDA_ENV_FILE=ci/requirements/environment-windows.yml" >> $GITHUB_ENV - else - echo "CONDA_ENV_FILE=ci/requirements/environment-windows-3.14.yml" >> $GITHUB_ENV - fi - elif [[ "${{ matrix.env }}" != "" ]] ; + if [[ "${{ matrix.env }}" != "" ]] ; then if [[ "${{ matrix.env }}" == "flaky" ]] ; then From 33f5eb0c14f35b0e71bb5ef320c3e4aa7be1020f Mon Sep 17 00:00:00 2001 From: Vecko <36369090+VeckoTheGecko@users.noreply.github.com> Date: Fri, 31 Oct 2025 16:29:20 +0100 Subject: [PATCH 37/89] ci.yaml : update set env vars to remove py314 section --- .github/workflows/ci.yaml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index d887f9079d5..29ec1c24a4c 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -119,12 +119,6 @@ jobs: # Don't raise on warnings echo "PYTEST_ADDOPTS=-W default" >> $GITHUB_ENV fi - else - if [[ ${{ matrix.python-version }} != "3.14" ]]; then - echo "CONDA_ENV_FILE=ci/requirements/environment.yml" >> $GITHUB_ENV - else - echo "CONDA_ENV_FILE=ci/requirements/environment-3.14.yml" >> $GITHUB_ENV - fi fi echo "PYTHON_VERSION=${{ matrix.python-version }}" >> $GITHUB_ENV From a9c85fcaeae67462f1d0e80de110451ee27626f3 Mon Sep 17 00:00:00 2001 From: Vecko <36369090+VeckoTheGecko@users.noreply.github.com> Date: Fri, 31 Oct 2025 16:37:19 +0100 Subject: [PATCH 38/89] Update environment name --- pixi.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pixi.toml b/pixi.toml index 6bf66ef332d..9a6e1c35a62 100644 --- a/pixi.toml +++ b/pixi.toml @@ -40,7 +40,7 @@ test-all-deps = { features = [ "plotting", "extras", ], solve-group = "test" } -test-bare-min = { features = ["test", "minimal"], solve-group = "test" } +test-bare-minimum = { features = ["test", "minimal"], solve-group = "test" } # Extra typing = { features = ["mypy"] } From 5ba56376dd90a31714e85d89f37ead4c889e0a41 Mon Sep 17 00:00:00 2001 From: Vecko <36369090+VeckoTheGecko@users.noreply.github.com> Date: Fri, 31 Oct 2025 16:41:07 +0100 Subject: [PATCH 39/89] Remove solve groups for now Removing so that I can generate lock without conflicts. AFAIK they're a performance improvement - can be added later. --- pixi.toml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pixi.toml b/pixi.toml index 9a6e1c35a62..edd6bdde0aa 100644 --- a/pixi.toml +++ b/pixi.toml @@ -12,7 +12,7 @@ depends-on = [ [environments] # Testing -test-default = { features = ["test"], solve-group = "test" } +test-default = { features = ["test"] } test-all-but-numba = { features = [ "py313", "test", @@ -21,7 +21,7 @@ test-all-but-numba = { features = [ "dask", "plotting", "extras", -], solve-group = "test" } +] } test-all-but-dask = { features = [ "py312", "test", @@ -30,7 +30,7 @@ test-all-but-dask = { features = [ "numba", "plotting", "extras", -], solve-group = "test" } +] } test-all-deps = { features = [ "test", "backends", @@ -39,8 +39,8 @@ test-all-deps = { features = [ "dask", "plotting", "extras", -], solve-group = "test" } -test-bare-minimum = { features = ["test", "minimal"], solve-group = "test" } +] } +test-bare-minimum = { features = ["test", "minimal"] } # Extra typing = { features = ["mypy"] } From 8141da43b2cd18885e325f1385721a735412e526 Mon Sep 17 00:00:00 2001 From: Vecko <36369090+VeckoTheGecko@users.noreply.github.com> Date: Fri, 31 Oct 2025 16:42:40 +0100 Subject: [PATCH 40/89] Add testing environments with mypy --- pixi.toml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/pixi.toml b/pixi.toml index edd6bdde0aa..e12afe1b487 100644 --- a/pixi.toml +++ b/pixi.toml @@ -40,6 +40,30 @@ test-all-deps = { features = [ "plotting", "extras", ] } + +test-all-mypy-py311 = { features = [ + "py311", + "test", + "backends", + "performance", + "numba", + "dask", + "plotting", + "extras", + "mypy", +] } + +test-all-mypy-py313 = { features = [ + "py313", + "test", + "backends", + "performance", + "numba", + "dask", + "plotting", + "extras", +] } + test-bare-minimum = { features = ["test", "minimal"] } # Extra From 2cb81b9a048716772fa0aff2d16de15282c90677 Mon Sep 17 00:00:00 2001 From: Vecko <36369090+VeckoTheGecko@users.noreply.github.com> Date: Fri, 31 Oct 2025 16:45:34 +0100 Subject: [PATCH 41/89] ci.yaml : Rename strategy 'env' var to 'pixi-env' --- .github/workflows/ci.yaml | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 29ec1c24a4c..9316c8e4ada 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -36,7 +36,7 @@ jobs: cache-pixi-lock: uses: ./.github/workflows/cache-pixi-lock.yml test: - name: ${{ matrix.os }} py${{ matrix.python-version }} ${{ matrix.env }} + name: ${{ matrix.os }} py${{ matrix.python-version }} ${{ matrix.pixi-env }} runs-on: ${{ matrix.os }} needs: [detect-ci-trigger, cache-pixi-lock] if: needs.detect-ci-trigger.outputs.triggered == 'false' @@ -49,35 +49,35 @@ jobs: os: ["ubuntu-latest", "macos-latest", "windows-latest"] # Bookend python versions python-version: ["3.11", "3.13"] - env: [""] + pixi-env: [""] include: # Minimum python version: - - env: "bare-minimum" + - pixi-env: "bare-minimum" python-version: "3.11" os: ubuntu-latest - - env: "bare-min-and-scipy" + - pixi-env: "bare-min-and-scipy" python-version: "3.11" os: ubuntu-latest - - env: "min-all-deps" + - pixi-env: "min-all-deps" python-version: "3.11" os: ubuntu-latest # Latest python version: - - env: "all-but-numba" + - pixi-env: "all-but-numba" python-version: "3.13" os: ubuntu-latest - - env: "all-but-dask" + - pixi-env: "all-but-dask" python-version: "3.12" os: ubuntu-latest - - env: "flaky" + - pixi-env: "flaky" python-version: "3.13" os: ubuntu-latest # The mypy tests must be executed using only 1 process in order to guarantee # predictable mypy output messages for comparison to expectations. - - env: "mypy" + - pixi-env: "mypy" python-version: "3.11" numprocesses: 1 os: ubuntu-latest - - env: "mypy" + - pixi-env: "mypy" python-version: "3.13" numprocesses: 1 os: ubuntu-latest @@ -101,20 +101,20 @@ jobs: run: | echo "TODAY=$(date +'%Y-%m-%d')" >> $GITHUB_ENV - if [[ "${{ matrix.env }}" != "" ]] ; + if [[ "${{ matrix.pixi-env }}" != "" ]] ; then - if [[ "${{ matrix.env }}" == "flaky" ]] ; + if [[ "${{ matrix.pixi-env }}" == "flaky" ]] ; then echo "CONDA_ENV_FILE=ci/requirements/environment.yml" >> $GITHUB_ENV echo "PYTEST_ADDOPTS=-m 'flaky or network' --run-flaky --run-network-tests -W default" >> $GITHUB_ENV - elif [[ "${{ matrix.env }}" == "mypy" ]] ; + elif [[ "${{ matrix.pixi-env }}" == "mypy" ]] ; then echo "CONDA_ENV_FILE=ci/requirements/environment.yml" >> $GITHUB_ENV echo "PYTEST_ADDOPTS=-n 1 -m 'mypy' --run-mypy -W default" >> $GITHUB_ENV else - echo "CONDA_ENV_FILE=ci/requirements/${{ matrix.env }}.yml" >> $GITHUB_ENV + echo "CONDA_ENV_FILE=ci/requirements/${{ matrix.pixi-env }}.yml" >> $GITHUB_ENV fi - if [[ "${{ matrix.env }}" == "min-all-deps" ]] ; + if [[ "${{ matrix.pixi-env }}" == "min-all-deps" ]] ; then # Don't raise on warnings echo "PYTEST_ADDOPTS=-W default" >> $GITHUB_ENV @@ -171,7 +171,7 @@ jobs: if: always() uses: actions/upload-artifact@v5 with: - name: Test results for ${{ runner.os }}-${{ matrix.python-version }} ${{ matrix.env }} + name: Test results for ${{ runner.os }}-${{ matrix.python-version }} ${{ matrix.pixi-env }} path: pytest.xml - name: Upload code coverage to Codecov From 60be388bcf6144e9ebb476c237fdbf668870ddae Mon Sep 17 00:00:00 2001 From: Vecko <36369090+VeckoTheGecko@users.noreply.github.com> Date: Fri, 31 Oct 2025 16:55:56 +0100 Subject: [PATCH 42/89] Add pixi environment for bare-min-and-scipy --- pixi.toml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pixi.toml b/pixi.toml index e12afe1b487..35b478301bc 100644 --- a/pixi.toml +++ b/pixi.toml @@ -65,6 +65,11 @@ test-all-mypy-py313 = { features = [ ] } test-bare-minimum = { features = ["test", "minimal"] } +test-bare-min-and-scipy = { features = [ + "test", + "minimal", + "minimum-scipy", +] } # Extra typing = { features = ["mypy"] } @@ -98,6 +103,9 @@ python = "3.11.*" numpy = "1.26.*" pandas = "2.2.*" +[feature.minimum-scipy.dependencies] +scipy = "1.13.*" + [feature.py311.dependencies] python = "3.11.*" From d049e332bb25cf0822048b3f24bce92b06bc860d Mon Sep 17 00:00:00 2001 From: Vecko <36369090+VeckoTheGecko@users.noreply.github.com> Date: Fri, 31 Oct 2025 17:07:20 +0100 Subject: [PATCH 43/89] Fix pixi environment names in CI --- .github/workflows/ci.yaml | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 9316c8e4ada..8c78edc6712 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -49,31 +49,34 @@ jobs: os: ["ubuntu-latest", "macos-latest", "windows-latest"] # Bookend python versions python-version: ["3.11", "3.13"] - pixi-env: [""] + pixi-env: ["test-all-deps"] + pytest-adopts: [""] include: # Minimum python version: - - pixi-env: "bare-minimum" + - pixi-env: "test-bare-minimum" python-version: "3.11" os: ubuntu-latest - - pixi-env: "bare-min-and-scipy" - python-version: "3.11" - os: ubuntu-latest - - pixi-env: "min-all-deps" + - pixi-env: "test-bare-min-and-scipy" python-version: "3.11" os: ubuntu-latest + # - pixi-env: "min-all-deps" # TODO: include later by duplicating old workflow and using conda. Not using Pixi for now. + # python-version: "3.11" + # os: ubuntu-latest # Latest python version: - - pixi-env: "all-but-numba" + - pixi-env: "test-all-but-numba" python-version: "3.13" os: ubuntu-latest - - pixi-env: "all-but-dask" + - pixi-env: "test-all-but-dask" python-version: "3.12" os: ubuntu-latest - - pixi-env: "flaky" + - pixi-env: "test-all-deps" + pytest-adopts: "flaky" python-version: "3.13" os: ubuntu-latest # The mypy tests must be executed using only 1 process in order to guarantee # predictable mypy output messages for comparison to expectations. - pixi-env: "mypy" + pytest-adopts: "mypy" python-version: "3.11" numprocesses: 1 os: ubuntu-latest @@ -97,17 +100,17 @@ jobs: cache: true cache-write: ${{ github.event_name == 'push' && github.ref_name == 'main' }} - - name: Set environment variables + - name: Set Pytest adopts run: | echo "TODAY=$(date +'%Y-%m-%d')" >> $GITHUB_ENV - if [[ "${{ matrix.pixi-env }}" != "" ]] ; + if [[ "${{ matrix.pytest-adopts }}" != "" ]] ; then - if [[ "${{ matrix.pixi-env }}" == "flaky" ]] ; + if [[ "${{ matrix.pytest-adopts }}" == "flaky" ]] ; then echo "CONDA_ENV_FILE=ci/requirements/environment.yml" >> $GITHUB_ENV echo "PYTEST_ADDOPTS=-m 'flaky or network' --run-flaky --run-network-tests -W default" >> $GITHUB_ENV - elif [[ "${{ matrix.pixi-env }}" == "mypy" ]] ; + elif [[ "${{ matrix.pytest-adopts }}" == "mypy" ]] ; then echo "CONDA_ENV_FILE=ci/requirements/environment.yml" >> $GITHUB_ENV echo "PYTEST_ADDOPTS=-n 1 -m 'mypy' --run-mypy -W default" >> $GITHUB_ENV From 38379dde4321af1fee939afc1f6c0790fd1723b7 Mon Sep 17 00:00:00 2001 From: Vecko <36369090+VeckoTheGecko@users.noreply.github.com> Date: Fri, 31 Oct 2025 17:08:51 +0100 Subject: [PATCH 44/89] Create `test-all-deps-py313` and `test-all-deps-py311` pixi envs --- pixi.toml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/pixi.toml b/pixi.toml index 35b478301bc..9b42cce0482 100644 --- a/pixi.toml +++ b/pixi.toml @@ -7,7 +7,7 @@ platforms = ["win-64", "linux-64", "osx-64", "osx-arm64"] depends-on = [ { task = "test", environment = "test-default" }, { task = "test", environment = "test-bare-min" }, - { task = "test", environment = "test-all-deps" }, + { task = "test", environment = "test-all-deps-py313" }, ] [environments] @@ -31,7 +31,18 @@ test-all-but-dask = { features = [ "plotting", "extras", ] } -test-all-deps = { features = [ +test-all-deps-py313 = { features = [ + "py313", + "test", + "backends", + "performance", + "numba", + "dask", + "plotting", + "extras", +] } +test-all-deps-py311 = { features = [ + "py311", "test", "backends", "performance", From 04899d7fad923f8faabd162253201d8f710471a4 Mon Sep 17 00:00:00 2001 From: Vecko <36369090+VeckoTheGecko@users.noreply.github.com> Date: Fri, 31 Oct 2025 17:10:14 +0100 Subject: [PATCH 45/89] Fix CI pixi env names --- .github/workflows/ci.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 8c78edc6712..7cdf91f9754 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -75,12 +75,12 @@ jobs: os: ubuntu-latest # The mypy tests must be executed using only 1 process in order to guarantee # predictable mypy output messages for comparison to expectations. - - pixi-env: "mypy" + - pixi-env: "test-all-mypy-py311" pytest-adopts: "mypy" python-version: "3.11" numprocesses: 1 os: ubuntu-latest - - pixi-env: "mypy" + - pixi-env: "test-all-mypy-py313" python-version: "3.13" numprocesses: 1 os: ubuntu-latest From 428c33c17ac6bdb815cd4ab0c95eaddbd0aaf714 Mon Sep 17 00:00:00 2001 From: Vecko <36369090+VeckoTheGecko@users.noreply.github.com> Date: Fri, 31 Oct 2025 17:14:56 +0100 Subject: [PATCH 46/89] Remove python-version matrix var Now its managed by pixi Acceptable (?) regression: No longer included in codecov reporting --- .github/workflows/ci.yaml | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 7cdf91f9754..2b1885c6e31 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -48,40 +48,32 @@ jobs: matrix: os: ["ubuntu-latest", "macos-latest", "windows-latest"] # Bookend python versions - python-version: ["3.11", "3.13"] - pixi-env: ["test-all-deps"] + pixi-env: ["test-all-deps-py311", "test-all-deps-py313"] pytest-adopts: [""] include: # Minimum python version: - pixi-env: "test-bare-minimum" - python-version: "3.11" os: ubuntu-latest - pixi-env: "test-bare-min-and-scipy" - python-version: "3.11" os: ubuntu-latest # - pixi-env: "min-all-deps" # TODO: include later by duplicating old workflow and using conda. Not using Pixi for now. # python-version: "3.11" # os: ubuntu-latest # Latest python version: - pixi-env: "test-all-but-numba" - python-version: "3.13" os: ubuntu-latest - pixi-env: "test-all-but-dask" - python-version: "3.12" os: ubuntu-latest - pixi-env: "test-all-deps" pytest-adopts: "flaky" - python-version: "3.13" os: ubuntu-latest # The mypy tests must be executed using only 1 process in order to guarantee # predictable mypy output messages for comparison to expectations. - pixi-env: "test-all-mypy-py311" pytest-adopts: "mypy" - python-version: "3.11" numprocesses: 1 os: ubuntu-latest - pixi-env: "test-all-mypy-py313" - python-version: "3.13" numprocesses: 1 os: ubuntu-latest steps: @@ -124,8 +116,6 @@ jobs: fi fi - echo "PYTHON_VERSION=${{ matrix.python-version }}" >> $GITHUB_ENV - - name: Setup micromamba uses: mamba-org/setup-micromamba@v2 with: @@ -174,7 +164,7 @@ jobs: if: always() uses: actions/upload-artifact@v5 with: - name: Test results for ${{ runner.os }}-${{ matrix.python-version }} ${{ matrix.pixi-env }} + name: Test results for OS ${{ runner.os }} | pixi-env -${{ matrix.pixi-env }} path: pytest.xml - name: Upload code coverage to Codecov @@ -184,7 +174,7 @@ jobs: with: file: ./coverage.xml flags: unittests - env_vars: RUNNER_OS,PYTHON_VERSION + env_vars: RUNNER_OS name: codecov-umbrella fail_ci_if_error: false From b5b5ab46ac07baa28958c96dc83ff66ded6e0360 Mon Sep 17 00:00:00 2001 From: Vecko <36369090+VeckoTheGecko@users.noreply.github.com> Date: Fri, 31 Oct 2025 17:17:08 +0100 Subject: [PATCH 47/89] Move pixi package section --- pixi.toml | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/pixi.toml b/pixi.toml index 9b42cce0482..4a86efc10e4 100644 --- a/pixi.toml +++ b/pixi.toml @@ -94,6 +94,17 @@ doc = { features = [ ], solve-group = "doc" } pre-commit = { features = ["pre-commit"], no-default-feature = true } +[package] +name = "xarray" +version = "dynamic" # dynamic versioning needs better support in pixi https://github.com/prefix-dev/pixi/issues/2923#issuecomment-2598460666 . Putting `version = "dynamic"` here for now until pixi recommends something else. + +[package.build] +backend = { name = "pixi-build-python", version = "==0.3.2" } + +[package.host-dependencies] +setuptools = "*" +setuptools_scm = "*" + [dependencies] python = "*" numpy = "*" @@ -264,15 +275,3 @@ pre-commit = "*" [feature.pre-commit.tasks] pre-commit = { cmd = "pre-commit" } - - -[package] -name = "xarray" -version = "dynamic" # dynamic versioning needs better support in pixi https://github.com/prefix-dev/pixi/issues/2923#issuecomment-2598460666 . Putting `version = "dynamic"` here for now until pixi recommends something else. - -[package.build] -backend = { name = "pixi-build-python", version = "==0.3.2" } - -[package.host-dependencies] -setuptools = "*" -setuptools_scm = "*" From 4c755946c40834f97e9649cb8741312212b63ade Mon Sep 17 00:00:00 2001 From: Vecko <36369090+VeckoTheGecko@users.noreply.github.com> Date: Fri, 31 Oct 2025 17:19:07 +0100 Subject: [PATCH 48/89] Add packages to run-dependencies section This is the proper way of doing it: https://github.com/Parcels-code/Parcels/pull/2344 --- .github/workflows/ci.yaml | 4 ---- pixi.toml | 6 +++--- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 2b1885c6e31..a22c00fc6e2 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -133,10 +133,6 @@ jobs: run: | python -m pip install pytest-github-actions-annotate-failures - - name: Install xarray - run: | - python -m pip install --no-deps -e . - - name: Version info run: | python xarray/util/print_versions.py diff --git a/pixi.toml b/pixi.toml index 4a86efc10e4..82d931dba96 100644 --- a/pixi.toml +++ b/pixi.toml @@ -105,7 +105,7 @@ backend = { name = "pixi-build-python", version = "==0.3.2" } setuptools = "*" setuptools_scm = "*" -[dependencies] +[package.run-dependencies] python = "*" numpy = "*" pandas = "*" @@ -113,8 +113,8 @@ pandas = "*" packaging = "24.1.*" #? Can be removed? git = "*" # needed for dynamic versioning -[pypi-dependencies] -xarray = { path = ".", editable = true } +[dependencies] +xarray = { path = "." } [target.linux-64.dependencies] pydap-server = "*" From b753cfa409c6a38e1e53114ce11740f2e01d7332 Mon Sep 17 00:00:00 2001 From: Vecko <36369090+VeckoTheGecko@users.noreply.github.com> Date: Fri, 31 Oct 2025 17:23:04 +0100 Subject: [PATCH 49/89] Fix install of pytest-github-actions-annotate-failures --- .github/workflows/ci.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index a22c00fc6e2..057b9348168 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -129,9 +129,9 @@ jobs: # We only want to install this on one run, because otherwise we'll have # duplicate annotations. - name: Install error reporter - if: ${{ matrix.os }} == 'ubuntu-latest' and ${{ matrix.python-version }} == '3.12' + if: ${{ matrix.os }} == 'ubuntu-latest' and ${{ matrix.pixi-env}} == 'test-all-deps-py313' run: | - python -m pip install pytest-github-actions-annotate-failures + pixi add --pypi pytest-github-actions-annotate-failures - name: Version info run: | From 93215f0aea3e8b1f8a4ba6c79494601a083608e4 Mon Sep 17 00:00:00 2001 From: Vecko <36369090+VeckoTheGecko@users.noreply.github.com> Date: Fri, 31 Oct 2025 17:28:02 +0100 Subject: [PATCH 50/89] Update pixi-build-python==0.4.0 --- pixi.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pixi.toml b/pixi.toml index 82d931dba96..5fa8ffdc6da 100644 --- a/pixi.toml +++ b/pixi.toml @@ -99,7 +99,7 @@ name = "xarray" version = "dynamic" # dynamic versioning needs better support in pixi https://github.com/prefix-dev/pixi/issues/2923#issuecomment-2598460666 . Putting `version = "dynamic"` here for now until pixi recommends something else. [package.build] -backend = { name = "pixi-build-python", version = "==0.3.2" } +backend = { name = "pixi-build-python", version = "==0.4.0" } [package.host-dependencies] setuptools = "*" From 31f95379138bb6cec48b1cff11aaa91b0833f925 Mon Sep 17 00:00:00 2001 From: Vecko <36369090+VeckoTheGecko@users.noreply.github.com> Date: Fri, 31 Oct 2025 17:44:48 +0100 Subject: [PATCH 51/89] Enable cross os pixi lockfile fetch --- .github/workflows/ci.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 057b9348168..1ce00b1f330 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -84,6 +84,7 @@ jobs: uses: actions/cache/restore@v4 id: restore-pixi-lock with: + enableCrossOsArchive: true path: | pixi.lock key: ${{ needs.cache-pixi-lock.outputs.cache-id }} From 57dedbeaa03030b5e452ba4803d638d649582fa1 Mon Sep 17 00:00:00 2001 From: Vecko <36369090+VeckoTheGecko@users.noreply.github.com> Date: Fri, 31 Oct 2025 17:46:40 +0100 Subject: [PATCH 52/89] Remove setup micromamba workflow --- .github/workflows/ci.yaml | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 1ce00b1f330..cb26288ddf5 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -117,16 +117,6 @@ jobs: fi fi - - name: Setup micromamba - uses: mamba-org/setup-micromamba@v2 - with: - environment-file: ${{ env.CONDA_ENV_FILE }} - environment-name: xarray-tests - cache-environment: true - cache-environment-key: "${{runner.os}}-${{runner.arch}}-py${{matrix.python-version}}-${{env.TODAY}}-${{hashFiles(env.CONDA_ENV_FILE)}}" - create-args: >- - python=${{matrix.python-version}} - # We only want to install this on one run, because otherwise we'll have # duplicate annotations. - name: Install error reporter From 27c4dbbec8369d222a996511c15a21230a96f44b Mon Sep 17 00:00:00 2001 From: Vecko <36369090+VeckoTheGecko@users.noreply.github.com> Date: Fri, 31 Oct 2025 17:49:26 +0100 Subject: [PATCH 53/89] Remove CONDA_ENV_FILE variable --- .github/workflows/ci.yaml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index cb26288ddf5..1d895ff2842 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -93,7 +93,7 @@ jobs: cache: true cache-write: ${{ github.event_name == 'push' && github.ref_name == 'main' }} - - name: Set Pytest adopts + - name: Set environment variables run: | echo "TODAY=$(date +'%Y-%m-%d')" >> $GITHUB_ENV @@ -101,14 +101,10 @@ jobs: then if [[ "${{ matrix.pytest-adopts }}" == "flaky" ]] ; then - echo "CONDA_ENV_FILE=ci/requirements/environment.yml" >> $GITHUB_ENV echo "PYTEST_ADDOPTS=-m 'flaky or network' --run-flaky --run-network-tests -W default" >> $GITHUB_ENV elif [[ "${{ matrix.pytest-adopts }}" == "mypy" ]] ; then - echo "CONDA_ENV_FILE=ci/requirements/environment.yml" >> $GITHUB_ENV echo "PYTEST_ADDOPTS=-n 1 -m 'mypy' --run-mypy -W default" >> $GITHUB_ENV - else - echo "CONDA_ENV_FILE=ci/requirements/${{ matrix.pixi-env }}.yml" >> $GITHUB_ENV fi if [[ "${{ matrix.pixi-env }}" == "min-all-deps" ]] ; then From 388fd1dfba734a79113d53231fee9f45d693f3c3 Mon Sep 17 00:00:00 2001 From: Vecko <36369090+VeckoTheGecko@users.noreply.github.com> Date: Fri, 31 Oct 2025 17:52:20 +0100 Subject: [PATCH 54/89] Enter pixi shell --- .github/workflows/ci.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 1d895ff2842..3f517814948 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -120,6 +120,10 @@ jobs: run: | pixi add --pypi pytest-github-actions-annotate-failures + - name: Enter pixi shell + run: | + pixi shell -e ${{ matrix.pixi-env }} + - name: Version info run: | python xarray/util/print_versions.py From 334a9df285770bbd9051b8dec465c6cc62a13e1d Mon Sep 17 00:00:00 2001 From: Vecko <36369090+VeckoTheGecko@users.noreply.github.com> Date: Fri, 31 Oct 2025 18:02:17 +0100 Subject: [PATCH 55/89] setup pixi with needed env --- .github/workflows/ci.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 3f517814948..2f84d8e1f4b 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -91,6 +91,7 @@ jobs: - uses: prefix-dev/setup-pixi@v0.9.0 with: cache: true + environments: ${{ matrix.pixi-env }} cache-write: ${{ github.event_name == 'push' && github.ref_name == 'main' }} - name: Set environment variables From c93faf6efd7050bb8c9021de47edfc2378ca71c6 Mon Sep 17 00:00:00 2001 From: Vecko <36369090+VeckoTheGecko@users.noreply.github.com> Date: Fri, 31 Oct 2025 18:04:36 +0100 Subject: [PATCH 56/89] Update workflow name --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 2f84d8e1f4b..343f3e31a79 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -36,7 +36,7 @@ jobs: cache-pixi-lock: uses: ./.github/workflows/cache-pixi-lock.yml test: - name: ${{ matrix.os }} py${{ matrix.python-version }} ${{ matrix.pixi-env }} + name: "${{ matrix.os }} | pixi shell -e ${{ matrix.pixi-env }}" runs-on: ${{ matrix.os }} needs: [detect-ci-trigger, cache-pixi-lock] if: needs.detect-ci-trigger.outputs.triggered == 'false' From 86bcd41957d76afe805ddf32b8e036322f759e36 Mon Sep 17 00:00:00 2001 From: Vecko <36369090+VeckoTheGecko@users.noreply.github.com> Date: Fri, 31 Oct 2025 18:05:39 +0100 Subject: [PATCH 57/89] project -> workspace Pixi was raising a dep warning on this naming --- pixi.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pixi.toml b/pixi.toml index 5fa8ffdc6da..dee12558680 100644 --- a/pixi.toml +++ b/pixi.toml @@ -1,4 +1,4 @@ -[project] +[workspace] preview = ["pixi-build"] channels = ["conda-forge", "nodefaults"] platforms = ["win-64", "linux-64", "osx-64", "osx-arm64"] From ba012ba53eab1a2e69c684b75e761f3146032055 Mon Sep 17 00:00:00 2001 From: Vecko <36369090+VeckoTheGecko@users.noreply.github.com> Date: Fri, 31 Oct 2025 18:06:31 +0100 Subject: [PATCH 58/89] Remove annotate pixi feature Handled in CI instead --- pixi.toml | 3 --- 1 file changed, 3 deletions(-) diff --git a/pixi.toml b/pixi.toml index dee12558680..2effcf72a28 100644 --- a/pixi.toml +++ b/pixi.toml @@ -180,9 +180,6 @@ matplotlib-base = "*" nc-time-axis = "*" seaborn = "*" -[feature.annotate-ci-failures.pypi-dependencies] -pytest-github-actions-annotate-failures = "*" - [feature.extras.dependencies] # array array-api-strict = "<2.4" From f6b5464d4af34458a3054618509472b3d70ad1d0 Mon Sep 17 00:00:00 2001 From: Vecko <36369090+VeckoTheGecko@users.noreply.github.com> Date: Fri, 31 Oct 2025 18:08:17 +0100 Subject: [PATCH 59/89] Use "pixi run" instead of "pixi shell" --- .github/workflows/ci.yaml | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 343f3e31a79..12ecd7214db 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -121,17 +121,13 @@ jobs: run: | pixi add --pypi pytest-github-actions-annotate-failures - - name: Enter pixi shell - run: | - pixi shell -e ${{ matrix.pixi-env }} - - name: Version info run: | - python xarray/util/print_versions.py + pixi run python xarray/util/print_versions.py - name: Import xarray run: | - python -c "import xarray" + pixi run python -c "import xarray" - name: Restore cached hypothesis directory uses: actions/cache@v4 @@ -142,7 +138,7 @@ jobs: save-always: true - name: Run tests - run: python -m pytest -n ${{ matrix.numprocesses || 4 }} + run: pixi run python -m pytest -n ${{ matrix.numprocesses || 4 }} --timeout 180 --cov=xarray --cov-report=xml From 28daf62f47a981c6a43a1303f5ad913dd9168b5a Mon Sep 17 00:00:00 2001 From: Vecko <36369090+VeckoTheGecko@users.noreply.github.com> Date: Fri, 31 Oct 2025 19:22:43 +0100 Subject: [PATCH 60/89] Add pip to typing feature --- pixi.toml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pixi.toml b/pixi.toml index 2effcf72a28..095c6652d57 100644 --- a/pixi.toml +++ b/pixi.toml @@ -73,6 +73,7 @@ test-all-mypy-py313 = { features = [ "dask", "plotting", "extras", + "mypy", ] } test-bare-minimum = { features = ["test", "minimal"] } @@ -258,6 +259,7 @@ types-requests = "*" types-setuptools = "*" types-openpyxl = "*" typing_extensions = "*" +pip = "*" [feature.mypy.pypi-dependencies] types-defusedxml = "*" @@ -265,7 +267,7 @@ types-pexpect = "*" [feature.mypy.tasks] -mypy = "mypy --install-types --non-interactive --cobertura-xml-report mypy_report" +typing = "mypy --install-types --non-interactive --cobertura-xml-report mypy_report" [feature.pre-commit.dependencies] pre-commit = "*" From ebdc125c03a89733bf248f138c8104069ca7d0b0 Mon Sep 17 00:00:00 2001 From: Vecko <36369090+VeckoTheGecko@users.noreply.github.com> Date: Fri, 31 Oct 2025 19:50:03 +0100 Subject: [PATCH 61/89] Pin pixi versions --- .github/workflows/ci.yaml | 3 +++ pixi.toml | 1 - 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 12ecd7214db..8aa30cc6390 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -35,6 +35,8 @@ jobs: cache-pixi-lock: uses: ./.github/workflows/cache-pixi-lock.yml + with: + pixi-version: "v0.58.0" # keep in sync with jobs test: name: "${{ matrix.os }} | pixi shell -e ${{ matrix.pixi-env }}" runs-on: ${{ matrix.os }} @@ -90,6 +92,7 @@ jobs: key: ${{ needs.cache-pixi-lock.outputs.cache-id }} - uses: prefix-dev/setup-pixi@v0.9.0 with: + pixi-version: "v0.58.0" # keep in sync with cache-pixi-lock cache: true environments: ${{ matrix.pixi-env }} cache-write: ${{ github.event_name == 'push' && github.ref_name == 'main' }} diff --git a/pixi.toml b/pixi.toml index 095c6652d57..6b0884502cb 100644 --- a/pixi.toml +++ b/pixi.toml @@ -265,7 +265,6 @@ pip = "*" types-defusedxml = "*" types-pexpect = "*" - [feature.mypy.tasks] typing = "mypy --install-types --non-interactive --cobertura-xml-report mypy_report" From b07bcaee2bc6afd04d3fd2e47e16658571111407 Mon Sep 17 00:00:00 2001 From: Vecko <36369090+VeckoTheGecko@users.noreply.github.com> Date: Fri, 31 Oct 2025 20:42:22 +0100 Subject: [PATCH 62/89] Update RTD for pixi --- .readthedocs.yaml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.readthedocs.yaml b/.readthedocs.yaml index ade46ca04ac..9da07cf3bf9 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -6,6 +6,9 @@ sphinx: build: os: ubuntu-lts-latest + tools: + # just so RTD stops complaining + python: "latest" jobs: create_environment: - asdf plugin add pixi @@ -15,9 +18,12 @@ build: - (git --no-pager log --pretty="tformat:%s" -1 | grep -vqF "[skip-rtd]") || exit 183 - git fetch --unshallow || true pre_install: - - git update-index --assume-unchanged doc/conf.py ci/requirements/doc.yml + - git update-index --assume-unchanged doc/conf.py install: - pixi install -e doc + build: + html: + - BUILDDIR=$READTHEDOCS_OUTPUT pixi run -e doc make html formats: - htmlzip From 0f3a618b607806f3ba783cb6099dcd052af52969 Mon Sep 17 00:00:00 2001 From: Vecko <36369090+VeckoTheGecko@users.noreply.github.com> Date: Fri, 31 Oct 2025 20:45:31 +0100 Subject: [PATCH 63/89] Specify pixi env explicitly Fixes pytest call --- .github/workflows/ci.yaml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 8aa30cc6390..43b3a186498 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -126,11 +126,11 @@ jobs: - name: Version info run: | - pixi run python xarray/util/print_versions.py + pixi run -e ${{ matrix.pixi-env }} python xarray/util/print_versions.py - name: Import xarray run: | - pixi run python -c "import xarray" + pixi run -e ${{ matrix.pixi-env }} python -c "import xarray" - name: Restore cached hypothesis directory uses: actions/cache@v4 @@ -141,7 +141,8 @@ jobs: save-always: true - name: Run tests - run: pixi run python -m pytest -n ${{ matrix.numprocesses || 4 }} + run: + pixi run -e ${{ matrix.pixi-env }} python -m pytest -n ${{ matrix.numprocesses || 4 }} --timeout 180 --cov=xarray --cov-report=xml From 4764b3d653deb7af275e31688bef549277d0a2ff Mon Sep 17 00:00:00 2001 From: Vecko <36369090+VeckoTheGecko@users.noreply.github.com> Date: Fri, 31 Oct 2025 21:02:23 +0100 Subject: [PATCH 64/89] Add pixi version in cache-pixi-lock cache id --- .github/workflows/cache-pixi-lock.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cache-pixi-lock.yml b/.github/workflows/cache-pixi-lock.yml index 1614cd582d6..bf1e190935e 100644 --- a/.github/workflows/cache-pixi-lock.yml +++ b/.github/workflows/cache-pixi-lock.yml @@ -29,7 +29,7 @@ jobs: with: path: | pixi.lock - key: ${{ steps.date.outputs.date }}_${{hashFiles('pixi.toml')}} + key: ${{ steps.date.outputs.date }}_${{ inputs.pixi-version }}_${{hashFiles('pixi.toml')}} - uses: prefix-dev/setup-pixi@v0.9.0 if: ${{ !steps.restore.outputs.cache-hit }} with: From 5f74f12f9df5e0e01527a7c52900cc01ca0da307 Mon Sep 17 00:00:00 2001 From: Vecko <36369090+VeckoTheGecko@users.noreply.github.com> Date: Fri, 31 Oct 2025 21:08:18 +0100 Subject: [PATCH 65/89] Fix artifact name --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 43b3a186498..8be4391484b 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -152,7 +152,7 @@ jobs: if: always() uses: actions/upload-artifact@v5 with: - name: Test results for OS ${{ runner.os }} | pixi-env -${{ matrix.pixi-env }} + name: Test results for OS ${{ runner.os }} pixi-env -${{ matrix.pixi-env }} path: pytest.xml - name: Upload code coverage to Codecov From 5c1476079183cce265060872965c479908be51d9 Mon Sep 17 00:00:00 2001 From: Vecko <36369090+VeckoTheGecko@users.noreply.github.com> Date: Mon, 3 Nov 2025 09:46:32 +0100 Subject: [PATCH 66/89] Review - fix pixi env name in CI --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 8be4391484b..248072ad340 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -66,7 +66,7 @@ jobs: os: ubuntu-latest - pixi-env: "test-all-but-dask" os: ubuntu-latest - - pixi-env: "test-all-deps" + - pixi-env: "test-all-deps-py313" pytest-adopts: "flaky" os: ubuntu-latest # The mypy tests must be executed using only 1 process in order to guarantee From 7ef5aceb04479a0d43d39bb746bb92aaae839b27 Mon Sep 17 00:00:00 2001 From: Vecko <36369090+VeckoTheGecko@users.noreply.github.com> Date: Mon, 3 Nov 2025 17:32:31 +0100 Subject: [PATCH 67/89] Add cftime as test dep --- pixi.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pixi.toml b/pixi.toml index 6b0884502cb..1b7ba049b98 100644 --- a/pixi.toml +++ b/pixi.toml @@ -207,6 +207,7 @@ pytest-mypy-plugins = "*" pytest-timeout = "*" pytest-xdist = "*" hypothesis = "*" +cftime = "*" # https://github.com/pydata/xarray/pull/10888#issuecomment-3481432315 coveralls = "*" [feature.test.tasks] From ee7297848359992d45d4d287301d86c8553a9596 Mon Sep 17 00:00:00 2001 From: Vecko <36369090+VeckoTheGecko@users.noreply.github.com> Date: Mon, 3 Nov 2025 17:47:39 +0100 Subject: [PATCH 68/89] Review feedback performance -> accel jax move to extras feature spelling --- .github/workflows/ci.yaml | 12 ++++++------ pixi.toml | 24 ++++++++++++------------ 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 248072ad340..496f1d60d6d 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -51,7 +51,7 @@ jobs: os: ["ubuntu-latest", "macos-latest", "windows-latest"] # Bookend python versions pixi-env: ["test-all-deps-py311", "test-all-deps-py313"] - pytest-adopts: [""] + pytest-addopts: [""] include: # Minimum python version: - pixi-env: "test-bare-minimum" @@ -67,12 +67,12 @@ jobs: - pixi-env: "test-all-but-dask" os: ubuntu-latest - pixi-env: "test-all-deps-py313" - pytest-adopts: "flaky" + pytest-addopts: "flaky" os: ubuntu-latest # The mypy tests must be executed using only 1 process in order to guarantee # predictable mypy output messages for comparison to expectations. - pixi-env: "test-all-mypy-py311" - pytest-adopts: "mypy" + pytest-addopts: "mypy" numprocesses: 1 os: ubuntu-latest - pixi-env: "test-all-mypy-py313" @@ -101,12 +101,12 @@ jobs: run: | echo "TODAY=$(date +'%Y-%m-%d')" >> $GITHUB_ENV - if [[ "${{ matrix.pytest-adopts }}" != "" ]] ; + if [[ "${{ matrix.pytest-addopts }}" != "" ]] ; then - if [[ "${{ matrix.pytest-adopts }}" == "flaky" ]] ; + if [[ "${{ matrix.pytest-addopts }}" == "flaky" ]] ; then echo "PYTEST_ADDOPTS=-m 'flaky or network' --run-flaky --run-network-tests -W default" >> $GITHUB_ENV - elif [[ "${{ matrix.pytest-adopts }}" == "mypy" ]] ; + elif [[ "${{ matrix.pytest-addopts }}" == "mypy" ]] ; then echo "PYTEST_ADDOPTS=-n 1 -m 'mypy' --run-mypy -W default" >> $GITHUB_ENV fi diff --git a/pixi.toml b/pixi.toml index 1b7ba049b98..af9936a7f7b 100644 --- a/pixi.toml +++ b/pixi.toml @@ -17,7 +17,7 @@ test-all-but-numba = { features = [ "py313", "test", "backends", - "performance", + "accel", "dask", "plotting", "extras", @@ -26,7 +26,7 @@ test-all-but-dask = { features = [ "py312", "test", "backends", - "performance", + "accel", "numba", "plotting", "extras", @@ -35,7 +35,7 @@ test-all-deps-py313 = { features = [ "py313", "test", "backends", - "performance", + "accel", "numba", "dask", "plotting", @@ -45,7 +45,7 @@ test-all-deps-py311 = { features = [ "py311", "test", "backends", - "performance", + "accel", "numba", "dask", "plotting", @@ -56,7 +56,7 @@ test-all-mypy-py311 = { features = [ "py311", "test", "backends", - "performance", + "accel", "numba", "dask", "plotting", @@ -68,7 +68,7 @@ test-all-mypy-py313 = { features = [ "py313", "test", "backends", - "performance", + "accel", "numba", "dask", "plotting", @@ -89,7 +89,7 @@ doc = { features = [ "doc", "backends", "test", - "performance", + "accel", "plotting", "extras", ], solve-group = "doc" } @@ -164,17 +164,13 @@ numbagg = "*" dask = "*" distributed = "*" -[feature.performance.dependencies] +[feature.accel.dependencies] flox = "*" bottleneck = "*" numexpr = "*" pyarrow = "*" opt_einsum = "*" -[feature.performance.pypi-dependencies] -jax = "*" - - [feature.plotting.dependencies] cartopy = "*" matplotlib-base = "*" @@ -198,6 +194,10 @@ cftime = "*" pint = "*" iris = "*" +[feature.extras.pypi-dependencies] +# array +jax = "*" + [feature.test.dependencies] pytest = "*" pytest-asyncio = "*" From 257d77cef2d4315e46ab9ae33ac5a425ea065873 Mon Sep 17 00:00:00 2001 From: Vecko <36369090+VeckoTheGecko@users.noreply.github.com> Date: Mon, 3 Nov 2025 16:50:34 +0100 Subject: [PATCH 69/89] Migrate CI additional to use Pixi --- .github/workflows/ci-additional.yaml | 196 ++++++++++++++------------- .github/workflows/ci.yaml | 5 +- 2 files changed, 103 insertions(+), 98 deletions(-) diff --git a/.github/workflows/ci-additional.yaml b/.github/workflows/ci-additional.yaml index 251856540ed..278a8f7f6b0 100644 --- a/.github/workflows/ci-additional.yaml +++ b/.github/workflows/ci-additional.yaml @@ -14,6 +14,7 @@ concurrency: env: FORCE_COLOR: 3 + PIXI_VERSION: "v0.58.0" jobs: detect-ci-trigger: @@ -32,19 +33,21 @@ jobs: id: detect-trigger with: keyword: "[skip-ci]" - + cache-pixi-lock: + uses: ./.github/workflows/cache-pixi-lock.yml + with: + pixi-version: "v0.58.0" # keep in sync with env var above doctest: name: Doctests runs-on: "ubuntu-latest" - needs: detect-ci-trigger + needs: [detect-ci-trigger, cache-pixi-lock] if: needs.detect-ci-trigger.outputs.triggered == 'false' defaults: run: shell: bash -l {0} env: - CONDA_ENV_FILE: ci/requirements/environment.yml - PYTHON_VERSION: "3.12" + PIXI_ENV: test-all-deps-py313 steps: - uses: actions/checkout@v5 with: @@ -54,22 +57,24 @@ jobs: run: | echo "TODAY=$(date +'%Y-%m-%d')" >> $GITHUB_ENV - - name: Setup micromamba - uses: mamba-org/setup-micromamba@v2 + - name: Restore cached pixi lockfile + uses: actions/cache/restore@v4 + id: restore-pixi-lock with: - environment-file: ${{env.CONDA_ENV_FILE}} - environment-name: xarray-tests - create-args: >- - python=${{env.PYTHON_VERSION}} - cache-environment: true - cache-environment-key: "${{runner.os}}-${{runner.arch}}-py${{env.PYTHON_VERSION}}-${{env.TODAY}}-${{hashFiles(env.CONDA_ENV_FILE)}}" + enableCrossOsArchive: true + path: | + pixi.lock + key: ${{ needs.cache-pixi-lock.outputs.cache-id }} + - uses: prefix-dev/setup-pixi@v0.9.0 + with: + pixi-version: ${{ env.PIXI_VERSION }} + cache: true + environments: ${{ env.PIXI_ENV }} + cache-write: ${{ github.event_name == 'push' && github.ref_name == 'main' }} - - name: Install xarray - run: | - python -m pip install --no-deps -e . - name: Version info run: | - python xarray/util/print_versions.py + pixi run -e ${{env.PIXI_ENV}} python xarray/util/print_versions.py - name: Run doctests run: | # Raise an error if there are warnings in the doctests, with `-Werror`. @@ -78,49 +83,47 @@ jobs: # # If dependencies emit warnings we can't do anything about, add ignores to # `xarray/tests/__init__.py`. - python -m pytest --doctest-modules xarray --ignore xarray/tests -Werror + pixi run -e ${{env.PIXI_ENV}} python -m pytest --doctest-modules xarray --ignore xarray/tests -Werror mypy: name: Mypy runs-on: "ubuntu-latest" - needs: detect-ci-trigger + needs: [detect-ci-trigger, cache-pixi-lock] defaults: run: shell: bash -l {0} env: - CONDA_ENV_FILE: ci/requirements/environment.yml - PYTHON_VERSION: "3.12" + PIXI_ENV: test-all-mypy-py313 steps: - uses: actions/checkout@v5 with: fetch-depth: 0 # Fetch all history for all branches and tags. - + - name: Restore cached pixi lockfile + uses: actions/cache/restore@v4 + id: restore-pixi-lock + with: + enableCrossOsArchive: true + path: | + pixi.lock + key: ${{ needs.cache-pixi-lock.outputs.cache-id }} + - uses: prefix-dev/setup-pixi@v0.9.0 + with: + pixi-version: ${{ env.PIXI_VERSION }} + cache: true + environments: ${{ env.PIXI_ENV }} + cache-write: ${{ github.event_name == 'push' && github.ref_name == 'main' }} - name: set environment variables run: | echo "TODAY=$(date +'%Y-%m-%d')" >> $GITHUB_ENV - - name: Setup micromamba - uses: mamba-org/setup-micromamba@v2 - with: - environment-file: ${{env.CONDA_ENV_FILE}} - environment-name: xarray-tests - create-args: >- - python=${{env.PYTHON_VERSION}} - cache-environment: true - cache-environment-key: "${{runner.os}}-${{runner.arch}}-py${{env.PYTHON_VERSION}}-${{env.TODAY}}-${{hashFiles(env.CONDA_ENV_FILE)}}" - - name: Install xarray - run: | - python -m pip install --no-deps -e . + echo "PYTHON_VERSION=$(pixi run -e ${{env.PIXI_ENV}} python --version | cut -d' ' -f2 | cut -d. -f1,2)" >> $GITHUB_ENV - name: Version info run: | - python xarray/util/print_versions.py - - name: Install mypy - run: | - python -m pip install "mypy==1.18.1" --force-reinstall + pixi run -e ${{env.PIXI_ENV}} python xarray/util/print_versions.py - name: Run mypy run: | - python -m mypy --install-types --non-interactive --cobertura-xml-report mypy_report + pixi run -e ${{env.PIXI_ENV}} python -m mypy --install-types --non-interactive --cobertura-xml-report mypy_report - name: Upload mypy coverage to Codecov uses: codecov/codecov-action@v5.5.1 @@ -134,44 +137,42 @@ jobs: mypy-min: name: Mypy 3.11 runs-on: "ubuntu-latest" - needs: detect-ci-trigger + needs: [detect-ci-trigger, cache-pixi-lock] defaults: run: shell: bash -l {0} env: - CONDA_ENV_FILE: ci/requirements/environment.yml - PYTHON_VERSION: "3.11" + PIXI_ENV: test-all-mypy-py311 steps: - uses: actions/checkout@v5 with: fetch-depth: 0 # Fetch all history for all branches and tags. - + - name: Restore cached pixi lockfile + uses: actions/cache/restore@v4 + id: restore-pixi-lock + with: + enableCrossOsArchive: true + path: | + pixi.lock + key: ${{ needs.cache-pixi-lock.outputs.cache-id }} + - uses: prefix-dev/setup-pixi@v0.9.0 + with: + pixi-version: ${{ env.PIXI_VERSION }} + cache: true + environments: ${{ env.PIXI_ENV }} + cache-write: ${{ github.event_name == 'push' && github.ref_name == 'main' }} - name: set environment variables run: | echo "TODAY=$(date +'%Y-%m-%d')" >> $GITHUB_ENV - - name: Setup micromamba - uses: mamba-org/setup-micromamba@v2 - with: - environment-file: ${{env.CONDA_ENV_FILE}} - environment-name: xarray-tests - create-args: >- - python=${{env.PYTHON_VERSION}} - cache-environment: true - cache-environment-key: "${{runner.os}}-${{runner.arch}}-py${{env.PYTHON_VERSION}}-${{env.TODAY}}-${{hashFiles(env.CONDA_ENV_FILE)}}" - - name: Install xarray - run: | - python -m pip install --no-deps -e . + echo "PYTHON_VERSION=$(pixi run -e ${{env.PIXI_ENV}} python --version | cut -d' ' -f2 | cut -d. -f1,2)" >> $GITHUB_ENV - name: Version info run: | - python xarray/util/print_versions.py - - name: Install mypy - run: | - python -m pip install "mypy==1.18.1" --force-reinstall + pixi run -e ${{env.PIXI_ENV}} python xarray/util/print_versions.py - name: Run mypy run: | - python -m mypy --install-types --non-interactive --cobertura-xml-report mypy_report + pixi run -e ${{env.PIXI_ENV}} python -m mypy --install-types --non-interactive --cobertura-xml-report mypy_report - name: Upload mypy coverage to Codecov uses: codecov/codecov-action@v5.5.1 @@ -185,7 +186,7 @@ jobs: pyright: name: Pyright runs-on: "ubuntu-latest" - needs: detect-ci-trigger + needs: [detect-ci-trigger, cache-pixi-lock] if: | always() && ( @@ -195,39 +196,41 @@ jobs: run: shell: bash -l {0} env: - CONDA_ENV_FILE: ci/requirements/environment.yml - PYTHON_VERSION: "3.12" + PIXI_ENV: test-all-deps-py313 steps: - uses: actions/checkout@v5 with: fetch-depth: 0 # Fetch all history for all branches and tags. + - name: Restore cached pixi lockfile + uses: actions/cache/restore@v4 + id: restore-pixi-lock + with: + enableCrossOsArchive: true + path: | + pixi.lock + key: ${{ needs.cache-pixi-lock.outputs.cache-id }} + - uses: prefix-dev/setup-pixi@v0.9.0 + with: + pixi-version: ${{ env.PIXI_VERSION }} + cache: true + environments: ${{ env.PIXI_ENV }} + cache-write: ${{ github.event_name == 'push' && github.ref_name == 'main' }} - name: set environment variables run: | echo "TODAY=$(date +'%Y-%m-%d')" >> $GITHUB_ENV - - name: Setup micromamba - uses: mamba-org/setup-micromamba@v2 - with: - environment-file: ${{env.CONDA_ENV_FILE}} - environment-name: xarray-tests - create-args: >- - python=${{env.PYTHON_VERSION}} - cache-environment: true - cache-environment-key: "${{runner.os}}-${{runner.arch}}-py${{env.PYTHON_VERSION}}-${{env.TODAY}}-${{hashFiles(env.CONDA_ENV_FILE)}}" - - name: Install xarray - run: | - python -m pip install --no-deps -e . + echo "PYTHON_VERSION=$(pixi run -e ${{env.PIXI_ENV}} python --version | cut -d' ' -f2 | cut -d. -f1,2)" >> $GITHUB_ENV - name: Version info run: | - python xarray/util/print_versions.py + pixi run -e ${{env.PIXI_ENV}} python xarray/util/print_versions.py - name: Install pyright run: | - python -m pip install pyright --force-reinstall + pixi add -e ${{env.PIXI_ENV}} --pypi pyright - name: Run pyright run: | - python -m pyright xarray/ + pixi run -e ${{env.PIXI_ENV}} python -m pyright xarray/ - name: Upload pyright coverage to Codecov uses: codecov/codecov-action@v5.5.1 @@ -241,7 +244,7 @@ jobs: pyright39: name: Pyright 3.11 runs-on: "ubuntu-latest" - needs: detect-ci-trigger + needs: [detect-ci-trigger, cache-pixi-lock] if: | always() && ( @@ -251,39 +254,40 @@ jobs: run: shell: bash -l {0} env: - CONDA_ENV_FILE: ci/requirements/environment.yml - PYTHON_VERSION: "3.11" + PIXI_ENV: test-all-deps-py313 steps: - uses: actions/checkout@v5 with: fetch-depth: 0 # Fetch all history for all branches and tags. - + - name: Restore cached pixi lockfile + uses: actions/cache/restore@v4 + id: restore-pixi-lock + with: + enableCrossOsArchive: true + path: | + pixi.lock + key: ${{ needs.cache-pixi-lock.outputs.cache-id }} + - uses: prefix-dev/setup-pixi@v0.9.0 + with: + pixi-version: ${{ env.PIXI_VERSION }} + cache: true + environments: ${{ env.PIXI_ENV }} + cache-write: ${{ github.event_name == 'push' && github.ref_name == 'main' }} - name: set environment variables run: | echo "TODAY=$(date +'%Y-%m-%d')" >> $GITHUB_ENV - - name: Setup micromamba - uses: mamba-org/setup-micromamba@v2 - with: - environment-file: ${{env.CONDA_ENV_FILE}} - environment-name: xarray-tests - create-args: >- - python=${{env.PYTHON_VERSION}} - cache-environment: true - cache-environment-key: "${{runner.os}}-${{runner.arch}}-py${{env.PYTHON_VERSION}}-${{env.TODAY}}-${{hashFiles(env.CONDA_ENV_FILE)}}" - - name: Install xarray - run: | - python -m pip install --no-deps -e . + echo "PYTHON_VERSION=$(pixi run -e ${{env.PIXI_ENV}} python --version | cut -d' ' -f2 | cut -d. -f1,2)" >> $GITHUB_ENV - name: Version info run: | - python xarray/util/print_versions.py + pixi run -e ${{env.PIXI_ENV}} python xarray/util/print_versions.py - name: Install pyright run: | - python -m pip install pyright --force-reinstall + pixi add -e ${{env.PIXI_ENV}} --pypi pyright - name: Run pyright run: | - python -m pyright xarray/ + pixi run -e ${{env.PIXI_ENV}} python -m pyright xarray/ - name: Upload pyright coverage to Codecov uses: codecov/codecov-action@v5.5.1 diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 496f1d60d6d..a8c3fcd2037 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -14,6 +14,7 @@ concurrency: env: FORCE_COLOR: 3 + PIXI_VERSION: "v0.58.0" jobs: detect-ci-trigger: @@ -36,7 +37,7 @@ jobs: cache-pixi-lock: uses: ./.github/workflows/cache-pixi-lock.yml with: - pixi-version: "v0.58.0" # keep in sync with jobs + pixi-version: "v0.58.0" # keep in sync with env var above test: name: "${{ matrix.os }} | pixi shell -e ${{ matrix.pixi-env }}" runs-on: ${{ matrix.os }} @@ -92,7 +93,7 @@ jobs: key: ${{ needs.cache-pixi-lock.outputs.cache-id }} - uses: prefix-dev/setup-pixi@v0.9.0 with: - pixi-version: "v0.58.0" # keep in sync with cache-pixi-lock + pixi-version: ${{ env.PIXI_VERSION }} cache: true environments: ${{ matrix.pixi-env }} cache-write: ${{ github.event_name == 'push' && github.ref_name == 'main' }} From c4e1c0d3f81203d727b940654c593d728787f5d5 Mon Sep 17 00:00:00 2001 From: Vecko <36369090+VeckoTheGecko@users.noreply.github.com> Date: Fri, 7 Nov 2025 17:02:25 +0100 Subject: [PATCH 70/89] review feedback --- .github/workflows/ci.yaml | 2 +- pixi.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index a8c3fcd2037..66adaf2f333 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -142,7 +142,7 @@ jobs: save-always: true - name: Run tests - run: + run: | pixi run -e ${{ matrix.pixi-env }} python -m pytest -n ${{ matrix.numprocesses || 4 }} --timeout 180 --cov=xarray diff --git a/pixi.toml b/pixi.toml index af9936a7f7b..3d35cf6f5fb 100644 --- a/pixi.toml +++ b/pixi.toml @@ -196,7 +196,7 @@ iris = "*" [feature.extras.pypi-dependencies] # array -jax = "*" +jax = "*" # no way to get cpu-only jaxlib from conda if gpu is present [feature.test.dependencies] pytest = "*" From 98e7499144794f88261b1cea17d346933bc9abcd Mon Sep 17 00:00:00 2001 From: Vecko <36369090+VeckoTheGecko@users.noreply.github.com> Date: Fri, 7 Nov 2025 17:21:10 +0100 Subject: [PATCH 71/89] Add pyright to typing feature - Rename typing feature from mypy to typing - Rename associated envs --- .github/workflows/ci-additional.yaml | 10 ++-------- .github/workflows/ci.yaml | 4 ++-- pixi.toml | 19 ++++++++++--------- 3 files changed, 14 insertions(+), 19 deletions(-) diff --git a/.github/workflows/ci-additional.yaml b/.github/workflows/ci-additional.yaml index 278a8f7f6b0..b61dfc87d47 100644 --- a/.github/workflows/ci-additional.yaml +++ b/.github/workflows/ci-additional.yaml @@ -93,7 +93,7 @@ jobs: run: shell: bash -l {0} env: - PIXI_ENV: test-all-mypy-py313 + PIXI_ENV: test-with-typing-py313 steps: - uses: actions/checkout@v5 @@ -142,7 +142,7 @@ jobs: run: shell: bash -l {0} env: - PIXI_ENV: test-all-mypy-py311 + PIXI_ENV: test-with-typing-py311 steps: - uses: actions/checkout@v5 @@ -224,9 +224,6 @@ jobs: - name: Version info run: | pixi run -e ${{env.PIXI_ENV}} python xarray/util/print_versions.py - - name: Install pyright - run: | - pixi add -e ${{env.PIXI_ENV}} --pypi pyright - name: Run pyright run: | @@ -281,9 +278,6 @@ jobs: - name: Version info run: | pixi run -e ${{env.PIXI_ENV}} python xarray/util/print_versions.py - - name: Install pyright - run: | - pixi add -e ${{env.PIXI_ENV}} --pypi pyright - name: Run pyright run: | diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 66adaf2f333..1445076a111 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -72,11 +72,11 @@ jobs: os: ubuntu-latest # The mypy tests must be executed using only 1 process in order to guarantee # predictable mypy output messages for comparison to expectations. - - pixi-env: "test-all-mypy-py311" + - pixi-env: "test-with-typing-py311" pytest-addopts: "mypy" numprocesses: 1 os: ubuntu-latest - - pixi-env: "test-all-mypy-py313" + - pixi-env: "test-with-typing-py313" numprocesses: 1 os: ubuntu-latest steps: diff --git a/pixi.toml b/pixi.toml index 3d35cf6f5fb..4c04164e839 100644 --- a/pixi.toml +++ b/pixi.toml @@ -52,7 +52,7 @@ test-all-deps-py311 = { features = [ "extras", ] } -test-all-mypy-py311 = { features = [ +test-with-typing-py311 = { features = [ "py311", "test", "backends", @@ -61,10 +61,10 @@ test-all-mypy-py311 = { features = [ "dask", "plotting", "extras", - "mypy", + "typing", ] } -test-all-mypy-py313 = { features = [ +test-with-typing-py313 = { features = [ "py313", "test", "backends", @@ -73,7 +73,7 @@ test-all-mypy-py313 = { features = [ "dask", "plotting", "extras", - "mypy", + "typing", ] } test-bare-minimum = { features = ["test", "minimal"] } @@ -84,7 +84,7 @@ test-bare-min-and-scipy = { features = [ ] } # Extra -typing = { features = ["mypy"] } +typing = { features = ["typing"] } doc = { features = [ "doc", "backends", @@ -244,8 +244,9 @@ cfgrib = "*" # pypi dep because of https://github.com/prefix-dev/pixi/issues/303 doc = { cmd = "make clean && make html", cwd = "doc" } -[feature.mypy.dependencies] +[feature.typing.dependencies] mypy = "==1.18.1" +pyright = "*" hypothesis = "*" lxml = "*" pandas-stubs = "<=2.2.3.241126" # https://github.com/pydata/xarray/issues/10110 @@ -262,12 +263,12 @@ types-openpyxl = "*" typing_extensions = "*" pip = "*" -[feature.mypy.pypi-dependencies] +[feature.typing.pypi-dependencies] types-defusedxml = "*" types-pexpect = "*" -[feature.mypy.tasks] -typing = "mypy --install-types --non-interactive --cobertura-xml-report mypy_report" +[feature.typing.tasks] +mypy = "mypy --install-types --non-interactive --cobertura-xml-report mypy_report" [feature.pre-commit.dependencies] pre-commit = "*" From d93b2a444305fd8736ea9a5a4d4325f87b9761df Mon Sep 17 00:00:00 2001 From: Vecko <36369090+VeckoTheGecko@users.noreply.github.com> Date: Fri, 7 Nov 2025 18:24:53 +0100 Subject: [PATCH 72/89] Add typing to unit_registry For some reason migrating to Pixi caused these failures --- xarray/tests/test_assertions.py | 2 +- xarray/tests/test_dask.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/xarray/tests/test_assertions.py b/xarray/tests/test_assertions.py index 222a01a6628..4b5733997ab 100644 --- a/xarray/tests/test_assertions.py +++ b/xarray/tests/test_assertions.py @@ -16,7 +16,7 @@ try: import pint - unit_registry = pint.UnitRegistry(force_ndarray_like=True) + unit_registry: pint.UnitRegistry = pint.UnitRegistry(force_ndarray_like=True) def quantity(x): return unit_registry.Quantity(x, "m") diff --git a/xarray/tests/test_dask.py b/xarray/tests/test_dask.py index ccbfc06eeb0..2d103994410 100644 --- a/xarray/tests/test_dask.py +++ b/xarray/tests/test_dask.py @@ -312,7 +312,7 @@ def test_persist(self): def test_tokenize_duck_dask_array(self): import pint - unit_registry = pint.UnitRegistry() + unit_registry: pint.UnitRegistry = pint.UnitRegistry() q = unit_registry.Quantity(self.data, "meter") variable = xr.Variable(("x", "y"), q) @@ -791,7 +791,7 @@ def test_from_dask_variable(self): def test_tokenize_duck_dask_array(self): import pint - unit_registry = pint.UnitRegistry() + unit_registry: pint.UnitRegistry = pint.UnitRegistry() q = unit_registry.Quantity(self.data, unit_registry.meter) data_array = xr.DataArray( From 863469930f2f7b980257e0d3fe43506f3917cf18 Mon Sep 17 00:00:00 2001 From: Vecko <36369090+VeckoTheGecko@users.noreply.github.com> Date: Mon, 10 Nov 2025 17:47:06 +0100 Subject: [PATCH 73/89] Fix command --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 1445076a111..d4f33833840 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -142,7 +142,7 @@ jobs: save-always: true - name: Run tests - run: | + run: pixi run -e ${{ matrix.pixi-env }} python -m pytest -n ${{ matrix.numprocesses || 4 }} --timeout 180 --cov=xarray From acc528eb4d74dd38188e849bcbb029f00b233fb7 Mon Sep 17 00:00:00 2001 From: Vecko <36369090+VeckoTheGecko@users.noreply.github.com> Date: Mon, 10 Nov 2025 17:57:39 +0100 Subject: [PATCH 74/89] Rename plotting feature to viz --- pixi.toml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/pixi.toml b/pixi.toml index 4c04164e839..f4c41238cb8 100644 --- a/pixi.toml +++ b/pixi.toml @@ -19,7 +19,7 @@ test-all-but-numba = { features = [ "backends", "accel", "dask", - "plotting", + "viz", "extras", ] } test-all-but-dask = { features = [ @@ -28,7 +28,7 @@ test-all-but-dask = { features = [ "backends", "accel", "numba", - "plotting", + "viz", "extras", ] } test-all-deps-py313 = { features = [ @@ -38,7 +38,7 @@ test-all-deps-py313 = { features = [ "accel", "numba", "dask", - "plotting", + "viz", "extras", ] } test-all-deps-py311 = { features = [ @@ -48,7 +48,7 @@ test-all-deps-py311 = { features = [ "accel", "numba", "dask", - "plotting", + "viz", "extras", ] } @@ -59,7 +59,7 @@ test-with-typing-py311 = { features = [ "accel", "numba", "dask", - "plotting", + "viz", "extras", "typing", ] } @@ -71,7 +71,7 @@ test-with-typing-py313 = { features = [ "accel", "numba", "dask", - "plotting", + "viz", "extras", "typing", ] } @@ -90,7 +90,7 @@ doc = { features = [ "backends", "test", "accel", - "plotting", + "viz", "extras", ], solve-group = "doc" } pre-commit = { features = ["pre-commit"], no-default-feature = true } @@ -171,7 +171,7 @@ numexpr = "*" pyarrow = "*" opt_einsum = "*" -[feature.plotting.dependencies] +[feature.viz.dependencies] cartopy = "*" matplotlib-base = "*" nc-time-axis = "*" From 52cec4d38d03a22ac2698af1ccbd6cdac5fbe9c7 Mon Sep 17 00:00:00 2001 From: Vecko <36369090+VeckoTheGecko@users.noreply.github.com> Date: Mon, 10 Nov 2025 18:10:39 +0100 Subject: [PATCH 75/89] Update confusing env name --- pixi.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pixi.toml b/pixi.toml index f4c41238cb8..7e4a0ca4a4d 100644 --- a/pixi.toml +++ b/pixi.toml @@ -5,14 +5,14 @@ platforms = ["win-64", "linux-64", "osx-64", "osx-arm64"] [tasks.test-all] depends-on = [ - { task = "test", environment = "test-default" }, + { task = "test", environment = "test-just-xarray" }, { task = "test", environment = "test-bare-min" }, { task = "test", environment = "test-all-deps-py313" }, ] [environments] # Testing -test-default = { features = ["test"] } +test-just-xarray = { features = ["test"] } test-all-but-numba = { features = [ "py313", "test", From 4d0f9522207354960a507ba82dc92275b4e94eb3 Mon Sep 17 00:00:00 2001 From: Vecko <36369090+VeckoTheGecko@users.noreply.github.com> Date: Mon, 10 Nov 2025 18:11:59 +0100 Subject: [PATCH 76/89] Disable test environment --- pixi.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pixi.toml b/pixi.toml index 7e4a0ca4a4d..96b07d95892 100644 --- a/pixi.toml +++ b/pixi.toml @@ -5,14 +5,14 @@ platforms = ["win-64", "linux-64", "osx-64", "osx-arm64"] [tasks.test-all] depends-on = [ - { task = "test", environment = "test-just-xarray" }, + # { task = "test", environment = "test-just-xarray" }, # https://github.com/pydata/xarray/pull/10888/files#r2511336147 { task = "test", environment = "test-bare-min" }, { task = "test", environment = "test-all-deps-py313" }, ] [environments] # Testing -test-just-xarray = { features = ["test"] } +# test-just-xarray = { features = ["test"] } # https://github.com/pydata/xarray/pull/10888/files#r2511336147 test-all-but-numba = { features = [ "py313", "test", From ad02e6aa94c6c1c2680f099b4d7cc28155e3321e Mon Sep 17 00:00:00 2001 From: Vecko <36369090+VeckoTheGecko@users.noreply.github.com> Date: Mon, 10 Nov 2025 18:42:19 +0100 Subject: [PATCH 77/89] Add doc-clean task --- pixi.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pixi.toml b/pixi.toml index 96b07d95892..cca0d6194be 100644 --- a/pixi.toml +++ b/pixi.toml @@ -241,7 +241,8 @@ sphinxext-rediraffe = "*" cfgrib = "*" # pypi dep because of https://github.com/prefix-dev/pixi/issues/3032#issuecomment-3302638043 [feature.doc.tasks] -doc = { cmd = "make clean && make html", cwd = "doc" } +doc = { cmd = "make html", cwd = "doc" } +doc-clean = { cmd = "make clean && make html", cwd = "doc" } [feature.typing.dependencies] From 8d52c20b5ebd1ab896ef2ee310ca76dce78fb5f3 Mon Sep 17 00:00:00 2001 From: Vecko <36369090+VeckoTheGecko@users.noreply.github.com> Date: Mon, 10 Nov 2025 18:47:24 +0100 Subject: [PATCH 78/89] Remove bare-minimum.yml Not sure why that was still here... --- ci/requirement-linting/bare-minimum.yml | 18 ------------------ 1 file changed, 18 deletions(-) delete mode 100644 ci/requirement-linting/bare-minimum.yml diff --git a/ci/requirement-linting/bare-minimum.yml b/ci/requirement-linting/bare-minimum.yml deleted file mode 100644 index 5ba31759969..00000000000 --- a/ci/requirement-linting/bare-minimum.yml +++ /dev/null @@ -1,18 +0,0 @@ -name: xarray-tests #! keep this file in sync with pixi.toml -channels: - - conda-forge - - nodefaults -dependencies: - - python=3.11 - - coveralls - - pip - - pytest - - pytest-asyncio - - pytest-cov - - pytest-env - - pytest-mypy-plugins - - pytest-timeout - - pytest-xdist - - numpy=1.26 - - packaging=24.1 - - pandas=2.2 From 7df8676b097b70b50a50fb2bc24950070ab5d092 Mon Sep 17 00:00:00 2001 From: Vecko <36369090+VeckoTheGecko@users.noreply.github.com> Date: Mon, 10 Nov 2025 18:59:43 +0100 Subject: [PATCH 79/89] Make pixi env for min versions --- pixi.toml | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/pixi.toml b/pixi.toml index cca0d6194be..674b3cf35b6 100644 --- a/pixi.toml +++ b/pixi.toml @@ -82,6 +82,11 @@ test-bare-min-and-scipy = { features = [ "minimal", "minimum-scipy", ] } +test-min-versions = { features = [ + "test", + "min-versions", +] } + # Extra typing = { features = ["typing"] } @@ -198,6 +203,48 @@ iris = "*" # array jax = "*" # no way to get cpu-only jaxlib from conda if gpu is present +[feature.min-versions.dependencies] +# minimal versions for all dependencies +# Note that when you update min-supported versions, you should: +# - Update the min version lower-bound in the corresponding feature(s) where applicable +# - Update this section to pin to the min version + +python = "3.11.*" +array-api-strict = "1.1.*" # dependency for testing the array api compat +boto3 = "1.34.*" +bottleneck = "1.4.*" +cartopy = "0.23.*" +cftime = "1.6.*" +dask-core = "2024.6.*" +distributed = "2024.6.*" +flox = "0.9.*" +h5netcdf = "1.3.*" +# h5py and hdf5 tend to cause conflicts +# for e.g. hdf5 1.12 conflicts with h5py=3.1 +# prioritize bumping other packages instead +h5py = "3.11.*" +hdf5 = "1.14.*" +iris = "3.9.*" +lxml = "5.1.*" # Optional dep of pydap +matplotlib-base = "3.8.*" +nc-time-axis = "1.4.*" +# netcdf follows a 1.major.minor[.patch] convention +# (see https://github.com/Unidata/netcdf4-python/issues/1090) +netcdf4 = "1.6.*" +numba = "0.60.*" +numbagg = "0.8.*" +numpy = "1.26.*" +packaging = "24.1.*" +pandas = "2.2.*" +pint = "0.24.*" +pydap = "==3.5.0" +rasterio = "1.3.*" +scipy = "1.13.*" +seaborn = "0.13.*" +sparse = "0.15.*" +toolz = "0.12.*" +zarr = "2.18.*" + [feature.test.dependencies] pytest = "*" pytest-asyncio = "*" From a50cf33671e25082d495a4374f76ac5fa5ad86cf Mon Sep 17 00:00:00 2001 From: Vecko <36369090+VeckoTheGecko@users.noreply.github.com> Date: Mon, 10 Nov 2025 19:01:55 +0100 Subject: [PATCH 80/89] Relax pydap min version Pydap server (installed as linux dep) needed at least 3.5.1 --- pixi.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pixi.toml b/pixi.toml index 674b3cf35b6..d8f4a0f250f 100644 --- a/pixi.toml +++ b/pixi.toml @@ -237,7 +237,7 @@ numpy = "1.26.*" packaging = "24.1.*" pandas = "2.2.*" pint = "0.24.*" -pydap = "==3.5.0" +pydap = "3.5.*" rasterio = "1.3.*" scipy = "1.13.*" seaborn = "0.13.*" From f79f5e6d97782549e4bb9ea58f3ec36a76bf902d Mon Sep 17 00:00:00 2001 From: Vecko <36369090+VeckoTheGecko@users.noreply.github.com> Date: Mon, 10 Nov 2025 19:05:22 +0100 Subject: [PATCH 81/89] Enable test-min-versions CI testing --- .github/workflows/ci.yaml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index d4f33833840..29ea68a663d 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -59,9 +59,8 @@ jobs: os: ubuntu-latest - pixi-env: "test-bare-min-and-scipy" os: ubuntu-latest - # - pixi-env: "min-all-deps" # TODO: include later by duplicating old workflow and using conda. Not using Pixi for now. - # python-version: "3.11" - # os: ubuntu-latest + - pixi-env: "test-min-versions" + os: ubuntu-latest # Latest python version: - pixi-env: "test-all-but-numba" os: ubuntu-latest From 435e9bc147934c40ed568e04fa63e7a47e400fd7 Mon Sep 17 00:00:00 2001 From: Vecko <36369090+VeckoTheGecko@users.noreply.github.com> Date: Mon, 10 Nov 2025 19:06:03 +0100 Subject: [PATCH 82/89] Delete `min-all-deps.yml` Migrated now to Pixi (see `test-min-versions`) --- ci/requirement-linting/min-all-deps.yml | 54 ------------------------- 1 file changed, 54 deletions(-) delete mode 100644 ci/requirement-linting/min-all-deps.yml diff --git a/ci/requirement-linting/min-all-deps.yml b/ci/requirement-linting/min-all-deps.yml deleted file mode 100644 index 4f90228294b..00000000000 --- a/ci/requirement-linting/min-all-deps.yml +++ /dev/null @@ -1,54 +0,0 @@ -name: xarray-tests #! keep this file in sync with pixi.toml -channels: - - conda-forge - - nodefaults -dependencies: - # MINIMUM VERSIONS POLICY: see doc/user-guide/installing.rst - # Run ci/min_deps_check.py to verify that this file respects the policy. - # When upgrading python, numpy, or pandas, must also change - # doc/user-guide/installing.rst, doc/user-guide/plotting.rst and setup.py. - - python=3.11 - - array-api-strict=1.1 # dependency for testing the array api compat - - boto3=1.34 - - bottleneck=1.4 - - cartopy=0.23 - - cftime=1.6 - - coveralls - - dask-core=2024.6 - - distributed=2024.6 - - flox=0.9 - - h5netcdf=1.3 - # h5py and hdf5 tend to cause conflicts - # for e.g. hdf5 1.12 conflicts with h5py=3.1 - # prioritize bumping other packages instead - - h5py=3.11 - - hdf5=1.14 - - hypothesis - - iris=3.9 - - lxml=5.1 # Optional dep of pydap - - matplotlib-base=3.8 - - nc-time-axis=1.4 - # netcdf follows a 1.major.minor[.patch] convention - # (see https://github.com/Unidata/netcdf4-python/issues/1090) - - netcdf4=1.6 - - numba=0.60 - - numbagg=0.8 - - numpy=1.26 - - packaging=24.1 - - pandas=2.2 - - pint=0.24 - - pip - - pydap=3.5.0 - - pytest - - pytest-asyncio - - pytest-cov - - pytest-env - - pytest-mypy-plugins - - pytest-timeout - - pytest-xdist - - rasterio=1.3 - - scipy=1.13 - - seaborn=0.13 - - sparse=0.15 - - toolz=0.12 - - zarr=2.18 From b05765a74f357514176373f6f783c19b06e5edce Mon Sep 17 00:00:00 2001 From: Vecko <36369090+VeckoTheGecko@users.noreply.github.com> Date: Mon, 10 Nov 2025 19:09:57 +0100 Subject: [PATCH 83/89] Disable `min-version-policy` workflow in CI --- .github/workflows/ci-additional.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci-additional.yaml b/.github/workflows/ci-additional.yaml index b61dfc87d47..ce1806cf865 100644 --- a/.github/workflows/ci-additional.yaml +++ b/.github/workflows/ci-additional.yaml @@ -296,7 +296,9 @@ jobs: name: Minimum Version Policy runs-on: "ubuntu-latest" needs: detect-ci-trigger - if: needs.detect-ci-trigger.outputs.triggered == 'false' + # min-version-policy doesn't work with Pixi yet https://github.com/pydata/xarray/pull/10888#discussion_r2504335457 + if: false + # if: needs.detect-ci-trigger.outputs.triggered == 'false' defaults: run: shell: bash -l {0} From f038fde9031ec1f4b0908861792a4279219414d9 Mon Sep 17 00:00:00 2001 From: Vecko <36369090+VeckoTheGecko@users.noreply.github.com> Date: Mon, 10 Nov 2025 19:16:38 +0100 Subject: [PATCH 84/89] Revert regression - save PYTHON_VERSION to codecov --- .github/workflows/ci.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 29ea68a663d..044c8987a4e 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -100,6 +100,7 @@ jobs: - name: Set environment variables run: | echo "TODAY=$(date +'%Y-%m-%d')" >> $GITHUB_ENV + echo "PYTHON_VERSION=$(pixi run -e ${{env.PIXI_ENV}} python --version | cut -d' ' -f2 | cut -d. -f1,2)" >> $GITHUB_ENV if [[ "${{ matrix.pytest-addopts }}" != "" ]] ; then @@ -162,7 +163,7 @@ jobs: with: file: ./coverage.xml flags: unittests - env_vars: RUNNER_OS + env_vars: RUNNER_OS,PYTHON_VERSION name: codecov-umbrella fail_ci_if_error: false From 81454f4caa98a983f891fc26fc001d0a9aa1a115 Mon Sep 17 00:00:00 2001 From: Vecko <36369090+VeckoTheGecko@users.noreply.github.com> Date: Mon, 10 Nov 2025 19:21:05 +0100 Subject: [PATCH 85/89] Migrate Hypothesis testing CI to Pixi --- .github/workflows/hypothesis.yaml | 44 ++++++++++++++++++------------- 1 file changed, 26 insertions(+), 18 deletions(-) diff --git a/.github/workflows/hypothesis.yaml b/.github/workflows/hypothesis.yaml index 50e6557aea8..d782860e917 100644 --- a/.github/workflows/hypothesis.yaml +++ b/.github/workflows/hypothesis.yaml @@ -13,6 +13,7 @@ on: env: FORCE_COLOR: 3 + PIXI_VERSION: "v0.58.0" jobs: detect-ci-trigger: @@ -32,10 +33,15 @@ jobs: with: keyword: "[skip-ci]" + cache-pixi-lock: + uses: ./.github/workflows/cache-pixi-lock.yml + with: + pixi-version: "v0.58.0" # keep in sync with env var above + hypothesis: name: Slow Hypothesis Tests runs-on: "ubuntu-latest" - needs: detect-ci-trigger + needs: [detect-ci-trigger, cache-pixi-lock] if: | always() && ( @@ -48,7 +54,7 @@ jobs: shell: bash -l {0} env: - CONDA_ENV_FILE: ci/requirements/environment.yml + PIXI_ENV: test-all-deps-py313 PYTHON_VERSION: "3.12" steps: @@ -56,27 +62,29 @@ jobs: with: fetch-depth: 0 # Fetch all history for all branches and tags. + - name: Restore cached pixi lockfile + uses: actions/cache/restore@v4 + id: restore-pixi-lock + with: + enableCrossOsArchive: true + path: | + pixi.lock + key: ${{ needs.cache-pixi-lock.outputs.cache-id }} + - uses: prefix-dev/setup-pixi@v0.9.0 + with: + pixi-version: ${{ env.PIXI_VERSION }} + cache: true + environments: ${{ env.PIXI_ENV }} + cache-write: ${{ github.event_name == 'push' && github.ref_name == 'main' }} + - name: set environment variables run: | echo "TODAY=$(date +'%Y-%m-%d')" >> $GITHUB_ENV + echo "PYTHON_VERSION=$(pixi run -e ${{env.PIXI_ENV}} python --version | cut -d' ' -f2 | cut -d. -f1,2)" >> $GITHUB_ENV - - name: Setup micromamba - uses: mamba-org/setup-micromamba@v2 - with: - environment-file: ci/requirements/environment.yml - environment-name: xarray-tests - create-args: >- - python=${{env.PYTHON_VERSION}} - pytest-reportlog - cache-environment: true - cache-environment-key: "${{runner.os}}-${{runner.arch}}-py${{env.PYTHON_VERSION}}-${{env.TODAY}}-${{hashFiles(env.CONDA_ENV_FILE)}}" - - - name: Install xarray - run: | - python -m pip install --no-deps -e . - name: Version info run: | - python xarray/util/print_versions.py + pixi run -e ${{ env.PIXI_ENV }} python xarray/util/print_versions.py # https://github.com/actions/cache/blob/main/tips-and-workarounds.md#update-a-cache - name: Restore cached hypothesis directory @@ -92,7 +100,7 @@ jobs: if: success() id: status run: | - python -m pytest --hypothesis-show-statistics --run-slow-hypothesis properties/*.py \ + pixi run -e ${{ env.PIXI_ENV }} python -m pytest --hypothesis-show-statistics --run-slow-hypothesis properties/*.py \ --report-log output-${{ matrix.python-version }}-log.jsonl # explicitly save the cache so it gets updated, also do this even if it fails. From cbd0bd0e9eee5ce3a1587c2b743301b3e3527946 Mon Sep 17 00:00:00 2001 From: Vecko <36369090+VeckoTheGecko@users.noreply.github.com> Date: Mon, 10 Nov 2025 19:40:25 +0100 Subject: [PATCH 86/89] Revert changes to `benchmarks.yml` asv works with conda - pixi to be explored later in another PR if needed --- .github/workflows/benchmarks.yml | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/.github/workflows/benchmarks.yml b/.github/workflows/benchmarks.yml index 66a26de2cf4..90c3aff8531 100644 --- a/.github/workflows/benchmarks.yml +++ b/.github/workflows/benchmarks.yml @@ -9,10 +9,7 @@ env: PR_HEAD_LABEL: ${{ github.event.pull_request.head.label }} jobs: - cache-pixi-lock: - uses: ./.github/workflows/cache-pixi-lock.yml benchmark: - needs: cache-pixi-lock if: ${{ contains( github.event.pull_request.labels.*.name, 'run-benchmark') && github.event_name == 'pull_request' || contains( github.event.pull_request.labels.*.name, 'topic-performance') && github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' }} name: Linux runs-on: ubuntu-latest @@ -27,18 +24,6 @@ jobs: with: fetch-depth: 0 - - name: Restore cached pixi lockfile - uses: actions/cache/restore@v4 - id: restore-pixi-lock - with: - path: | - pixi.lock - key: ${{ needs.cache-pixi-lock.outputs.cache-id }} - - uses: prefix-dev/setup-pixi@v0.9.0 - with: - cache: true - cache-write: ${{ github.event_name == 'push' && github.ref_name == 'main' }} - - name: Set up conda environment uses: mamba-org/setup-micromamba@v2 with: From 3146b8bc983beecc7cb570bb0a34c9768c2fd745 Mon Sep 17 00:00:00 2001 From: Vecko <36369090+VeckoTheGecko@users.noreply.github.com> Date: Mon, 10 Nov 2025 19:45:35 +0100 Subject: [PATCH 87/89] Self review - Delete empty files - Update name of artifact --- .github/workflows/ci.yaml | 2 +- ci/requirements/all-but-dask.yml | 0 ci/requirements/all-but-numba.yml | 0 ci/requirements/bare-min-and-scipy.yml | 0 ci/requirements/bare-minimum.yml | 0 ci/requirements/environment-3.14.yml | 0 ci/requirements/environment-windows-3.14.yml | 0 ci/requirements/environment-windows.yml | 0 ci/requirements/environment.yml | 0 9 files changed, 1 insertion(+), 1 deletion(-) delete mode 100644 ci/requirements/all-but-dask.yml delete mode 100644 ci/requirements/all-but-numba.yml delete mode 100644 ci/requirements/bare-min-and-scipy.yml delete mode 100644 ci/requirements/bare-minimum.yml delete mode 100644 ci/requirements/environment-3.14.yml delete mode 100644 ci/requirements/environment-windows-3.14.yml delete mode 100644 ci/requirements/environment-windows.yml delete mode 100644 ci/requirements/environment.yml diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 044c8987a4e..ca07a882328 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -153,7 +153,7 @@ jobs: if: always() uses: actions/upload-artifact@v5 with: - name: Test results for OS ${{ runner.os }} pixi-env -${{ matrix.pixi-env }} + name: Test results for OS ${{ runner.os }} pixi-env ${{ matrix.pixi-env }} pytest-addopts ${{ matrix.pytest-addopts }} path: pytest.xml - name: Upload code coverage to Codecov diff --git a/ci/requirements/all-but-dask.yml b/ci/requirements/all-but-dask.yml deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/ci/requirements/all-but-numba.yml b/ci/requirements/all-but-numba.yml deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/ci/requirements/bare-min-and-scipy.yml b/ci/requirements/bare-min-and-scipy.yml deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/ci/requirements/bare-minimum.yml b/ci/requirements/bare-minimum.yml deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/ci/requirements/environment-3.14.yml b/ci/requirements/environment-3.14.yml deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/ci/requirements/environment-windows-3.14.yml b/ci/requirements/environment-windows-3.14.yml deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/ci/requirements/environment-windows.yml b/ci/requirements/environment-windows.yml deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/ci/requirements/environment.yml b/ci/requirements/environment.yml deleted file mode 100644 index e69de29bb2d..00000000000 From f19ca43992c4b1019c1cbc8f983358f60859d7da Mon Sep 17 00:00:00 2001 From: Vecko <36369090+VeckoTheGecko@users.noreply.github.com> Date: Mon, 10 Nov 2025 19:56:04 +0100 Subject: [PATCH 88/89] Fix RTD for pixi --- .readthedocs.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 9da07cf3bf9..a229f42fd41 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -23,7 +23,7 @@ build: - pixi install -e doc build: html: - - BUILDDIR=$READTHEDOCS_OUTPUT pixi run -e doc make html + - BUILDDIR=$READTHEDOCS_OUTPUT pixi run doc formats: - htmlzip From 435b124ef7acee9b8bbd112689075191ada7e563 Mon Sep 17 00:00:00 2001 From: Vecko <36369090+VeckoTheGecko@users.noreply.github.com> Date: Mon, 10 Nov 2025 19:56:26 +0100 Subject: [PATCH 89/89] Update contributing instructions for Pixi --- doc/contribute/contributing.rst | 115 ++++++++++++-------------------- 1 file changed, 43 insertions(+), 72 deletions(-) diff --git a/doc/contribute/contributing.rst b/doc/contribute/contributing.rst index 7733e73a120..6bc23b73fbb 100644 --- a/doc/contribute/contributing.rst +++ b/doc/contribute/contributing.rst @@ -186,77 +186,73 @@ documentation locally before pushing your changes. Creating a Python Environment ----------------------------- +Xarray uses Pixi to manage development environments. Before starting any development, you'll need to create an isolated xarray development environment: -- Install either `Anaconda `_ or `miniconda - `_ -- Make sure your conda is up to date (``conda update conda``) +- Install `Pixi `_ +- Make sure your Pixi is up to date (``pixi self-update``) - Make sure that you have :ref:`cloned the repository ` - ``cd`` to the *xarray* source directory -We'll now kick off a two-step process: +That's it! Now you're ready to contribute to Xarray. -1. Install the build dependencies -2. Build and install xarray +Pixi defines multiple environments as well as tasks to help you with development. These include tasks for: -.. code-block:: sh - - # Create and activate the build environment - conda create -c conda-forge -n xarray-tests python=3.11 +- running the test suite +- building the documentation +- running the static type checker +- running code formatters and linters - # This is for Linux and MacOS - conda env update -f ci/requirements/environment.yml +Some of these tasks can be run in several environments (e.g., the test suite is run in environments with different, +dependencies as well as different Python versions to make sure we have wide support for Xarray). Some of these tasks +are only run in a single environment (e.g., building the documentation or running pre-commit hooks). - # On windows, use environment-windows.yml instead - conda env update -f ci/requirements/environment-windows.yml +You can see all available environments and tasks by running:: - conda activate xarray-tests + pixi list - # or with older versions of Anaconda: - source activate xarray-tests +For example: - # Build and install xarray - pip install -e . +- ``pixi run doc`` will build the documentation +- ``pixi run mypy`` will run the static type checker +- ``pixi run test`` will run the test suite +- ``pixi run pre-commit`` will run all code formatters and linters - defined via the pre-commit hooks -At this point you should be able to import *xarray* from your locally -built version: +When running ``pixi run test`` you will be prompted to select which environment you want to use. You can specify the environment +directly by providing the ``-e`` flag, e.g., ``pixi run -e my_environment test`` . Our CI setup uses Pixi as well - you can easily +reproduce CI tests by running the same tasks in the same environments as defined in the CI. -.. code-block:: sh +You can enter any of the defined environments with:: - $ python # start an interpreter - >>> import xarray - >>> xarray.__version__ - '2025.7.2.dev14+g5ce69b2b.d20250725' + pixi shell -e my_environment -This will create the new environment, and not touch any of your existing environments, -nor any existing Python installation. +This is similar to "activating" an environment in Conda. To exit this shell type ``exit`` or press ``Ctrl-D``. -To view your environments:: +All these Pixi environments and tasks are defined in the ``pixi.toml`` file in the root of the repository. - conda info -e -To return to your root environment:: +Install pre-commit hooks +------------------------- - conda deactivate +You can either run pre-commit manually via Pixi as described above, or set up git hooks to run pre-commit automatically. -See the full `conda docs here `__. +This is done by: -Install pre-commit hooks ------------------------- +.. code-block:: sh + pixi shell -e pre-commit # enter the pre-commit environment + pre-commit install # install the git hooks -We highly recommend that you setup `pre-commit `_ hooks to automatically -run all the above tools every time you make a git commit. To install the hooks:: + # or - python -m pip install pre-commit - pre-commit install + pre-commit uninstall # uninstall the git hooks -This can be done by running: :: +Now, every time you make a git commit, all the pre-commit hooks will be run automatically using the pre-commit that comes +with Pixi. - pre-commit run +Alternatively you can use a separate installation of ``pre-commit`` (e.g., install globally using Pixi (``pixi install -g pre_commit``), or via `Homebrew `_ ). -from the root of the xarray repository. You can skip the pre-commit checks with -``git commit --no-verify``. +If you want to commit without running ``pre-commit`` hooks, you can use ``git commit --no-verify``. Update the ``main`` branch @@ -276,11 +272,6 @@ request. If you have uncommitted changes, you will need to ``git stash`` them prior to updating. This will effectively store your changes, which can be reapplied after updating. -If the *xarray* ``main`` branch version has updated since you last fetched changes, -you may also wish to reinstall xarray so that the pip version reflects the *xarray* -version:: - - pip install -e . Create a new feature branch --------------------------- @@ -433,29 +424,10 @@ How to build the *xarray* documentation Requirements ~~~~~~~~~~~~ -Make sure to follow the instructions on :ref:`creating a development environment` above, but -to build the docs you need to use the environment file ``ci/requirements/doc.yml``. -You should also use this environment and these steps if you want to view changes you've made to the docstrings. - -.. code-block:: sh - - # Create and activate the docs environment - conda env create -f ci/requirements/doc.yml - conda activate xarray-docs - - # or with older versions of Anaconda: - source activate xarray-docs - - # Build and install a local, editable version of xarray - pip install -e . - -Building the documentation -~~~~~~~~~~~~~~~~~~~~~~~~~~ - -To build the documentation run:: +Make sure to follow the instructions on :ref:`creating a development environment` above. Once you +have Pixi installed - you can build the documentation using the command:: - cd doc/ - make html + pixi run doc Then you can find the HTML output files in the folder ``xarray/doc/_build/html/``. @@ -475,8 +447,7 @@ evocations, Sphinx will try to only build the pages that have been modified. If you want to do a full clean build, do:: - make clean - make html + pixi run doc-clean Writing ReST pages ------------------