Skip to content

Commit

Permalink
dev whats-new (#9936)
Browse files Browse the repository at this point in the history
* dev whats-new

* silence warning

* [skip-ci] add rich

* [skip-ci] add :okwarning: for ipython blocks which use to_zarr in user-guide/io.rst

* [skip-ci] add :okwarning: for ipython blocks which use open_zarr in user-guide/io.rst

* [skip-ci] remove :okwarning: for python code block

---------

Co-authored-by: Kai Mühlbauer <kai.muehlbauer@uni-bonn.de>
  • Loading branch information
dcherian and kmuehlbauer authored Jan 10, 2025
1 parent ceb5364 commit 5279bd1
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 0 deletions.
1 change: 1 addition & 0 deletions ci/requirements/doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ dependencies:
- pre-commit
- pyarrow
- pyproj
- rich # for Zarr tree()
- scipy!=1.10.0
- seaborn
- setuptools
Expand Down
1 change: 1 addition & 0 deletions doc/internals/zarr-encoding-spec.rst
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ As a concrete example, here we write a tutorial dataset to Zarr and then
re-open it directly with Zarr:

.. ipython:: python
:okwarning:
import os
import xarray as xr
Expand Down
7 changes: 7 additions & 0 deletions doc/user-guide/io.rst
Original file line number Diff line number Diff line change
Expand Up @@ -661,6 +661,7 @@ To write to a local directory, we pass a path to a directory:
! rm -rf path/to/directory.zarr
.. ipython:: python
:okwarning:
ds = xr.Dataset(
{"foo": (("x", "y"), np.random.rand(4, 5))},
Expand Down Expand Up @@ -697,6 +698,7 @@ To read back a zarr dataset that has been created this way, we use the
:py:func:`open_zarr` method:

.. ipython:: python
:okwarning:
ds_zarr = xr.open_zarr("path/to/directory.zarr")
ds_zarr
Expand Down Expand Up @@ -771,6 +773,7 @@ to Zarr:
! rm -rf path/to/directory.zarr
.. ipython:: python
:okwarning:
import dask.array
Expand Down Expand Up @@ -823,6 +826,7 @@ For example:
! rm -rf foo.zarr
.. ipython:: python
:okwarning:
import zarr
from numcodecs.blosc import Blosc
Expand Down Expand Up @@ -873,6 +877,7 @@ order, e.g., for time-stepping a simulation:
! rm -rf path/to/directory.zarr
.. ipython:: python
:okwarning:
ds1 = xr.Dataset(
{"foo": (("x", "y", "t"), np.random.rand(4, 5, 2))},
Expand Down Expand Up @@ -940,6 +945,7 @@ space on disk or in memory, yet when writing to disk the default zarr behavior i
split them into chunks:

.. ipython:: python
:okwarning:
ds.to_zarr("path/to/directory.zarr", mode="w")
! ls -R path/to/directory.zarr
Expand All @@ -950,6 +956,7 @@ storage provider. To disable this chunking, we can specify a chunk size equal to
length of each dimension by using the shorthand chunk size ``-1``:

.. ipython:: python
:okwarning:
ds.to_zarr(
"path/to/directory.zarr",
Expand Down
27 changes: 27 additions & 0 deletions doc/whats-new.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,33 @@ What's New
np.random.seed(123456)
.. _whats-new.2025.01.2:

v2025.01.2 (unreleased)
-----------------------

New Features
~~~~~~~~~~~~


Breaking changes
~~~~~~~~~~~~~~~~


Deprecations
~~~~~~~~~~~~


Bug fixes
~~~~~~~~~


Documentation
~~~~~~~~~~~~~


Internal Changes
~~~~~~~~~~~~~~~~

.. _whats-new.2025.01.1:

Expand Down

0 comments on commit 5279bd1

Please sign in to comment.