-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add doc for implicit namespace packages
- Loading branch information
Showing
4 changed files
with
118 additions
and
19 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
{% if not obj.display %} | ||
:orphan: | ||
|
||
{% endif %} | ||
:py:mod:`{{ obj.name }}` | ||
=========={{ "=" * obj.name|length }} | ||
|
||
.. py:module:: {{ obj.name }} | ||
{% if obj.docstring %} | ||
.. autoapi-nested-parse:: | ||
|
||
{{ obj.docstring|indent(3) }} | ||
|
||
{% endif %} | ||
|
||
{% block submodules %} | ||
{% set visible_submodules = obj.submodules|selectattr("display")|list %} | ||
{% if visible_submodules %} | ||
Submodules | ||
---------- | ||
.. toctree:: | ||
:titlesonly: | ||
:maxdepth: 1 | ||
|
||
{% for submodule in visible_submodules %} | ||
{{ submodule.short_name }}/index.rst | ||
{% endfor %} | ||
|
||
|
||
{% endif %} | ||
{% endblock %} | ||
{% block content %} | ||
{% if obj.all is not none %} | ||
{% set visible_children = obj.children|selectattr("short_name", "in", obj.all)|list %} | ||
{% elif obj.type is equalto("package") %} | ||
{% set visible_children = obj.children|selectattr("display")|list %} | ||
{% else %} | ||
{% set visible_children = obj.children|selectattr("display")|rejectattr("imported")|list %} | ||
{% endif %} | ||
{% if visible_children %} | ||
{{ obj.type|title }} Contents | ||
{{ "-" * obj.type|length }}--------- | ||
|
||
{% set visible_classes = visible_children|selectattr("type", "equalto", "class")|list %} | ||
{% set visible_functions = visible_children|selectattr("type", "equalto", "function")|list %} | ||
{% set visible_attributes = visible_children|selectattr("type", "equalto", "data")|list %} | ||
{% if "show-module-summary" in autoapi_options and (visible_classes or visible_functions) %} | ||
{% block classes scoped %} | ||
{% if visible_classes %} | ||
Classes | ||
~~~~~~~ | ||
|
||
.. autoapisummary:: | ||
|
||
{% for klass in visible_classes %} | ||
{{ klass.id }} | ||
{% endfor %} | ||
|
||
|
||
{% endif %} | ||
{% endblock %} | ||
|
||
{% block functions scoped %} | ||
{% if visible_functions %} | ||
Functions | ||
~~~~~~~~~ | ||
|
||
.. autoapisummary:: | ||
|
||
{% for function in visible_functions %} | ||
{{ function.id }} | ||
{% endfor %} | ||
|
||
|
||
{% endif %} | ||
{% endblock %} | ||
|
||
{% block attributes scoped %} | ||
{% if visible_attributes %} | ||
Attributes | ||
~~~~~~~~~~ | ||
|
||
.. autoapisummary:: | ||
|
||
{% for attribute in visible_attributes %} | ||
{{ attribute.id }} | ||
{% endfor %} | ||
|
||
|
||
{% endif %} | ||
{% endblock %} | ||
{% endif %} | ||
{% for obj_item in visible_children %} | ||
{{ obj_item.render()|indent(0) }} | ||
{% endfor %} | ||
{% endif %} | ||
{% endblock %} |
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
Empty file.