Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions docs/sphinx/source/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,40 @@ To build the docs locally, install the ``doc`` dependencies specified in the
`setup.py <https://github.com/pvlib/pvlib-python/blob/master/setup.py>`_
file. See :ref:`installation` instructions for more information.

Example Gallery
---------------

The example gallery uses `sphinx-gallery <https://sphinx-gallery.github.io/>`_
and is generated from script files in the
`docs/examples <https://github.com/pvlib/pvlib-python/tree/master/docs/examples>`_
directory. sphinx-gallery will execute example files that start with
``plot_`` and capture the output.

Here is a starter template for new examples:

.. code-block:: python

"""
Page Title
==========

A sentence describing the example.
"""

# %%
# Explanatory text about the example, what it does, why it does it, etc.
# Text in the comment block before the first line of code `import pvlib`
# will be printed to the example's webpage.

import pvlib
import matplotlib.pyplot as plt

plt.scatter([1, 2, 3], [4, 5, 6])
plt.show()

For more details, see the sphinx-gallery
`docs <https://sphinx-gallery.github.io/stable/syntax.html#embedding-rst>`_.

.. _testing:

Testing
Expand Down
5 changes: 3 additions & 2 deletions docs/sphinx/source/whatsnew/v0.7.2.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,9 @@ Bug fixes

Documentation
~~~~~~~~~~~~~
* Add NumFOCUS affiliation to Sphinx documentation :pull:`862`
* Add example of IV curve generation :pull:`872`
* Add NumFOCUS affiliation to Sphinx documentation (:pull:`862`)
* Add example of IV curve generation (:pull:`872`)
* Add section about gallery examples to Contributing guide (:pull:`905`)

Requirements
~~~~~~~~~~~~
Expand Down