Skip to content

Commit 3479ecd

Browse files
committed
add release notes to docs
1 parent 4bac0ec commit 3479ecd

File tree

4 files changed

+148
-2
lines changed

4 files changed

+148
-2
lines changed

docs/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ Contents
5656
tutorial
5757
api
5858
spec
59+
release
5960

6061
Acknowledgments
6162
---------------

docs/release.rst

Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
Release notes
2+
=============
3+
4+
.. _release_1.0.0:
5+
6+
1.0.0
7+
-----
8+
9+
This release includes a complete re-organization of the code base. The
10+
major version number has been bumped to indicate that there have been
11+
backwards-incompatible changes to the API and the on-disk storage
12+
format. However, Zarr is still in an early stage of development, so
13+
please do not take the version number as an indicator of maturity.
14+
15+
Storage
16+
~~~~~~~
17+
18+
The main motivation for re-organizing the code was to create an
19+
abstraction layer between the core array logic and data storage (`#21
20+
<https://github.com/alimanfoo/zarr/issues/21>`_). In this release, any
21+
object that implements the ``MutableMapping`` interface can be used as
22+
an array store. See the tutorial sections on :ref:`tutorial_persist`
23+
and :ref:`tutorial_tips_storage`, the :ref:`spec_v1`, and the
24+
:mod:`zarr.storage` module documentation for more information.
25+
26+
Please note also that the file organization and file name conventions
27+
used when storing a Zarr array in a directory on the file system have
28+
changed. Persistent Zarr arrays created using previous versions of the
29+
software will not be compatible with this version. See the
30+
:mod:`zarr.storage` API docs and the :ref:`spec_v1` for more
31+
information.
32+
33+
Compression
34+
~~~~~~~~~~~
35+
36+
An abstraction layer has also been created between the core array
37+
logic and the code for compressing and decompressing array
38+
chunks. This release still bundles the c-blosc library and uses Blosc
39+
as the default compressor, however other compressors including zlib,
40+
BZ2 and LZMA are also now supported via the Python standard
41+
library. New compressors can also be dynamically registered for use
42+
with Zarr. See the tutorial sections on :ref:`tutorial_compress` and
43+
:ref:`tutorial_tips_blosc`, the :ref:`spec_v1`, and the
44+
:mod:`zarr.compressors` module documentation for more information.
45+
46+
Synchronization
47+
~~~~~~~~~~~~~~~
48+
49+
The synchronization code has also been refactored to create a layer of
50+
abstraction, enabling Zarr arrays to be used in parallel computations
51+
with a number of alternative synchronization methods. For more
52+
information see the tutorial section on :ref:`tutorial_sync` and the
53+
:mod:`zarr.sync` module documentation.
54+
55+
Changes to the Blosc extension
56+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
57+
58+
NumPy is no longer a build dependency for the :mod:`zarr.blosc` Cython
59+
extension, so setup.py will run even if NumPy is not already
60+
installed, and should automatically install NumPy as a runtime
61+
dependency. Manual installation of NumPy prior to installing Zarr is
62+
still recommended, however, as the automatic installation of NumPy may
63+
fail or be sub-optimal on some platforms.
64+
65+
The :mod:`zarr.blosc` Cython extension is now optional and compilation
66+
will only be attempted on posix systems; other systems will fall back
67+
to a pure-Python installation (`#25
68+
<https://github.com/alimanfoo/zarr/issues/25>`_). On these systems
69+
only 'zlib', 'bz2' and 'lzma' compression will be available.
70+
71+
Some optimizations have been made within the :mod:`zarr.blosc`
72+
extension to avoid unnecessary memory copies, giving a ~10-20%
73+
performance improvement for multi-threaded compression operations.
74+
75+
The :mod:`zarr.blosc` extension now automatically detects whether it
76+
is running within a single-threaded or multi-threaded program and
77+
adapts its internal behaviour accordingly (`#27
78+
<https://github.com/alimanfoo/zarr/issues/27>`_). There is no need for
79+
the user to make any API calls to switch Blosc between contextual and
80+
non-contextual (global lock) mode. See also the tutorial section on
81+
:ref:`tutorial_tips_blosc`.
82+
83+
Other changes
84+
~~~~~~~~~~~~~
85+
86+
The internal code for managing chunks has been rewritten to be more
87+
efficient. Now no state is maintained for chunks outside of the array
88+
store, meaning that chunks do not carry any extra memory overhead not
89+
accounted for by the store. This negates the need for the "lazy"
90+
option present in the previous release, and this has been removed.
91+
92+
The memory layout within chunks can now be set as either "C"
93+
(row-major) or "F" (column-major), which can help to provide better
94+
compression for some data (`#7
95+
<https://github.com/alimanfoo/zarr/issues/7>`_). See the tutorial
96+
section on :ref:`tutorial_tips_order` for more information.
97+
98+
A bug has been fixed within the ``__getitem__`` and ``__setitem__``
99+
machinery for slicing arrays, to properly handle getting and setting
100+
partial slices.
101+
102+
.. _release_0.4.0:
103+
104+
0.4.0
105+
-----
106+
107+
See `v0.4.0 release notes on GitHub
108+
<https://github.com/alimanfoo/zarr/releases/tag/v0.4.0>`_.
109+
110+
.. _release_0.3.0:
111+
112+
0.3.0
113+
-----
114+
115+
See `v0.3.0 release notes on GitHub
116+
<https://github.com/alimanfoo/zarr/releases/tag/v0.3.0>`_.
117+

docs/spec/v1.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
.. _spec_v1:
2+
13
Zarr storage specification version 1
24
====================================
35

docs/tutorial.rst

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
.. _tutorial:
2+
13
Tutorial
24
========
35

@@ -7,6 +9,8 @@ chunks and compressed. If you are already familiar with HDF5 datasets
79
then Zarr arrays provide similar functionality, but with some
810
additional flexibility.
911

12+
.. _tutorial_create:
13+
1014
Creating an array
1115
-----------------
1216

@@ -28,6 +32,8 @@ The code above creates a 2-dimensional array of 32-bit integers with
2832
For a complete list of array creation routines see the
2933
:mod:`zarr.creation` module documentation.
3034

35+
.. _tutorial_array:
36+
3137
Reading and writing data
3238
------------------------
3339

@@ -73,6 +79,8 @@ the requested region into a NumPy array, e.g.::
7379
[9998, 42, 42, ..., 42, 42, 42],
7480
[9999, 42, 42, ..., 42, 42, 42]], dtype=int32)
7581

82+
.. _tutorial_persist:
83+
7684
Persistent arrays
7785
-----------------
7886

@@ -114,6 +122,8 @@ Check that the data have been written and can be read again::
114122
>>> np.all(z1[:] == z2[:])
115123
True
116124

125+
.. _tutorial_resize:
126+
117127
Resizing and appending
118128
----------------------
119129

@@ -157,6 +167,8 @@ which can be used to append data to any axis. E.g.::
157167
nbytes: 152.6M; nbytes_stored: 7.9M; ratio: 19.3; initialized: 400/400
158168
store: builtins.dict
159169

170+
.. _tutorial_compress:
171+
160172
Compression
161173
-----------
162174

@@ -216,6 +228,8 @@ the delta filter::
216228
nbytes: 381.5M; nbytes_stored: 248.1K; ratio: 1574.7; initialized: 100/100
217229
store: builtins.dict
218230

231+
.. _tutorial_sync:
232+
219233
Parallel computing and synchronization
220234
--------------------------------------
221235

@@ -277,6 +291,8 @@ provided that all processes have access to a shared file system. E.g.::
277291

278292
This array is safe to read or write from multiple processes.
279293

294+
.. _tutorial_attrs:
295+
280296
User attributes
281297
---------------
282298

@@ -298,9 +314,13 @@ for associating an array with application-specific metadata. For example::
298314
Internally Zarr uses JSON to store array attributes, so attribute values
299315
must be JSON serializable.
300316

317+
.. _tutorial_tips:
318+
301319
Tips and tricks
302320
---------------
303321

322+
.. _tutorial_tips_copy:
323+
304324
Copying large arrays
305325
~~~~~~~~~~~~~~~~~~~~
306326

@@ -316,6 +336,8 @@ Internally the example above works chunk-by-chunk, extracting only the
316336
data from ``z1`` required to fill each chunk in ``z2``. The source of
317337
the data (``z1``) could equally be an h5py Dataset.
318338

339+
.. _tutorial_tips_order:
340+
319341
Changing memory layout
320342
~~~~~~~~~~~~~~~~~~~~~~
321343

@@ -343,6 +365,8 @@ order of bytes within chunks of an array may improve the compression ratio,
343365
depending on the structure of the data, the compression algorithm used, and
344366
which compression filters (e.g., byte shuffle) have been applied.
345367

368+
.. _tutorial_tips_storage:
369+
346370
Storage alternatives
347371
~~~~~~~~~~~~~~~~~~~~
348372

@@ -390,6 +414,8 @@ because items within a Zip file cannot be updated in place. This means
390414
that data in the array should only be written once and write
391415
operations should be aligned with chunk boundaries.
392416

417+
.. _tutorial_tips_chunks:
418+
393419
Chunk size and shape
394420
~~~~~~~~~~~~~~~~~~~~
395421

@@ -420,6 +446,8 @@ to find a compromise, e.g.::
420446
>>> z3.chunks
421447
(1000, 1000)
422448

449+
.. _tutorial_tips_blosc:
450+
423451
Configuring Blosc
424452
~~~~~~~~~~~~~~~~~
425453

@@ -441,5 +469,3 @@ behaviour, set the value of the ``blosc.use_threads`` variable to
441469
``True`` (Blosc always uses multiple internal threads) or ``False``
442470
(Blosc always runs in single-threaded contextual mode). To re-enable
443471
automatic switching, set ``blosc.use_threads`` to ``None``.
444-
445-

0 commit comments

Comments
 (0)