Skip to content

Commit b4ed8ee

Browse files
committed
Merge branch 'main' of https://github.com/pydata/xarray
2 parents 5d15bbd + c19aa4f commit b4ed8ee

File tree

136 files changed

+4225
-2323
lines changed

Some content is hidden

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

136 files changed

+4225
-2323
lines changed

.github/workflows/ci-additional.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ jobs:
123123
python -m mypy --install-types --non-interactive --cobertura-xml-report mypy_report
124124
125125
- name: Upload mypy coverage to Codecov
126-
uses: codecov/codecov-action@v5.4.2
126+
uses: codecov/codecov-action@v5.4.3
127127
with:
128128
file: mypy_report/cobertura.xml
129129
flags: mypy
@@ -174,7 +174,7 @@ jobs:
174174
python -m mypy --install-types --non-interactive --cobertura-xml-report mypy_report
175175
176176
- name: Upload mypy coverage to Codecov
177-
uses: codecov/codecov-action@v5.4.2
177+
uses: codecov/codecov-action@v5.4.3
178178
with:
179179
file: mypy_report/cobertura.xml
180180
flags: mypy-min
@@ -230,7 +230,7 @@ jobs:
230230
python -m pyright xarray/
231231
232232
- name: Upload pyright coverage to Codecov
233-
uses: codecov/codecov-action@v5.4.2
233+
uses: codecov/codecov-action@v5.4.3
234234
with:
235235
file: pyright_report/cobertura.xml
236236
flags: pyright
@@ -286,7 +286,7 @@ jobs:
286286
python -m pyright xarray/
287287
288288
- name: Upload pyright coverage to Codecov
289-
uses: codecov/codecov-action@v5.4.2
289+
uses: codecov/codecov-action@v5.4.3
290290
with:
291291
file: pyright_report/cobertura.xml
292292
flags: pyright39

.github/workflows/ci.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ jobs:
5454
- env: "bare-minimum"
5555
python-version: "3.10"
5656
os: ubuntu-latest
57+
- env: "bare-min-and-scipy"
58+
python-version: "3.10"
59+
os: ubuntu-latest
5760
- env: "min-all-deps"
5861
python-version: "3.10"
5962
os: ubuntu-latest
@@ -172,7 +175,7 @@ jobs:
172175
path: pytest.xml
173176

174177
- name: Upload code coverage to Codecov
175-
uses: codecov/codecov-action@v5.4.2
178+
uses: codecov/codecov-action@v5.4.3
176179
env:
177180
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
178181
with:

.github/workflows/upstream-dev-ci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ jobs:
140140
run: |
141141
python -m mypy --install-types --non-interactive --cobertura-xml-report mypy_report
142142
- name: Upload mypy coverage to Codecov
143-
uses: codecov/codecov-action@v5.4.2
143+
uses: codecov/codecov-action@v5.4.3
144144
with:
145145
file: mypy_report/cobertura.xml
146146
flags: mypy

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ __pycache__
1010
doc/*.nc
1111
doc/auto_gallery
1212
doc/rasm.zarr
13-
doc/savefig
1413

1514
# C extensions
1615
*.so

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ repos:
2525
- id: text-unicode-replacement-char
2626
- repo: https://github.com/astral-sh/ruff-pre-commit
2727
# Ruff version.
28-
rev: v0.11.8
28+
rev: v0.11.12
2929
hooks:
3030
- id: ruff-format
3131
- id: ruff
@@ -42,7 +42,7 @@ repos:
4242
- id: prettier
4343
args: [--cache-location=.prettier_cache/cache]
4444
- repo: https://github.com/pre-commit/mirrors-mypy
45-
rev: v1.15.0
45+
rev: v1.16.0
4646
hooks:
4747
- id: mypy
4848
# Copied from setup.cfg

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Xarray's contributor guidelines [can be found in our online documentation](https://docs.xarray.dev/en/stable/contributing.html)
1+
Xarray's contributor guidelines [can be found in our online documentation](https://docs.xarray.dev/en/stable/contribute/contributing.html)

asv_bench/benchmarks/indexing.py

Lines changed: 38 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -39,18 +39,30 @@
3939
"2d-1scalar": xr.DataArray(randn(100, frac_nan=0.1), dims=["x"]),
4040
}
4141

42-
vectorized_indexes = {
43-
"1-1d": {"x": xr.DataArray(randint(0, nx, 400), dims="a")},
44-
"2-1d": {
45-
"x": xr.DataArray(randint(0, nx, 400), dims="a"),
46-
"y": xr.DataArray(randint(0, ny, 400), dims="a"),
47-
},
48-
"3-2d": {
49-
"x": xr.DataArray(randint(0, nx, 400).reshape(4, 100), dims=["a", "b"]),
50-
"y": xr.DataArray(randint(0, ny, 400).reshape(4, 100), dims=["a", "b"]),
51-
"t": xr.DataArray(randint(0, nt, 400).reshape(4, 100), dims=["a", "b"]),
52-
},
53-
}
42+
43+
def make_vectorized_indexes(n_index):
44+
return {
45+
"1-1d": {"x": xr.DataArray(randint(0, nx, n_index), dims="a")},
46+
"2-1d": {
47+
"x": xr.DataArray(randint(0, nx, n_index), dims="a"),
48+
"y": xr.DataArray(randint(0, ny, n_index), dims="a"),
49+
},
50+
"3-2d": {
51+
"x": xr.DataArray(
52+
randint(0, nx, n_index).reshape(n_index // 100, 100), dims=["a", "b"]
53+
),
54+
"y": xr.DataArray(
55+
randint(0, ny, n_index).reshape(n_index // 100, 100), dims=["a", "b"]
56+
),
57+
"t": xr.DataArray(
58+
randint(0, nt, n_index).reshape(n_index // 100, 100), dims=["a", "b"]
59+
),
60+
},
61+
}
62+
63+
64+
vectorized_indexes = make_vectorized_indexes(400)
65+
big_vectorized_indexes = make_vectorized_indexes(400_000)
5466

5567
vectorized_assignment_values = {
5668
"1-1d": xr.DataArray(randn((400, ny)), dims=["a", "y"], coords={"a": randn(400)}),
@@ -101,6 +113,20 @@ def time_indexing_basic_ds_large(self, key):
101113
self.ds_large.isel(**basic_indexes[key]).load()
102114

103115

116+
class IndexingOnly(Base):
117+
@parameterized(["key"], [list(basic_indexes.keys())])
118+
def time_indexing_basic(self, key):
119+
self.ds.isel(**basic_indexes[key])
120+
121+
@parameterized(["key"], [list(outer_indexes.keys())])
122+
def time_indexing_outer(self, key):
123+
self.ds.isel(**outer_indexes[key])
124+
125+
@parameterized(["key"], [list(big_vectorized_indexes.keys())])
126+
def time_indexing_big_vectorized(self, key):
127+
self.ds.isel(**big_vectorized_indexes[key])
128+
129+
104130
class Assignment(Base):
105131
@parameterized(["key"], [list(basic_indexes.keys())])
106132
def time_assignment_basic(self, key):

ci/requirements/all-but-dask.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ channels:
44
- nodefaults
55
dependencies:
66
- aiobotocore
7-
- array-api-strict
7+
- array-api-strict<2.4
88
- boto3
99
- bottleneck
1010
- cartopy

ci/requirements/all-but-numba.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ dependencies:
66
# Pin a "very new numpy" (updated Sept 24, 2024)
77
- numpy>=2.1.1
88
- aiobotocore
9-
- array-api-strict
9+
- array-api-strict<2.4
1010
- boto3
1111
- bottleneck
1212
- cartopy
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: xarray-tests
2+
channels:
3+
- conda-forge
4+
- nodefaults
5+
dependencies:
6+
- python=3.10
7+
- coveralls
8+
- pip
9+
- pytest
10+
- pytest-cov
11+
- pytest-env
12+
- pytest-mypy-plugins
13+
- pytest-timeout
14+
- pytest-xdist
15+
- numpy=1.24
16+
- packaging=23.1
17+
- pandas=2.1
18+
- scipy=1.11

0 commit comments

Comments
 (0)