From b7e4b1883cca4de2bb53a2613ac1102f65c108a7 Mon Sep 17 00:00:00 2001 From: Mihai Baltac Date: Wed, 14 Feb 2018 18:16:55 +0100 Subject: [PATCH] added full module name in module template --- docs/generation-templates/module.rst | 2 +- docs/generation-templates/package.rst | 3 +-- nifty4/spaces/__init__.py | 2 +- nifty4/spaces/dof_space.py | 2 +- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/docs/generation-templates/module.rst b/docs/generation-templates/module.rst index e300a6fc..66822218 100644 --- a/docs/generation-templates/module.rst +++ b/docs/generation-templates/module.rst @@ -4,8 +4,8 @@ {% else %} {{ fullname }} {% for item in range(8 + fullname|length) -%}={%- endfor %} -({{ fullname }} module) {% endif %} +({{ fullname }} module) .. currentmodule:: {{ fullname }} diff --git a/docs/generation-templates/package.rst b/docs/generation-templates/package.rst index ce32e9dd..1e640d82 100644 --- a/docs/generation-templates/package.rst +++ b/docs/generation-templates/package.rst @@ -1,12 +1,11 @@ {% if name %} {{ name }} {% for item in range(8 + name|length) -%}={%- endfor %} -({{ fullname }} package) {% else %} {{ fullname }} {% for item in range(8 + fullname|length) -%}={%- endfor %} -({{ fullname }} package) {% endif %} +({{ fullname }} package) .. automodule:: {{ fullname }} {% if members -%} diff --git a/nifty4/spaces/__init__.py b/nifty4/spaces/__init__.py index f441fd8a..49937a89 100644 --- a/nifty4/spaces/__init__.py +++ b/nifty4/spaces/__init__.py @@ -1,3 +1,3 @@ """ -Sample documentation for spaces. (or any other package) This will be displayed under Summary section of module documentation +Sample documentation for spaces. (or any other package) This will be displayed under the package title in the docs """ diff --git a/nifty4/spaces/dof_space.py b/nifty4/spaces/dof_space.py index 31145a78..69cd1912 100644 --- a/nifty4/spaces/dof_space.py +++ b/nifty4/spaces/dof_space.py @@ -17,7 +17,7 @@ # and financially supported by the Studienstiftung des deutschen Volkes. """ -Sample documentation for DOF space. (or any other module). This will be displayed under Summary section of module documentation +Sample documentation for DOF space. (or any other module). This will be displayed under the module title in the docs """ import numpy as np -- GitLab