Skip to content

Commit a0cfc59

Browse files
authored
Merge branch 'main' into docs/3.0-user-guide
2 parents a418508 + f407a41 commit a0cfc59

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
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
@@ -62,6 +63,20 @@
6263
autoapi_keep_files = True
6364
autoapi_options = [ 'members', 'undoc-members', 'show-inheritance', 'show-module-summary', 'imported-members', ]
6465

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

@@ -182,6 +197,7 @@
182197

183198
def setup(app: sphinx.application.Sphinx) -> None:
184199
app.add_css_file("custom.css")
200+
app.connect("autoapi-skip-member", skip_submodules)
185201

186202

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

0 commit comments

Comments
 (0)