diff --git a/doc/sphinx/Pacemaker_Python_API/_templates/custom-class-template.rst b/doc/sphinx/Pacemaker_Python_API/_templates/custom-class-template.rst deleted file mode 100644 index 8d9b5b9684..0000000000 --- a/doc/sphinx/Pacemaker_Python_API/_templates/custom-class-template.rst +++ /dev/null @@ -1,32 +0,0 @@ -{{ fullname | escape | underline}} - -.. currentmodule:: {{ module }} - -.. autoclass:: {{ objname }} - :members: - :show-inheritance: - :inherited-members: - - {% block methods %} - .. automethod:: __init__ - - {% if methods %} - .. rubric:: {{ 'Methods' }} - - .. autosummary:: - {% for item in methods %} - ~{{ name }}.{{ item }} - {%- endfor %} - {% endif %} - {% endblock %} - - {% block attributes %} - {% if attributes %} - .. rubric:: {{ 'Attributes' }} - - .. autosummary:: - {% for item in attributes %} - ~{{ name }}.{{ item }} - {%- endfor %} - {% endif %} - {% endblock %} diff --git a/doc/sphinx/Pacemaker_Python_API/_templates/custom-module-template.rst b/doc/sphinx/Pacemaker_Python_API/_templates/custom-module-template.rst deleted file mode 100644 index ffb4f5c706..0000000000 --- a/doc/sphinx/Pacemaker_Python_API/_templates/custom-module-template.rst +++ /dev/null @@ -1,65 +0,0 @@ -{{ fullname | escape | underline}} - -.. automodule:: {{ fullname }} - - {% block attributes %} - {% if attributes %} - .. rubric:: {{ 'Module Attributes' }} - - .. autosummary:: - :toctree: - {% for item in attributes %} - {{ item }} - {%- endfor %} - {% endif %} - {% endblock %} - - {% block functions %} - {% if functions %} - .. rubric:: {{ 'Functions' }} - - .. autosummary:: - :toctree: - {% for item in functions %} - {{ item }} - {%- endfor %} - {% endif %} - {% endblock %} - - {% block classes %} - {% if classes %} - .. rubric:: {{ 'Classes' }} - - .. autosummary:: - :toctree: - :template: custom-class-template.rst - {% for item in classes %} - {{ item }} - {%- endfor %} - {% endif %} - {% endblock %} - - {% block exceptions %} - {% if exceptions %} - .. rubric:: {{ 'Exceptions' }} - - .. autosummary:: - :toctree: - {% for item in exceptions %} - {{ item }} - {%- endfor %} - {% endif %} - {% endblock %} - -{% block modules %} -{% if modules %} -.. rubric:: Modules - -.. autosummary:: - :toctree: - :template: custom-module-template.rst -{% for item in modules %} - {{ item }} -{%- endfor %} -{% endif %} -{% endblock %} diff --git a/doc/sphinx/Pacemaker_Python_API/api.rst b/doc/sphinx/Pacemaker_Python_API/api.rst index 01b74d3374..3a9187cd08 100644 --- a/doc/sphinx/Pacemaker_Python_API/api.rst +++ b/doc/sphinx/Pacemaker_Python_API/api.rst @@ -1,10 +1,9 @@ API === .. autosummary:: :toctree: generated - :template: custom-module-template.rst pacemaker pacemaker.buildoptions pacemaker.exitstatus diff --git a/doc/sphinx/Pacemaker_Python_API/index.rst b/doc/sphinx/Pacemaker_Python_API/index.rst index 5c7f191a49..a4a293e0ee 100644 --- a/doc/sphinx/Pacemaker_Python_API/index.rst +++ b/doc/sphinx/Pacemaker_Python_API/index.rst @@ -1,11 +1,20 @@ -Contents --------- +Pacemaker Python Module +----------------------- The APIs are documented here in submodules, but each submodule class is included at the top level, so code should import directly from the ``pacemaker`` module. For example, use ``from pacemaker import BuildOptions``, not ``from pacemaker.buildoptions import BuildOptions``. .. toctree:: + :maxdepth: 2 api + + +Index +----- + +* :ref:`genindex` +* :ref:`modindex` +* :ref:`search`