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

Automatic example galleries in API pages #2136

Merged
merged 1 commit into from
Sep 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
* Deprecated oldest LinearModelAlgorithm(X, basis, Y) and LinearModelStepwiseAlgorithm(X, basis, Y,...) ctors

=== Documentation ===
* Added example galleries at the end of API doc pages

=== Python module ===

Expand Down
3 changes: 3 additions & 0 deletions python/doc/_templates/Copula.rst_t
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,6 @@
{% block methods %}
.. automethod:: __init__
{% endblock %}

.. minigallery:: {{module}}.{{objname}}
:add-heading: Examples using the class
3 changes: 3 additions & 0 deletions python/doc/_templates/CovarianceModel.rst_t
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,6 @@
{% block methods %}
.. automethod:: __init__
{% endblock %}

.. minigallery:: {{module}}.{{objname}}
:add-heading: Examples using the class
3 changes: 3 additions & 0 deletions python/doc/_templates/Distribution.rst_t
Original file line number Diff line number Diff line change
Expand Up @@ -80,3 +80,6 @@
{% block methods %}
.. automethod:: __init__
{% endblock %}

.. minigallery:: {{module}}.{{objname}}
:add-heading: Examples using the class
3 changes: 3 additions & 0 deletions python/doc/_templates/DistributionFactory.rst_t
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,6 @@
{% block methods %}
.. automethod:: __init__
{% endblock %}

.. minigallery:: {{module}}.{{objname}}
:add-heading: Examples using the class
3 changes: 3 additions & 0 deletions python/doc/_templates/DistributionHighDimension.rst_t
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,6 @@
{% block methods %}
.. automethod:: __init__
{% endblock %}

.. minigallery:: {{module}}.{{objname}}
:add-heading: Examples using the class
3 changes: 3 additions & 0 deletions python/doc/_templates/FilteringWindow.rst_t
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,6 @@
{% block methods %}
.. automethod:: __init__
{% endblock %}

.. minigallery:: {{module}}.{{objname}}
:add-heading: Examples using the class
3 changes: 3 additions & 0 deletions python/doc/_templates/LowDiscrepancySequence.rst_t
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,6 @@
{% block methods %}
.. automethod:: __init__
{% endblock %}

.. minigallery:: {{module}}.{{objname}}
:add-heading: Examples using the class
3 changes: 3 additions & 0 deletions python/doc/_templates/ODESolver.rst_t
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,6 @@
{% block methods %}
.. automethod:: __init__
{% endblock %}

.. minigallery:: {{module}}.{{objname}}
:add-heading: Examples using the class
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,6 @@
{% block methods %}
.. automethod:: __init__
{% endblock %}

.. minigallery:: {{module}}.{{objname}}
:add-heading: Examples using the class
3 changes: 3 additions & 0 deletions python/doc/_templates/Process.rst_t
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,6 @@
{% block methods %}
.. automethod:: __init__
{% endblock %}

.. minigallery:: {{module}}.{{objname}}
:add-heading: Examples using the class
3 changes: 3 additions & 0 deletions python/doc/_templates/Solver.rst_t
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,6 @@
{% block methods %}
.. automethod:: __init__
{% endblock %}

.. minigallery:: {{module}}.{{objname}}
:add-heading: Examples using the class
3 changes: 3 additions & 0 deletions python/doc/_templates/SpectralModel.rst_t
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,6 @@
{% block methods %}
.. automethod:: __init__
{% endblock %}

.. minigallery:: {{module}}.{{objname}}
:add-heading: Examples using the class
3 changes: 3 additions & 0 deletions python/doc/_templates/StratifiedExperiment.rst_t
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,6 @@
{% block methods %}
.. automethod:: __init__
{% endblock %}

.. minigallery:: {{module}}.{{objname}}
:add-heading: Examples using the class
2 changes: 2 additions & 0 deletions python/doc/_templates/class.rst_t
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,5 @@
{% endblock %}


.. minigallery:: {{module}}.{{objname}}
:add-heading: Examples using the class
3 changes: 3 additions & 0 deletions python/doc/_templates/classWithPlot.rst_t
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,6 @@
{% block methods %}
.. automethod:: __init__
{% endblock %}

.. minigallery:: {{module}}.{{objname}}
:add-heading: Examples using the class
3 changes: 3 additions & 0 deletions python/doc/_templates/function.rst_t
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@
.. currentmodule:: {{ module }}

.. autofunction:: {{ objname }}

.. minigallery:: {{module}}.{{objname}}
:add-heading: Examples using the function
3 changes: 3 additions & 0 deletions python/doc/_templates/functionWithPlot.rst_t
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,6 @@
.. currentmodule:: {{ module }}

.. autofunction:: {{ objname }}

.. minigallery:: {{module}}.{{objname}}
:add-heading: Examples using the function
10 changes: 10 additions & 0 deletions python/doc/conf.py.in
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,16 @@ sphinx_gallery_conf = {
'examples/graphs',]),
'show_signature': False,

# directory where function/class granular galleries are stored
'backreferences_dir' : 'gen_modules/backreferences',

# Modules for which function/class level galleries are created.
'doc_module' : ('openturns'),

# objects to exclude from implicit backreferences. The default option
# is an empty set, i.e. exclude nothing.
'exclude_implicit_doc': {},

}


Expand Down