Skip to content

Commit 0dacef1

Browse files
authored
Merge branch 'main' into optipng
2 parents b1b96d5 + 61596a7 commit 0dacef1

12 files changed

+42
-54
lines changed

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +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'
27+
micromamba-version: '1.5.10-0'
2828
environment-file: ${{env.CONDA_ENV_FILE}}
2929
environment-name: xarray-tests
3030
cache-environment: true

.github/workflows/benchmarks.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +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'
30+
micromamba-version: '1.5.10-0'
3131
environment-file: ${{env.CONDA_ENV_FILE}}
3232
environment-name: xarray-tests
3333
cache-environment: true
@@ -36,7 +36,7 @@ jobs:
3636
create-args: >-
3737
asv
3838
python-build
39-
mamba
39+
mamba<=1.5.10
4040
4141
4242
- name: Run benchmarks

.github/workflows/ci-additional.yaml

+5-10
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ concurrency:
1414

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

1918
jobs:
2019
detect-ci-trigger:
@@ -58,7 +57,6 @@ jobs:
5857
- name: Setup micromamba
5958
uses: mamba-org/setup-micromamba@v2
6059
with:
61-
micromamba-version: ${{env.MICROMAMBA_VERSION}}
6260
environment-file: ${{env.CONDA_ENV_FILE}}
6361
environment-name: xarray-tests
6462
create-args: >-
@@ -104,7 +102,6 @@ jobs:
104102
- name: Setup micromamba
105103
uses: mamba-org/setup-micromamba@v2
106104
with:
107-
micromamba-version: ${{env.MICROMAMBA_VERSION}}
108105
environment-file: ${{env.CONDA_ENV_FILE}}
109106
environment-name: xarray-tests
110107
create-args: >-
@@ -156,7 +153,6 @@ jobs:
156153
- name: Setup micromamba
157154
uses: mamba-org/setup-micromamba@v2
158155
with:
159-
micromamba-version: ${{env.MICROMAMBA_VERSION}}
160156
environment-file: ${{env.CONDA_ENV_FILE}}
161157
environment-name: xarray-tests
162158
create-args: >-
@@ -213,7 +209,6 @@ jobs:
213209
- name: Setup micromamba
214210
uses: mamba-org/setup-micromamba@v2
215211
with:
216-
micromamba-version: ${{env.MICROMAMBA_VERSION}}
217212
environment-file: ${{env.CONDA_ENV_FILE}}
218213
environment-name: xarray-tests
219214
create-args: >-
@@ -270,7 +265,6 @@ jobs:
270265
- name: Setup micromamba
271266
uses: mamba-org/setup-micromamba@v2
272267
with:
273-
micromamba-version: ${{env.MICROMAMBA_VERSION}}
274268
environment-file: ${{env.CONDA_ENV_FILE}}
275269
environment-name: xarray-tests
276270
create-args: >-
@@ -304,8 +298,7 @@ jobs:
304298
name: Minimum Version Policy
305299
runs-on: "ubuntu-latest"
306300
needs: detect-ci-trigger
307-
# disabled until `conda` is compatible with the new `libmambapy`
308-
if: false && needs.detect-ci-trigger.outputs.triggered == 'false'
301+
if: needs.detect-ci-trigger.outputs.triggered == 'false'
309302
defaults:
310303
run:
311304
shell: bash -l {0}
@@ -318,13 +311,15 @@ jobs:
318311
- name: Setup micromamba
319312
uses: mamba-org/setup-micromamba@v2
320313
with:
321-
micromamba-version: ${{env.MICROMAMBA_VERSION}}
314+
# run with micromamba 1.5.10 together with conda
315+
# conda.api is not API compatible with libmambapy
316+
micromamba-version: "1.5.10-0"
322317
environment-name: xarray-tests
323318
create-args: >-
324319
python=3.12
325320
pyyaml
326321
python-dateutil
327-
libmambapy
322+
conda
328323
329324
- name: All-deps minimum versions policy
330325
run: |

.github/workflows/ci.yaml

-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ concurrency:
1414

1515
env:
1616
FORCE_COLOR: 3
17-
micromamba_version: 2
1817

1918
jobs:
2019
detect-ci-trigger:
@@ -111,7 +110,6 @@ jobs:
111110
- name: Setup micromamba
112111
uses: mamba-org/setup-micromamba@v2
113112
with:
114-
micromamba-version: '2.0.2-2'
115113
environment-file: ${{ env.CONDA_ENV_FILE }}
116114
environment-name: xarray-tests
117115
cache-environment: true

.github/workflows/hypothesis.yaml

-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ jobs:
6363
- name: Setup micromamba
6464
uses: mamba-org/setup-micromamba@v2
6565
with:
66-
micromamba-version: "2.0.2-2"
6766
environment-file: ci/requirements/environment.yml
6867
environment-name: xarray-tests
6968
create-args: >-

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

