Skip to content

Commit 16f5cc2

Browse files
committed
Merge branch 'main' of github.com:zarr-developers/zarr-python into feat/read-funcs
2 parents 98bc328 + 7be0ac9 commit 16f5cc2

Some content is hidden

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

42 files changed

+1444
-1907
lines changed

.pre-commit-config.yaml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ default_language_version:
77
python: python3
88
repos:
99
- repo: https://github.com/astral-sh/ruff-pre-commit
10-
rev: v0.7.3
10+
rev: v0.8.0
1111
hooks:
1212
- id: ruff
1313
args: ["--fix", "--show-fixes"]
@@ -28,10 +28,8 @@ repos:
2828
files: src|tests
2929
additional_dependencies:
3030
# Package dependencies
31-
- asciitree
32-
- crc32c
3331
- donfig
34-
- numcodecs
32+
- numcodecs[crc32c]
3533
- numpy
3634
- typing_extensions
3735
- universal-pathlib

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,13 @@
7878
</td>
7979
</tr>
8080
<tr>
81+
<td>Funding</td>
82+
<td>
83+
<a href="https://chanzuckerberg.com/eoss/">
84+
<img src="https://img.shields.io/badge/funded%20by-EOSS-FF414B.svg?logo=data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI0NSIgaGVpZ2h0PSI0NSI+PHBhdGggZD0iTTIyLjA5OCAyMS4wNzRjLTEuMjM1Ljg2LTIuNjggMS4zOTktNC42ODggMS40MzgtMi40MjYuMDUtNC4yMzgtMS41NTEtNC40MDYtMy45MThhNC40NjUgNC40NjUgMCAwIDEgMS4xODctMy4zOCA0LjQ4IDQuNDggMCAwIDEgMy4yODYtMS40NDQgNC42NzQgNC42NzQgMCAwIDEgMS44OTQuMzc1cy0uMTU2IDEuMzItLjIxIDEuOTE0bDEuOTg3LjAxNS4zNTYtMi45NzYtLjU2My0uMzU2YTYuNTQxIDYuNTQxIDAgM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I5NC0uMzEzLTMuMzkxYTE5Ljk5NyAxOS45OTcgMCAwIDAtLjQ1My0xLjgzMmwtMy43OTMgMi4zNy01LjAyIDMuMThjLS4xNzUtLjY2OC0uNTgxLTEuMzQzLTEuNDQtMS43My0xLjAxMi0uNDY1LTIuNjYtLjExLTMuODY4LjU4MiAwIDAgMy4zMDUtNi40MDIgMy44Ni03LjQ1LjAzNS0uMDY2LS4wMTYtLjE0OC0uMDk4LS4xNDhoLTYuMThsLS4yNSAyLjA2N0gyNi41MDhsLTQuNzMgOS4wNjJjLS4wOTQuMTc2LjA5Ny4zNjMuMjc3LjI3NGwyLjUyMy0xLjM0YzEuMjE5LS42MjUgMy4yNS0xLjkxIDQuMjU0LTEuMTY4LjE0NS4xMS4zMzIuMzk4LjM0OC42OTVhLjM1Ny4zNTcgMCAwIDEtLjE0OS4yOTNsLTUuMDQzIDMuNDA2Yy0xLjYzNiAxLjE2OC0yLjI3NyAyLjkxLTIuMTIgNC41NTUuMTI0IDEuMzc1Ljk4NCAyLjU2NiAyLjI1NyAzLjI2MmE0LjE3IDQuMTcgMCAwIDAgMi4xMTMuNTE1IDQuMTY5IDQuMTY5IDAgMCAwIDEuODY0LS41YzEuNDM3LS43NTQgMi4zOTQtMi4yMzQgMi41NjItMy45NDVsLjQwMi00LjYxMy0yLjE5OSAxLjYzM1ptMCAwIiBzdHlsZT0ic3Ryb2tlOm5vbmU7ZmlsbC1ydWxlOm5vbnplcm87ZmlsbDojZmZmO2ZpbGwtb3BhY2l0eToxIi8+PC9zdmc+" alt="CZI's Essential Open Source Software for Science">
85+
</a>
86+
</td>
87+
</tr>
8188
<td>Citation</td>
8289
<td>
8390
<a href="https://doi.org/10.5281/zenodo.3773450">

