Skip to content

Commit 1365746

Browse files
authored
Merge branch 'main' into fix-7794
2 parents 1221750 + fc05da9 commit 1365746

File tree

277 files changed

+24542
-14394
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

277 files changed

+24542
-14394
lines changed

.binder/environment.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ dependencies:
2828
- pip
2929
- pooch
3030
- pydap
31-
- pynio
3231
- rasterio
3332
- scipy
3433
- seaborn

.github/FUNDING.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
github: numfocus
2-
custom: http://numfocus.org/donate-to-xarray
2+
custom: https://numfocus.org/donate-to-xarray

.github/release.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
changelog:
2+
exclude:
3+
authors:
4+
- dependabot
5+
- pre-commit-ci

.github/workflows/benchmarks-last-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
fetch-depth: 0
2323

2424
- name: Set up conda environment
25-
uses: mamba-org/setup-micromamba@v1
25+
uses: mamba-org/setup-micromamba@v2
2626
with:
2727
environment-file: ${{env.CONDA_ENV_FILE}}
2828
environment-name: xarray-tests

.github/workflows/benchmarks.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ on:
55
types: [opened, reopened, synchronize, labeled]
66
workflow_dispatch:
77

8+
env:
9+
PR_HEAD_LABEL: ${{ github.event.pull_request.head.label }}
10+
811
jobs:
912
benchmark:
1013
if: ${{ contains( github.event.pull_request.labels.*.name, 'run-benchmark') && github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' }}
@@ -22,14 +25,17 @@ jobs:
2225
fetch-depth: 0
2326

2427
- name: Set up conda environment
25-
uses: mamba-org/setup-micromamba@v1
28+
uses: mamba-org/setup-micromamba@v2
2629
with:
2730
environment-file: ${{env.CONDA_ENV_FILE}}
2831
environment-name: xarray-tests
2932
cache-environment: true
3033
cache-environment-key: "${{runner.os}}-${{runner.arch}}-py${{env.PYTHON_VERSION}}-${{env.TODAY}}-${{hashFiles(env.CONDA_ENV_FILE)}}-benchmark"
34+
# add "build" because of https://github.com/airspeed-velocity/asv/issues/1385
3135
create-args: >-
3236
asv
37+
python-build
38+
mamba
3339
3440
3541
- name: Run benchmarks
@@ -46,10 +52,7 @@ jobs:
4652
# ID this runner
4753
asv machine --yes
4854
echo "Baseline: ${{ github.event.pull_request.base.sha }} (${{ github.event.pull_request.base.label }})"
49-
echo "Contender: ${GITHUB_SHA} (${{ github.event.pull_request.head.label }})"
50-
# Use mamba for env creation
51-
# export CONDA_EXE=$(which mamba)
52-
export CONDA_EXE=$(which conda)
55+
echo "Contender: ${GITHUB_SHA} ($PR_HEAD_LABEL)"
5356
# Run benchmarks for current commit against base
5457
ASV_OPTIONS="--split --show-stderr --factor $ASV_FACTOR"
5558
asv continuous $ASV_OPTIONS ${{ github.event.pull_request.base.sha }} ${GITHUB_SHA} \

.github/workflows/ci-additional.yaml

Lines changed: 37 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ concurrency:
1212
group: ${{ github.workflow }}-${{ github.ref }}
1313
cancel-in-progress: true
1414

15+
env:
16+
FORCE_COLOR: 3
17+
1518
jobs:
1619
detect-ci-trigger:
1720
name: detect ci trigger
@@ -35,14 +38,13 @@ jobs:
3538
runs-on: "ubuntu-latest"
3639
needs: detect-ci-trigger
3740
if: needs.detect-ci-trigger.outputs.triggered == 'false'
41+
3842
defaults:
3943
run:
4044
shell: bash -l {0}
41-
4245
env:
4346
CONDA_ENV_FILE: ci/requirements/environment.yml
44-
PYTHON_VERSION: "3.11"
45-
47+
PYTHON_VERSION: "3.12"
4648
steps:
4749
- uses: actions/checkout@v4
4850
with:
@@ -53,7 +55,7 @@ jobs:
5355
echo "TODAY=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
5456
5557
- name: Setup micromamba
56-
uses: mamba-org/setup-micromamba@v1
58+
uses: mamba-org/setup-micromamba@v2
5759
with:
5860
environment-file: ${{env.CONDA_ENV_FILE}}
5961
environment-name: xarray-tests
@@ -79,8 +81,7 @@ jobs:
7981
#
8082
# If dependencies emit warnings we can't do anything about, add ignores to
8183
# `xarray/tests/__init__.py`.
82-
# [MHS, 01/25/2024] Skip datatree_ documentation remove after #8572
83-
python -m pytest --doctest-modules xarray --ignore xarray/tests --ignore xarray/datatree_ -Werror
84+
python -m pytest --doctest-modules xarray --ignore xarray/tests -Werror
8485
8586
mypy:
8687
name: Mypy
@@ -91,7 +92,7 @@ jobs:
9192
shell: bash -l {0}
9293
env:
9394
CONDA_ENV_FILE: ci/requirements/environment.yml
94-
PYTHON_VERSION: "3.11"
95+
PYTHON_VERSION: "3.12"
9596

9697
steps:
9798
- uses: actions/checkout@v4
@@ -102,7 +103,7 @@ jobs:
102103
run: |
103104
echo "TODAY=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
104105
- name: Setup micromamba
105-
uses: mamba-org/setup-micromamba@v1
106+
uses: mamba-org/setup-micromamba@v2
106107
with:
107108
environment-file: ${{env.CONDA_ENV_FILE}}
108109
environment-name: xarray-tests
@@ -121,31 +122,31 @@ jobs:
121122
python xarray/util/print_versions.py
122123
- name: Install mypy
123124
run: |
124-
python -m pip install "mypy<1.9" --force-reinstall
125+
python -m pip install "mypy==1.13" --force-reinstall
125126
126127
- name: Run mypy
127128
run: |
128-
python -m mypy --install-types --non-interactive --cobertura-xml-report mypy_report xarray/
129+
python -m mypy --install-types --non-interactive --cobertura-xml-report mypy_report
129130
130131
- name: Upload mypy coverage to Codecov
131-
uses: codecov/codecov-action@v4.1.0
132+
uses: codecov/codecov-action@v4.6.0
132133
with:
133134
file: mypy_report/cobertura.xml
134135
flags: mypy
135136
env_vars: PYTHON_VERSION
136137
name: codecov-umbrella
137138
fail_ci_if_error: false
138139

139-
mypy39:
140-
name: Mypy 3.9
140+
mypy-min:
141+
name: Mypy 3.10
141142
runs-on: "ubuntu-latest"
142143
needs: detect-ci-trigger
143144
defaults:
144145
run:
145146
shell: bash -l {0}
146147
env:
147148
CONDA_ENV_FILE: ci/requirements/environment.yml
148-
PYTHON_VERSION: "3.9"
149+
PYTHON_VERSION: "3.10"
149150

150151
steps:
151152
- uses: actions/checkout@v4
@@ -156,7 +157,7 @@ jobs:
156157
run: |
157158
echo "TODAY=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
158159
- name: Setup micromamba
159-
uses: mamba-org/setup-micromamba@v1
160+
uses: mamba-org/setup-micromamba@v2
160161
with:
161162
environment-file: ${{env.CONDA_ENV_FILE}}
162163
environment-name: xarray-tests
@@ -175,38 +176,36 @@ jobs:
175176
python xarray/util/print_versions.py
176177
- name: Install mypy
177178
run: |
178-
python -m pip install "mypy<1.9" --force-reinstall
179+
python -m pip install "mypy==1.13" --force-reinstall
179180
180181
- name: Run mypy
181182
run: |
182-
python -m mypy --install-types --non-interactive --cobertura-xml-report mypy_report xarray/
183+
python -m mypy --install-types --non-interactive --cobertura-xml-report mypy_report
183184
184185
- name: Upload mypy coverage to Codecov
185-
uses: codecov/codecov-action@v4.1.0
186+
uses: codecov/codecov-action@v4.6.0
186187
with:
187188
file: mypy_report/cobertura.xml
188-
flags: mypy39
189+
flags: mypy-min
189190
env_vars: PYTHON_VERSION
190191
name: codecov-umbrella
191192
fail_ci_if_error: false
192193

193-
194-
195194
pyright:
196195
name: Pyright
197196
runs-on: "ubuntu-latest"
198197
needs: detect-ci-trigger
199198
if: |
200-
always()
201-
&& (
202-
contains( github.event.pull_request.labels.*.name, 'run-pyright')
203-
)
199+
always()
200+
&& (
201+
contains( github.event.pull_request.labels.*.name, 'run-pyright')
202+
)
204203
defaults:
205204
run:
206205
shell: bash -l {0}
207206
env:
208207
CONDA_ENV_FILE: ci/requirements/environment.yml
209-
PYTHON_VERSION: "3.10"
208+
PYTHON_VERSION: "3.12"
210209

211210
steps:
212211
- uses: actions/checkout@v4
@@ -217,7 +216,7 @@ jobs:
217216
run: |
218217
echo "TODAY=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
219218
- name: Setup micromamba
220-
uses: mamba-org/setup-micromamba@v1
219+
uses: mamba-org/setup-micromamba@v2
221220
with:
222221
environment-file: ${{env.CONDA_ENV_FILE}}
223222
environment-name: xarray-tests
@@ -243,7 +242,7 @@ jobs:
243242
python -m pyright xarray/
244243
245244
- name: Upload pyright coverage to Codecov
246-
uses: codecov/codecov-action@v4.1.0
245+
uses: codecov/codecov-action@v4.6.0
247246
with:
248247
file: pyright_report/cobertura.xml
249248
flags: pyright
@@ -252,20 +251,20 @@ jobs:
252251
fail_ci_if_error: false
253252

254253
pyright39:
255-
name: Pyright 3.9
254+
name: Pyright 3.10
256255
runs-on: "ubuntu-latest"
257256
needs: detect-ci-trigger
258257
if: |
259-
always()
260-
&& (
261-
contains( github.event.pull_request.labels.*.name, 'run-pyright')
262-
)
258+
always()
259+
&& (
260+
contains( github.event.pull_request.labels.*.name, 'run-pyright')
261+
)
263262
defaults:
264263
run:
265264
shell: bash -l {0}
266265
env:
267266
CONDA_ENV_FILE: ci/requirements/environment.yml
268-
PYTHON_VERSION: "3.9"
267+
PYTHON_VERSION: "3.10"
269268

270269
steps:
271270
- uses: actions/checkout@v4
@@ -276,7 +275,7 @@ jobs:
276275
run: |
277276
echo "TODAY=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
278277
- name: Setup micromamba
279-
uses: mamba-org/setup-micromamba@v1
278+
uses: mamba-org/setup-micromamba@v2
280279
with:
281280
environment-file: ${{env.CONDA_ENV_FILE}}
282281
environment-name: xarray-tests
@@ -302,16 +301,14 @@ jobs:
302301
python -m pyright xarray/
303302
304303
- name: Upload pyright coverage to Codecov
305-
uses: codecov/codecov-action@v4.1.0
304+
uses: codecov/codecov-action@v4.6.0
306305
with:
307306
file: pyright_report/cobertura.xml
308307
flags: pyright39
309308
env_vars: PYTHON_VERSION
310309
name: codecov-umbrella
311310
fail_ci_if_error: false
312311

313-
314-
315312
min-version-policy:
316313
name: Minimum Version Policy
317314
runs-on: "ubuntu-latest"
@@ -327,11 +324,11 @@ jobs:
327324
fetch-depth: 0 # Fetch all history for all branches and tags.
328325

329326
- name: Setup micromamba
330-
uses: mamba-org/setup-micromamba@v1
327+
uses: mamba-org/setup-micromamba@v2
331328
with:
332329
environment-name: xarray-tests
333330
create-args: >-
334-
python=3.11
331+
python=3.12
335332
pyyaml
336333
conda
337334
python-dateutil

0 commit comments

Comments
 (0)