Skip to content

Commit cd10a57

Browse files
authored
Merge pull request #37 from alimanfoo/hierarchy
Hierarchical storage, resolves #26.
2 parents 3c6f4d9 + 4da5183 commit cd10a57

34 files changed

+4665
-783
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,3 +66,5 @@ zarr/version.py
6666
*.zarr
6767
*~
6868
*.zip
69+
example*
70+
doesnotexist

docs/api.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ API reference
66

77
api/creation
88
api/core
9+
api/hierarchy
910
api/storage
1011
api/compressors
1112
api/sync

docs/api/creation.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Array creation (``zarr.creation``)
77
.. autofunction:: ones
88
.. autofunction:: full
99
.. autofunction:: array
10-
.. autofunction:: open
10+
.. autofunction:: open_array
1111
.. autofunction:: empty_like
1212
.. autofunction:: zeros_like
1313
.. autofunction:: ones_like

docs/api/hierarchy.rst

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
Groups (``zarr.hierarchy``)
2+
===========================
3+
.. module:: zarr.hierarchy
4+
5+
.. autofunction:: group
6+
.. autofunction:: open_group
7+
8+
.. autoclass:: Group
9+
10+
.. automethod:: __len__
11+
.. automethod:: __iter__
12+
.. automethod:: __contains__
13+
.. automethod:: __getitem__
14+
.. automethod:: group_keys
15+
.. automethod:: groups
16+
.. automethod:: array_keys
17+
.. automethod:: arrays
18+
.. automethod:: create_group
19+
.. automethod:: require_group
20+
.. automethod:: create_groups
21+
.. automethod:: require_groups
22+
.. automethod:: create_dataset
23+
.. automethod:: require_dataset
24+
.. automethod:: create
25+
.. automethod:: empty
26+
.. automethod:: zeros
27+
.. automethod:: ones
28+
.. automethod:: full
29+
.. automethod:: array
30+
.. automethod:: empty_like
31+
.. automethod:: zeros_like
32+
.. automethod:: ones_like
33+
.. automethod:: full_like

docs/api/storage.rst

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@ Storage (``zarr.storage``)
22
==========================
33
.. module:: zarr.storage
44

5-
This module contains a single :class:`DirectoryStore` class providing
6-
a ``MutableMapping`` interface to a directory on the file
7-
system. However, note that any object implementing the
8-
``MutableMapping`` interface can be used as a Zarr array store.
5+
This module contains storage classes for use with Zarr arrays and groups.
6+
However, note that any object implementing the ``MutableMapping`` interface
7+
can be used as a Zarr array store.
98

10-
.. autofunction:: init_store
9+
.. autofunction:: init_array
10+
.. autofunction:: init_group
1111

12+
.. autoclass:: DictStore
1213
.. autoclass:: DirectoryStore
14+
.. autoclass:: ZipStore

docs/api/sync.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,3 @@ Synchronization (``zarr.sync``)
44

55
.. autoclass:: ThreadSynchronizer
66
.. autoclass:: ProcessSynchronizer
7-
.. autoclass:: SynchronizedArray

docs/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ Highlights
1616
* Store arrays in memory, on disk, inside a Zip file, on S3, ...
1717
* Read an array concurrently from multiple threads or processes.
1818
* Write to an array concurrently from multiple threads or processes.
19+
* Organize arrays into hierarchies via groups.
1920

2021
Status
2122
------

docs/release.rst

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,21 @@
11
Release notes
22
=============
33

4+
.. _release_2.0.0:
5+
6+
2.0.0
7+
-----
8+
9+
Hierarchies
10+
~~~~~~~~~~~
11+
12+
Support has been added for organizing arrays into hierarchies via groups. See
13+
the tutorial section on :ref:`tutorial_groups` and the :mod:`zarr.hierarchy`
14+
API docs for more information.
15+
16+
To accommodate support for hierarchies the Zarr format has been modified. See
17+
the :ref:`spec_v2` for more information.
18+
419
.. _release_1.1.0:
520

621
1.1.0

docs/spec.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
1+
.. _spec:
2+
13
Specifications
24
==============
35

46
.. toctree::
57
:maxdepth: 3
68

79
spec/v1
10+
spec/v2

docs/spec/v1.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT",
1010
interpreted as described in `RFC 2119
1111
<https://www.ietf.org/rfc/rfc2119.txt>`_.
1212

13+
Status
14+
------
15+
16+
This specification is deprecated. See :ref:`spec` for the latest version.
17+
1318
Storage
1419
-------
1520

0 commit comments

Comments
 (0)