Skip to content

Commit

Permalink
properly load module and add toctree for class generation
Browse files Browse the repository at this point in the history
  • Loading branch information
the-hampel authored and Wentzell committed Feb 17, 2022
1 parent d9c66bf commit 8362b69
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 9 deletions.
2 changes: 1 addition & 1 deletion doc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ endif()
add_custom_target(${PROJECT_NAME}_docs_sphinx ALL)
add_custom_command(
TARGET ${PROJECT_NAME}_docs_sphinx
COMMAND PYTHONPATH=${PROJECT_BINARY_DIR}/python/${PROJECT_NAME}:${PROJECT_BINARY_DIR}/python:$ENV{PYTHONPATH} ${SPHINXBUILD_EXECUTABLE} -c . -b html ${CMAKE_CURRENT_SOURCE_DIR} html
COMMAND PYTHONPATH=${PROJECT_BINARY_DIR}/python:$ENV{PYTHONPATH} ${SPHINXBUILD_EXECUTABLE} -j auto -c . -b html ${CMAKE_CURRENT_SOURCE_DIR} html
)

option(Sphinx_Only "When building the documentation, skip the Python Modules and the generation of C++ Api and example outputs" OFF)
Expand Down
9 changes: 3 additions & 6 deletions doc/_templates/autosummary_class_template.rst
Original file line number Diff line number Diff line change
@@ -1,19 +1,15 @@
{{ fullname | escape | underline}}
{{ fullname | escape | underline }}

.. currentmodule:: {{ module }}

.. autoclass:: {{ objname }}
:members:
:show-inheritance:
:inherited-members:

{% block methods %}
.. automethod:: __init__

{% if methods %}
.. rubric:: {{ _('Methods') }}

.. autosummary::
:toctree:
{% for item in methods %}
~{{ name }}.{{ item }}
{%- endfor %}
Expand All @@ -25,6 +21,7 @@
.. rubric:: {{ _('Attributes') }}

.. autosummary::
:toctree:
{% for item in attributes %}
~{{ name }}.{{ item }}
{%- endfor %}
Expand Down
2 changes: 1 addition & 1 deletion doc/conf.py.in
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ html_theme_options = {
# Toc options
'collapse_navigation': False,
'sticky_navigation': True,
'navigation_depth': 4,
'navigation_depth': 5,
'includehidden': True,
'titles_only': False
}
Expand Down
2 changes: 1 addition & 1 deletion doc/documentation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ Python reference manual
:template: autosummary_module_template.rst
:recursive:

app4triqs_module
app4triqs

0 comments on commit 8362b69

Please sign in to comment.