Skip to content

Commit 87ab727

Browse files
authored
Merge branch 'main' into fix-11103-facetgrid-figsize-option
2 parents fff12ed + cf19e74 commit 87ab727

37 files changed

+618
-305
lines changed

.github/workflows/cache-pixi-lock.yml

Lines changed: 0 additions & 52 deletions
This file was deleted.

.github/workflows/ci-additional.yaml

Lines changed: 88 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ env:
1919
jobs:
2020
detect-ci-trigger:
2121
name: detect ci trigger
22-
runs-on: ubuntu-latest
22+
runs-on: ubuntu-slim
2323
if: |
2424
github.repository == 'pydata/xarray'
2525
&& (github.event_name == 'push' || github.event_name == 'pull_request')
@@ -34,15 +34,31 @@ jobs:
3434
id: detect-trigger
3535
with:
3636
keyword: "[skip-ci]"
37+
3738
cache-pixi-lock:
38-
uses: ./.github/workflows/cache-pixi-lock.yml
39-
with:
40-
pixi-version: "v0.63.2" # keep in sync with env var above
39+
needs: detect-ci-trigger
40+
if: needs.detect-ci-trigger.outputs.triggered == 'false'
41+
runs-on: ubuntu-latest
42+
43+
outputs:
44+
cache-key: ${{ steps.pixi-lock.outputs.cache-key }}
45+
pixi-version: ${{ steps.pixi-lock.outputs.pixi-version }}
46+
47+
steps:
48+
- uses: actions/checkout@v6
49+
- uses: Parcels-code/pixi-lock/create-and-cache@9a2866f8258b87a3c616d5ad7d51c6cd853df78b
50+
id: pixi-lock
51+
with:
52+
pixi-version: ${{env.PIXI_VERSION}}
53+
- uses: actions/upload-artifact@v6
54+
with:
55+
name: pixi-lock
56+
path: pixi.lock
57+
4158
doctest:
4259
name: Doctests
4360
runs-on: "ubuntu-latest"
44-
needs: [detect-ci-trigger, cache-pixi-lock]
45-
if: needs.detect-ci-trigger.outputs.triggered == 'false'
61+
needs: cache-pixi-lock
4662

4763
defaults:
4864
run:
@@ -59,16 +75,12 @@ jobs:
5975
echo "TODAY=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
6076
6177
- name: Restore cached pixi lockfile
62-
uses: actions/cache/restore@v5
63-
id: restore-pixi-lock
78+
uses: Parcels-code/pixi-lock/restore@9a2866f8258b87a3c616d5ad7d51c6cd853df78b
6479
with:
65-
enableCrossOsArchive: true
66-
path: |
67-
pixi.lock
68-
key: ${{ needs.cache-pixi-lock.outputs.cache-id }}
80+
cache-key: ${{ needs.cache-pixi-lock.outputs.cache-key }}
6981
- uses: prefix-dev/setup-pixi@v0.9.4
7082
with:
71-
pixi-version: ${{ env.PIXI_VERSION }}
83+
pixi-version: ${{ needs.cache-pixi-lock.outputs.pixi-version }}
7284
cache: true
7385
environments: ${{ env.PIXI_ENV }}
7486
cache-write: ${{ github.event_name == 'push' && github.ref_name == 'main' }}
@@ -89,7 +101,7 @@ jobs:
89101
mypy:
90102
name: Mypy
91103
runs-on: "ubuntu-latest"
92-
needs: [detect-ci-trigger, cache-pixi-lock]
104+
needs: cache-pixi-lock
93105
defaults:
94106
run:
95107
shell: bash -l {0}
@@ -101,16 +113,12 @@ jobs:
101113
with:
102114
fetch-depth: 0 # Fetch all history for all branches and tags.
103115
- name: Restore cached pixi lockfile
104-
uses: actions/cache/restore@v5
105-
id: restore-pixi-lock
116+
uses: Parcels-code/pixi-lock/restore@9a2866f8258b87a3c616d5ad7d51c6cd853df78b
106117
with:
107-
enableCrossOsArchive: true
108-
path: |
109-
pixi.lock
110-
key: ${{ needs.cache-pixi-lock.outputs.cache-id }}
118+
cache-key: ${{ needs.cache-pixi-lock.outputs.cache-key }}
111119
- uses: prefix-dev/setup-pixi@v0.9.4
112120
with:
113-
pixi-version: ${{ env.PIXI_VERSION }}
121+
pixi-version: ${{ needs.cache-pixi-lock.outputs.pixi-version }}
114122
cache: true
115123
environments: ${{ env.PIXI_ENV }}
116124
cache-write: ${{ github.event_name == 'push' && github.ref_name == 'main' }}
@@ -138,7 +146,7 @@ jobs:
138146
mypy-min:
139147
name: Mypy 3.11
140148
runs-on: "ubuntu-latest"
141-
needs: [detect-ci-trigger, cache-pixi-lock]
149+
needs: cache-pixi-lock
142150
defaults:
143151
run:
144152
shell: bash -l {0}
@@ -150,16 +158,12 @@ jobs:
150158
with:
151159
fetch-depth: 0 # Fetch all history for all branches and tags.
152160
- name: Restore cached pixi lockfile
153-
uses: actions/cache/restore@v5
154-
id: restore-pixi-lock
161+
uses: Parcels-code/pixi-lock/restore@9a2866f8258b87a3c616d5ad7d51c6cd853df78b
155162
with:
156-
enableCrossOsArchive: true
157-
path: |
158-
pixi.lock
159-
key: ${{ needs.cache-pixi-lock.outputs.cache-id }}
163+
cache-key: ${{ needs.cache-pixi-lock.outputs.cache-key }}
160164
- uses: prefix-dev/setup-pixi@v0.9.4
161165
with:
162-
pixi-version: ${{ env.PIXI_VERSION }}
166+
pixi-version: ${{ needs.cache-pixi-lock.outputs.pixi-version }}
163167
cache: true
164168
environments: ${{ env.PIXI_ENV }}
165169
cache-write: ${{ github.event_name == 'push' && github.ref_name == 'main' }}
@@ -184,10 +188,56 @@ jobs:
184188
name: codecov-umbrella
185189
fail_ci_if_error: false
186190

