Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add API templates #278

Merged
merged 60 commits into from
Sep 8, 2023
Merged
Changes from 1 commit
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
bfba652
feat: improve autosummary templates
jorgepiloto Aug 16, 2023
209a281
feat: add function to retrieve templates location
jorgepiloto Aug 18, 2023
8111aa8
dbg: working tabs
jorgepiloto Aug 18, 2023
c6cc1ac
dbg: working dynamic tabs
jorgepiloto Aug 18, 2023
d1942a2
dbg: add interfaces tab
jorgepiloto Aug 18, 2023
6d72af7
dbg: add exceptions tab
jorgepiloto Aug 18, 2023
b4edf13
feat: working tree view
jorgepiloto Aug 19, 2023
e9dc27b
feat: working templates with tabs and icons
jorgepiloto Aug 19, 2023
9cb20ad
feat: add enums tab
jorgepiloto Aug 21, 2023
95a184f
feat: add visible classes in toc
jorgepiloto Aug 22, 2023
6cbb2ae
feat: add class rst files
Revathyvenugopal162 Aug 23, 2023
51d1aaa
feat: modify the class.rst
Revathyvenugopal162 Aug 23, 2023
b51be2b
feat: add tabs for all attributes
Revathyvenugopal162 Aug 23, 2023
81ca37d
feat: pre-commit fixed
Revathyvenugopal162 Aug 23, 2023
223307f
feat: use summary insted of description
jorgepiloto Aug 23, 2023
27c79a9
fix: the docstring with numpy
Revathyvenugopal162 Aug 23, 2023
0145ba3
Merge branch 'feat/api-templates' of https://github.com/ansys/ansys-s…
Revathyvenugopal162 Aug 23, 2023
ebc8c26
feat: add current module
Revathyvenugopal162 Aug 23, 2023
05dd038
feat: add lines
Revathyvenugopal162 Aug 23, 2023
40b1a5c
feat: render interfaces and enums
jorgepiloto Aug 24, 2023
3d5d255
feat: add sectioon headings
Revathyvenugopal162 Aug 24, 2023
03963f2
Merge branch 'feat/api-templates' of https://github.com/ansys/ansys-s…
Revathyvenugopal162 Aug 24, 2023
9b4bac1
feat: add docstring only having summary
Revathyvenugopal162 Aug 24, 2023
ff4ff89
feat: differntiate methods
Revathyvenugopal162 Aug 24, 2023
de9afeb
feat: add differnt methods
Revathyvenugopal162 Aug 24, 2023
4276b55
feat: add import detail
Revathyvenugopal162 Aug 24, 2023
4f3026d
feat: attept to chnage the property
Revathyvenugopal162 Aug 24, 2023
70f293e
feat: test cases
Revathyvenugopal162 Aug 25, 2023
5091829
feat: add macros
Revathyvenugopal162 Aug 25, 2023
fc5bd63
Merge branch 'main' into feat/api-templates
Revathyvenugopal162 Aug 28, 2023
bfd963f
Merge branch 'main' into feat/api-templates
Revathyvenugopal162 Aug 28, 2023
2e4a804
feat: add macros for modules
Revathyvenugopal162 Aug 29, 2023
1486621
Merge branch 'main' into feat/api-templates
RobPasMue Aug 31, 2023
a86142e
Merge branch 'main' into feat/api-templates
Revathyvenugopal162 Aug 31, 2023
dcfdc86
fix: style checks
Revathyvenugopal162 Aug 31, 2023
1d5f746
include only in toctree if option is there
Revathyvenugopal162 Sep 5, 2023
f5c1ed9
Merge branch 'main' into feat/api-templates
Revathyvenugopal162 Sep 5, 2023
c507894
fix: Add the toctree class conditions
Revathyvenugopal162 Sep 5, 2023
cd530dd
fix: Add the toctree macros
Revathyvenugopal162 Sep 5, 2023
ffa9ed6
fix: Add the macros for toctree
Revathyvenugopal162 Sep 5, 2023
5d3b7cb
feat: move macros.rst to autoapi/python/
jorgepiloto Sep 6, 2023
84f2fe1
fix: indentation and heading depth
jorgepiloto Sep 6, 2023
90629c5
feat: declare macros at the top
jorgepiloto Sep 6, 2023
890bc8e
fix: remove unused macros.rst
jorgepiloto Sep 6, 2023
590d65a
feat: ensure non single attrs are rendered in the same page
jorgepiloto Sep 7, 2023
5940c6e
fix: ensure objects render in module page
jorgepiloto Sep 7, 2023
62ebacd
feat: map objects in toctree
jorgepiloto Sep 7, 2023
ff015bb
feat: improve rendering of obj in same page
jorgepiloto Sep 7, 2023
f206db1
fix: include module detail only if required
jorgepiloto Sep 7, 2023
4042f19
fix: restore autosummary templates
jorgepiloto Sep 7, 2023
dab5372
doc: restore code link
jorgepiloto Sep 7, 2023
5a78779
fix: links from tables
jorgepiloto Sep 7, 2023
5aff191
feat: allow classes to render in the same apge
jorgepiloto Sep 7, 2023
acddf43
fix: add the obj type
Revathyvenugopal162 Sep 7, 2023
8776fa1
fix: add the obj type in module.rst
Revathyvenugopal162 Sep 7, 2023
3207091
fix: add cononical for module.rst
Revathyvenugopal162 Sep 7, 2023
69cce3e
fix: add the comments
Revathyvenugopal162 Sep 7, 2023
79c96fc
fix: the conditions
Revathyvenugopal162 Sep 8, 2023
f20d949
fix: add conditions for render objects
Revathyvenugopal162 Sep 8, 2023
198056d
fix: add the visible objects without single page render
Revathyvenugopal162 Sep 8, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat: add tabs for all attributes
Revathyvenugopal162 committed Aug 23, 2023
commit b51be2b51e884d80964989a437c3b6d1498438c2
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
{% if obj.display %}

