Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mandate kwargs on to_zarr #8257

Merged
merged 3 commits into from
Oct 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions doc/whats-new.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ New Features
Breaking changes
~~~~~~~~~~~~~~~~

- :py:meth:`Dataset.to_zarr` & :py:meth:`DataArray.to_zarr` require keyword
arguments after the initial 7 positional arguments.
By `Maximilian Roos <https://github.com/max-sixty>`_.


Deprecations
~~~~~~~~~~~~
Expand Down
2 changes: 2 additions & 0 deletions xarray/backends/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -1528,6 +1528,7 @@ def to_zarr(
synchronizer=None,
group: str | None = None,
encoding: Mapping | None = None,
*,
compute: Literal[True] = True,
consolidated: bool | None = None,
append_dim: Hashable | None = None,
Expand Down Expand Up @@ -1573,6 +1574,7 @@ def to_zarr(
synchronizer=None,
group: str | None = None,
encoding: Mapping | None = None,
*,
compute: bool = True,
consolidated: bool | None = None,
append_dim: Hashable | None = None,
Expand Down
2 changes: 2 additions & 0 deletions xarray/core/dataarray.py
Original file line number Diff line number Diff line change
Expand Up @@ -4010,6 +4010,7 @@ def to_zarr(
mode: Literal["w", "w-", "a", "r+", None] = None,
synchronizer=None,
group: str | None = None,
*,
encoding: Mapping | None = None,
compute: Literal[True] = True,
consolidated: bool | None = None,
Expand Down Expand Up @@ -4050,6 +4051,7 @@ def to_zarr(
synchronizer=None,
group: str | None = None,
encoding: Mapping | None = None,
*,
compute: bool = True,
consolidated: bool | None = None,
append_dim: Hashable | None = None,
Expand Down
2 changes: 2 additions & 0 deletions xarray/core/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -2293,6 +2293,7 @@ def to_zarr(
synchronizer=None,
group: str | None = None,
encoding: Mapping | None = None,
*,
compute: Literal[True] = True,
consolidated: bool | None = None,
append_dim: Hashable | None = None,
Expand Down Expand Up @@ -2336,6 +2337,7 @@ def to_zarr(
synchronizer=None,
group: str | None = None,
encoding: Mapping | None = None,
*,
compute: bool = True,
consolidated: bool | None = None,
append_dim: Hashable | None = None,
Expand Down
Loading