191+
stubtest:
192+
name: Stubtest
193+
runs-on: "ubuntu-latest"
194+
needs: [detect-ci-trigger, cache-pixi-lock]
195+
# Phase 1: Non-blocking (informational only)
196+
# Change to 'false' once stubtest is stable to make it required
197+
continue-on-error: true
198+
defaults:
199+
run:
200+
shell: bash -l {0}
201+
env:
202+
PIXI_ENV: test-py313-with-typing
203+
204+
steps:
205+
- uses: actions/checkout@v6
206+
with:
207+
fetch-depth: 0
208+
209+
- name: Restore cached pixi lockfile
210+
uses: Parcels-code/pixi-lock/restore@9a2866f8258b87a3c616d5ad7d51c6cd853df78b
211+
with:
212+
cache-key: ${{ needs.cache-pixi-lock.outputs.cache-key }}
213+
- uses: prefix-dev/setup-pixi@v0.9.4
214+
with:
215+
pixi-version: ${{ needs.cache-pixi-lock.outputs.pixi-version }}
216+
cache: true
217+
environments: ${{ env.PIXI_ENV }}
218+
cache-write: ${{ github.event_name == 'push' && github.ref_name == 'main' }}
219+
220+
- name: Version info
221+
run: |
222+
pixi run -e ${{env.PIXI_ENV}} -- python xarray/util/print_versions.py
223+
224+
- name: Install type stubs
225+
run: |
226+
pixi run -e ${{env.PIXI_ENV}} -- python -m mypy --install-types --non-interactive xarray/ || true
227+
228+
- name: Run stubtest (core modules)
229+
run: |
230+
pixi run -e ${{env.PIXI_ENV}} -- python -m mypy.stubtest \
231+
xarray.core.dataarray \
232+
xarray.core.dataset \
233+
xarray.core.variable \
234+
--mypy-config-file pyproject.toml \
235+
--allowlist _stubtest/allowlist.txt
236+
187237
pyright:
188238
name: Pyright | ${{ matrix.pixi-env }}"
189239
runs-on: "ubuntu-latest"
190-
needs: [detect-ci-trigger, cache-pixi-lock]
240+
needs: cache-pixi-lock
191241
strategy:
192242
fail-fast: false
193243
matrix:
@@ -207,16 +257,12 @@ jobs:
207257
fetch-depth: 0 # Fetch all history for all branches and tags.
208258

209259
- name: Restore cached pixi lockfile
210-
uses: actions/cache/restore@v5
211-
id: restore-pixi-lock
260+
uses: Parcels-code/pixi-lock/restore@9a2866f8258b87a3c616d5ad7d51c6cd853df78b
212261
with:
213-
enableCrossOsArchive: true
214-
path: |
215-
pixi.lock
216-
key: ${{ needs.cache-pixi-lock.outputs.cache-id }}
262+
cache-key: ${{ needs.cache-pixi-lock.outputs.cache-key }}
217263
- uses: prefix-dev/setup-pixi@v0.9.4
218264
with:
219-
pixi-version: ${{ env.PIXI_VERSION }}
265+
pixi-version: ${{ needs.cache-pixi-lock.outputs.pixi-version }}
220266
cache: true
221267
environments: ${{ matrix.pixi-env }}
222268
cache-write: ${{ github.event_name == 'push' && github.ref_name == 'main' }}
@@ -244,8 +290,8 @@ jobs:
244290
min-version-policy:
245291
name: Minimum Version Policy
246292
runs-on: "ubuntu-latest"
247-
needs: [detect-ci-trigger, cache-pixi-lock]
248-
if: needs.detect-ci-trigger.outputs.triggered == 'false'
293+
needs: cache-pixi-lock
294+
249295
defaults:
250296
run:
251297
shell: bash -l {0}
@@ -259,17 +305,13 @@ jobs:
259305
fetch-depth: 0 # Fetch all history for all branches and tags.
260306

