You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As a sphinx noob, I'm not sure how to use "autodoc_pydantic’s autodocumenters ... to render the object’s documentation in the generated stub pages of autosummary."
extensions = [
"sphinx.ext.napoleon",
"sphinx.ext.autodoc", # Core Sphinx library for auto html doc generation from docstrings
"sphinx.ext.autosummary", # Create neat summary tables for modules/classes/methods etc
"sphinx.ext.intersphinx", # Link to other project's documentation (see mapping below)
"sphinx.ext.viewcode", # Add a link to the Python source code for classes, functions etc.
"sphinx_autodoc_typehints", # Automatically document param types (less noise in class signature)
"IPython.sphinxext.ipython_console_highlighting",
"sphinxcontrib.autodoc_pydantic",
"sphinx.ext.coverage",
"myst_parser",
]
The generated stub pages do not use the standard autosummary templates (e.g. the class template which lists all methods and attributes). As of sphinx version 3.5.4, this is not possible because autosummary does not support custom autodocumenters provided by extensions such as autodoc_pydantic
But I didn't fully understand what I need to modify to make them work?
my current workflow for generating the documentation is
rm -rf build
rm -rf source/_apidoc
sphinx-apidoc -o source/_apidoc ../<my project> --separate
make html
Where I was trying to use sphinx-apidoc to generate (what I believed to be) the stub pages.
Alternatively, I would just do
rm -rf build
rm -rf source/_apidoc
make html
And let autosummary generate everything, and _apidoc would be replaced with _autosummary in the above setup.
Thank you again for your work!
The text was updated successfully, but these errors were encountered:
Thank you for creating this library!
I'm struggling a bit with the instructions to get "autodoc_pydantic" and "autosummary" to play nicely together. I was hoping you could clarify the instructions and warning on this page: https://autodoc-pydantic.readthedocs.io/en/stable/users/usage.html
As a sphinx noob, I'm not sure how to use "autodoc_pydantic’s autodocumenters ... to render the object’s documentation in the generated stub pages of autosummary."
My set up is:
where
index.rst
is:conf.py
extensions areand
custom-module-template.rst
isFrom your warning, I understand that
But I didn't fully understand what I need to modify to make them work?
my current workflow for generating the documentation is
Where I was trying to use
sphinx-apidoc
to generate (what I believed to be) the stub pages.Alternatively, I would just do
And let
autosummary
generate everything, and_apidoc
would be replaced with_autosummary
in the above setup.Thank you again for your work!
The text was updated successfully, but these errors were encountered: