Skip to content

Commit a675475

Browse files
committed
Merge branch 'main' into creation-from-other-zarr
# Conflicts: # tests/test_array.py
2 parents 3c5ec3f + eb25424 commit a675475

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

94 files changed

+5529
-3343
lines changed

.github/workflows/test.yml

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,13 +94,38 @@ jobs:
9494
run: |
9595
hatch env run --env ${{ matrix.dependency-set }} run
9696
97+
doctests:
98+
name: doctests
99+
runs-on: ubuntu-latest
100+
steps:
101+
- uses: actions/checkout@v4
102+
with:
103+
fetch-depth: 0 # required for hatch version discovery, which is needed for numcodecs.zarr3
104+
- name: Set up Python
105+
uses: actions/setup-python@v5
106+
with:
107+
python-version: '3.13'
108+
cache: 'pip'
109+
- name: Install Hatch
110+
run: |
111+
python -m pip install --upgrade pip
112+
pip install hatch
113+
- name: Set Up Hatch Env
114+
run: |
115+
hatch env create doctest
116+
hatch env run -e doctest list-env
117+
- name: Run Tests
118+
run: |
119+
hatch env run --env doctest run
120+
97121
test-complete:
98122
name: Test complete
99123

100124
needs:
101125
[
102126
test,
103127
test-upstream-and-min-deps,
128+
doctests
104129
]
105130
if: always()
106131
runs-on: ubuntu-latest
@@ -111,4 +136,4 @@ jobs:
111136
contains(needs.*.result, 'cancelled')
112137
run: exit 1
113138
- name: Success
114-
run: echo Success!
139+
run: echo Success!

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,10 @@ coverage.xml
5151

5252
# Sphinx documentation
5353
docs/_build/
54-
docs/_autoapi
54+
docs/api
55+
docs/data
56+
data
57+
data.zip
5558

5659
# PyBuilder
5760
target/

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ ci:
66
default_stages: [pre-commit, pre-push]
77
repos:
88
- repo: https://github.com/astral-sh/ruff-pre-commit
9-
rev: v0.8.2
9+
rev: v0.8.6
1010
hooks:
1111
- id: ruff
1212
args: ["--fix", "--show-fixes"]
@@ -22,7 +22,7 @@ repos:
2222
- id: check-yaml
2323
- id: trailing-whitespace
2424
- repo: https://github.com/pre-commit/mirrors-mypy
25-
rev: v1.13.0
25+
rev: v1.14.1
2626
hooks:
2727
- id: mypy
2828
files: src|tests

data/donotdelete

Lines changed: 0 additions & 1 deletion
This file was deleted.

docs/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ help:
5252
.PHONY: clean
5353
clean:
5454
rm -rf $(BUILDDIR)/*
55-
rm -rf $(BUILDDIR)/../_autoapi
55+
rm -rf $(BUILDDIR)/../api
5656

5757
.PHONY: html
5858
html:

docs/about.rst

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
About
2+
=====
3+
4+
Zarr is a format for the storage of chunked, compressed, N-dimensional arrays
5+
inspired by `HDF5 <https://www.hdfgroup.org/HDF5/>`_, `h5py
6+
<https://www.h5py.org/>`_ and `bcolz <https://bcolz.readthedocs.io/>`_.
7+
8+
These documents describe the Zarr-Python implementation. More information
9+
about the Zarr format can be found on the `main website <https://zarr.dev>`_.
10+
11+
Projects using Zarr
12+
-------------------
13+
14+
If you are using Zarr-Python, we would `love to hear about it
15+
<https://github.com/zarr-developers/community/issues/19>`_.
16+
17+
Funding
18+
-------
19+
The project is fiscally sponsored by `NumFOCUS <https://numfocus.org/>`_, a US
20+
501(c)(3) public charity, and development is supported by the
21+
`MRC Centre for Genomics and Global Health <https://www.cggh.org>`_
22+
and the `Chan Zuckerberg Initiative <https://chanzuckerberg.com/>`_.
23+
24+
.. _NumCodecs: https://numcodecs.readthedocs.io/

docs/api/index.rst

Lines changed: 0 additions & 7 deletions
This file was deleted.

docs/conf.py

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
import sys
1818
from typing import Any
1919

20+
import sphinx
2021
import sphinx.application
2122

2223
from importlib.metadata import version as get_version
@@ -56,10 +57,24 @@
5657
autoapi_add_toctree_entry = False
5758
autoapi_generate_api_docs = True
5859
autoapi_member_order = "groupwise"
59-
autoapi_root = "_autoapi"
60+
autoapi_root = "api"
6061
autoapi_keep_files = True
6162
autoapi_options = [ 'members', 'undoc-members', 'show-inheritance', 'show-module-summary', 'imported-members', ]
6263

64+
def skip_submodules(
65+
app: sphinx.application.Sphinx,
66+
what: str,
67+
name: str,
68+
obj: object,
69+
skip: bool,
70+
options: dict[str, Any]
71+
) -> bool:
72+
# Skip documenting zarr.codecs submodules
73+
# codecs are documented in the main zarr.codecs namespace
74+
if what == "module" and name.startswith("zarr.codecs."):
75+
skip = True
76+
return skip
77+
6378
# Add any paths that contain templates here, relative to this directory.
6479
templates_path = ["_templates"]
6580

@@ -87,7 +102,13 @@
87102
"spec/v1": 'https://zarr-specs.readthedocs.io/en/latest/v1/v1.0.html',
88103
"spec/v2": "https://zarr-specs.readthedocs.io/en/latest/v2/v2.0.html",
89104
"spec/v3": "https://zarr-specs.readthedocs.io/en/latest/v3/core/v3.0.html",
90-
"license": "https://github.com/zarr-developers/zarr-python/blob/main/LICENSE.txt"
105+
"license": "https://github.com/zarr-developers/zarr-python/blob/main/LICENSE.txt",
106+
"tutorial": "user-guide",
107+
"getting-started": "quickstart",
108+
"release": "developers/release.html",
109+
"roadmap": "developers/roadmap.html",
110+
"installation": "user-guide/installation.html",
111+
"api": "api/zarr/index"
91112
}
92113

93114
# The language for content autogenerated by Sphinx. Refer to documentation
@@ -179,6 +200,7 @@
179200

180201
def setup(app: sphinx.application.Sphinx) -> None:
181202
app.add_css_file("custom.css")
203+
app.connect("autoapi-skip-member", skip_submodules)
182204

183205

184206
# The name of an image file (relative to this directory) to use as a favicon of

0 commit comments

Comments
 (0)