forked from zarr-developers/zarr-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
84 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
Runtime configuration | ||
===================== | ||
|
||
The :mod:`zarr.core.config` module is responsible for managing the configuration of zarr | ||
and is based on the `donfig <https://github.com/pytroll/donfig>`_ Python library. | ||
|
||
Configuration values can be set using code like the following: | ||
|
||
.. code-block:: python | ||
import zarr | ||
zarr.config.set({"array.order": "F"}) | ||
Alternatively, configuration values can be set using environment variables, e.g. | ||
``ZARR_ARRAY__ORDER=F``. | ||
|
||
The configuration can also be read from a YAML file in standard locations. | ||
For more information, see the | ||
`donfig documentation <https://donfig.readthedocs.io/en/latest/>`_. | ||
|
||
Configuration options include the following: | ||
|
||
- Default Zarr format ``default_zarr_version`` | ||
- Default array order in memory ``array.order`` | ||
- Default codecs ``array.v3_default_codecs`` and ``array.v2_default_compressor`` | ||
- Whether empty chunks are written to storage ``array.write_empty_chunks`` | ||
- Async and threading options, e.g. ``async.concurrency`` and ``threading.max_workers`` | ||
- Selections of implementations of codecs, codec pipelines and buffers | ||
|
||
For selecting custom implementations of codecs, pipelines, buffers and ndbuffers, | ||
first register the implementations in the registry and then select them in the config. | ||
For example, an implementation of the bytes codec in a class "custompackage.NewBytesCodec", | ||
requires the value of ``codecs.bytes.name`` to be "custompackage.NewBytesCodec". | ||
|
||
This is the current default configuration: | ||
|
||
.. ipython:: python | ||
import zarr | ||
zarr.config.pprint() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,7 @@ User Guide | |
arrays | ||
groups | ||
storage | ||
config | ||
v3_migration | ||
todo | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters