Skip to content

Sphinx Gallery API pages + deprecating old examples folder #8525

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

Merged
merged 11 commits into from
Apr 27, 2017
14 changes: 14 additions & 0 deletions doc/_static/mpl.css
Original file line number Diff line number Diff line change
Expand Up @@ -786,4 +786,18 @@ div.responsive_subfig img {
width: 50%; /* we want 2 subfigs in a row */
}

/* Sphinx gallery display */
}

div.align-center {
margin: auto;
text-align: center;
}

p.caption {
font-weight: bold;
}

div#gallery.section {
overflow: hidden;
}
19 changes: 19 additions & 0 deletions doc/_templates/autofunctions.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@

{{ fullname | escape | underline }}


.. currentmodule:: {{ fullname }}

{% block functions %}
{% if functions %}

Functions
---------

.. autosummary::
:template: autosummary.rst
:toctree:
{% for item in functions %}{% if item not in ['plotting', 'colormaps'] %}
{{ item }}{% endif %}{% endfor %}
{% endif %}
{% endblock %}
51 changes: 51 additions & 0 deletions doc/_templates/automodule.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{{ fullname | escape | underline}}


.. automodule:: {{ fullname }}
:no-members:
:no-inherited-members:

{% block functions %}
{% if functions %}

Classes
-------

.. autosummary::
:template: autosummary.rst
:toctree:

{% for item in classes %}
{{ item }}
{% endfor %}
{% endif %}
{% endblock %}

{% block exceptions %}
{% if exceptions %}

Functions
---------

.. autosummary::
:template: autosummary.rst
:toctree:

{% for item in functions %}
{{ item }}
{% endfor %}
{% endif %}
{% endblock %}

{% block classes %}
{% if classes %}

Exceptions
----------

.. autosummary::
{% for item in exceptions %}
{{ item }}
{%- endfor %}
{% endif %}
{% endblock %}
16 changes: 16 additions & 0 deletions doc/_templates/autosummary.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{{ fullname | escape | underline}}


.. currentmodule:: {{ module }}

.. auto{{ objtype }}:: {{ objname }}

{% if objtype in ['class', 'method', 'function'] %}

.. include:: {{module}}.{{objname}}.examples

.. raw:: html

<div class="clearer"></div>

{% endif %}
12 changes: 12 additions & 0 deletions doc/_templates/function.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
:mod:`{{module}}`.{{objname}}
{{ underline }}====================

.. currentmodule:: {{ module }}

.. autofunction:: {{ objname }}

.. include:: {{module}}.{{objname}}.examples

.. raw:: html

<div class="clearer"></div>
1 change: 0 additions & 1 deletion doc/_templates/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,6 @@ <h3>{{ _('Navigation') }}</h3>
{%- block sidebar1 %} {# possible location for sidebar #} {% endblock %}

{%- block sidebar2 %}{{ sidebar() }}{% endblock %}

<div class="document">
{%- block document %}
<div class="documentwrapper">
Expand Down
28 changes: 14 additions & 14 deletions doc/api/animation_api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -139,17 +139,17 @@ Examples
.. toctree::
:maxdepth: 1

../examples/animation/animate_decay
../examples/animation/bayes_update
../examples/animation/double_pendulum_animated
../examples/animation/dynamic_image
../examples/animation/histogram
../examples/animation/rain
../examples/animation/random_data
../examples/animation/simple_3danim
../examples/animation/simple_anim
../examples/animation/strip_chart_demo
../examples/animation/unchained
../gallery/animation/animate_decay
../gallery/animation/bayes_update_sgskip
../gallery/animation/double_pendulum_animated_sgskip
../gallery/animation/dynamic_image
../gallery/animation/histogram
../gallery/animation/rain
../gallery/animation/random_data
../gallery/animation/simple_3danim
../gallery/animation/simple_anim
../gallery/animation/strip_chart_demo
../gallery/animation/unchained

``ArtistAnimation``
-------------------
Expand All @@ -161,9 +161,9 @@ Examples
.. toctree::
:maxdepth: 1

../examples/animation/basic_example
../examples/animation/basic_example_writer_sgskip
../examples/animation/dynamic_image2
../gallery/animation/basic_example
../gallery/animation/basic_example_writer_sgskip
../gallery/animation/dynamic_image2



Expand Down
Loading