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..725daaf85c 100644 --- a/doc/sphinx/Pacemaker_Python_API/api.rst +++ b/doc/sphinx/Pacemaker_Python_API/api.rst @@ -1,10 +1,8 @@ -API -=== +API Reference +============= -.. autosummary:: - :toctree: generated - :template: custom-module-template.rst +.. toctree:: 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..d7802f2fdc 100644 --- a/doc/sphinx/Pacemaker_Python_API/index.rst +++ b/doc/sphinx/Pacemaker_Python_API/index.rst @@ -1,11 +1,21 @@ -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``. +This is the Python interface to the `Pacemaker `_ +project. At the moment, it doesn't do very much but we are planning to expand +its capabilities over time. .. toctree:: + :maxdepth: 2 api + + +.. only:: builder_epub or builder_html or builder_pdf + + Index + ===== + + * :ref:`genindex` + * :ref:`modindex` + * :ref:`search` diff --git a/doc/sphinx/Pacemaker_Python_API/pacemaker.buildoptions.rst b/doc/sphinx/Pacemaker_Python_API/pacemaker.buildoptions.rst new file mode 100644 index 0000000000..3a6f3cb174 --- /dev/null +++ b/doc/sphinx/Pacemaker_Python_API/pacemaker.buildoptions.rst @@ -0,0 +1,5 @@ +Build Options +============= + +.. autoclass:: pacemaker.BuildOptions + :members: diff --git a/doc/sphinx/Pacemaker_Python_API/pacemaker.exitstatus.rst b/doc/sphinx/Pacemaker_Python_API/pacemaker.exitstatus.rst new file mode 100644 index 0000000000..de41dc271d --- /dev/null +++ b/doc/sphinx/Pacemaker_Python_API/pacemaker.exitstatus.rst @@ -0,0 +1,6 @@ +Exit Status +=========== + +.. autoclass:: pacemaker.ExitStatus + :members: + :undoc-members: diff --git a/doc/sphinx/Pacemaker_Python_API/pacemaker.rst b/doc/sphinx/Pacemaker_Python_API/pacemaker.rst new file mode 100644 index 0000000000..ba8493cc5d --- /dev/null +++ b/doc/sphinx/Pacemaker_Python_API/pacemaker.rst @@ -0,0 +1,9 @@ +Pacemaker +========= + +The pacemaker module re-exports its submodules, so code should import directly from +the ``pacemaker`` module: + +.. code-block:: python + + >>> from pacemaker import BuildOptions