docs/guide/storage.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Storage
22
=======
33

44
Zarr-Python supports multiple storage backends, including: local file systems,
5-
Zip files, remote stores via ``fspec`` (S3, HTTP, etc.), and in-memory stores. In
5+
Zip files, remote stores via ``fsspec`` (S3, HTTP, etc.), and in-memory stores. In
66
Zarr-Python 3, stores must implement the abstract store API from
77
:class:`zarr.abc.store.Store`.
88

@@ -19,9 +19,9 @@ to Zarr's top level API will result in the store being created automatically.
1919
.. code-block:: python
2020
2121
>>> import zarr
22-
>>> zarr.open("data/foo/bar", mode="r") # implicitly creates a LocalStore
22+
>>> zarr.open("data/foo/bar", mode="r") # implicitly creates a read-only LocalStore
2323
<Group file://data/foo/bar>
24-
>>> zarr.open("s3://foo/bar", mode="r") # implicitly creates a RemoteStore
24+
>>> zarr.open("s3://foo/bar", mode="r") # implicitly creates a read-only RemoteStore
2525
<Group s3://foo/bar>
2626
>>> data = {}
2727
>>> zarr.open(data, mode="w") # implicitly creates a MemoryStore
@@ -43,7 +43,7 @@ filesystem.
4343
.. code-block:: python
4444
4545
>>> import zarr
46-
>>> store = zarr.storage.LocalStore("data/foo/bar", mode="r")
46+
>>> store = zarr.storage.LocalStore("data/foo/bar", read_only=True)
4747
>>> zarr.open(store=store)
4848
<Group file://data/foo/bar>
4949
@@ -72,7 +72,7 @@ that implements the `AbstractFileSystem` API,
7272
.. code-block:: python
7373
7474
>>> import zarr
75-
>>> store = zarr.storage.RemoteStore.from_url("gs://foo/bar", mode="r")
75+
>>> store = zarr.storage.RemoteStore.from_url("gs://foo/bar", read_only=True)
7676
>>> zarr.open(store=store)
7777
<Array <RemoteStore(GCSFileSystem, foo/bar)> shape=(10, 20) dtype=float32>
7878
@@ -86,7 +86,7 @@ Zarr data (metadata and chunks) to a dictionary.
8686
8787
>>> import zarr
8888
>>> data = {}
89-
>>> store = zarr.storage.MemoryStore(data, mode="w")
89+
>>> store = zarr.storage.MemoryStore(data)
9090
>>> zarr.open(store=store, shape=(2, ))
9191
<Array memory://4943638848 shape=(2,) dtype=float64>
9292

docs/tutorial.rst

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -330,10 +330,10 @@ representation of the hierarchy, e.g.::
330330

331331
>>> root.tree()
332332
/
333-
└── foo
334-
└── bar
335-
├── baz (10000, 10000) int32
336-
└── quux (10000, 10000) int32
333+
└── foo
334+
└── bar
335+
├── baz (10000, 10000) int32
336+
└── quux (10000, 10000) int32
337337

338338
The :func:`zarr.convenience.open` function provides a convenient way to create or
339339
re-open a group stored in a directory on the file-system, with sub-groups stored in
@@ -424,6 +424,12 @@ Groups also have the :func:`zarr.hierarchy.Group.tree` method, e.g.::
424424
├── bar (1000000,) int64
425425
└── baz (1000, 1000) float32
426426

427+
428+
.. note::
429+
430+
:func:`zarr.Group.tree` requires the optional `rich <https://rich.readthedocs.io/en/stable/>`_
431+
dependency. It can be installed with the ``[tree]`` extra.
432+
427433
If you're using Zarr within a Jupyter notebook (requires
428434
`ipytree <https://github.com/QuantStack/ipytree>`_), calling ``tree()`` will generate an
429435
interactive tree representation, see the `repr_tree.ipynb notebook

0 commit comments

Comments
 (0)