Skip to content

Commit 15cb757

Browse files
authored
Merge branch 'main' into creation-docstrings
2 parents 1f04238 + f407a41 commit 15cb757

File tree

5 files changed

+32
-11
lines changed

5 files changed

+32
-11
lines changed

docs/conf.py

Lines changed: 16 additions & 0 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
@@ -60,6 +61,20 @@
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

@@ -179,6 +194,7 @@
179194

180195
def setup(app: sphinx.application.Sphinx) -> None:
181196
app.add_css_file("custom.css")
197+
app.connect("autoapi-skip-member", skip_submodules)
182198

183199

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

pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,8 @@ numpy = ["1.25", "2.1"]
136136
features = ["gpu"]
137137

138138
[tool.hatch.envs.test.scripts]
139-
run-coverage = "pytest --cov-config=pyproject.toml --cov=pkg --cov=tests"
140-
run-coverage-gpu = "pip install cupy-cuda12x && pytest -m gpu --cov-config=pyproject.toml --cov=pkg --cov=tests"
139+
run-coverage = "pytest --cov-config=pyproject.toml --cov=pkg --cov=src"
140+
run-coverage-gpu = "pip install cupy-cuda12x && pytest -m gpu --cov-config=pyproject.toml --cov=pkg --cov=src"
141141
run = "run-coverage --no-cov"
142142
run-verbose = "run-coverage --verbose"
143143
run-mypy = "mypy src"
@@ -157,7 +157,7 @@ numpy = ["1.25", "2.1"]
157157
version = ["minimal"]
158158

159159
[tool.hatch.envs.gputest.scripts]
160-
run-coverage = "pytest -m gpu --cov-config=pyproject.toml --cov=pkg --cov=tests"
160+
run-coverage = "pytest -m gpu --cov-config=pyproject.toml --cov=pkg --cov=src"
161161
run = "run-coverage --no-cov"
162162
run-verbose = "run-coverage --verbose"
163163
run-mypy = "mypy src"

src/zarr/storage/local.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,18 @@ async def set_partial_values(
189189
await concurrent_map(args, asyncio.to_thread, limit=None) # TODO: fix limit
190190

191191
async def delete(self, key: str) -> None:
192+
"""
193+
Remove a key from the store.
194+
195+
Parameters
196+
----------
197+
key : str
198+
199+
Notes
200+
-----
201+
If ``key`` is a directory within this store, the entire directory
202+
at ``store.root / key`` is deleted.
203+
"""
192204
# docstring inherited
193205
self._check_writable()
194206
path = self.root / key

src/zarr/storage/memory.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
class MemoryStore(Store):
2121
"""
22-
In-memory store for testing purposes.
22+
In-memory store.
2323
2424
Parameters
2525
----------

test.py

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

0 commit comments

Comments
 (0)