261307
- name: Restore cached pixi lockfile
262-
uses: actions/cache/restore@v5
263-
id: restore-pixi-lock
308+
uses: Parcels-code/pixi-lock/restore@9a2866f8258b87a3c616d5ad7d51c6cd853df78b
264309
with:
265-
enableCrossOsArchive: true
266-
path: |
267-
pixi.lock
268-
key: ${{ needs.cache-pixi-lock.outputs.cache-id }}
310+
cache-key: ${{ needs.cache-pixi-lock.outputs.cache-key }}
269311

270312
- uses: prefix-dev/setup-pixi@v0.9.4
271313
with:
272-
pixi-version: ${{ env.PIXI_VERSION }}
314+
pixi-version: ${{ needs.cache-pixi-lock.outputs.pixi-version }}
273315
cache: true
274316
environments: "policy"
275317
cache-write: ${{ github.event_name == 'push' && github.ref_name == 'main' }}

.github/workflows/ci.yaml

Lines changed: 26 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ env:
1919
jobs:
2020
detect-ci-trigger:
2121
name: detect ci trigger
22-
runs-on: ubuntu-latest
22+
runs-on: ubuntu-slim
2323
if: |
2424
github.repository == 'pydata/xarray'
2525
&& (github.event_name == 'push' || github.event_name == 'pull_request')
@@ -36,14 +36,30 @@ jobs:
3636
keyword: "[skip-ci]"
3737

3838
cache-pixi-lock:
39-
uses: ./.github/workflows/cache-pixi-lock.yml
40-
with:
41-
pixi-version: "v0.63.2" # keep in sync with env var above
39+
needs: detect-ci-trigger
40+
if: needs.detect-ci-trigger.outputs.triggered == 'false'
41+
42+
runs-on: ubuntu-latest
43+
44+
outputs:
45+
cache-key: ${{ steps.pixi-lock.outputs.cache-key }}
46+
pixi-version: ${{ steps.pixi-lock.outputs.pixi-version }}
47+
48+
steps:
49+
- uses: actions/checkout@v6
50+
- uses: Parcels-code/pixi-lock/create-and-cache@9a2866f8258b87a3c616d5ad7d51c6cd853df78b
51+
id: pixi-lock
52+
with:
53+
pixi-version: ${{env.PIXI_VERSION}}
54+
- uses: actions/upload-artifact@v6
55+
with:
56+
name: pixi-lock
57+
path: pixi.lock
58+
4259
test:
4360
name: "${{ matrix.os }} | ${{ matrix.pixi-env }}${{ matrix.pytest-addopts && format(' ({0})', matrix.pytest-addopts) || '' }}"
4461
runs-on: ${{ matrix.os }}
45-
needs: [detect-ci-trigger, cache-pixi-lock]
46-
if: needs.detect-ci-trigger.outputs.triggered == 'false'
62+
needs: cache-pixi-lock
4763
defaults:
4864
run:
4965
shell: bash -l {0}
@@ -84,16 +100,12 @@ jobs:
84100
with:
85101
fetch-depth: 0 # Fetch all history for all branches and tags.
86102
- name: Restore cached pixi lockfile
87-
uses: actions/cache/restore@v5
88-
id: restore-pixi-lock
103+
uses: Parcels-code/pixi-lock/restore@9a2866f8258b87a3c616d5ad7d51c6cd853df78b
89104
with:
90-
enableCrossOsArchive: true
91-
path: |
92-
pixi.lock
93-
key: ${{ needs.cache-pixi-lock.outputs.cache-id }}
105+
cache-key: ${{ needs.cache-pixi-lock.outputs.cache-key }}
94106
- uses: prefix-dev/setup-pixi@v0.9.4
95107
with:
96-
pixi-version: ${{ env.PIXI_VERSION }}
108+
pixi-version: ${{ needs.cache-pixi-lock.outputs.pixi-version }}
97109
cache: true
98110
environments: ${{ matrix.pixi-env }}
99111
cache-write: ${{ github.event_name == 'push' && github.ref_name == 'main' }}
@@ -170,7 +182,7 @@ jobs:
170182

171183
event_file:
172184
name: "Event File"
173-
runs-on: ubuntu-latest
185+
runs-on: ubuntu-slim
174186
if: github.repository == 'pydata/xarray'
175187
steps:
176188
- name: Upload

0 commit comments

Comments
 (0)