Skip to content

Commit

Permalink
update apidoc templates
Browse files Browse the repository at this point in the history
  • Loading branch information
mdtanker committed Nov 19, 2023
1 parent 6cfd46c commit 8636362
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 25 deletions.
6 changes: 6 additions & 0 deletions docs/api/invert4geom.inversion.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
invert4geom.inversion
---------------------
.. automodule:: invert4geom.inversion
:members:
:undoc-members:
:show-inheritance:
9 changes: 9 additions & 0 deletions docs/api/invert4geom.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

API Reference
-------------

.. toctree::
:maxdepth: 4

invert4geom.inversion
invert4geom.utils
6 changes: 6 additions & 0 deletions docs/api/invert4geom.utils.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
invert4geom.utils
-----------------
.. automodule:: invert4geom.utils
:members:
:undoc-members:
:show-inheritance:
4 changes: 4 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,7 @@
]

always_document_param_types = True

add_module_names = False

add_function_parentheses = False
2 changes: 1 addition & 1 deletion docs/template/module.rst_t
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{%- if show_headings %}
{{- [basename, "module"] | join(' ') | e | heading }}
{{- basename | e | heading(2) }}
{% endif -%}
.. automodule:: {{ qualname }}
{%- for option in automodule_options %}
Expand Down
27 changes: 3 additions & 24 deletions docs/template/package.rst_t
Original file line number Diff line number Diff line change
Expand Up @@ -13,36 +13,15 @@
{%- endfor %}
{%- endmacro %}

{%- if is_namespace %}
{{- [pkgname, "namespace"] | join(" ") | e | heading }}
{% else %}
{{- [pkgname, "package"] | join(" ") | e | heading }}
{% endif %}

{%- if is_namespace %}
.. py:module:: {{ pkgname }}
{% endif %}

{%- if modulefirst and not is_namespace %}
{{ automodule(pkgname, automodule_options) }}
{% endif %}

{%- if subpackages %}
Subpackages
-----------

{{ toctree(subpackages) }}
{% endif %}

{%- if submodules %}
Submodules
----------
API Reference
-------------
{% if separatemodules %}
{{ toctree(submodules) }}
{% else %}
{%- for submodule in submodules %}
{% if show_headings %}
{{- [submodule, "module"] | join(" ") | e | heading(2) }}
{{- submodule | e | heading(2) }}
{% endif %}
{{ automodule(submodule, automodule_options) }}
{% endfor %}
Expand Down

0 comments on commit 8636362

Please sign in to comment.