| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -52,7 +52,7 @@ _build | |||
| 52 | 52 | # Generated rst files | |
| 53 | 53 | ###################### | |
| 54 | 54 | genrst/ | |
| 55 | - autoapi/ | ||
| 55 | + /autoapi/ | ||
| 56 | 56 | ||
| 57 | 57 | # ctags and similar | |
| 58 | 58 | ################### | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -67,6 +67,7 @@ help: | |||
| 67 | 67 | ||
| 68 | 68 | clean: | |
| 69 | 69 | rm -rf $(BUILDDIR)/* | |
| 70 | + rm -rf autoapi | ||
| 70 | 71 | rm -rf $(STUBDIR) $(DISTDIR) *.egg-info | |
| 71 | 72 | ||
| 72 | 73 | html: stubs | |
@@ -213,10 +214,10 @@ check-translate: locale/circuitpython.pot $(wildcard locale/*.po) | |||
| 213 | 214 | $(PYTHON) tools/check_translations.py $^ | |
| 214 | 215 | ||
| 215 | 216 | stubs: | |
| 216 | - mkdir -p circuitpython-stubs | ||
| 217 | - python tools/extract_pyi.py shared-bindings/ $(STUBDIR) | ||
| 218 | - python tools/extract_pyi.py ports/atmel-samd/bindings $(STUBDIR) | ||
| 219 | - python setup.py sdist | ||
| 217 | + @mkdir -p circuitpython-stubs | ||
| 218 | + @$(PYTHON) tools/extract_pyi.py shared-bindings/ $(STUBDIR) | ||
| 219 | + @$(PYTHON) tools/extract_pyi.py ports/atmel-samd/bindings $(STUBDIR) | ||
| 220 | + @$(PYTHON) setup.py -q sdist | ||
| 220 | 221 | ||
| 221 | 222 | update-frozen-libraries: | |
| 222 | 223 | @echo "Updating all frozen libraries to latest tagged version." | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -71,11 +71,13 @@ | |||
| 71 | 71 | ||
| 72 | 72 | autoapi_type = 'python' | |
| 73 | 73 | # Uncomment this if debugging autoapi | |
| 74 | - # autoapi_keep_files = True | ||
| 75 | - autoapi_dirs = ['circuitpython-stubs'] | ||
| 74 | + autoapi_keep_files = True | ||
| 75 | + autoapi_dirs = [os.path.join('circuitpython-stubs', x) for x in os.listdir('circuitpython-stubs')] | ||
| 76 | + print(autoapi_dirs) | ||
| 76 | 77 | autoapi_add_toctree_entry = False | |
| 77 | 78 | autoapi_options = ['members', 'undoc-members', 'private-members', 'show-inheritance', 'special-members', 'show-module-summary'] | |
| 78 | 79 | autoapi_template_dir = 'docs/autoapi/templates' | |
| 80 | + autoapi_python_use_implicit_namespaces = True | ||
| 79 | 81 | ||
| 80 | 82 | # The encoding of source files. | |
| 81 | 83 | #source_encoding = 'utf-8-sig' | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,93 @@ | |||
| 1 | + {% if not obj.display %} | ||
| 2 | + :orphan: | ||
| 3 | + | ||
| 4 | + {% endif %} | ||
| 5 | + :mod:`{{ obj.name }}` | ||
| 6 | + ======={{ "=" * obj.name|length }} | ||
| 7 | + | ||
| 8 | + .. py:module:: {{ obj.name }} | ||
| 9 | + | ||
| 10 | + {% if obj.docstring %} | ||
| 11 | + .. autoapi-nested-parse:: | ||
| 12 | + | ||
| 13 | + {{ obj.docstring|prepare_docstring|indent(3) }} | ||
| 14 | + | ||
| 15 | + {% endif %} | ||
| 16 | + | ||
| 17 | + {% block subpackages %} | ||
| 18 | + {% set visible_subpackages = obj.subpackages|selectattr("display")|list %} | ||
| 19 | + {% if visible_subpackages %} | ||
| 20 | + .. toctree:: | ||
| 21 | + :titlesonly: | ||
| 22 | + :maxdepth: 3 | ||
| 23 | + | ||
| 24 | + {% for subpackage in visible_subpackages %} | ||
| 25 | + {{ subpackage.short_name }}/index.rst | ||
| 26 | + {% endfor %} | ||
| 27 | + | ||
| 28 | + | ||
| 29 | + {% endif %} | ||
| 30 | + {% endblock %} | ||
| 31 | + {% block submodules %} | ||
| 32 | + {% set visible_submodules = obj.submodules|selectattr("display")|list %} | ||
| 33 | + {% if visible_submodules %} | ||
| 34 | + | ||
| 35 | + .. toctree:: | ||
| 36 | + :titlesonly: | ||
| 37 | + :maxdepth: 1 | ||
| 38 | + | ||
| 39 | + {% for submodule in visible_submodules %} | ||
| 40 | + {{ submodule.short_name }}/index.rst | ||
| 41 | + {% endfor %} | ||
| 42 | + | ||
| 43 | + | ||
| 44 | + {% endif %} | ||
| 45 | + {% endblock %} | ||
| 46 | + {% block content %} | ||
| 47 | + {% if obj.all is not none %} | ||
| 48 | + {% set visible_children = obj.children|selectattr("short_name", "in", obj.all)|list %} | ||
| 49 | + {% elif obj.type is equalto("package") %} | ||
| 50 | + {% set visible_children = obj.children|selectattr("display")|list %} | ||
| 51 | + {% else %} | ||
| 52 | + {% set visible_children = obj.children|selectattr("display")|rejectattr("imported")|list %} | ||
| 53 | + {% endif %} | ||
| 54 | + {% if visible_children %} | ||
| 55 | + | ||
| 56 | + {% set visible_classes = visible_children|selectattr("type", "equalto", "class")|list %} | ||
| 57 | + {% set visible_functions = visible_children|selectattr("type", "equalto", "function")|list %} | ||
| 58 | + {% if "show-module-summary" in autoapi_options and (visible_classes or visible_functions) %} | ||
| 59 | + {% block classes %} | ||
| 60 | + {% if visible_classes %} | ||
| 61 | + Classes | ||
| 62 | + ~~~~~~~ | ||
| 63 | + | ||
| 64 | + .. autoapisummary:: | ||
| 65 | + | ||
| 66 | + {% for klass in visible_classes %} | ||
| 67 | + {{ klass.id }} | ||
| 68 | + {% endfor %} | ||
| 69 | + | ||
| 70 | + | ||
| 71 | + {% endif %} | ||
| 72 | + {% endblock %} | ||
| 73 | + | ||
| 74 | + {% block functions %} | ||
| 75 | + {% if visible_functions %} | ||
| 76 | + Functions | ||
| 77 | + ~~~~~~~~~ | ||
| 78 | + | ||
| 79 | + .. autoapisummary:: | ||
| 80 | + | ||
| 81 | + {% for function in visible_functions %} | ||
| 82 | + {{ function.id }} | ||
| 83 | + {% endfor %} | ||
| 84 | + | ||
| 85 | + | ||
| 86 | + {% endif %} | ||
| 87 | + {% endblock %} | ||
| 88 | + {% endif %} | ||
| 89 | + {% for obj_item in visible_children %} | ||
| 90 | + {{ obj_item.rendered|indent(0) }} | ||
| 91 | + {% endfor %} | ||
| 92 | + {% endif %} | ||
| 93 | + {% endblock %} | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments