Skip to content

Commit 978fad9

Browse files
committed
Merge branch 'main' into groupby-shuffle
* main: Enforce ruff/flake8-pie rules (PIE) (pydata#9740) Enforce ruff/flake8-comprehensions rules (C4) (pydata#9724) Enforce ruff/Perflint rules (PERF) (pydata#9730) Apply ruff rule RUF007 (pydata#9739) chmod -x (pydata#9725) Aplpy ruff rules (RUF) (pydata#9731) Fix typos found by codespell (pydata#9721) support for additional scipy nd interpolants (pydata#9599) Apply ruff/flake8-simplify rules (SIM) (pydata#9727) Apply ruff/flake8-implicit-str-concat rules (ISC) (pydata#9722) Apply ruff/flake8-pie rules (PIE) (pydata#9726) Enforce ruff/pygrep-hooks rules (PGH) (pydata#9729) Move to micromamba 2 (pydata#9732) Fix groupby tests (pydata#9716) Add missing xarray.core.missing import (pydata#9714) Fix writing of DataTree subgroups to zarr or netCDF (pydata#9677) Bump pypa/gh-action-pypi-publish from 1.10.3 to 1.11.0 in the actions group (pydata#9707) Update pre-commit hooks (pydata#9713)
2 parents b100fb1 + c65b8a6 commit 978fad9

Some content is hidden

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

85 files changed

+779
-615
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ jobs:
2424
- name: Set up conda environment
2525
uses: mamba-org/setup-micromamba@v2
2626
with:
27+
micromamba-version: '2.0.2-2'
2728
environment-file: ${{env.CONDA_ENV_FILE}}
2829
environment-name: xarray-tests
2930
cache-environment: true

.github/workflows/benchmarks.yml

Lines changed: 1 addition & 0 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: '2.0.2-2'
3031
environment-file: ${{env.CONDA_ENV_FILE}}
3132
environment-name: xarray-tests
3233
cache-environment: true

.github/workflows/ci-additional.yaml

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ concurrency:
1414

1515
env:
1616
FORCE_COLOR: 3
17+
MICROMAMBA_VERSION: "2.0.2-2"
1718

1819
jobs:
1920
detect-ci-trigger:
@@ -57,11 +58,11 @@ jobs:
5758
- name: Setup micromamba
5859
uses: mamba-org/setup-micromamba@v2
5960
with:
61+
micromamba-version: ${{env.MICROMAMBA_VERSION}}
6062
environment-file: ${{env.CONDA_ENV_FILE}}
6163
environment-name: xarray-tests
6264
create-args: >-
6365
python=${{env.PYTHON_VERSION}}
64-
conda
6566
cache-environment: true
6667
cache-environment-key: "${{runner.os}}-${{runner.arch}}-py${{env.PYTHON_VERSION}}-${{env.TODAY}}-${{hashFiles(env.CONDA_ENV_FILE)}}"
6768

@@ -70,8 +71,6 @@ jobs:
7071
python -m pip install --no-deps -e .
7172
- name: Version info
7273
run: |
73-
conda info -a
74-
conda list
7574
python xarray/util/print_versions.py
7675
- name: Run doctests
7776
run: |
@@ -105,20 +104,18 @@ jobs:
105104
- name: Setup micromamba
106105
uses: mamba-org/setup-micromamba@v2
107106
with:
107+
micromamba-version: ${{env.MICROMAMBA_VERSION}}
108108
environment-file: ${{env.CONDA_ENV_FILE}}
109109
environment-name: xarray-tests
110110
create-args: >-
111111
python=${{env.PYTHON_VERSION}}
112-
conda
113112
cache-environment: true
114113
cache-environment-key: "${{runner.os}}-${{runner.arch}}-py${{env.PYTHON_VERSION}}-${{env.TODAY}}-${{hashFiles(env.CONDA_ENV_FILE)}}"
115114
- name: Install xarray
116115
run: |
117116
python -m pip install --no-deps -e .
118117
- name: Version info
119118
run: |
120-
conda info -a
121-
conda list
122119
python xarray/util/print_versions.py
123120
- name: Install mypy
124121
run: |
@@ -159,20 +156,18 @@ jobs:
159156
- name: Setup micromamba
160157
uses: mamba-org/setup-micromamba@v2
161158
with:
159+
micromamba-version: ${{env.MICROMAMBA_VERSION}}
162160
environment-file: ${{env.CONDA_ENV_FILE}}
163161
environment-name: xarray-tests
164162
create-args: >-
165163
python=${{env.PYTHON_VERSION}}
166-
conda
167164
cache-environment: true
168165
cache-environment-key: "${{runner.os}}-${{runner.arch}}-py${{env.PYTHON_VERSION}}-${{env.TODAY}}-${{hashFiles(env.CONDA_ENV_FILE)}}"
169166
- name: Install xarray
170167
run: |
171168
python -m pip install --no-deps -e .
172169
- name: Version info
173170
run: |
174-
conda info -a
175-
conda list
176171
python xarray/util/print_versions.py
177172
- name: Install mypy
178173
run: |
@@ -218,20 +213,18 @@ jobs:
218213
- name: Setup micromamba
219214
uses: mamba-org/setup-micromamba@v2
220215
with:
216+
micromamba-version: ${{env.MICROMAMBA_VERSION}}
221217
environment-file: ${{env.CONDA_ENV_FILE}}
222218
environment-name: xarray-tests
223219
create-args: >-
224220
python=${{env.PYTHON_VERSION}}
225-
conda
226221
cache-environment: true
227222
cache-environment-key: "${{runner.os}}-${{runner.arch}}-py${{env.PYTHON_VERSION}}-${{env.TODAY}}-${{hashFiles(env.CONDA_ENV_FILE)}}"
228223
- name: Install xarray
229224
run: |
230225
python -m pip install --no-deps -e .
231226
- name: Version info
232227
run: |
233-
conda info -a
234-
conda list
235228
python xarray/util/print_versions.py
236229
- name: Install pyright
237230
run: |
@@ -277,20 +270,18 @@ jobs:
277270
- name: Setup micromamba
278271
uses: mamba-org/setup-micromamba@v2
279272
with:
273+
micromamba-version: ${{env.MICROMAMBA_VERSION}}
280274
environment-file: ${{env.CONDA_ENV_FILE}}
281275
environment-name: xarray-tests
282276
create-args: >-
283277
python=${{env.PYTHON_VERSION}}
284-
conda
285278
cache-environment: true
286279
cache-environment-key: "${{runner.os}}-${{runner.arch}}-py${{env.PYTHON_VERSION}}-${{env.TODAY}}-${{hashFiles(env.CONDA_ENV_FILE)}}"
287280
- name: Install xarray
288281
run: |
289282
python -m pip install --no-deps -e .
290283
- name: Version info
291284
run: |
292-
conda info -a
293-
conda list
294285
python xarray/util/print_versions.py
295286
- name: Install pyright
296287
run: |
@@ -313,7 +304,8 @@ jobs:
313304
name: Minimum Version Policy
314305
runs-on: "ubuntu-latest"
315306
needs: detect-ci-trigger
316-
if: needs.detect-ci-trigger.outputs.triggered == 'false'
307+
# disabled until `conda` is compatible with the new `libmambapy`
308+
if: false && needs.detect-ci-trigger.outputs.triggered == 'false'
317309
defaults:
318310
run:
319311
shell: bash -l {0}
@@ -326,12 +318,13 @@ jobs:
326318
- name: Setup micromamba
327319
uses: mamba-org/setup-micromamba@v2
328320
with:
321+
micromamba-version: ${{env.MICROMAMBA_VERSION}}
329322
environment-name: xarray-tests
330323
create-args: >-
331324
python=3.12
332325
pyyaml
333-
conda
334326
python-dateutil
327+
libmambapy
335328
336329
- name: All-deps minimum versions policy
337330
run: |

.github/workflows/ci.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ concurrency:
1414

1515
env:
1616
FORCE_COLOR: 3
17+
micromamba_version: 2
1718

1819
jobs:
1920
detect-ci-trigger:
@@ -110,13 +111,13 @@ jobs:
110111
- name: Setup micromamba
111112
uses: mamba-org/setup-micromamba@v2
112113
with:
114+
micromamba-version: '2.0.2-2'
113115
environment-file: ${{ env.CONDA_ENV_FILE }}
114116
environment-name: xarray-tests
115117
cache-environment: true
116118
cache-environment-key: "${{runner.os}}-${{runner.arch}}-py${{matrix.python-version}}-${{env.TODAY}}-${{hashFiles(env.CONDA_ENV_FILE)}}"
117119
create-args: >-
118120
python=${{matrix.python-version}}
119-
conda
120121
121122
# We only want to install this on one run, because otherwise we'll have
122123
# duplicate annotations.
@@ -131,8 +132,6 @@ jobs:
131132
132133
- name: Version info
133134
run: |
134-
conda info -a
135-
conda list
136135
python xarray/util/print_versions.py
137136
138137
- name: Import xarray

.github/workflows/hypothesis.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ jobs:
6363
- name: Setup micromamba
6464
uses: mamba-org/setup-micromamba@v2
6565
with:
66+
micromamba-version: "2.0.2-2"
6667
environment-file: ci/requirements/environment.yml
6768
environment-name: xarray-tests
6869
create-args: >-
@@ -76,8 +77,6 @@ jobs:
7677
python -m pip install --no-deps -e .
7778
- name: Version info
7879
run: |
79-
conda info -a
80-
conda list
8180
python xarray/util/print_versions.py
8281
8382
# https://github.com/actions/cache/blob/main/tips-and-workarounds.md#update-a-cache

.github/workflows/pypi-release.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ 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.11.0
9292
with:
9393
repository_url: https://test.pypi.org/legacy/
9494
verbose: true
@@ -111,6 +111,6 @@ jobs:
111111
name: releases
112112
path: dist
113113
- name: Publish package to PyPI
114-
uses: pypa/gh-action-pypi-publish@v1.10.3
114+
uses: pypa/gh-action-pypi-publish@v1.11.0
115115
with:
116116
verbose: true

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

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ concurrency:
1717

1818
env:
1919
FORCE_COLOR: 3
20+
MICROMAMBA_VERSION: "2.0.2-2"
2021

2122
jobs:
2223
detect-ci-trigger:
@@ -63,12 +64,12 @@ jobs:
6364
- name: Set up conda environment
6465
uses: mamba-org/setup-micromamba@v2
6566
with:
67+
micromamba-version: ${{env.MICROMAMBA_VERSION}}
6668
environment-file: ci/requirements/environment.yml
6769
environment-name: xarray-tests
6870
create-args: >-
6971
python=${{ matrix.python-version }}
7072
pytest-reportlog
71-
conda
7273
- name: Install upstream versions
7374
run: |
7475
bash ci/install-upstream-wheels.sh
@@ -77,8 +78,6 @@ jobs:
7778
python -m pip install --no-deps -e .
7879
- name: Version info
7980
run: |
80-
conda info -a
81-
conda list
8281
python xarray/util/print_versions.py
8382
- name: Import xarray
8483
run: |
@@ -122,12 +121,12 @@ jobs:
122121
- name: Set up conda environment
123122
uses: mamba-org/setup-micromamba@v2
124123
with:
124+
micromamba-version: ${{env.MICROMAMBA_VERSION}}
125125
environment-file: ci/requirements/environment.yml
126126
environment-name: xarray-tests
127127
create-args: >-
128128
python=${{ matrix.python-version }}
129129
pytest-reportlog
130-
conda
131130
- name: Install upstream versions
132131
run: |
133132
bash ci/install-upstream-wheels.sh
@@ -136,8 +135,6 @@ jobs:
136135
python -m pip install --no-deps -e .
137136
- name: Version info
138137
run: |
139-
conda info -a
140-
conda list
141138
python xarray/util/print_versions.py
142139
- name: Install mypy
143140
run: |

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ repos:
1313
- id: mixed-line-ending
1414
- repo: https://github.com/astral-sh/ruff-pre-commit
1515
# Ruff version.
16-
rev: 'v0.6.9'
16+
rev: 'v0.7.2'
1717
hooks:
1818
- id: ruff-format
1919
- id: ruff
@@ -25,7 +25,7 @@ repos:
2525
exclude: "generate_aggregations.py"
2626
additional_dependencies: ["black==24.8.0"]
2727
- repo: https://github.com/pre-commit/mirrors-mypy
28-
rev: v1.11.2
28+
rev: v1.13.0
2929
hooks:
3030
- id: mypy
3131
# Copied from setup.cfg

DATATREE_MIGRATION_GUIDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ A number of other API changes have been made, which should only require minor mo
4141
- The method `DataTree.to_dataset()` still exists but now has different options for controlling which variables are present on the resulting `Dataset`, e.g. `inherit=True/False`.
4242
- `DataTree.copy()` also has a new `inherit` keyword argument for controlling whether or not coordinates defined on parents are copied (only relevant when copying a non-root node).
4343
- The `DataTree.parent` property is now read-only. To assign a ancestral relationships directly you must instead use the `.children` property on the parent node, which remains settable.
44-
- Similarly the `parent` kwarg has been removed from the `DataTree.__init__` constuctor.
44+
- Similarly the `parent` kwarg has been removed from the `DataTree.__init__` constructor.
4545
- DataTree objects passed to the `children` kwarg in `DataTree.__init__` are now shallow-copied.
4646
- `DataTree.as_array` has been replaced by `DataTree.to_dataarray`.
4747
- A number of methods which were not well tested have been (temporarily) disabled. In general we have tried to only keep things that are known to work, with the plan to increase API surface incrementally after release.

asv_bench/benchmarks/dataset_io.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -712,7 +712,7 @@ def load(self) -> tuple:
712712
dims=("time",),
713713
fastpath=True,
714714
)
715-
for v in range(0, n_variables)
715+
for v in range(n_variables)
716716
}
717717
attributes = {}
718718

@@ -722,7 +722,7 @@ class PerformanceBackend(xr.backends.BackendEntrypoint):
722722
def open_dataset(
723723
self,
724724
filename_or_obj: str | os.PathLike | None,
725-
drop_variables: tuple[str, ...] = None,
725+
drop_variables: tuple[str, ...] | None = None,
726726
*,
727727
mask_and_scale=True,
728728
decode_times=True,

0 commit comments

Comments
 (0)