-
Notifications
You must be signed in to change notification settings - Fork 128
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Also have a skeleton test structure
- Loading branch information
Showing
17 changed files
with
527 additions
and
589 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,105 +1,102 @@ | ||
{% if obj.display %} | ||
{% if is_own_page %} | ||
{% if is_own_page %} | ||
{{ obj.name }} | ||
{{ "=" * obj.name | length }} | ||
{% endif %} | ||
|
||
{% endif %} | ||
{% set visible_children = obj.children|selectattr("display")|list %} | ||
{% set own_page_children = visible_children|selectattr("type", "in", own_page_types|list) %} | ||
{% if own_page_children %} | ||
.. toctree:: | ||
:hidden: | ||
|
||
{% for child in own_page_children %} | ||
{{ child.short_name }}/index | ||
{% endfor %} | ||
|
||
{% endif %} | ||
.. py:{{ obj.type }}:: {{ obj.short_name }}{% if obj.args %}({{ obj.args }}){% endif %} | ||
{% for (args, return_annotation) in obj.overloads %} | ||
{% for (args, return_annotation) in obj.overloads %} | ||
{{ " " * (obj.type | length) }} {{ obj.short_name }}{% if args %}({{ args }}){% endif %} | ||
|
||
{% endfor %} | ||
|
||
|
||
{% endfor %} | ||
{% if obj.bases %} | ||
{% if "show-inheritance" in autoapi_options %} | ||
{% if "show-inheritance" in autoapi_options %} | ||
Bases: {% for base in obj.bases %}{{ base|link_objs }}{% if not loop.last %}, {% endif %}{% endfor %} | ||
{% endif %} | ||
{% endif %} | ||
|
||
|
||
{% if "show-inheritance-diagram" in autoapi_options and obj.bases != ["object"] %} | ||
{% if "show-inheritance-diagram" in autoapi_options and obj.bases != ["object"] %} | ||
.. autoapi-inheritance-diagram:: {{ obj.obj["full_name"] }} | ||
:parts: 1 | ||
{% if "private-members" in autoapi_options %} | ||
{% if "private-members" in autoapi_options %} | ||
:private-bases: | ||
{% endif %} | ||
{% endif %} | ||
|
||
{% endif %} | ||
{% endif %} | ||
{% endif %} | ||
{% if obj.docstring %} | ||
{{ obj.docstring|indent(3) }} | ||
|
||
{% endif %} | ||
{# TODO: Rendering of all children below this line must be conditional on own_page_types #} | ||
{% if "inherited-members" in autoapi_options %} | ||
{% set visible_classes = obj.classes|selectattr("display")|list %} | ||
{% else %} | ||
{% set visible_classes = obj.classes|rejectattr("inherited")|selectattr("display")|list %} | ||
{% endif %} | ||
{% for klass in visible_classes %} | ||
{{ klass.render(own_page_types=[])|indent(3) }} | ||
{% for obj_item in visible_children %} | ||
{% if obj_item.type not in own_page_types %} | ||
{{ obj_item.render()|indent(3) }} | ||
{% endif %} | ||
{% endfor %} | ||
{% if "inherited-members" in autoapi_options %} | ||
{% set visible_properties = obj.properties|selectattr("display")|list %} | ||
{% else %} | ||
{% set visible_properties = obj.properties|rejectattr("inherited")|selectattr("display")|list %} | ||
{% endif %} | ||
{% if "property" in own_page_types and visible_properties %} | ||
{% if is_own_page and own_page_children %} | ||
{% set visible_attributes = own_page_children|selectattr("type", "equalto", "attribute")|list %} | ||
{% if visible_attributes %} | ||
Attributes | ||
---------- | ||
|
||
Properties | ||
---------- | ||
.. autoapisummary:: | ||
|
||
.. toctree:: | ||
:hidden: | ||
{% for attribute in visible_attributes %} | ||
{{ attribute.id }} | ||
{% endfor %} | ||
|
||
{% for property in visible_properties %} | ||
{{ property.name }} | ||
{% endfor %} | ||
{% else %} | ||
{% for property in visible_properties %} | ||
{{ property.render()|indent(3) }} | ||
{% endfor %} | ||
{% endif %} | ||
{% if "inherited-members" in autoapi_options %} | ||
{% set visible_attributes = obj.attributes|selectattr("display")|list %} | ||
{% else %} | ||
{% set visible_attributes = obj.attributes|rejectattr("inherited")|selectattr("display")|list %} | ||
{% endif %} | ||
{% if "attribute" in own_page_types and visible_attributes %} | ||
|
||
Attributes | ||
---------- | ||
{% endif %} | ||
{% set visible_exceptions = own_page_children|selectattr("type", "equalto", "exception")|list %} | ||
{% if visible_exceptions %} | ||
Exceptions | ||
---------- | ||
|
||
.. toctree:: | ||
:hidden: | ||
.. autoapisummary:: | ||
|
||
{% for attribute in visible_attributes %} | ||
{{ attribute.name }} | ||
{% endfor %} | ||
{% else %} | ||
{% for attribute in visible_attributes %} | ||
{{ attribute.render()|indent(3) }} | ||
{% endfor %} | ||
{% endif %} | ||
{% if "inherited-members" in autoapi_options %} | ||
{% set visible_methods = obj.methods|selectattr("display")|list %} | ||
{% else %} | ||
{% set visible_methods = obj.methods|rejectattr("inherited")|selectattr("display")|list %} | ||
{% endif %} | ||
{% if "method" in own_page_types and visible_methods %} | ||
{% for exception in visible_exceptions %} | ||
{{ exception.id }} | ||
{% endfor %} | ||
|
||
Methods | ||
------- | ||
|
||
.. toctree:: | ||
:hidden: | ||
{% endif %} | ||
{% set visible_classes = own_page_children|selectattr("type", "equalto", "class")|list %} | ||
{% if visible_classes %} | ||
Classes | ||
------- | ||
|
||
{% for method in visible_methods %} | ||
{{ method.name }} | ||
{% endfor %} | ||
{% else %} | ||
{% for method in visible_methods %} | ||
{{ method.render()|indent(3) }} | ||
{% endfor %} | ||
.. autoapisummary:: | ||
|
||
{% for klass in visible_classes %} | ||
{{ klass.id }} | ||
{% endfor %} | ||
|
||
|
||
{% endif %} | ||
{% set visible_methods = own_page_children|selectattr("type", "equalto", "method")|list %} | ||
{% if visible_methods %} | ||
Methods | ||
------- | ||
|
||
.. autoapisummary:: | ||
|
||
{% for method in visible_methods %} | ||
{{ method.id }} | ||
{% endfor %} | ||
|
||
|
||
{% endif %} | ||
{% endif %} | ||
{% endif %} |
Oops, something went wrong.