Skip to content

Commit 6d9ed1c

Browse files
committed
Merge branch 'main' into groupby-shuffle
* main: Adds copy parameter to __array__ for numpy 2.0 (pydata#9393) `numpy 2` compatibility in the `pydap` backend (pydata#9391) pyarrow dependency added to doc environment (pydata#9394) Extend padding functionalities (pydata#9353) refactor GroupBy internals (pydata#9389) Combine `UnsignedIntegerCoder` and `CFMaskCoder` (pydata#9274) passing missing parameters to ZarrStore.open_store when opening a datatree (pydata#9377) Fix tests on big-endian systems (pydata#9380) Improve error message on `ds['x', 'y']` (pydata#9375)
2 parents b8e7f62 + a04d857 commit 6d9ed1c

26 files changed

+655
-329
lines changed

ci/install-upstream-wheels.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ fi
1212
$conda remove -y numba numbagg sparse
1313
# temporarily remove numexpr
1414
$conda remove -y numexpr
15-
# temporarily remove backends
16-
$conda remove -y pydap
1715
# forcibly remove packages to avoid artifacts
1816
$conda remove -y --force \
1917
numpy \

ci/requirements/all-but-dask.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ dependencies:
2727
- pandas
2828
- pint>=0.22
2929
- pip
30-
# - pydap
30+
- pydap
3131
- pytest
3232
- pytest-cov
3333
- pytest-env

ci/requirements/doc.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ dependencies:
2828
- pooch
2929
- pip
3030
- pre-commit
31+
- pyarrow
3132
- pyproj
3233
- scipy!=1.10.0
3334
- seaborn

ci/requirements/environment-windows.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ dependencies:
2929
# - pint>=0.22
3030
- pip
3131
- pre-commit
32-
# - pydap
32+
- pydap
3333
- pytest
3434
- pytest-cov
3535
- pytest-env

ci/requirements/environment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ dependencies:
3535
- pooch
3636
- pre-commit
3737
- pyarrow # pandas raises a deprecation warning without this, breaking doctests
38-
# - pydap
38+
- pydap
3939
- pytest
4040
- pytest-cov
4141
- pytest-env

doc/api-hidden.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -684,7 +684,6 @@
684684

685685
conventions.decode_cf_variables
686686

687-
coding.variables.UnsignedIntegerCoder
688687
coding.variables.CFMaskCoder
689688
coding.variables.CFScaleOffsetCoder
690689

doc/conf.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,9 @@
153153
"matplotlib colormap name": ":doc:`matplotlib colormap name <matplotlib:gallery/color/colormap_reference>`",
154154
"matplotlib axes object": ":py:class:`matplotlib axes object <matplotlib.axes.Axes>`",
155155
"colormap": ":py:class:`colormap <matplotlib.colors.Colormap>`",
156+
# xarray terms
157+
"dim name": ":term:`dimension name <name>`",
158+
"var name": ":term:`variable name <name>`",
156159
# objects without namespace: xarray
157160
"DataArray": "~xarray.DataArray",
158161
"Dataset": "~xarray.Dataset",

doc/whats-new.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ New Features
2424
~~~~~~~~~~~~
2525
- Make chunk manager an option in ``set_options`` (:pull:`9362`).
2626
By `Tom White <https://github.com/tomwhite>`_.
27+
- Allow data variable specific ``constant_values`` in the dataset ``pad`` function (:pull:`9353``).
28+
By `Tiago Sanona <https://github.com/tsanona>`_.
2729

2830
Breaking changes
2931
~~~~~~~~~~~~~~~~
@@ -47,6 +49,12 @@ Bug fixes
4749
date "0001-01-01". (:issue:`9108`, :pull:`9116`) By `Spencer Clark
4850
<https://github.com/spencerkclark>`_ and `Deepak Cherian
4951
<https://github.com/dcherian>`_.
52+
- Fix issue with passing parameters to ZarrStore.open_store when opening
53+
datatree in zarr format (:issue:`9376`, :pull:`9377`).
54+
By `Alfonso Ladino <https://github.com/aladinor>`_
55+
- Fix deprecation warning that was raised when calling ``np.array`` on an ``xr.DataArray``
56+
in NumPy 2.0 (:issue:`9312`, :pull:`9393`)
57+
By `Andrew Scherer <https://github.com/andrew-s28>`_.
5058

5159
Documentation
5260
~~~~~~~~~~~~~
@@ -55,6 +63,9 @@ Documentation
5563
Internal Changes
5664
~~~~~~~~~~~~~~~~
5765

66+
- Re-enable testing ``pydap`` backend with ``numpy>=2`` (:pull:`9391`).
67+
By `Miguel Jimenez <https://github.com/Mikejmnez>`_ .
68+
5869

5970

6071
.. _whats-new.2024.07.0:

xarray/backends/zarr.py

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1225,15 +1225,37 @@ def open_datatree(
12251225
filename_or_obj = _normalize_path(filename_or_obj)
12261226
if group:
12271227
parent = NodePath("/") / NodePath(group)
1228-
stores = ZarrStore.open_store(filename_or_obj, group=parent)
1228+
stores = ZarrStore.open_store(
1229+
filename_or_obj,
1230+
group=parent,
1231+
mode=mode,
1232+
synchronizer=synchronizer,
1233+
consolidated=consolidated,
1234+
consolidate_on_close=False,
1235+
chunk_store=chunk_store,
1236+
storage_options=storage_options,
1237+
stacklevel=stacklevel + 1,
1238+
zarr_version=zarr_version,
1239+
)
12291240
if not stores:
12301241
ds = open_dataset(
12311242
filename_or_obj, group=parent, engine="zarr", **kwargs
12321243
)
12331244
return DataTree.from_dict({str(parent): ds})
12341245
else:
12351246
parent = NodePath("/")
1236-
stores = ZarrStore.open_store(filename_or_obj, group=parent)
1247+
stores = ZarrStore.open_store(
1248+
filename_or_obj,
1249+
group=parent,
1250+
mode=mode,
1251+
synchronizer=synchronizer,
1252+
consolidated=consolidated,
1253+
consolidate_on_close=False,
1254+
chunk_store=chunk_store,
1255+
storage_options=storage_options,
1256+
stacklevel=stacklevel + 1,
1257+
zarr_version=zarr_version,
1258+
)
12371259
ds = open_dataset(filename_or_obj, group=parent, engine="zarr", **kwargs)
12381260
tree_root = DataTree.from_dict({str(parent): ds})
12391261
for path_group, store in stores.items():

0 commit comments

Comments
 (0)