Skip to content

Commit

Permalink
update autosummary
Browse files Browse the repository at this point in the history
  • Loading branch information
j042 committed Jun 20, 2023
1 parent 8784518 commit a247ff4
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 16 deletions.
13 changes: 11 additions & 2 deletions docs/source/_templates/autosummary/class.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,21 @@
.. currentmodule:: {{ module }}

.. autoclass:: {{ objname }}
:show-inheritance:

{% block methods %}

{% if methods %}
.. rubric:: {{ _('Methods') }}

.. autosummary::
:toctree:
{% for item in methods %}
~{{ name }}.{{ item }}
{% if item not in skipmethods %}
{% if item not in inherited_members %}
{{ name }}.{{ item }}
{% endif %}
{% endif %}
{%- endfor %}
{% endif %}
{% endblock %}
Expand All @@ -21,8 +27,11 @@
.. rubric:: {{ _('Attributes') }}

.. autosummary::
:toctree:
{% for item in attributes %}
~{{ name }}.{{ item }}
{% if item not in inherited_members %}
{{ name }}.{{ item }}
{% endif %}
{%- endfor %}
{% endif %}
{% endblock %}
3 changes: 3 additions & 0 deletions docs/source/_templates/autosummary/module.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.. _{{ fullname }}:

{{ fullname | escape | underline}}

.. automodule:: {{ fullname }}
Expand Down Expand Up @@ -32,6 +34,7 @@

.. autosummary::
:toctree:
:template:
{% for item in classes %}
{{ item }}
{%- endfor %}
Expand Down
17 changes: 17 additions & 0 deletions docs/source/api_references.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
API References
==============

Overview
--------
- :class:`splinepy.splinepy_core` is a module that includes all the c++ bindings. Most importantly, :class:`.PySpline` and :class:`.PyMultiPatch` are implemented here, which serve bases for all the derived spline types with in the library. It only contains minimal documentation, as the classes and methods are derived / integrated throughout the library with proper documentations on python side.
- :class:`.Spline` extends / documents :class:`.PySpline`. Common features for all splines are implemented here. We recommend using :class:`.Bezier`, :class:`.RationalBezier`, :class:`.BSpline`, or :class:`.NURBS` in front-end applications.
- :class:`.BezierBase` extends :class:`.Spline` with features available for Bezier-families. It becomes a basis for :class:`.Bezier` and :class:`.RationalBezier`, where the derived classes implement appropriate initializations.
- :class:`.BSplineBase` extends :class:`.Spline` with features available for BSpline-famlilies. It becomes a basis for :class:`.BSpline` and :class:`.NURBS`, where derived classes implements appropriate initializations.
- :class:`.Multipatch` extends / documents :class:`.PyMultiPatch`.
- :class:`splinepy.helpme` module contains useful application-driven tools / utility functions.


splinepy
--------
.. toctree::
full_api
12 changes: 3 additions & 9 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
extensions = [
"sphinx.ext.autodoc",
"sphinx.ext.autosummary",
"sphinx.ext.inheritance_diagram",
"sphinx.ext.mathjax",
"sphinx.ext.napoleon",
"sphinx.ext.viewcode",
Expand All @@ -51,11 +50,6 @@
"autosummary": True,
}

# def skip(app, what, name, obj, would_skip, options):
# if name == "__init__":
# return False
#
# return would_skip
#
# def setup(app):
# app.connect("autodoc-skip-member", skip)
autosummary_context = {
"skipmethods": ["__init__"],
}
5 changes: 1 addition & 4 deletions docs/modules.rst → docs/source/full_api.rst
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
API references
--------------

.. autosummary::
:toctree: _autosummary
:template:
:recursive:

splinepy
splinepy
2 changes: 1 addition & 1 deletion docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Related Links and further Information
.. toctree::
:maxdepth: 1

API references <_autosummary/splinepy>
API references <api_references>

.. Indices and tables
.. ==================
Expand Down

0 comments on commit a247ff4

Please sign in to comment.