{{ obj.short_name }}
{{"=" * obj.short_name|length }}

.. py:{{ obj.type }}:: {{ obj.short_name }}{% if obj.args %}({{ obj.args }}){% endif %}

{% for (args, return_annotation) in obj.overloads %}
@@ -64,25 +61,55 @@ Bases: {% for base in obj.bases %}{{ base|link_objs }}{% if not loop.last %}, {%
{% if visible_properties %}
.. tab-item:: Properties

{% for property in visible_properties %}
{{ property.render()|indent(3) }}
{% endfor %}
.. list-table::
:header-rows: 0
:widths: auto

{% for property in visible_properties %}
* - :py:data:`{{ property.name }}`
- {{ property.summary }}
{% endfor %}

{% endif %}

{% if visible_attributes %}
.. tab-item:: Attributes

{% for attribute in visible_attributes %}
{{ attribute.render()|indent(3) }}
{% endfor %}
.. list-table::
:header-rows: 0
:widths: auto

{% for attribute in visible_attributes %}
* - :py:attr:`{{ attribute.name }}`
- {{ attribute.summary }}
{% endfor %}

{% endif %}

{% if visible_methods %}
.. tab-item:: Methods

{% for method in visible_methods %}
{{ method.render()|indent(3) }}
{% endfor %}
.. list-table::
:header-rows: 0
:widths: auto

{% for method in visible_methods %}
* - :py:attr:`{{ method.name }}`
- {{ method.summary }}
{% endfor %}
{% endif %}

{% endif %}
{% endif %}
{% endif %}

{% for property in visible_properties %}
{{ property.render()|indent(3) }}
{% endfor %}

{% for attribute in visible_attributes %}
{{ attribute.render()|indent(3) }}
{% endfor %}

{% for method in visible_methods %}
{{ method.render()|indent(3) }}
{% endfor %}
Original file line number Diff line number Diff line change
@@ -191,11 +191,10 @@ Contents
{% endif %}
{% endif %}

{% if not "class" in autoapi_render_in_single_page and (visible_classes or visible_functions) %}

{% for klass in visible_classes %}

{% endfor %}
{% endif %}