Skip to content

Commit

Permalink
Merge pull request #15 from MatthewSZhang/doc-init
Browse files Browse the repository at this point in the history
DOC add class and function template
  • Loading branch information
MatthewSZhang authored Oct 22, 2024
2 parents 589fa3e + 5b5c845 commit f09b191
Show file tree
Hide file tree
Showing 5 changed files with 723 additions and 665 deletions.
6 changes: 5 additions & 1 deletion doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,11 @@
# directories to ignore when looking for source files.
exclude_patterns = ["_build"]

autodoc_default_options = {"members": True, "inherited-members": True}
# Hide class prefix in right sidebar.
toc_object_entries_show_parents = "hide"

# Add any paths that contain templates here, relative to this directory.
templates_path = ["templates"]

# generate autosummary even if no references
autosummary_generate = True
Expand Down
8 changes: 8 additions & 0 deletions doc/templates/autosummary/class.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{{ objname | escape | underline(line="=") }}

.. currentmodule:: {{ module }}

.. autoclass:: {{ objname }}
:members:
:inherited-members:
:special-members: __call__
5 changes: 5 additions & 0 deletions doc/templates/autosummary/function.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{{ objname | escape | underline(line="=") }}

.. currentmodule:: {{ module }}

.. autofunction:: {{ objname }}
Loading

0 comments on commit f09b191

Please sign in to comment.