Skip to content

Commit a615ee9

Browse files
dstansbyjoshmoore
andauthored
Remove specs pages from docs (#2555)
* Remove specs pages from docs * Add spec doc redirects * Fix redirects * Fix index page typo Co-authored-by: Josh Moore <[email protected]> --------- Co-authored-by: Josh Moore <[email protected]>
1 parent c0f7ece commit a615ee9

File tree

10 files changed

+30
-45
lines changed

10 files changed

+30
-45
lines changed

docs/conf.py

+8
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
"sphinx_issues",
4848
"sphinx_copybutton",
4949
"sphinx_design",
50+
'sphinx_reredirects',
5051
]
5152

5253
issues_github_path = "zarr-developers/zarr-python"
@@ -81,6 +82,13 @@
8182
version = get_version("zarr")
8283
release = get_version("zarr")
8384

85+
redirects = {
86+
"spec": "https://zarr-specs.readthedocs.io",
87+
"spec/v1": 'https://zarr-specs.readthedocs.io/en/latest/v1/v1.0.html',
88+
"spec/v2": "https://zarr-specs.readthedocs.io/en/latest/v2/v2.0.html",
89+
"spec/v3": "https://zarr-specs.readthedocs.io/en/latest/v3/core/v3.0.html",
90+
}
91+
8492
# The language for content autogenerated by Sphinx. Refer to documentation
8593
# for a list of supported languages.
8694
#

docs/contributing.rst

+2-1
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,8 @@ Data format compatibility
307307
The data format used by Zarr is defined by a specification document, which should be
308308
platform-independent and contain sufficient detail to construct an interoperable
309309
software library to read and/or write Zarr data using any programming language. The
310-
latest version of the specification document is available from the :ref:`spec` page.
310+
latest version of the specification document is available on the
311+
`Zarr specifications website <https://zarr-specs.readthedocs.io>`_.
311312

312313
Here, **data format compatibility** means that all software libraries that implement a
313314
particular version of the Zarr storage specification are interoperable, in the sense

docs/index.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ Zarr-Python
1212
tutorial
1313
guide/index
1414
api/index
15-
spec
1615
release
1716
license
1817
contributing
@@ -26,7 +25,8 @@ Zarr-Python
2625
`Installation <installation.html>`_ |
2726
`Source Repository <https://github.com/zarr-developers/zarr-python>`_ |
2827
`Issue Tracker <https://github.com/zarr-developers/zarr-python/issues>`_ |
29-
`Zulip Chat <https://ossci.zulipchat.com/>`_
28+
`Zulip Chat <https://ossci.zulipchat.com/>`_ |
29+
`Zarr specifications <https://zarr-specs.readthedocs.io>`_
3030

3131
Zarr is a file storage format for chunked, compressed, N-dimensional arrays based on an open-source specification.
3232

docs/release.rst

+10-10
Original file line numberDiff line numberDiff line change
@@ -218,17 +218,17 @@ Typing
218218
Maintenance
219219
~~~~~~~~~~~
220220

221-
* Remedy a situation where ``zarr-python`` was importing ``DummyStorageTransformer`` from the test suite.
221+
* Remedy a situation where ``zarr-python`` was importing ``DummyStorageTransformer`` from the test suite.
222222
The dependency relationship is now reversed: the test suite imports this class from ``zarr-python``.
223223
By :user:`Davis Bennett <d-v-b>` :issue:`1601`.
224224

225-
* [V3] Update minimum supported Python and Numpy versions.
225+
* [V3] Update minimum supported Python and Numpy versions.
226226
By :user:`Joe Hamman <jhamman>` :issue:`1638`
227227

228228
* use src layout and use hatch for packaging.
229229
By :user:`Davis Bennett <d-v-b>` :issue:`1592`.
230230

231-
* temporarily disable mypy in v3 directory.
231+
* temporarily disable mypy in v3 directory.
232232
By :user:`Joe Hamman <jhamman>` :issue:`1649`.
233233

