Skip to content

Commit ed0f199

Browse files
authored
Improve installation page (#2538)
* Make code blocks console * Clean up installation page * Split into pip/conda * Fix doc headings * Fix contributing link * Fix contributing link
1 parent 333a9e3 commit ed0f199

File tree

2 files changed

+31
-20
lines changed

2 files changed

+31
-20
lines changed

docs/installation.rst

Lines changed: 24 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,37 @@
11
Installation
22
============
33

4-
Zarr depends on NumPy. It is generally best to `install NumPy
5-
<https://numpy.org/doc/stable/user/install.html>`_ first using whatever method is most
6-
appropriate for your operating system and Python distribution. Other dependencies should be
7-
installed automatically if using one of the installation methods below.
4+
pip
5+
---
86

9-
Note: Zarr has endorsed `Scientific-Python SPEC 0 <https://scientific-python.org/specs/spec-0000/>`_ and now follows the version support window as outlined below:
7+
.. code-block:: console
108
11-
- Python: 36 months after initial release
12-
- Core package dependencies (e.g. NumPy): 24 months after initial release
9+
$ pip install zarr
1310
14-
Install Zarr from PyPI::
11+
There are a number of optional dependency groups you can install for extra functionality.
12+
These can be installed using ``pip install "zarr[<extra>]"``, e.g. ``pip install "zarr[gpu]"``
1513

16-
$ pip install zarr
14+
- ``gpu``: support for GPUs
15+
- ``fsspec``: support for reading/writing to remote data stores
16+
- ``tree``: support for pretty printing of directory trees
1717

18-
Alternatively, install Zarr via conda::
18+
conda
19+
-----
20+
21+
.. code-block:: console
1922
2023
$ conda install -c conda-forge zarr
2124
22-
To install the latest development version of Zarr, you can use pip with the
23-
latest GitHub main::
25+
Conda does not support optional dependencies, so you will have to manually install any packages
26+
needed to enable extra functionality.
27+
28+
Dependency support
29+
------------------
30+
Zarr has endorsed `Scientific-Python SPEC 0 <https://scientific-python.org/specs/spec-0000/>`_ and now follows the version support window as outlined below:
2431

25-
$ pip install git+https://github.com/zarr-developers/zarr-python.git
32+
- Python: 36 months after initial release
33+
- Core package dependencies (e.g. NumPy): 24 months after initial release
2634

27-
To work with Zarr source code in development, see `Contributing <contributing.html>`_.
35+
Development
36+
-----------
37+
To install the latest development version of Zarr, see `the contributing guide <contributing.html>`_.

src/zarr/core/group.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1847,8 +1847,8 @@ def __repr__(self) -> str:
18471847
async def update_attributes_async(self, new_attributes: dict[str, Any]) -> Group:
18481848
"""Update the attributes of this group.
18491849
1850-
Example
1851-
-------
1850+
Examples
1851+
--------
18521852
>>> import zarr
18531853
>>> group = zarr.group()
18541854
>>> await group.update_attributes_async({"foo": "bar"})
@@ -1947,8 +1947,9 @@ def synchronizer(self) -> None:
19471947

19481948
def update_attributes(self, new_attributes: dict[str, Any]) -> Group:
19491949
"""Update the attributes of this group.
1950-
Example
1951-
-------
1950+
1951+
Examples
1952+
--------
19521953
>>> import zarr
19531954
>>> group = zarr.group()
19541955
>>> group.update_attributes({"foo": "bar"})
@@ -2027,8 +2028,8 @@ def __contains__(self, member: str) -> bool:
20272028
def groups(self) -> Generator[tuple[str, Group], None]:
20282029
"""Return the sub-groups of this group as a generator of (name, group) pairs.
20292030
2030-
Example
2031-
-------
2031+
Examples
2032+
--------
20322033
>>> import zarr
20332034
>>> group = zarr.group()
20342035
>>> group.create_group("subgroup")

0 commit comments

Comments
 (0)