|
57 | 57 |
|
58 | 58 | autoapi_dirs = ['../src/zarr']
|
59 | 59 | autoapi_add_toctree_entry = False
|
60 |
| -autoapi_generate_api_docs = False |
| 60 | +autoapi_generate_api_docs = True |
61 | 61 | autoapi_member_order = "groupwise"
|
62 |
| -autoapi_root = "api" |
| 62 | +autoapi_root = "_autoapi" |
| 63 | +autoapi_keep_files = True |
63 | 64 |
|
64 | 65 |
|
65 | 66 | # Add any paths that contain templates here, relative to this directory.
|
|
172 | 173 | html_logo = "_static/logo1.png"
|
173 | 174 |
|
174 | 175 |
|
| 176 | +def autoapi_skip_modules(app: sphinx.application.Sphinx, what: str, name: str, obj: object, skip: bool, options: dict[str, Any]) -> bool: |
| 177 | + """ |
| 178 | + Return True if a module should be skipped in th API docs. |
| 179 | + """ |
| 180 | + parts = name.split(".") |
| 181 | + if what == "module" and (any(part.startswith("_") for part in parts) or "v2" in name or name.startswith("zarr.core")): |
| 182 | + return True |
| 183 | + return False |
| 184 | + |
| 185 | + |
175 | 186 | def setup(app: sphinx.application.Sphinx) -> None:
|
176 | 187 | app.add_css_file("custom.css")
|
| 188 | + app.connect("autoapi-skip-member", autoapi_skip_modules) |
177 | 189 |
|
178 | 190 |
|
179 | 191 | # The name of an image file (relative to this directory) to use as a favicon of
|
@@ -339,7 +351,7 @@ def setup(app: sphinx.application.Sphinx) -> None:
|
339 | 351 | # use in refs e.g:
|
340 | 352 | # :ref:`comparison manual <python:comparisons>`
|
341 | 353 | intersphinx_mapping = {
|
342 |
| - "python": ("https://docs.python.org/", None), |
| 354 | + "python": ("https://docs.python.org/3/", None), |
343 | 355 | "numpy": ("https://numpy.org/doc/stable/", None),
|
344 | 356 | "numcodecs": ("https://numcodecs.readthedocs.io/en/stable/", None),
|
345 | 357 | }
|
|
0 commit comments