From 11686468ad0435252b62f3ff6220060f6c6c0b28 Mon Sep 17 00:00:00 2001 From: Robert Haschke Date: Tue, 4 Jan 2022 21:27:07 +0100 Subject: [PATCH] Update rosdoc + sphinx config --- core/doc/conf.py | 26 ++++++-------------------- core/python/bindings/src/module.cpp | 4 ---- core/rosdoc.yaml | 2 +- 3 files changed, 7 insertions(+), 25 deletions(-) diff --git a/core/doc/conf.py b/core/doc/conf.py index 8f9a5a51..91faa40c 100644 --- a/core/doc/conf.py +++ b/core/doc/conf.py @@ -33,24 +33,12 @@ extensions = [ ] autosummary_generate = True -# Only add class doc in docstring as this is needed to clean up the -# constructor signature -autoclass_content = "class" -# Remove 'view source code' from top of page (for html, not python) -html_show_sourcelink = True +autoclass_content = "both" # Add __init__ doc (ie. params) to class summaries +html_show_sourcelink = True # Remove 'view source code' from top of page (for html, not python) autodoc_inherit_docstrings = True # If no docstring, inherit from base class -# Enable 'expensive' imports for sphinx_autodoc_typehints -set_type_checking_flag = True +set_type_checking_flag = True # Enable 'expensive' imports for sphinx_autodoc_typehints add_module_names = False -# Look for the function signature in the first line of the docstring. -autodoc_docstring_signature = True - -# Interpret docstring formatting as to Numpy code style conventions. -# napoleon_google_docstring = True -# napoleon_numpy_docstring = True - - # Add any paths that contain templates here, relative to this directory. templates_path = ["_templates"] @@ -156,7 +144,7 @@ html_theme = "sphinx_rtd_theme" # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". -html_static_path = ["_static"] +# html_static_path = ["_static"] # Add any extra paths that contain custom files (such as robots.txt or # .htaccess) here, relative to this directory. These files are copied @@ -222,9 +210,7 @@ html_static_path = ["_static"] htmlhelp_basename = "mtcdoc" # Example configuration for intersphinx: refer to the Python standard library. -intersphinx_mapping = {"https://docs.python.org/3": None} +intersphinx_mapping = {"python": ("https://docs.python.org/3", None)} # Default options for generating documentation. -autodoc_default_options = { - "exclude-members": "ContainerBase, InitStageError, ParallelContainerBase, PlannerInterface, WrapperBase, PropagatingForward, PropagatingBackward, PropagatingEitherWay, MergeMode, SerialContainer, Solutions, PropertyInitializerSource" -} +autodoc_default_options = {"exclude-members": "ContainerBase, ParallelContainerBase, WrapperBase"} diff --git a/core/python/bindings/src/module.cpp b/core/python/bindings/src/module.cpp index 65f83b56..6b2157a1 100644 --- a/core/python/bindings/src/module.cpp +++ b/core/python/bindings/src/module.cpp @@ -46,10 +46,6 @@ void export_stages(pybind11::module& m); } // namespace moveit PYBIND11_MODULE(pymoveit_mtc, m) { - // disable function signatures in generated documentation - pybind11::options options; - options.disable_function_signatures(); - auto msub = m.def_submodule("core", R"( moveit.task_constructor.core ============================ diff --git a/core/rosdoc.yaml b/core/rosdoc.yaml index c37dfed4..2448c5a7 100644 --- a/core/rosdoc.yaml +++ b/core/rosdoc.yaml @@ -6,5 +6,5 @@ name: C++ API output_dir: cpp file_patterns: "*.c *.cpp *.h *.cc *.hh *.dox" - exclude_patterns: "*/core/python/pybind11/* */test/*" + exclude_patterns: "*/core/python/pybind11/* */core/python/bindings/* */test/* " exclude_symbols: "*Private class_ declval*"