Skip to content

Commit 2bbafa6

Browse files
committed
Merge remote-tracking branch 'upstream/main' into soft_import
Manually fixed a conflict in xarray/backends/common.py, specifically LOC touched/added by pydata#9727 and pydata#9787 In one case I just needed to incorporate the xarray.core.types imports from pydata#9787 In the other case, a flake was fixed in one of the attempted imports that will utilize the attempt_import function in this PR. I just incorporated that flake fix from pydata#9727 into this PR
2 parents 8d52549 + 700191b commit 2bbafa6

File tree

171 files changed

+5183
-2480
lines changed

Some content is hidden

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

171 files changed

+5183
-2480
lines changed

.binder/environment.yml

+1-1
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

+1-1
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

+1-1
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

+1-1
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

+3-3
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

+2-1
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

+2-2
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

+16-25
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: |
@@ -92,7 +89,7 @@ jobs:
9289
shell: bash -l {0}
9390
env:
9491
CONDA_ENV_FILE: ci/requirements/environment.yml
95-
PYTHON_VERSION: "3.11"
92+
PYTHON_VERSION: "3.12"
9693

9794
steps:
9895
- uses: actions/checkout@v4
@@ -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.11.2" --force-reinstall
119+
python -m pip install "mypy==1.13" --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.0.2
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.11.2" --force-reinstall
170+
python -m pip install "mypy==1.13" --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.0.2
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.0.2
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.0.2
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

+1-4
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,6 @@ jobs:
116116
cache-environment-key: "${{runner.os}}-${{runner.arch}}-py${{matrix.python-version}}-${{env.TODAY}}-${{hashFiles(env.CONDA_ENV_FILE)}}"
117117
create-args: >-
118118
python=${{matrix.python-version}}
119-
conda
120119
121120
# We only want to install this on one run, because otherwise we'll have
122121
# duplicate annotations.
@@ -131,8 +130,6 @@ jobs:
131130
132131
- name: Version info
133132
run: |
134-
conda info -a
135-
conda list
136133
python xarray/util/print_versions.py
137134
138135
- name: Import xarray
@@ -162,7 +159,7 @@ jobs:
162159
path: pytest.xml
163160

164161
- name: Upload code coverage to Codecov
165-
uses: codecov/codecov-action@v4.6.0
162+
uses: codecov/codecov-action@v5.0.2
166163
with:
167164
file: ./coverage.xml
168165
flags: unittests

.github/workflows/hypothesis.yaml

+8-10
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

.github/workflows/pypi-release.yaml

+3-4
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
- published
66
push:
77
tags:
8-
- 'v*'
8+
- "v*"
99

1010
jobs:
1111
build-artifacts:
@@ -88,12 +88,11 @@ jobs:
8888
path: dist
8989
- name: Publish package to TestPyPI
9090
if: github.event_name == 'push'
91-
uses: pypa/gh-action-pypi-publish@v1.10.3
91+
uses: pypa/gh-action-pypi-publish@v1.12.2
9292
with:
9393
repository_url: https://test.pypi.org/legacy/
9494
verbose: true
9595

96-
9796
upload-to-pypi:
9897
needs: test-built-dist
9998
if: github.event_name == 'release'
@@ -111,6 +110,6 @@ jobs:
111110
name: releases
112111
path: dist
113112
- name: Publish package to PyPI
114-
uses: pypa/gh-action-pypi-publish@v1.10.3
113+
uses: pypa/gh-action-pypi-publish@v1.12.2
115114
with:
116115
verbose: true

0 commit comments

Comments
 (0)