Closed da1910 closed 3 months ago
That depends on how you configure autoapi to do it for you. If you use the latest templates @Revathyvenugopal162 and @jorgepiloto provided you won't get this issue. See https://geometry.docs.pyansys.com/version/dev/api/ansys/geometry/core/designer/body/index.html
Bottom line: the only thing you need to do is configure it properly.
Im sure that would be straightforward, but nowhere in the docs for this package do we provide any guidance on doing so, nor any explanation for which of the myriad options pyGeo uses are actually required to make it work.
Minimum working example:
from pathlib import Path
from ansys_sphinx_theme import get_autoapi_templates_dir_relative_path
...
# Configuration for Sphinx autoapi
autoapi_type = "python"
autoapi_dirs = ["../../src/ansys"]
autoapi_root = "api"
autoapi_options = [
"members",
"undoc-members",
"show-inheritance",
"show-module-summary",
"special-members",
]
autoapi_template_dir = get_autoapi_templates_dir_relative_path(Path(__file__))
autoapi_python_use_implicit_namespaces = True
autoapi_keep_files = True
autoapi_own_page_level = "class"
I believe the section is pretty clear in PyAnsys Geometry (even though we might have a "myriad" of options 😉 )
Nonetheless, I do agree we should documented it in our Sphinx theme... Probably here https://sphinxdocs.ansys.com/version/stable/user_guide/index.html
@da1910, may you please point us to the project where you are experiencing this? I want to check if there is a conflict with autodoc
.
If not, the configuration provided by @RobPasMue should work like a charm.
Throwing out final link with the documentation https://sphinxdocs.ansys.com/version/dev/user_guide/autoapi.html
The class parameters here serve limited purpose ( at least to me ) as they are untyped, are not a link to the relevant place in the docs, and are almost always truncated anyway. Additionally the square bracket syntax for optional arguments is not, I think, an official python thing?
Can we suppress these and just leave the class name here with a link to the docs page?