Skip to content

Commit 53906e4

Browse files
committed
Merge branch 'main' into namedarray-parallelcompat
* main: (153 commits) Add overloads to get_axis_num (pydata#8547) Fix CI: temporary pin pytest version to 7.4.* (pydata#8682) Bump the actions group with 1 update (pydata#8678) [namedarray] split `.set_dims()` into `.expand_dims()` and `broadcast_to()` (pydata#8380) Add chunk-friendly code path to `encode_cf_datetime` and `encode_cf_timedelta` (pydata#8575) Fix NetCDF4 C version detection (pydata#8675) groupby: Don't set `method` by default on flox>=0.9 (pydata#8657) Fix automatic broadcasting when wrapping array api class (pydata#8669) Fix unstack method when wrapping array api class (pydata#8668) Fix `variables` arg typo in `Dataset.sortby()` docstring (pydata#8670) dt.weekday_name - removal of function (pydata#8664) Add `dev` dependencies to `pyproject.toml` (pydata#8661) CI: Pin scientific-python/upload-nightly-action to release sha (pydata#8662) Update HOW_TO_RELEASE.md by clarifying where RTD build can be found (pydata#8655) ruff: use extend-exclude (pydata#8649) new whats-new section (pydata#8652) xfail another test on windows (pydata#8648) use first element of residual in _nonpolyfit_1d (pydata#8647) whatsnew for v2024.01.1 implement `isnull` using `full_like` instead of `zeros_like` (pydata#7395) ...
2 parents 8a87810 + 81f38f3 commit 53906e4

File tree

160 files changed

+8131
-4629
lines changed

Some content is hidden

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

160 files changed

+8131
-4629
lines changed

.binder/environment.yml

+3-5
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,10 @@ name: xarray-examples
22
channels:
33
- conda-forge
44
dependencies:
5-
- python=3.9
5+
- python=3.10
66
- boto3
77
- bottleneck
88
- cartopy
9-
- cdms2
109
- cfgrib
1110
- cftime
1211
- coveralls
@@ -25,7 +24,7 @@ dependencies:
2524
- numpy
2625
- packaging
2726
- pandas
28-
- pint
27+
- pint>=0.22
2928
- pip
3029
- pooch
3130
- pydap
@@ -38,5 +37,4 @@ dependencies:
3837
- toolz
3938
- xarray
4039
- zarr
41-
- pip:
42-
- numbagg
40+
- numbagg

.github/dependabot.yml

+4
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,7 @@ updates:
55
schedule:
66
# Check for updates once a week
77
interval: 'weekly'
8+
groups:
9+
actions:
10+
patterns:
11+
- "*"

.github/labeler.yml

-85
This file was deleted.

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ jobs:
7272
cp benchmarks/README_CI.md benchmarks.log .asv/results/
7373
working-directory: ${{ env.ASV_DIR }}
7474

75-
- uses: actions/upload-artifact@v3
75+
- uses: actions/upload-artifact@v4
7676
if: always()
7777
with:
7878
name: asv-benchmark-results-${{ runner.os }}

.github/workflows/benchmarks.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77

88
jobs:
99
benchmark:
10-
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' }}
10+
if: ${{ contains( github.event.pull_request.labels.*.name, 'run-benchmark') && github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' }}
1111
name: Linux
1212
runs-on: ubuntu-20.04
1313
env:
@@ -67,7 +67,7 @@ jobs:
6767
cp benchmarks/README_CI.md benchmarks.log .asv/results/
6868
working-directory: ${{ env.ASV_DIR }}
6969

70-
- uses: actions/upload-artifact@v3
70+
- uses: actions/upload-artifact@v4
7171
if: always()
7272
with:
7373
name: asv-benchmark-results-${{ runner.os }}

.github/workflows/ci-additional.yaml

+20-18
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ name: CI Additional
22
on:
33
push:
44
branches:
5-
- "*"
5+
- "main"
66
pull_request:
77
branches:
8-
- "*"
8+
- "main"
99
workflow_dispatch: # allows you to trigger manually
1010

1111
concurrency:
@@ -41,7 +41,7 @@ jobs:
4141

4242
env:
4343
CONDA_ENV_FILE: ci/requirements/environment.yml
44-
PYTHON_VERSION: "3.10"
44+
PYTHON_VERSION: "3.11"
4545

4646
steps:
4747
- uses: actions/checkout@v4
@@ -76,6 +76,9 @@ jobs:
7676
# Raise an error if there are warnings in the doctests, with `-Werror`.
7777
# This is a trial; if it presents an problem, feel free to remove.
7878
# See https://github.com/pydata/xarray/issues/7164 for more info.
79+
#
80+
# If dependencies emit warnings we can't do anything about, add ignores to
81+
# `xarray/tests/__init__.py`.
7982
python -m pytest --doctest-modules xarray --ignore xarray/tests -Werror
8083
8184
mypy:
@@ -87,7 +90,7 @@ jobs:
8790
shell: bash -l {0}
8891
env:
8992
CONDA_ENV_FILE: ci/requirements/environment.yml
90-
PYTHON_VERSION: "3.10"
93+
PYTHON_VERSION: "3.11"
9194

9295
steps:
9396
- uses: actions/checkout@v4
@@ -117,14 +120,14 @@ jobs:
117120
python xarray/util/print_versions.py
118121
- name: Install mypy
119122
run: |
120-
python -m pip install mypy --force-reinstall
123+
python -m pip install "mypy<1.9" --force-reinstall
121124
122125
- name: Run mypy
123126
run: |
124127
python -m mypy --install-types --non-interactive --cobertura-xml-report mypy_report xarray/
125128
126129
- name: Upload mypy coverage to Codecov
127-
uses: codecov/[email protected].4
130+
uses: codecov/[email protected].5
128131
with:
129132
file: mypy_report/cobertura.xml
130133
flags: mypy
@@ -171,14 +174,14 @@ jobs:
171174
python xarray/util/print_versions.py
172175
- name: Install mypy
173176
run: |
174-
python -m pip install mypy --force-reinstall
177+
python -m pip install "mypy<1.9" --force-reinstall
175178
176179
- name: Run mypy
177180
run: |
178181
python -m mypy --install-types --non-interactive --cobertura-xml-report mypy_report xarray/
179182
180183
- name: Upload mypy coverage to Codecov
181-
uses: codecov/[email protected].4
184+
uses: codecov/[email protected].5
182185
with:
183186
file: mypy_report/cobertura.xml
184187
flags: mypy39
@@ -239,7 +242,7 @@ jobs:
239242
python -m pyright xarray/
240243
241244
- name: Upload pyright coverage to Codecov
242-
uses: codecov/[email protected].4
245+
uses: codecov/[email protected].5
243246
with:
244247
file: pyright_report/cobertura.xml
245248
flags: pyright
@@ -298,7 +301,7 @@ jobs:
298301
python -m pyright xarray/
299302
300303
- name: Upload pyright coverage to Codecov
301-
uses: codecov/[email protected].4
304+
uses: codecov/[email protected].5
302305
with:
303306
file: pyright_report/cobertura.xml
304307
flags: pyright39
@@ -317,11 +320,6 @@ jobs:
317320
run:
318321
shell: bash -l {0}
319322

320-
strategy:
321-
matrix:
322-
environment-file: ["bare-minimum", "min-all-deps"]
323-
fail-fast: false
324-
325323
steps:
326324
- uses: actions/checkout@v4
327325
with:
@@ -332,11 +330,15 @@ jobs:
332330
with:
333331
environment-name: xarray-tests
334332
create-args: >-
335-
python=3.10
333+
python=3.11
336334
pyyaml
337335
conda
338336
python-dateutil
339337
340-
- name: minimum versions policy
338+
- name: All-deps minimum versions policy
339+
run: |
340+
python ci/min_deps_check.py ci/requirements/min-all-deps.yml
341+
342+
- name: Bare minimum versions policy
341343
run: |
342-
python ci/min_deps_check.py ci/requirements/${{ matrix.environment-file }}.yml
344+
python ci/min_deps_check.py ci/requirements/bare-minimum.yml

.github/workflows/ci.yaml

+19-15
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ name: CI
22
on:
33
push:
44
branches:
5-
- "*"
5+
- "main"
66
pull_request:
77
branches:
8-
- "*"
8+
- "main"
99
workflow_dispatch: # allows you to trigger manually
1010

1111
concurrency:
@@ -34,6 +34,8 @@ jobs:
3434
runs-on: ${{ matrix.os }}
3535
needs: detect-ci-trigger
3636
if: needs.detect-ci-trigger.outputs.triggered == 'false'
37+
env:
38+
ZARR_V3_EXPERIMENTAL_API: 1
3739
defaults:
3840
run:
3941
shell: bash -l {0}
@@ -42,7 +44,7 @@ jobs:
4244
matrix:
4345
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
4446
# Bookend python versions
45-
python-version: ["3.9", "3.11"]
47+
python-version: ["3.9", "3.11", "3.12"]
4648
env: [""]
4749
include:
4850
# Minimum python version:
@@ -67,15 +69,13 @@ jobs:
6769
run: |
6870
echo "TODAY=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
6971
70-
if [[ "${{matrix.python-version}}" == "3.11" ]]; then
71-
if [[ ${{matrix.os}} == windows* ]]; then
72-
echo "CONDA_ENV_FILE=ci/requirements/environment-windows-py311.yml" >> $GITHUB_ENV
72+
if [[ ${{ matrix.os }} == windows* ]] ;
73+
then
74+
if [[ ${{ matrix.python-version }} != "3.12" ]]; then
75+
echo "CONDA_ENV_FILE=ci/requirements/environment-windows.yml" >> $GITHUB_ENV
7376
else
74-
echo "CONDA_ENV_FILE=ci/requirements/environment-py311.yml" >> $GITHUB_ENV
77+
echo "CONDA_ENV_FILE=ci/requirements/environment-windows-3.12.yml" >> $GITHUB_ENV
7578
fi
76-
elif [[ ${{ matrix.os }} == windows* ]] ;
77-
then
78-
echo "CONDA_ENV_FILE=ci/requirements/environment-windows.yml" >> $GITHUB_ENV
7979
elif [[ "${{ matrix.env }}" != "" ]] ;
8080
then
8181
if [[ "${{ matrix.env }}" == "flaky" ]] ;
@@ -86,7 +86,11 @@ jobs:
8686
echo "CONDA_ENV_FILE=ci/requirements/${{ matrix.env }}.yml" >> $GITHUB_ENV
8787
fi
8888
else
89-
echo "CONDA_ENV_FILE=ci/requirements/environment.yml" >> $GITHUB_ENV
89+
if [[ ${{ matrix.python-version }} != "3.12" ]]; then
90+
echo "CONDA_ENV_FILE=ci/requirements/environment.yml" >> $GITHUB_ENV
91+
else
92+
echo "CONDA_ENV_FILE=ci/requirements/environment-3.12.yml" >> $GITHUB_ENV
93+
fi
9094
fi
9195
9296
echo "PYTHON_VERSION=${{ matrix.python-version }}" >> $GITHUB_ENV
@@ -133,13 +137,13 @@ jobs:
133137

134138
- name: Upload test results
135139
if: always()
136-
uses: actions/upload-artifact@v3
140+
uses: actions/upload-artifact@v4
137141
with:
138-
name: Test results for ${{ runner.os }}-${{ matrix.python-version }}
142+
name: Test results for ${{ runner.os }}-${{ matrix.python-version }} ${{ matrix.env }}
139143
path: pytest.xml
140144

141145
- name: Upload code coverage to Codecov
142-
uses: codecov/[email protected].4
146+
uses: codecov/[email protected].5
143147
with:
144148
file: ./coverage.xml
145149
flags: unittests
@@ -153,7 +157,7 @@ jobs:
153157
if: github.repository == 'pydata/xarray'
154158
steps:
155159
- name: Upload
156-
uses: actions/upload-artifact@v3
160+
uses: actions/upload-artifact@v4
157161
with:
158162
name: Event File
159163
path: ${{ github.event_path }}

.github/workflows/label-all.yml

-14
This file was deleted.

.github/workflows/label-prs.yml

-12
This file was deleted.

0 commit comments

Comments
 (0)