From 0680a28f5f6b75331b7aeb9633222b4383218623 Mon Sep 17 00:00:00 2001 From: Andre Anjos <andre.dos.anjos@gmail.com> Date: Thu, 19 Mar 2020 21:59:08 +0100 Subject: [PATCH] [doc] Better templating for autosummary; Configuration is now setup --- doc/_templates/config.rst | 38 +------------------------------------- doc/api.rst | 6 +----- 2 files changed, 2 insertions(+), 42 deletions(-) diff --git a/doc/_templates/config.rst b/doc/_templates/config.rst index 0c315cc0..a287392f 100644 --- a/doc/_templates/config.rst +++ b/doc/_templates/config.rst @@ -1,38 +1,2 @@ -{{ fullname | escape | underline}} - -.. automodule:: {{ fullname }} - - {% block functions %} - {% if functions %} - .. rubric:: Functions - - .. autosummary:: - {% for item in functions %} - {{ item }} - {%- endfor %} - {% endif %} - {% endblock %} - - {% block classes %} - {% if classes %} - .. rubric:: Classes - - .. autosummary:: - {% for item in classes %} - {{ item }} - {%- endfor %} - {% endif %} - {% endblock %} - - {% block exceptions %} - {% if exceptions %} - .. rubric:: Exceptions - - .. autosummary:: - {% for item in exceptions %} - {{ item }} - {%- endfor %} - {% endif %} - {% endblock %} - +{% include "autosummary/module.rst" %} .. literalinclude:: ../../../../{{ fullname.replace(".", "/") }}.py diff --git a/doc/api.rst b/doc/api.rst index d178eb98..a79deca5 100644 --- a/doc/api.rst +++ b/doc/api.rst @@ -96,11 +96,6 @@ Scripts Preset Configurations --------------------- -.. autosummary:: - :toctree: api/configs - - bob.ip.binseg.configs - Models ====== @@ -126,6 +121,7 @@ Datasets .. autosummary:: :toctree: api/configs/datasets + :template: config.rst bob.ip.binseg.configs.datasets.amdrive bob.ip.binseg.configs.datasets.amdrivetest -- GitLab