Skip to content

Commit 1a38d93

Browse files
committed
Merge branch 'main' into feature/astropy-units-support
2 parents 408a023 + c425779 commit 1a38d93

File tree

123 files changed

+1550
-1098
lines changed

Some content is hidden

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

123 files changed

+1550
-1098
lines changed

.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/workflows/benchmarks-last-release.yml

+1
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: '1.5.10-0'
2728
environment-file: ${{env.CONDA_ENV_FILE}}
2829
environment-name: xarray-tests
2930
cache-environment: true

.github/workflows/benchmarks.yml

+2-1
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,7 +36,7 @@ jobs:
3536
create-args: >-
3637
asv
3738
python-build
38-
mamba
39+
mamba<=1.5.10
3940
4041
4142
- name: Run benchmarks

.github/workflows/ci-additional.yaml

+9-18
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: |
@@ -109,16 +106,13 @@ 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: |
@@ -163,16 +157,13 @@ 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: |
@@ -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: |
@@ -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: |
@@ -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

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

.github/workflows/hypothesis.yaml

-2
Original file line numberDiff line numberDiff line change
@@ -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

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

-6
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ jobs:
6868
create-args: >-
6969
python=${{ matrix.python-version }}
7070
pytest-reportlog
71-
conda
7271
- name: Install upstream versions
7372
run: |
7473
bash ci/install-upstream-wheels.sh
@@ -77,8 +76,6 @@ jobs:
7776
python -m pip install --no-deps -e .
7877
- name: Version info
7978
run: |
80-
conda info -a
81-
conda list
8279
python xarray/util/print_versions.py
8380
- name: Import xarray
8481
run: |
@@ -127,7 +124,6 @@ jobs:
127124
create-args: >-
128125
python=${{ matrix.python-version }}
129126
pytest-reportlog
130-
conda
131127
- name: Install upstream versions
132128
run: |
133129
bash ci/install-upstream-wheels.sh
@@ -136,8 +132,6 @@ jobs:
136132
python -m pip install --no-deps -e .
137133
- name: Version info
138134
run: |
139-
conda info -a
140-
conda list
141135
python xarray/util/print_versions.py
142136
- name: Install mypy
143137
run: |

.pep8speaks.yml

-6
This file was deleted.

CODE_OF_CONDUCT.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ Project maintainers who do not follow or enforce the Code of Conduct in good fai
4040

4141
## Attribution
4242

43-
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
43+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [https://contributor-covenant.org/version/1/4][version]
4444

45-
[homepage]: http://contributor-covenant.org
46-
[version]: http://contributor-covenant.org/version/1/4/
45+
[homepage]: https://contributor-covenant.org
46+
[version]: https://contributor-covenant.org/version/1/4/

CONTRIBUTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Xarray's contributor guidelines [can be found in our online documentation](http://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/contributing.html)

DATATREE_MIGRATION_GUIDE.md

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

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ recommend that a file or class name and description of purpose be included on
176176
the same "printed page" as the copyright notice for easier identification within
177177
third-party archives.
178178

179-
Copyright [yyyy] [name of copyright owner]
179+
Copyright 2014-2024 xarray Developers
180180

181181
Licensed under the Apache License, Version 2.0 (the "License");
182182
you may not use this file except in compliance with the License.

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ our efforts.
9494
## History
9595

9696
Xarray is an evolution of an internal tool developed at [The Climate
97-
Corporation](http://climate.com/). It was originally written by Climate
97+
Corporation](https://climate.com/). It was originally written by Climate
9898
Corp researchers Stephan Hoyer, Alex Kleeman and Eugene Brevdo and was
9999
released as open source in May 2014. The project was renamed from
100100
"xray" in January 2016. Xarray became a fiscally sponsored project of
@@ -108,7 +108,7 @@ Thanks to our many contributors!
108108

109109
## License
110110

111-
Copyright 2014-2023, xarray Developers
111+
Copyright 2014-2024, xarray Developers
112112

113113
Licensed under the Apache License, Version 2.0 (the "License"); you
114114
may not use this file except in compliance with the License. You may

asv_bench/asv.conf.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"project": "xarray",
88

99
// The project's homepage
10-
"project_url": "http://docs.xarray.dev/",
10+
"project_url": "https://docs.xarray.dev/",
1111

1212
// The URL or local path of the source code repository for the
1313
// project being benchmarked

asv_bench/benchmarks/dataset_io.py

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

asv_bench/benchmarks/groupby.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# import flox to avoid the cost of first import
22
import cftime
3-
import flox.xarray # noqa
3+
import flox.xarray # noqa: F401
44
import numpy as np
55
import pandas as pd
66

0 commit comments

Comments
 (0)