Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
YeisonCardona committed Feb 23, 2024
1 parent afe58ec commit ec63b46
Show file tree
Hide file tree
Showing 7 changed files with 363 additions and 102 deletions.
1 change: 0 additions & 1 deletion docs/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
Expand Down
2 changes: 0 additions & 2 deletions docs/source/_modules/docs.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
docs package
============

.. automodule:: docs
:members:
Expand Down
9 changes: 9 additions & 0 deletions docs/source/_templates/module.rst_t
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{%- if show_headings %}
{{- [basename, "module"] | join(' ') | e | heading }}

{% endif -%}
.. automodule:: {{ qualname }}
{%- for option in automodule_options %}
:{{ option }}:
{%- endfor %}

51 changes: 51 additions & 0 deletions docs/source/_templates/package.rst_t
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{%- macro automodule(modname, options) -%}
.. automodule:: {{ modname }}
{%- for option in options %}
:{{ option }}:
{%- endfor %}
{%- endmacro %}

{%- macro toctree(docnames) -%}
.. toctree::
:maxdepth: {{ maxdepth }}
{% for docname in docnames %}
{{ docname }}
{%- endfor %}
{%- endmacro %}

{%- 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
----------
{% if separatemodules %}
{{ toctree(submodules) }}
{% else %}
{%- for submodule in submodules %}
{% if show_headings %}
{{- [submodule, "module"] | join(" ") | e | heading(2) }}
{% endif %}
{{ automodule(submodule, automodule_options) }}
{% endfor %}
{%- endif %}
{%- endif %}

{%- if not modulefirst and not is_namespace %}
Module contents
---------------

{{ automodule(pkgname, automodule_options) }}
{% endif %}
8 changes: 8 additions & 0 deletions docs/source/_templates/toc.rst_t
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{{ header | heading }}

.. toctree::
:maxdepth: {{ maxdepth }}
{% for docname in docnames %}
{{ docname }}
{%- endfor %}

6 changes: 3 additions & 3 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
]

templates_path = ['_templates']
exclude_patterns = []
exclude_patterns = ['_build', '**.ipynb_checkpoints']

html_logo = '_static/logo.svg'
html_favicon = '_static/favicon.ico'
Expand All @@ -46,5 +46,5 @@
dunderlab_color_links = '#FC4DB5'
dunderlab_code_reference = True

autodoc_mock_imports = ["docs", "setup"]
exclude_patterns = ['_build', '**.ipynb_checkpoints']
autodoc_mock_imports = ["ipywidgets", "IPython", "ipython_secrets"]
# add_module_names = False
Loading

0 comments on commit ec63b46

Please sign in to comment.