File tree Expand file tree Collapse file tree 5 files changed +65
-0
lines changed Expand file tree Collapse file tree 5 files changed +65
-0
lines changed Original file line number Diff line number Diff line change 1+ {{ fullname | escape | underline}}
2+
3+ .. currentmodule :: {{ module }}
4+
5+ .. autoclass :: {{ objname }}
6+
7+ {% block methods %}
8+ .. automethod :: __init__
9+
10+ {% if methods %}
11+ .. rubric :: Methods
12+
13+ .. autosummary ::
14+ {% for item in methods %}
15+ ~{{ name }}.{{ item }}
16+ {%- endfor %}
17+ {% endif %}
18+ {% endblock %}
19+
20+ {% block attributes %}
21+ {% if attributes %}
22+ .. rubric :: Attributes
23+
24+ .. autosummary ::
25+ {% for item in attributes %}
26+ ~{{ name }}.{{ item }}
27+ {%- endfor %}
28+ {% endif %}
29+ {% endblock %}
30+
31+ {# not sure how to get the minigallery directive to not render empty #}
32+ {# galleries, so just use the old `include ` style instead #}
33+ {# .. minigallery:: {{ fullname }} #}
34+
35+ .. include :: gallery_backreferences/{{fullname}}.examples
Original file line number Diff line number Diff line change 1+ {{ fullname | escape | underline }}
2+
3+ .. currentmodule :: {{ module }}
4+
5+ .. autofunction :: {{ fullname }}
6+
7+ {# not sure how to get the minigallery directive to not render empty #}
8+ {# galleries, so just use the old `include ` style instead #}
9+ {# .. minigallery:: {{ fullname }} #}
10+
11+ .. include :: gallery_backreferences/{{fullname}}.examples
Original file line number Diff line number Diff line change 1+ {{ fullname | escape | underline }}
2+
3+ .. currentmodule :: {{ module }}
4+
5+ .. automethod :: {{ fullname }}
6+
7+ {# not sure how to get the minigallery directive to not render empty #}
8+ {# galleries, so just use the old `include ` style instead #}
9+ {# .. minigallery:: {{ fullname }} #}
10+
11+ .. include :: gallery_backreferences/{{fullname}}.examples
Original file line number Diff line number Diff line change @@ -341,6 +341,13 @@ def setup(app):
341341 'gallery_dirs' : ['auto_examples' ], # location of generated output
342342 # sphinx-gallery only shows plots from plot_*.py files by default:
343343 # 'filename_pattern': '*.py',
344+
345+ # directory where function/class granular galleries are stored
346+ 'backreferences_dir' : 'generated/gallery_backreferences' ,
347+
348+ # Modules for which function/class level galleries are created. In
349+ # this case only pvlib, could include others though. must be tuple of str
350+ 'doc_module' : ('pvlib' ,),
344351}
345352# supress warnings in gallery output
346353# https://sphinx-gallery.github.io/stable/configuration.html
Original file line number Diff line number Diff line change @@ -54,6 +54,7 @@ Documentation
5454* Add a transposition gain example to the gallery. (:pull: `979 `)
5555* Add a gallery example of calculating diffuse IAM using
5656 :py:func: `pvlib.iam.marion_diffuse `. (:pull: `984 `)
57+ * Add minigalleries to API reference pages. (:pull: `991 `)
5758
5859Requirements
5960~~~~~~~~~~~~
You can’t perform that action at this time.
0 commit comments