Skip to content

Commit b55d09d

Browse files
authored
Merge branch 'main' into feat/filters-prop
2 parents 8f2babb + 5c6267e commit b55d09d

File tree

18 files changed

+164
-170
lines changed

18 files changed

+164
-170
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ coverage.xml
5151

5252
# Sphinx documentation
5353
docs/_build/
54-
docs/_autoapi
54+
docs/api
5555
docs/data
5656
data
5757
data.zip

docs/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ help:
5252
.PHONY: clean
5353
clean:
5454
rm -rf $(BUILDDIR)/*
55-
rm -rf $(BUILDDIR)/../_autoapi
55+
rm -rf $(BUILDDIR)/../api
5656

5757
.PHONY: html
5858
html:

docs/api/index.rst

Lines changed: 0 additions & 7 deletions
This file was deleted.

docs/conf.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
autoapi_add_toctree_entry = False
5858
autoapi_generate_api_docs = True
5959
autoapi_member_order = "groupwise"
60-
autoapi_root = "_autoapi"
60+
autoapi_root = "api"
6161
autoapi_keep_files = True
6262
autoapi_options = [ 'members', 'undoc-members', 'show-inheritance', 'show-module-summary', 'imported-members', ]
6363

@@ -108,6 +108,7 @@ def skip_submodules(
108108
"release": "developers/release.html",
109109
"roadmap": "developers/roadmap.html",
110110
"installation": "user-guide/installation.html",
111+
"api": "api/zarr/index"
111112
}
112113

113114
# The language for content autogenerated by Sphinx. Refer to documentation

docs/index.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Zarr-Python
1010

1111
quickstart
1212
user-guide/index
13-
api/index
13+
API reference <api/zarr/index>
1414
developers/index
1515
developers/release
1616
about
@@ -25,7 +25,7 @@ Zarr-Python
2525

2626
Zarr-Python is a Python library for reading and writing Zarr groups and arrays. Highlights include:
2727

28-
* Specification support for both Zarr v2 and v3.
28+
* Specification support for both Zarr format 2 and 3.
2929
* Create and read from N-dimensional arrays using NumPy-like semantics.
3030
* Flexible storage enables reading and writing from local, cloud and in-memory stores.
3131
* High performance: Enables fast I/O with support for asynchronous I/O and multi-threading.
@@ -81,12 +81,12 @@ Zarr-Python is a Python library for reading and writing Zarr groups and arrays.
8181

8282
+++
8383

84-
.. button-ref:: api/index
84+
.. button-ref:: api/zarr/index
8585
:expand:
8686
:color: dark
8787
:click-parent:
8888

89-
To the API reference guide
89+
To the API reference
9090

9191
.. grid-item-card::
9292
:img-top: _static/index_contribute.svg

docs/user-guide/extending.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ Custom codecs
1010
-------------
1111

1212
.. note::
13-
This section explains how custom codecs can be created for Zarr version 3 data. For Zarr
14-
version 2, codecs should subclass the
13+
This section explains how custom codecs can be created for Zarr format 3 arrays. For Zarr
14+
format 2, codecs should subclass the
1515
`numcodecs.abc.Codec <https://numcodecs.readthedocs.io/en/stable/abc.html#numcodecs.abc.Codec>`_
1616
base class and register through
1717
`numcodecs.registry.register_codec <https://numcodecs.readthedocs.io/en/stable/registry.html#numcodecs.registry.register_codec>`_.
@@ -66,7 +66,7 @@ strongly recommended to prefix the codec identifier with a unique name. For exam
6666
the codecs from ``numcodecs`` are prefixed with ``numcodecs.``, e.g. ``numcodecs.delta``.
6767

6868
.. note::
69-
Note that the extension mechanism for the Zarr version 3 is still under development.
69+
Note that the extension mechanism for the Zarr format 3 is still under development.
7070
Requirements for custom codecs including the choice of codec identifiers might
7171
change in the future.
7272

docs/user-guide/v3_migration.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
Zarr-Python 3 represents a major refactor of the Zarr-Python codebase. Some of the
55
goals motivating this refactor included:
66

7-
* adding support for the Zarr V3 specification (along with the Zarr V2 specification)
7+
* adding support for the Zarr format 3 specification (along with the Zarr format 2 specification)
88
* cleaning up internal and user facing APIs
99
* improving performance (particularly in high latency storage environments like
1010
cloud object stores)

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ filterwarnings = [
380380
"ignore:The loop argument is deprecated since Python 3.8.*:DeprecationWarning",
381381
"ignore:Creating a zarr.buffer.gpu.*:UserWarning",
382382
"ignore:Duplicate name:UserWarning", # from ZipFile
383-
"ignore:.*is currently not part in the Zarr version 3 specification.*:UserWarning",
383+
"ignore:.*is currently not part in the Zarr format 3 specification.*:UserWarning",
384384
]
385385
markers = [
386386
"gpu: mark a test as requiring CuPy and GPU"

src/zarr/api/asynchronous.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ async def consolidate_metadata(
198198

199199
if any(m.zarr_format == 3 for m in members_metadata.values()):
200200
warnings.warn(
201-
"Consolidated metadata is currently not part in the Zarr version 3 specification. It "
201+
"Consolidated metadata is currently not part in the Zarr format 3 specification. It "
202202
"may not be supported by other zarr implementations and may change in the future.",
203203
category=UserWarning,
204204
stacklevel=1,
@@ -770,16 +770,16 @@ async def open_group(
770770
Whether to use consolidated metadata.
771771
772772
By default, consolidated metadata is used if it's present in the
773-
store (in the ``zarr.json`` for Zarr v3 and in the ``.zmetadata`` file
774-
for Zarr v2).
773+
store (in the ``zarr.json`` for Zarr format 3 and in the ``.zmetadata`` file
774+
for Zarr format 2).
775775
776776
To explicitly require consolidated metadata, set ``use_consolidated=True``,
777777
which will raise an exception if consolidated metadata is not found.
778778
779779
To explicitly *not* use consolidated metadata, set ``use_consolidated=False``,
780780
which will fall back to using the regular, non consolidated metadata.
781781
782-
Zarr v2 allowed configuring the key storing the consolidated metadata
782+
Zarr format 2 allowed configuring the key storing the consolidated metadata
783783
(``.zmetadata`` by default). Specify the custom key as ``use_consolidated``
784784
to load consolidated metadata from a non-default key.
785785
@@ -870,21 +870,21 @@ async def create(
870870
Array shape.
871871
chunks : int or tuple of ints, optional
872872
The shape of the array's chunks.
873-
V2 only. V3 arrays should use `chunk_shape` instead.
873+
Zarr format 2 only. Zarr format 3 arrays should use `chunk_shape` instead.
874874
If not specified, default values are guessed based on the shape and dtype.
875875
dtype : str or dtype, optional
876876
NumPy dtype.
877877
chunk_shape : int or tuple of ints, optional
878878
The shape of the Array's chunks (default is None).
879-
V3 only. V2 arrays should use `chunks` instead.
879+
Zarr format 3 only. Zarr format 2 arrays should use `chunks` instead.
880880
chunk_key_encoding : ChunkKeyEncoding, optional
881881
A specification of how the chunk keys are represented in storage.
882-
V3 only. V2 arrays should use `dimension_separator` instead.
882+
Zarr format 3 only. Zarr format 2 arrays should use `dimension_separator` instead.
883883
Default is ``("default", "/")``.
884884
codecs : Sequence of Codecs or dicts, optional
885885
An iterable of Codec or dict serializations of Codecs. The elements of
886886
this collection specify the transformation from array values to stored bytes.
887-
V3 only. V2 arrays should use ``filters`` and ``compressor`` instead.
887+
Zarr format 3 only. Zarr format 2 arrays should use ``filters`` and ``compressor`` instead.
888888
889889
If no codecs are provided, default codecs will be used:
890890
@@ -895,7 +895,7 @@ async def create(
895895
These defaults can be changed by modifying the value of ``array.v3_default_codecs`` in :mod:`zarr.core.config`.
896896
compressor : Codec, optional
897897
Primary compressor to compress chunk data.
898-
V2 only. V3 arrays should use ``codecs`` instead.
898+
Zarr format 2 only. Zarr format 3 arrays should use ``codecs`` instead.
899899
900900
If neither ``compressor`` nor ``filters`` are provided, a default compressor will be used:
901901
@@ -925,7 +925,7 @@ async def create(
925925
for storage of both chunks and metadata.
926926
filters : sequence of Codecs, optional
927927
Sequence of filters to use to encode chunk data prior to compression.
928-
V2 only. If no ``filters`` are provided, a default set of filters will be used.
928+
Zarr format 2 only. If no ``filters`` are provided, a default set of filters will be used.
929929
These defaults can be changed by modifying the value of ``array.v2_default_filters`` in :mod:`zarr.core.config`.
930930
cache_metadata : bool, optional
931931
If True, array configuration metadata will be cached for the
@@ -942,7 +942,7 @@ async def create(
942942
A codec to encode object arrays, only needed if dtype=object.
943943
dimension_separator : {'.', '/'}, optional
944944
Separator placed between the dimensions of a chunk.
945-
V2 only. V3 arrays should use ``chunk_key_encoding`` instead.
945+
Zarr format 2 only. Zarr format 3 arrays should use ``chunk_key_encoding`` instead.
946946
Default is ".".
947947
write_empty_chunks : bool, optional
948948
Deprecated in favor of the ``config`` keyword argument.

src/zarr/api/synchronous.py

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -502,16 +502,16 @@ def open_group(
502502
Whether to use consolidated metadata.
503503
504504
By default, consolidated metadata is used if it's present in the
505-
store (in the ``zarr.json`` for Zarr v3 and in the ``.zmetadata`` file
506-
for Zarr v2).
505+
store (in the ``zarr.json`` for Zarr format 3 and in the ``.zmetadata`` file
506+
for Zarr format 2).
507507
508508
To explicitly require consolidated metadata, set ``use_consolidated=True``,
509509
which will raise an exception if consolidated metadata is not found.
510510
511511
To explicitly *not* use consolidated metadata, set ``use_consolidated=False``,
512512
which will fall back to using the regular, non consolidated metadata.
513513
514-
Zarr v2 allowed configuring the key storing the consolidated metadata
514+
Zarr format 2 allows configuring the key storing the consolidated metadata
515515
(``.zmetadata`` by default). Specify the custom key as ``use_consolidated``
516516
to load consolidated metadata from a non-default key.
517517
@@ -785,16 +785,16 @@ def create_array(
785785
Iterable of filters to apply to each chunk of the array, in order, before serializing that
786786
chunk to bytes.
787787
788-
For Zarr v3, a "filter" is a codec that takes an array and returns an array,
788+
For Zarr format 3, a "filter" is a codec that takes an array and returns an array,
789789
and these values must be instances of ``ArrayArrayCodec``, or dict representations
790790
of ``ArrayArrayCodec``.
791791
If ``filters`` and ``compressors`` are not specified, then the default codecs for
792-
Zarr v3 will be used.
792+
Zarr format 3 will be used.
793793
These defaults can be changed by modifying the value of ``array.v3_default_codecs``
794794
in :mod:`zarr.core.config`.
795795
Use ``None`` to omit default filters.
796796
797-
For Zarr v2, a "filter" can be any numcodecs codec; you should ensure that the
797+
For Zarr format 2, a "filter" can be any numcodecs codec; you should ensure that the
798798
the order if your filters is consistent with the behavior of each filter.
799799
If no ``filters`` are provided, a default set of filters will be used.
800800
These defaults can be changed by modifying the value of ``array.v2_default_filters``
@@ -804,32 +804,32 @@ def create_array(
804804
List of compressors to apply to the array. Compressors are applied in order, and after any
805805
filters are applied (if any are specified) and the data is serialized into bytes.
806806
807-
For Zarr v3, a "compressor" is a codec that takes a bytestrea, and
808-
returns another bytestream. Multiple compressors my be provided for Zarr v3.
807+
For Zarr format 3, a "compressor" is a codec that takes a bytestream, and
808+
returns another bytestream. Multiple compressors my be provided for Zarr format 3.
809809
If ``filters`` and ``compressors`` are not specified, then the default codecs for
810-
Zarr v3 will be used.
810+
Zarr format 3 will be used.
811811
These defaults can be changed by modifying the value of ``array.v3_default_codecs``
812812
in :mod:`zarr.core.config`.
813813
Use ``None`` to omit default compressors.
814814
815-
For Zarr v2, a "compressor" can be any numcodecs codec. Only a single compressor may
816-
be provided for Zarr v2.
815+
For Zarr format 2, a "compressor" can be any numcodecs codec. Only a single compressor may
816+
be provided for Zarr format 2.
817817
If no ``compressors`` are provided, a default compressor will be used.
818818
These defaults can be changed by modifying the value of ``array.v2_default_compressor``
819819
in :mod:`zarr.core.config`.
820820
Use ``None`` to omit the default compressor.
821821
serializer : dict[str, JSON] | ArrayBytesCodec, optional
822822
Array-to-bytes codec to use for encoding the array data.
823-
Zarr v3 only. Zarr v2 arrays use implicit array-to-bytes conversion.
823+
Zarr format 3 only. Zarr format 2 arrays use implicit array-to-bytes conversion.
824824
If no ``serializer`` is provided, the `zarr.codecs.BytesCodec` codec will be used.
825825
fill_value : Any, optional
826826
Fill value for the array.
827827
order : {"C", "F"}, optional
828828
The memory of the array (default is "C").
829-
For Zarr v2, this parameter sets the memory order of the array.
830-
For Zarr v3, this parameter is deprecated, because memory order
831-
is a runtime parameter for Zarr v3 arrays. The recommended way to specify the memory
832-
order for Zarr v3 arrays is via the ``config`` parameter, e.g. ``{'config': 'C'}``.
829+
For Zarr format 2, this parameter sets the memory order of the array.
830+
For Zarr format 3, this parameter is deprecated, because memory order
831+
is a runtime parameter for Zarr format 3 arrays. The recommended way to specify the memory
832+
order for Zarr format 3 arrays is via the ``config`` parameter, e.g. ``{'config': 'C'}``.
833833
If no ``order`` is provided, a default order will be used.
834834
This default can be changed by modifying the value of ``array.order`` in :mod:`zarr.core.config`.
835835
zarr_format : {2, 3}, optional
@@ -838,11 +838,11 @@ def create_array(
838838
Attributes for the array.
839839
chunk_key_encoding : ChunkKeyEncoding, optional
840840
A specification of how the chunk keys are represented in storage.
841-
For Zarr v3, the default is ``{"name": "default", "separator": "/"}}``.
842-
For Zarr v2, the default is ``{"name": "v2", "separator": "."}}``.
841+
For Zarr format 3, the default is ``{"name": "default", "separator": "/"}}``.
842+
For Zarr format 2, the default is ``{"name": "v2", "separator": "."}}``.
843843
dimension_names : Iterable[str], optional
844844
The names of the dimensions (default is None).
845-
Zarr v3 only. Zarr v2 arrays should not use this parameter.
845+
Zarr format 3 only. Zarr format 2 arrays should not use this parameter.
846846
storage_options : dict, optional
847847
If using an fsspec URL to create the store, these will be passed to the backend implementation.
848848
Ignored otherwise.

0 commit comments

Comments
 (0)