Skip to content
forked from pydata/xarray

Commit 00ef8c5

Browse files
committed
Merge branch 'main' into groupby-dask
* main: Add `DataTree.persist` (pydata#9682) Typing annotations for arithmetic overrides (e.g., DataArray + Dataset) (pydata#9688) Raise `ValueError` for unmatching chunks length in `DataArray.chunk()` (pydata#9689) Fix inadvertent deep-copying of child data in DataTree (pydata#9684) new blank whatsnew (pydata#9679) v2024.10.0 release summary (pydata#9678) drop the length from `numpy`'s fixed-width string dtypes (pydata#9586) fixing behaviour for group parameter in `open_datatree` (pydata#9666) Use zarr v3 dimension_names (pydata#9669) fix(zarr): use inplace array.resize for zarr 2 and 3 (pydata#9673) implement `dask` methods on `DataTree` (pydata#9670) support `chunks` in `open_groups` and `open_datatree` (pydata#9660) Compatibility for zarr-python 3.x (pydata#9552) Update to_dataframe doc to match current behavior (pydata#9662) Reduce graph size through writing indexes directly into graph for ``map_blocks`` (pydata#9658)
2 parents f826b65 + 0c6cded commit 00ef8c5

33 files changed

+2462
-437
lines changed

.github/workflows/ci-additional.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ jobs:
9292
shell: bash -l {0}
9393
env:
9494
CONDA_ENV_FILE: ci/requirements/environment.yml
95-
PYTHON_VERSION: "3.11"
95+
PYTHON_VERSION: "3.12"
9696

9797
steps:
9898
- uses: actions/checkout@v4

ci/install-upstream-wheels.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,15 @@ python -m pip install \
4545
--pre \
4646
--upgrade \
4747
pyarrow
48-
# manually install `pint` to pull in new dependencies
49-
python -m pip install --upgrade pint
48+
# manually install `pint`, `donfig`, and `crc32c` to pull in new dependencies
49+
python -m pip install --upgrade pint donfig crc32c
5050
python -m pip install \
5151
--no-deps \
5252
--upgrade \
5353
git+https://github.com/dask/dask \
5454
git+https://github.com/dask/dask-expr \
5555
git+https://github.com/dask/distributed \
56-
git+https://github.com/zarr-developers/zarr.git@main \
56+
git+https://github.com/zarr-developers/zarr \
5757
git+https://github.com/Unidata/cftime \
5858
git+https://github.com/pypa/packaging \
5959
git+https://github.com/hgrecco/pint \

doc/api.rst

+5
Original file line numberDiff line numberDiff line change
@@ -656,6 +656,7 @@ This interface echoes that of ``xarray.Dataset``.
656656
DataTree.has_attrs
657657
DataTree.is_empty
658658
DataTree.is_hollow
659+
DataTree.chunksizes
659660

660661
Dictionary Interface
661662
--------------------
@@ -968,6 +969,10 @@ DataTree methods
968969
DataTree.to_dict
969970
DataTree.to_netcdf
970971
DataTree.to_zarr
972+
DataTree.chunk
973+
DataTree.load
974+
DataTree.compute
975+
DataTree.persist
971976

972977
.. ..
973978

doc/user-guide/io.rst

+2-1
Original file line numberDiff line numberDiff line change
@@ -823,8 +823,9 @@ For example:
823823
.. ipython:: python
824824
825825
import zarr
826+
from numcodecs.blosc import Blosc
826827
827-
compressor = zarr.Blosc(cname="zstd", clevel=3, shuffle=2)
828+
compressor = Blosc(cname="zstd", clevel=3, shuffle=2)
828829
ds.to_zarr("foo.zarr", encoding={"foo": {"compressor": compressor}})
829830
830831
.. note::

doc/whats-new.rst

+63-29
Original file line numberDiff line numberDiff line change
@@ -14,34 +14,18 @@ What's New
1414
1515
np.random.seed(123456)
1616
17-
.. _whats-new.2024.09.1:
17+
.. _whats-new.2024.10.1:
1818

19-
v2024.09.1 (unreleased)
20-
-----------------------
19+
v.2024.10.1 (unreleased)
20+
------------------------
2121

2222
New Features
2323
~~~~~~~~~~~~
24-
- ``DataTree`` related functionality is now exposed in the main ``xarray`` public
25-
API. This includes: ``xarray.DataTree``, ``xarray.open_datatree``, ``xarray.open_groups``,
26-
``xarray.map_over_datasets``, ``xarray.group_subtrees``,
27-
``xarray.register_datatree_accessor`` and ``xarray.testing.assert_isomorphic``.
28-
By `Owen Littlejohns <https://github.com/owenlittlejohns>`_,
29-
`Eni Awowale <https://github.com/eni-awowale>`_,
30-
`Matt Savoie <https://github.com/flamingbear>`_,
31-
`Stephan Hoyer <https://github.com/shoyer>`_ and
32-
`Tom Nicholas <https://github.com/TomNicholas>`_.
33-
- A migration guide for users of the prototype `xarray-contrib/datatree repository <https://github.com/xarray-contrib/datatree>`_ has been added, and can be found in the `DATATREE_MIGRATION_GUIDE.md` file in the repository root.
34-
By `Tom Nicholas <https://github.com/TomNicholas>`_.
35-
- Added zarr backends for :py:func:`open_groups` (:issue:`9430`, :pull:`9469`).
36-
By `Eni Awowale <https://github.com/eni-awowale>`_.
24+
- Added :py:meth:`DataTree.persist` method (:issue:`9675`, :pull:`9682`).
25+
By `Sam Levang <https://github.com/slevang>`_.
3726
- Support lazy grouping by dask arrays, and allow specifying ordered groups with ``UniqueGrouper(labels=["a", "b", "c"])``
3827
(:issue:`2852`, :issue:`757`).
3928
By `Deepak Cherian <https://github.com/dcherian>`_.
40-
- Added support for vectorized interpolation using additional interpolators
41-
from the ``scipy.interpolate`` module (:issue:`9049`, :pull:`9526`).
42-
By `Holly Mandel <https://github.com/hollymandel>`_.
43-
- Implement handling of complex numbers (netcdf4/h5netcdf) and enums (h5netcdf) (:issue:`9246`, :issue:`3297`, :pull:`9509`).
44-
By `Kai Mühlbauer <https://github.com/kmuehlbauer>`_.
4529

4630
Breaking changes
4731
~~~~~~~~~~~~~~~~
@@ -55,6 +39,62 @@ Deprecations
5539
provide expected group labels using the ``labels`` kwarg to a grouper object such as
5640
:py:class:`grouper.UniqueGrouper` or :py:class:`grouper.BinGrouper`.
5741

42+
Bug fixes
43+
~~~~~~~~~
44+
45+
- Fix inadvertent deep-copying of child data in DataTree.
46+
By `Stephan Hoyer <https://github.com/shoyer>`_.
47+
48+
Documentation
49+
~~~~~~~~~~~~~
50+
51+
52+
Internal Changes
53+
~~~~~~~~~~~~~~~~
54+
- ``persist`` methods now route through the :py:class:`xr.core.parallelcompat.ChunkManagerEntrypoint` (:pull:`9682`).
55+
By `Sam Levang <https://github.com/slevang>`_.
56+
57+
.. _whats-new.2024.10.0:
58+
59+
v2024.10.0 (Oct 24th, 2024)
60+
---------------------------
61+
62+
This release brings official support for `xarray.DataTree`, and compatibility with zarr-python v3!
63+
64+
Aside from these two huge features, it also improves support for vectorised interpolation and fixes various bugs.
65+
66+
Thanks to the 31 contributors to this release:
67+
Alfonso Ladino, DWesl, Deepak Cherian, Eni, Etienne Schalk, Holly Mandel, Ilan Gold, Illviljan, Joe Hamman, Justus Magin, Kai Mühlbauer, Karl Krauth, Mark Harfouche, Martey Dodoo, Matt Savoie, Maximilian Roos, Patrick Hoefler, Peter Hill, Renat Sibgatulin, Ryan Abernathey, Spencer Clark, Stephan Hoyer, Tom Augspurger, Tom Nicholas, Vecko, Virgile Andreani, Yvonne Fröhlich, carschandler, joseph nowak, mgunyho and owenlittlejohns
68+
69+
New Features
70+
~~~~~~~~~~~~
71+
- ``DataTree`` related functionality is now exposed in the main ``xarray`` public
72+
API. This includes: ``xarray.DataTree``, ``xarray.open_datatree``, ``xarray.open_groups``,
73+
``xarray.map_over_datasets``, ``xarray.group_subtrees``,
74+
``xarray.register_datatree_accessor`` and ``xarray.testing.assert_isomorphic``.
75+
By `Owen Littlejohns <https://github.com/owenlittlejohns>`_,
76+
`Eni Awowale <https://github.com/eni-awowale>`_,
77+
`Matt Savoie <https://github.com/flamingbear>`_,
78+
`Stephan Hoyer <https://github.com/shoyer>`_,
79+
`Tom Nicholas <https://github.com/TomNicholas>`_,
80+
`Justus Magin <https://github.com/keewis>`_, and
81+
`Alfonso Ladino <https://github.com/aladinor>`_.
82+
- A migration guide for users of the prototype `xarray-contrib/datatree repository <https://github.com/xarray-contrib/datatree>`_ has been added, and can be found in the `DATATREE_MIGRATION_GUIDE.md` file in the repository root.
83+
By `Tom Nicholas <https://github.com/TomNicholas>`_.
84+
- Support for Zarr-Python 3 (:issue:`95515`, :pull:`9552`).
85+
By `Tom Augspurger <https://github.com/TomAugspurger>`_,
86+
`Ryan Abernathey <https://github.com/rabernat>`_ and
87+
`Joe Hamman <https://github.com/jhamman>`_.
88+
- Added zarr backends for :py:func:`open_groups` (:issue:`9430`, :pull:`9469`).
89+
By `Eni Awowale <https://github.com/eni-awowale>`_.
90+
- Added support for vectorized interpolation using additional interpolators
91+
from the ``scipy.interpolate`` module (:issue:`9049`, :pull:`9526`).
92+
By `Holly Mandel <https://github.com/hollymandel>`_.
93+
- Implement handling of complex numbers (netcdf4/h5netcdf) and enums (h5netcdf) (:issue:`9246`, :issue:`3297`, :pull:`9509`).
94+
By `Kai Mühlbauer <https://github.com/kmuehlbauer>`_.
95+
- Fix passing missing arguments to when opening hdf5 and netCDF4 datatrees
96+
(:issue:`9427`, :pull: `9428`).
97+
By `Alfonso Ladino <https://github.com/aladinor>`_.
5898

5999
Bug fixes
60100
~~~~~~~~~
@@ -78,6 +118,8 @@ Bug fixes
78118
<https://github.com/josephnowak>`_.
79119
- Fix binning by multiple variables where some bins have no observations. (:issue:`9630`).
80120
By `Deepak Cherian <https://github.com/dcherian>`_.
121+
- Fix issue where polyfit wouldn't handle non-dimension coordinates. (:issue:`4375`, :pull:`9369`)
122+
By `Karl Krauth <https://github.com/Karl-Krauth>`_.
81123

82124
Documentation
83125
~~~~~~~~~~~~~
@@ -88,12 +130,9 @@ Documentation
88130
By `Owen Littlejohns <https://github.com/owenlittlejohns>`_, `Matt Savoie <https://github.com/flamingbear>`_, and
89131
`Tom Nicholas <https://github.com/TomNicholas>`_.
90132

91-
92-
93133
Internal Changes
94134
~~~~~~~~~~~~~~~~
95135

96-
97136
.. _whats-new.2024.09.0:
98137

99138
v2024.09.0 (Sept 11, 2024)
@@ -161,17 +200,12 @@ Bug fixes
161200
date "0001-01-01". (:issue:`9108`, :pull:`9116`) By `Spencer Clark
162201
<https://github.com/spencerkclark>`_ and `Deepak Cherian
163202
<https://github.com/dcherian>`_.
164-
- Fix issue where polyfit wouldn't handle non-dimension coordinates. (:issue:`4375`, :pull:`9369`)
165-
By `Karl Krauth <https://github.com/Karl-Krauth>`_.
166203
- Fix issue with passing parameters to ZarrStore.open_store when opening
167204
datatree in zarr format (:issue:`9376`, :pull:`9377`).
168205
By `Alfonso Ladino <https://github.com/aladinor>`_
169206
- Fix deprecation warning that was raised when calling ``np.array`` on an ``xr.DataArray``
170207
in NumPy 2.0 (:issue:`9312`, :pull:`9393`)
171208
By `Andrew Scherer <https://github.com/andrew-s28>`_.
172-
- Fix passing missing arguments to when opening hdf5 and netCDF4 datatrees
173-
(:issue:`9427`, :pull: `9428`).
174-
By `Alfonso Ladino <https://github.com/aladinor>`_.
175209
- Fix support for using ``pandas.DateOffset``, ``pandas.Timedelta``, and
176210
``datetime.timedelta`` objects as ``resample`` frequencies
177211
(:issue:`9408`, :pull:`9413`).

pyproject.toml

+3-1
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ accel = ["scipy", "bottleneck", "numbagg", "numba>=0.54", "flox", "opt_einsum"]
3737
complete = ["xarray[accel,etc,io,parallel,viz]"]
3838
dev = [
3939
"hypothesis",
40+
"jinja2",
4041
"mypy",
4142
"pre-commit",
4243
"pytest",
@@ -49,7 +50,7 @@ dev = [
4950
"sphinx_autosummary_accessors",
5051
"xarray[complete]",
5152
]
52-
io = ["netCDF4", "h5netcdf", "scipy", 'pydap; python_version<"3.10"', "zarr<3", "fsspec", "cftime", "pooch"]
53+
io = ["netCDF4", "h5netcdf", "scipy", 'pydap; python_version<"3.10"', "zarr", "fsspec", "cftime", "pooch"]
5354
etc = ["sparse"]
5455
parallel = ["dask[complete]"]
5556
viz = ["cartopy", "matplotlib", "nc-time-axis", "seaborn"]
@@ -124,6 +125,7 @@ module = [
124125
"nc_time_axis.*",
125126
"netCDF4.*",
126127
"netcdftime.*",
128+
"numcodecs.*",
127129
"opt_einsum.*",
128130
"pint.*",
129131
"pooch.*",

0 commit comments

Comments
 (0)