Skip to content

Commit 6827a61

Browse files
d-v-bclaude
andauthored
Revert "fix: make xarray downstream tests work" (#4047)
* Revert "fix: make xarray downstream tests work (#4043)" This reverts commit b9d3964. * ci: install only the test-py313 pixi environment for xarray downstream With no committed pixi.lock in pydata/xarray, setup-pixi's bare `pixi install` solves every environment in the manifest, including `mypy-upstream`, which sources numcodecs from git and fails under newer pixi with `meson-python: error: Unknown option "pixi-conda-environment"` during the solve — before any test runs. Setting `environments: test-py313` makes setup-pixi run `pixi install -e test-py313`, which never solves that environment. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * ci: run xarray downstream tests via uv instead of pixi pixi has no committed lockfile in pydata/xarray, so `pixi install` solves the entire manifest regardless of `-e <env>` — including the `mypy-upstream` environment, which sources numcodecs from git and fails to build under newer pixi with `meson-python: error: Unknown option "pixi-conda-environment"`. The job died at environment setup before any test ran, and the per-environment flag (the previously reverted approach) does not avoid the failing solve. Install xarray with uv from its checkout instead — the `dev` dependency group for pytest tooling plus the `io`/`parallel`/`accel` extras for the zarr-relevant backends — then override zarr with the branch build. Tests needing an uninstalled backend skip via xarray's `requires_*` markers. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 0734666 commit 6827a61

1 file changed

Lines changed: 25 additions & 15 deletions

File tree

.github/workflows/downstream.yml

Lines changed: 25 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -33,34 +33,44 @@ jobs:
3333
path: xarray
3434
persist-credentials: false
3535

36-
- name: Set up pixi
37-
uses: prefix-dev/setup-pixi@5185adfbffb4bd703da3010310260805d89ebb11 # v0.9.6
36+
# We install xarray with plain pip/uv rather than pixi. pixi solves
37+
# xarray's entire manifest (it has no committed lockfile), which drags in
38+
# the `mypy-upstream` environment; that environment sources numcodecs from
39+
# git and fails to build under newer pixi with
40+
# `meson-python: error: Unknown option "pixi-conda-environment"`, breaking
41+
# the job before any test runs. Tests that need a backend we don't install
42+
# are skipped via xarray's `requires_*` markers, not failed.
43+
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
3844
with:
39-
manifest-path: xarray/pixi.toml
40-
# Only install the environment our steps use. Installing every
41-
# environment in xarray's manifest (the default) drags in
42-
# `mypy-upstream`, which builds numcodecs from git and fails under
43-
# newer pixi with `meson-python: error: Unknown option
44-
# "pixi-conda-environment"` — unrelated to the zarr-python branch
45-
# under test.
46-
environments: test-py313
47-
48-
- name: Install zarr-python from branch
45+
python-version: '3.13'
46+
47+
- name: Install uv
48+
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
49+
50+
- name: Install xarray and test dependencies
4951
working-directory: xarray
50-
run: pixi run -e test-py313 -- pip install --no-deps ..
52+
run: |
53+
uv venv
54+
# xarray's pytest tooling lives in the PEP 735 `dev` dependency group;
55+
# the zarr-relevant backends come from the `io` and `parallel` extras.
56+
uv pip install --group dev ".[io,parallel,accel]"
57+
58+
- name: Override zarr-python with branch version
59+
working-directory: xarray
60+
run: uv pip install --no-deps ..
5161

5262
- name: Show versions
5363
working-directory: xarray
5464
run: |
55-
pixi run -e test-py313 -- python -c "
65+
uv run python -c "
5666
import zarr; print(f'zarr {zarr.__version__}')
5767
import xarray; print(f'xarray {xarray.__version__}')
5868
"
5969
6070
- name: Run xarray zarr backend tests
6171
working-directory: xarray
6272
run: |
63-
pixi run -e test-py313 -- python -m pytest --no-header -q \
73+
uv run python -m pytest --no-header -q \
6474
xarray/tests/test_backends.py \
6575
xarray/tests/test_backends_api.py \
6676
xarray/tests/test_backends_datatree.py

0 commit comments

Comments
 (0)