diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 9f2df6b969..5a63682479 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -19,7 +19,7 @@ build: - "asdf plugin add poetry" - "asdf install poetry latest" - "asdf global poetry latest" - - "poetry install --only docs" + - "poetry install --only docs,main" - "poetry run sphinx-build -T -E -b html -c ./docs/ ./docs/source/ ${READTHEDOCS_OUTPUT}/html/" diff --git a/docs/conf.py b/docs/conf.py index 16fda67e63..a73eb41114 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -33,6 +33,8 @@ extensions = [ "myst_parser", + "sphinx.ext.autodoc", + "sphinx.ext.autosummary", ] root_doc = "contents" @@ -57,4 +59,18 @@ } +# -- Options for sphinx.ext.autodoc ------------------------------------------ +# https://www.sphinx-doc.org/en/master/usage/extensions/autodoc.html + +autodoc_default_options = { + 'members': True, +} + + +# -- Options for sphinx.ext.autosummary -------------------------------------- +# https://www.sphinx-doc.org/en/master/usage/extensions/autosummary.html + +autosummary_generate = True + + # EOF diff --git a/docs/source/dev/api.rst b/docs/source/dev/api.rst new file mode 100644 index 0000000000..40493823d0 --- /dev/null +++ b/docs/source/dev/api.rst @@ -0,0 +1,15 @@ +.. + + +*** +API +*** + +.. autosummary:: + :toctree: autosummary + :recursive: + + mxcubecore + + +.. EOF diff --git a/docs/source/dev/autosummary/.gitignore b/docs/source/dev/autosummary/.gitignore new file mode 100644 index 0000000000..6976c6bf7a --- /dev/null +++ b/docs/source/dev/autosummary/.gitignore @@ -0,0 +1,7 @@ +# + + +* + + +# EOF