-3
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ concurrency:
1717

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

2221
jobs:
2322
detect-ci-trigger:
@@ -64,7 +63,6 @@ jobs:
6463
- name: Set up conda environment
6564
uses: mamba-org/setup-micromamba@v2
6665
with:
67-
micromamba-version: ${{env.MICROMAMBA_VERSION}}
6866
environment-file: ci/requirements/environment.yml
6967
environment-name: xarray-tests
7068
create-args: >-
@@ -121,7 +119,6 @@ jobs:
121119
- name: Set up conda environment
122120
uses: mamba-org/setup-micromamba@v2
123121
with:
124-
micromamba-version: ${{env.MICROMAMBA_VERSION}}
125122
environment-file: ci/requirements/environment.yml
126123
environment-name: xarray-tests
127124
create-args: >-

ci/min_deps_check.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
from collections.abc import Iterator
1212
from datetime import datetime
1313

14-
import libmambapy # type: ignore[import]
14+
import conda.api # type: ignore[import]
1515
import yaml
1616
from dateutil.relativedelta import relativedelta
1717

@@ -93,7 +93,7 @@ def metadata(entry):
9393

9494
return (major, minor), time
9595

96-
raw_data = libmambapy.SubdirData.query_all(pkg, channels=CHANNELS)
96+
raw_data = conda.api.SubdirData.query_all(pkg, channels=CHANNELS)
9797
data = sorted(metadata(entry) for entry in raw_data if entry.timestamp != 0)
9898

9999
release_dates = {

ci/requirements/all-but-dask.yml

+1-1
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.1
88
- boto3
99
- bottleneck
1010
- cartopy

ci/requirements/all-but-numba.yml

+1-1
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.1
1010
- boto3
1111
- bottleneck
1212
- cartopy

ci/requirements/environment-windows.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: xarray-tests
22
channels:
33
- conda-forge
44
dependencies:
5-
- array-api-strict
5+
- array-api-strict<=2.1
66
- boto3
77
- bottleneck
88
- cartopy

ci/requirements/environment.yml

+1-1
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.1
88
- boto3
99
- bottleneck
1010
- cartopy

pyproject.toml

+28-29
Original file line numberDiff line numberDiff line change
@@ -234,41 +234,40 @@ extend-exclude = [
234234
]
235235

236236
[tool.ruff.lint]
237-
# E402: module level import not at top of file
238-
# E501: line too long - let the formatter worry about that
239-
# E731: do not assign a lambda expression, use a def
237+
extend-select = [
238+
"F", # Pyflakes
239+
"E", # pycodestyle errors
240+
"W", # pycodestyle warnings
241+
"I", # isort
242+
"UP", # pyupgrade
243+
"B", # flake8-bugbear
244+
"C4", # flake8-comprehensions
245+
"PIE", # flake8-pie
246+
"TID", # flake8-tidy-imports (absolute imports)
247+
"PGH", # pygrep-hooks
248+
"PERF", # Perflint
249+
"RUF",
250+
]
240251
extend-safe-fixes = [
241-
"TID252", # absolute imports
252+
"TID252", # absolute imports
242253
]
243254
ignore = [
244-
"C40",
245-
"E402",
246-
"E501",
247-
"E731",
248-
"UP007",
249-
"PERF20",
255+
"E402", # module level import not at top of file
256+
"E501", # line too long - let the formatter worry about that
257+
"E731", # do not assign a lambda expression, use a def
258+
"UP007", # use X | Y for type annotations
259+
"UP027", # deprecated
260+
"C40", # unnecessary generator, comprehension, or literal
250261
"PIE790", # unnecessary pass statement
251-
"RUF001",
252-
"RUF002",
253-
"RUF003",
254-
"RUF005",
255-
"RUF012",
256-
]
257-
extend-select = [
258-
"B", # flake8-bugbear
259-
"C4", # flake8-comprehensions
260-
"F", # Pyflakes
261-
"E", # Pycodestyle
262-
"W",
263-
"TID", # flake8-tidy-imports (absolute imports)
264-
"I", # isort
265-
"PERF", # Perflint
266-
"PIE", # flake8-pie
267-
"PGH", # pygrep-hooks
268-
"RUF",
269-
"UP", # Pyupgrade
262+
"PERF203", # try-except within a loop incurs performance overhead
263+
"RUF001", # string contains ambiguous unicode character
264+
"RUF002", # docstring contains ambiguous acute accent unicode character
265+
"RUF003", # comment contains ambiguous no-break space unicode character
266+
"RUF005", # consider upacking operator instead of concatenation
267+
"RUF012", # mutable class attributes
270268
]
271269

270+
272271
[tool.ruff.lint.per-file-ignores]
273272
# don't enforce absolute imports
274273
"asv_bench/**" = ["TID252"]

0 commit comments

Comments
 (0)