Skip to content

Commit 91ae5aa

Browse files
committed
[docs] Adds sphinx extensions
Note that for `sphinx-apidoc` to work we need a `__init__.py` file on the `sagittal_average` library. Add it if not done before. Alternatively you can pass the `--implicit-namespaces` flag to `sphinx-apidoc` if you prefer to have a native namespace package. Steps to build the docs ```bash sphinx-apidoc -o ./docs/api ./src/sagittal_average cd docs make html # Assuming the library is installed python -m http.server -d _build/html # to view the automatically built documentation ```
1 parent 58a9cf5 commit 91ae5aa

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

docs/conf.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,12 @@
1414
# -- General configuration ---------------------------------------------------
1515
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
1616

17-
extensions = []
17+
extensions = [
18+
'sphinx.ext.autodoc', # Support automatic documentation
19+
'sphinx.ext.coverage', # Automatically check if functions are documented
20+
'sphinx.ext.mathjax', # Allow support for algebra
21+
'sphinx.ext.viewcode', # Include the source code in documentation
22+
]
1823

1924
templates_path = ['_templates']
2025
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']

docs/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,4 @@ Welcome to sagittal-average's documentation!
1010
:maxdepth: 2
1111
:caption: Contents:
1212

13+
API <api/modules>

0 commit comments

Comments
 (0)