|
10 | 10 | import sys |
11 | 11 | import time |
12 | 12 |
|
13 | | -# Ensure the *repo root* is on sys.path so autodoc imports the local package. |
14 | | -# This works whether conf.py is in docs/ or docs/source/. |
| 13 | +# Put the repo root on sys.path so the local package can be imported. |
15 | 14 | DOCS_DIR = os.path.abspath(os.path.dirname(__file__)) |
16 | | -REPO_ROOT = os.path.abspath(os.path.join(DOCS_DIR, "..")) |
| 15 | +REPO_ROOT = os.path.abspath(os.path.join(DOCS_DIR, "..", "..")) |
17 | 16 | sys.path.insert(0, REPO_ROOT) |
18 | 17 |
|
19 | 18 | # -- Project information ----------------------------------------------------- |
|
42 | 41 | "sphinx.ext.napoleon", |
43 | 42 | "sphinx.ext.intersphinx", |
44 | 43 | "sphinx.ext.extlinks", |
45 | | - "nbsphinx", |
46 | | - "sphinx_copybutton", |
| 44 | + "autoapi.extension", |
47 | 45 | ] |
48 | 46 |
|
49 | 47 | # Autosummary (API stubs) |
|
58 | 56 | napoleon_use_rtype = True |
59 | 57 | napoleon_use_ivar = True |
60 | 58 |
|
61 | | -# (Optional) If some modules have optional heavy deps, you can mock them here: |
62 | | -autodoc_mock_imports = ["MDAnalysis", "rdkit"] |
| 59 | +# API reference generated from the source by sphinx-autoapi |
| 60 | +autoapi_dirs = ["../../CodeEntropy"] |
| 61 | +autoapi_root = "reference" |
| 62 | +autoapi_add_toctree_entry = False |
| 63 | +autoapi_member_order = "groupwise" |
| 64 | +autoapi_options = [ |
| 65 | + "members", |
| 66 | + "undoc-members", |
| 67 | + "show-inheritance", |
| 68 | + "show-module-summary", |
| 69 | +] |
| 70 | + |
| 71 | +# Show type hints in the parameter list rather than the signature |
| 72 | +autodoc_typehints = "description" |
| 73 | +add_module_names = False |
| 74 | +python_maximum_signature_line_length = 88 |
63 | 75 |
|
64 | 76 | templates_path = ["_templates"] |
65 | 77 |
|
|
72 | 84 | pygments_style = "default" |
73 | 85 |
|
74 | 86 | # -- Options for HTML output ------------------------------------------------- |
75 | | -html_theme = "furo" |
76 | | -html_theme_options = { |
77 | | - "dark_logo": "logos/biosim-codeentropy_logo_light.png", |
78 | | - "light_logo": "logos/biosim-codeentropy_logo_dark.png", |
79 | | -} |
| 87 | +html_theme = "ccpbiosim_sphinx_theme" |
| 88 | +html_context = {"github_repo": "CodeEntropy"} |
80 | 89 |
|
81 | 90 | html_static_path = ["_static"] |
82 | 91 |
|
|
0 commit comments