Skip to content

Commit 4379f29

Browse files
committed
Merge branch 'main' into fix-7794
2 parents 1365746 + 0184702 commit 4379f29

File tree

229 files changed

+12209
-5230
lines changed

Some content is hidden

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

229 files changed

+12209
-5230
lines changed

.binder/environment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ dependencies:
1616
- h5py
1717
- hdf5
1818
- iris
19-
- lxml # Optional dep of pydap
19+
- lxml # Optional dep of pydap
2020
- matplotlib
2121
- nc-time-axis
2222
- netcdf4

.codecov.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ coverage:
1010
flags:
1111
- unittests
1212
paths:
13-
- "!xarray/tests/"
13+
- "!xarray/tests/"
1414
unittests:
1515
target: 90%
1616
flags:

.github/ISSUE_TEMPLATE/bugreport.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ body:
3737
Please confirm that the bug report is in an excellent state, so we can understand & fix it quickly & efficiently. For more details, check out:
3838
3939
- [Minimal Complete Verifiable Examples](https://stackoverflow.com/help/mcve)
40-
- [Craft Minimal Bug Reports](http://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports)
40+
- [Craft Minimal Bug Reports](https://matthewrocklin.com/minimal-bug-reports)
4141
4242
options:
4343
- label: Minimal example — the example is as focused as reasonably possible to demonstrate the underlying issue in xarray.

.github/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ newIssueWelcomeComment: >
1414
newPRWelcomeComment: >
1515
Thank you for opening this pull request! It may take us a few days to respond here, so thank you for being patient.
1616
17-
If you have questions, some answers may be found in our [contributing guidelines](http://docs.xarray.dev/en/stable/contributing.html).
17+
If you have questions, some answers may be found in our [contributing guidelines](https://docs.xarray.dev/en/stable/contributing.html).
1818
1919
# Comment to be posted to on pull requests merged by a first time user
2020
firstPRMergeComment: >

.github/dependabot.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
version: 2
22
updates:
3-
- package-ecosystem: 'github-actions'
4-
directory: '/'
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
55
schedule:
66
# Check for updates once a week
7-
interval: 'weekly'
7+
interval: "weekly"
88
groups:
99
actions:
1010
patterns:

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,15 @@ jobs:
2424
- name: Set up conda environment
2525
uses: mamba-org/setup-micromamba@v2
2626
with:
27+
micromamba-version: "1.5.10-0"
2728
environment-file: ${{env.CONDA_ENV_FILE}}
2829
environment-name: xarray-tests
2930
cache-environment: true
3031
cache-environment-key: "${{runner.os}}-${{runner.arch}}-py${{env.PYTHON_VERSION}}-${{env.TODAY}}-${{hashFiles(env.CONDA_ENV_FILE)}}-benchmark"
3132
create-args: >-
3233
asv
3334
34-
- name: 'Get Previous tag'
35+
- name: "Get Previous tag"
3536
id: previoustag
3637
uses: "WyriHaximus/github-action-get-previous-tag@v1"
3738
# with:

.github/workflows/benchmarks.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ jobs:
2727
- name: Set up conda environment
2828
uses: mamba-org/setup-micromamba@v2
2929
with:
30+
micromamba-version: "1.5.10-0"
3031
environment-file: ${{env.CONDA_ENV_FILE}}
3132
environment-name: xarray-tests
3233
cache-environment: true
@@ -35,8 +36,7 @@ jobs:
3536
create-args: >-
3637
asv
3738
python-build
38-
mamba
39-
39+
mamba<=1.5.10
4040
4141
- name: Run benchmarks
4242
shell: bash -l {0}

.github/workflows/ci-additional.yaml

Lines changed: 15 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ jobs:
6161
environment-name: xarray-tests
6262
create-args: >-
6363
python=${{env.PYTHON_VERSION}}
64-
conda
6564
cache-environment: true
6665
cache-environment-key: "${{runner.os}}-${{runner.arch}}-py${{env.PYTHON_VERSION}}-${{env.TODAY}}-${{hashFiles(env.CONDA_ENV_FILE)}}"
6766

@@ -70,8 +69,6 @@ jobs:
7069
python -m pip install --no-deps -e .
7170
- name: Version info
7271
run: |
73-
conda info -a
74-
conda list
7572
python xarray/util/print_versions.py
7673
- name: Run doctests
7774
run: |
@@ -109,27 +106,24 @@ jobs:
109106
environment-name: xarray-tests
110107
create-args: >-
111108
python=${{env.PYTHON_VERSION}}
112-
conda
113109
cache-environment: true
114110
cache-environment-key: "${{runner.os}}-${{runner.arch}}-py${{env.PYTHON_VERSION}}-${{env.TODAY}}-${{hashFiles(env.CONDA_ENV_FILE)}}"
115111
- name: Install xarray
116112
run: |
117113
python -m pip install --no-deps -e .
118114
- name: Version info
119115
run: |
120-
conda info -a
121-
conda list
122116
python xarray/util/print_versions.py
123117
- name: Install mypy
124118
run: |
125-
python -m pip install "mypy==1.13" --force-reinstall
119+
python -m pip install "mypy==1.15" --force-reinstall
126120
127121
- name: Run mypy
128122
run: |
129123
python -m mypy --install-types --non-interactive --cobertura-xml-report mypy_report
130124
131125
- name: Upload mypy coverage to Codecov
132-
uses: codecov/codecov-action@v4.6.0
126+
uses: codecov/codecov-action@v5.3.1
133127
with:
134128
file: mypy_report/cobertura.xml
135129
flags: mypy
@@ -163,27 +157,24 @@ jobs:
163157
environment-name: xarray-tests
164158
create-args: >-
165159
python=${{env.PYTHON_VERSION}}
166-
conda
167160
cache-environment: true
168161
cache-environment-key: "${{runner.os}}-${{runner.arch}}-py${{env.PYTHON_VERSION}}-${{env.TODAY}}-${{hashFiles(env.CONDA_ENV_FILE)}}"
169162
- name: Install xarray
170163
run: |
171164
python -m pip install --no-deps -e .
172165
- name: Version info
173166
run: |
174-
conda info -a
175-
conda list
176167
python xarray/util/print_versions.py
177168
- name: Install mypy
178169
run: |
179-
python -m pip install "mypy==1.13" --force-reinstall
170+
python -m pip install "mypy==1.15" --force-reinstall
180171
181172
- name: Run mypy
182173
run: |
183174
python -m mypy --install-types --non-interactive --cobertura-xml-report mypy_report
184175
185176
- name: Upload mypy coverage to Codecov
186-
uses: codecov/codecov-action@v4.6.0
177+
uses: codecov/codecov-action@v5.3.1
187178
with:
188179
file: mypy_report/cobertura.xml
189180
flags: mypy-min
@@ -222,16 +213,13 @@ jobs:
222213
environment-name: xarray-tests
223214
create-args: >-
224215
python=${{env.PYTHON_VERSION}}
225-
conda
226216
cache-environment: true
227217
cache-environment-key: "${{runner.os}}-${{runner.arch}}-py${{env.PYTHON_VERSION}}-${{env.TODAY}}-${{hashFiles(env.CONDA_ENV_FILE)}}"
228218
- name: Install xarray
229219
run: |
230220
python -m pip install --no-deps -e .
231221
- name: Version info
232222
run: |
233-
conda info -a
234-
conda list
235223
python xarray/util/print_versions.py
236224
- name: Install pyright
237225
run: |
@@ -242,7 +230,7 @@ jobs:
242230
python -m pyright xarray/
243231
244232
- name: Upload pyright coverage to Codecov
245-
uses: codecov/codecov-action@v4.6.0
233+
uses: codecov/codecov-action@v5.3.1
246234
with:
247235
file: pyright_report/cobertura.xml
248236
flags: pyright
@@ -281,16 +269,13 @@ jobs:
281269
environment-name: xarray-tests
282270
create-args: >-
283271
python=${{env.PYTHON_VERSION}}
284-
conda
285272
cache-environment: true
286273
cache-environment-key: "${{runner.os}}-${{runner.arch}}-py${{env.PYTHON_VERSION}}-${{env.TODAY}}-${{hashFiles(env.CONDA_ENV_FILE)}}"
287274
- name: Install xarray
288275
run: |
289276
python -m pip install --no-deps -e .
290277
- name: Version info
291278
run: |
292-
conda info -a
293-
conda list
294279
python xarray/util/print_versions.py
295280
- name: Install pyright
296281
run: |
@@ -301,7 +286,7 @@ jobs:
301286
python -m pyright xarray/
302287
303288
- name: Upload pyright coverage to Codecov
304-
uses: codecov/codecov-action@v4.6.0
289+
uses: codecov/codecov-action@v5.3.1
305290
with:
306291
file: pyright_report/cobertura.xml
307292
flags: pyright39
@@ -318,6 +303,9 @@ jobs:
318303
run:
319304
shell: bash -l {0}
320305

306+
env:
307+
COLUMNS: 120
308+
321309
steps:
322310
- uses: actions/checkout@v4
323311
with:
@@ -330,13 +318,16 @@ jobs:
330318
create-args: >-
331319
python=3.12
332320
pyyaml
333-
conda
334321
python-dateutil
322+
cytoolz
323+
rich
324+
rich-click
325+
py-rattler
335326
336327
- name: All-deps minimum versions policy
337328
run: |
338-
python ci/min_deps_check.py ci/requirements/min-all-deps.yml
329+
python ci/minimum_versions.py ci/requirements/min-all-deps.yml
339330
340331
- name: Bare minimum versions policy
341332
run: |
342-
python ci/min_deps_check.py ci/requirements/bare-minimum.yml
333+
python ci/minimum_versions.py ci/requirements/bare-minimum.yml

.github/workflows/ci.yaml

Lines changed: 26 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
matrix:
4848
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
4949
# Bookend python versions
50-
python-version: ["3.10", "3.12"]
50+
python-version: ["3.10", "3.13"]
5151
env: [""]
5252
include:
5353
# Minimum python version:
@@ -59,14 +59,23 @@ jobs:
5959
os: ubuntu-latest
6060
# Latest python version:
6161
- env: "all-but-numba"
62-
python-version: "3.12"
62+
python-version: "3.13"
6363
os: ubuntu-latest
6464
- env: "all-but-dask"
65-
# Not 3.12 because of pint
66-
python-version: "3.11"
65+
python-version: "3.12"
6766
os: ubuntu-latest
6867
- env: "flaky"
69-
python-version: "3.12"
68+
python-version: "3.13"
69+
os: ubuntu-latest
70+
# The mypy tests must be executed using only 1 process in order to guarantee
71+
# predictable mypy output messages for comparison to expectations.
72+
- env: "mypy"
73+
python-version: "3.10"
74+
numprocesses: 1
75+
os: ubuntu-latest
76+
- env: "mypy"
77+
python-version: "3.13"
78+
numprocesses: 1
7079
os: ubuntu-latest
7180
steps:
7281
- uses: actions/checkout@v4
@@ -78,17 +87,21 @@ jobs:
7887
7988
if [[ ${{ matrix.os }} == windows* ]] ;
8089
then
81-
if [[ ${{ matrix.python-version }} != "3.13" ]]; then
90+
if [[ ${{ matrix.python-version }} != "3.14" ]]; then
8291
echo "CONDA_ENV_FILE=ci/requirements/environment-windows.yml" >> $GITHUB_ENV
8392
else
84-
echo "CONDA_ENV_FILE=ci/requirements/environment-windows-3.13.yml" >> $GITHUB_ENV
93+
echo "CONDA_ENV_FILE=ci/requirements/environment-windows-3.14.yml" >> $GITHUB_ENV
8594
fi
8695
elif [[ "${{ matrix.env }}" != "" ]] ;
8796
then
8897
if [[ "${{ matrix.env }}" == "flaky" ]] ;
8998
then
9099
echo "CONDA_ENV_FILE=ci/requirements/environment.yml" >> $GITHUB_ENV
91100
echo "PYTEST_ADDOPTS=-m 'flaky or network' --run-flaky --run-network-tests -W default" >> $GITHUB_ENV
101+
elif [[ "${{ matrix.env }}" == "mypy" ]] ;
102+
then
103+
echo "CONDA_ENV_FILE=ci/requirements/environment.yml" >> $GITHUB_ENV
104+
echo "PYTEST_ADDOPTS=-n 1 -m 'mypy' --run-mypy -W default" >> $GITHUB_ENV
92105
else
93106
echo "CONDA_ENV_FILE=ci/requirements/${{ matrix.env }}.yml" >> $GITHUB_ENV
94107
fi
@@ -98,10 +111,10 @@ jobs:
98111
echo "PYTEST_ADDOPTS=-W default" >> $GITHUB_ENV
99112
fi
100113
else
101-
if [[ ${{ matrix.python-version }} != "3.13" ]]; then
114+
if [[ ${{ matrix.python-version }} != "3.14" ]]; then
102115
echo "CONDA_ENV_FILE=ci/requirements/environment.yml" >> $GITHUB_ENV
103116
else
104-
echo "CONDA_ENV_FILE=ci/requirements/environment-3.13.yml" >> $GITHUB_ENV
117+
echo "CONDA_ENV_FILE=ci/requirements/environment-3.14.yml" >> $GITHUB_ENV
105118
fi
106119
fi
107120
@@ -116,7 +129,6 @@ jobs:
116129
cache-environment-key: "${{runner.os}}-${{runner.arch}}-py${{matrix.python-version}}-${{env.TODAY}}-${{hashFiles(env.CONDA_ENV_FILE)}}"
117130
create-args: >-
118131
python=${{matrix.python-version}}
119-
conda
120132
121133
# We only want to install this on one run, because otherwise we'll have
122134
# duplicate annotations.
@@ -131,8 +143,6 @@ jobs:
131143
132144
- name: Version info
133145
run: |
134-
conda info -a
135-
conda list
136146
python xarray/util/print_versions.py
137147
138148
- name: Import xarray
@@ -148,7 +158,7 @@ jobs:
148158
save-always: true
149159

150160
- name: Run tests
151-
run: python -m pytest -n 4
161+
run: python -m pytest -n ${{ matrix.numprocesses || 4 }}
152162
--timeout 180
153163
--cov=xarray
154164
--cov-report=xml
@@ -162,7 +172,9 @@ jobs:
162172
path: pytest.xml
163173

164174
- name: Upload code coverage to Codecov
165-
uses: codecov/[email protected]
175+
uses: codecov/[email protected]
176+
env:
177+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
166178
with:
167179
file: ./coverage.xml
168180
flags: unittests

.github/workflows/hypothesis.yaml

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,12 @@ jobs:
3737
runs-on: "ubuntu-latest"
3838
needs: detect-ci-trigger
3939
if: |
40-
always()
41-
&& (
42-
needs.detect-ci-trigger.outputs.triggered == 'false'
43-
&& ( (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch')
44-
|| contains( github.event.pull_request.labels.*.name, 'run-slow-hypothesis'))
45-
)
40+
always()
41+
&& (
42+
needs.detect-ci-trigger.outputs.triggered == 'false'
43+
&& ( (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch')
44+
|| contains( github.event.pull_request.labels.*.name, 'run-slow-hypothesis'))
45+
)
4646
defaults:
4747
run:
4848
shell: bash -l {0}
@@ -76,8 +76,6 @@ jobs:
7676
python -m pip install --no-deps -e .
7777
- name: Version info
7878
run: |
79-
conda info -a
80-
conda list
8179
python xarray/util/print_versions.py
8280
8381
# https://github.com/actions/cache/blob/main/tips-and-workarounds.md#update-a-cache
@@ -94,8 +92,8 @@ jobs:
9492
if: success()
9593
id: status
9694
run: |
97-
python -m pytest --hypothesis-show-statistics --run-slow-hypothesis properties/*.py \
98-
--report-log output-${{ matrix.python-version }}-log.jsonl
95+
python -m pytest --hypothesis-show-statistics --run-slow-hypothesis properties/*.py \
96+
--report-log output-${{ matrix.python-version }}-log.jsonl
9997
10098
# explicitly save the cache so it gets updated, also do this even if it fails.
10199
- name: Save cached hypothesis directory

0 commit comments

Comments
 (0)