234234
* create hatch test env.
@@ -315,10 +315,10 @@ Maintenance
315315
Documentation
316316
~~~~~~~~~~~~~
317317

318-
* Specify docs hatch env for v3 branch.
318+
* Specify docs hatch env for v3 branch.
319319
By :user:`Max Jones <maxrjones>` :issue:`1655`.
320320

321-
* Development installation/contributing docs updates.
321+
* Development installation/contributing docs updates.
322322
By :user:`Alden Keefe Sampson <aldenks>` :issue:`1643`.
323323

324324
* chore: update project settings per scientific python repo-review.
@@ -336,7 +336,7 @@ Enhancements
336336
~~~~~~~~~~~~
337337
* Added support for creating a copy of data when converting a `zarr.Array`
338338
to a numpy array.
339-
By :user:`David Stansby <dstansby>` (:issue:`2106`) and
339+
By :user:`David Stansby <dstansby>` (:issue:`2106`) and
340340
:user:`Joe Hamman <jhamman>` (:issue:`2123`).
341341

342342
Maintenance
@@ -2191,7 +2191,7 @@ Other changes
21912191
~~~~~~~~~~~~~
21922192

21932193
To accommodate support for hierarchies and filters, the Zarr metadata format
2194-
has been modified. See the :ref:`spec_v2` for more information. To migrate an
2194+
has been modified. See the ``spec_v2`` for more information. To migrate an
21952195
array stored using Zarr version 1.x, use the :func:`zarr.storage.migrate_1to2`
21962196
function.
21972197

@@ -2237,14 +2237,14 @@ abstraction layer between the core array logic and data storage (:issue:`21`).
22372237
In this release, any
22382238
object that implements the ``MutableMapping`` interface can be used as
22392239
an array store. See the tutorial sections on :ref:`tutorial_persist`
2240-
and :ref:`tutorial_storage`, the :ref:`spec_v1`, and the
2240+
and :ref:`tutorial_storage`, the ``spec_v1``, and the
22412241
:mod:`zarr.storage` module documentation for more information.
22422242

22432243
Please note also that the file organization and file name conventions
22442244
used when storing a Zarr array in a directory on the file system have
22452245
changed. Persistent Zarr arrays created using previous versions of the
22462246
software will not be compatible with this version. See the
2247-
:mod:`zarr.storage` API docs and the :ref:`spec_v1` for more
2247+
:mod:`zarr.storage` API docs and the ``spec_v1`` for more
22482248
information.
22492249

22502250
Compression
@@ -2257,7 +2257,7 @@ as the default compressor, however other compressors including zlib,
22572257
BZ2 and LZMA are also now supported via the Python standard
22582258
library. New compressors can also be dynamically registered for use
22592259
with Zarr. See the tutorial sections on :ref:`tutorial_compress` and
2260-
:ref:`tutorial_tips_blosc`, the :ref:`spec_v1`, and the
2260+
:ref:`tutorial_tips_blosc`, the ``spec_v1``, and the
22612261
:mod:`zarr.compressors` module documentation for more information.
22622262

22632263
Synchronization

docs/spec.rst

-11
This file was deleted.

docs/spec/v1.rst

-7
This file was deleted.

docs/spec/v2.rst

-7
This file was deleted.

docs/spec/v3.rst

-7
This file was deleted.

pyproject.toml

+1
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ docs = [
8181
'sphinx_design',
8282
'sphinx-issues',
8383
'sphinx-copybutton',
84+
'sphinx-reredirects',
8485
'pydata-sphinx-theme',
8586
'numpydoc',
8687
'numcodecs[msgpack]',

test.py

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import zarr
2+
3+
store = zarr.DirectoryStore("data")
4+
r = zarr.open_group(store=store)
5+
z = r.full("myArray", 42, shape=(), dtype="i4", compressor=None)
6+
7+
print(z.oindex[...])

0 commit comments

Comments
 (0)