Skip to content

Commit 51d8667

Browse files
committed
fix persistence docs
1 parent 73d780c commit 51d8667

File tree

2 files changed

+14
-10
lines changed

2 files changed

+14
-10
lines changed

PERSISTENCE.rst

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ zarr - Persistence
44
This document describes the file organisation and formats used to save zarr
55
arrays on disk.
66

7-
All data and metadata associated with a zarr array is stored within a
7+
All data and metadata associated with a zarr array are stored within a
88
directory on the file system. Within this directory there are a number
99
of files and sub-directories storing different components of the data
1010
and metadata. Here I'll refer to a directory containing a zarr array
@@ -23,7 +23,7 @@ Mandatory fields and allowed values are as follows:
2323

2424
* ``shape`` - list of integers - the size of each dimension of the array
2525
* ``chunks`` - list of integers - the size of each dimension of a chunk, i.e., the chunk shape
26-
* ``dtype`` - string or list of lists - a description of the data type, following Numpy convention
26+
* ``dtype`` - string - a description of the data type, following Numpy convention
2727
* ``fill_value`` - scalar value - value to use for uninitialised portions of the array
2828
* ``cname`` - string - name of the compression library used
2929
* ``clevel`` - integer - compression level
@@ -60,7 +60,7 @@ metadata associated with the array, i.e., user attributes. The format
6060
of this file is JSON.
6161

6262
For example::
63-
63+
6464
>>> import zarr
6565
>>> z = zarr.open('example.zarr', mode='w', shape=(1000000, 1000),
6666
... chunks=(10000, 100), dtype='i4', fill_value=42,
@@ -69,16 +69,20 @@ For example::
6969
>>> z.attrs['bar'] = 4.2
7070
>>> z.attrs['baz'] = 'quux'
7171
>>> print(open('example.zarr/__zattr__').read())
72-
73-
TODO add results above
72+
{
73+
"bar": 4.2,
74+
"baz": "quux",
75+
"foo": 42
76+
}
7477

7578
Array data
7679
----------
7780

7881
Within a root directory, a sub-directory called "__zdata__" contains
7982
the array data. The array data is divided into chunks, each of which
80-
is compressed using the [blosc meta-compression library](TODO). Each
81-
chunk is stored in a separate file.
83+
is compressed using the `blosc meta-compression library
84+
<https://github.com/blosc/c-blosc>`_. Each chunk is stored in a
85+
separate file.
8286

8387
The chunk files are named according to the chunk indices. E.g., for a
8488
2-dimensional array with shape (100, 100) and chunk shape (10, 10)
@@ -101,8 +105,8 @@ header is organised as follows::
101105
| +----------blosclz version
102106
+--------------blosc version
103107

104-
For more details on the header, see the [C-Blosc header
105-
description](https://github.com/Blosc/c-blosc/blob/master/README_HEADER.rst).
108+
For more details on the header, see the `c-blosc header description
109+
<https://github.com/Blosc/c-blosc/blob/master/README_HEADER.rst>`_.
106110

107111
If a file does not exist on the file system for any given chunk in an
108112
array, that indicates the chunk has not been initialised, and the

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ setenv =
1212
commands =
1313
python setup.py build_ext --inplace
1414
nosetests -v
15-
py34: python -m doctest -o NORMALIZE_WHITESPACE README.rst
15+
py34: python -m doctest -o NORMALIZE_WHITESPACE README.rst PERSISTENCE.rst
1616
deps =
1717
nose
1818
setuptools

0 commit comments

Comments
 (0)