Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 529410f

Browse files
dstansbytimhoffm
authored andcommitted
Add sphinx-copybutton to docs (#12997)
* Add sphinx-copybutton to docs * Directly include documentation requirements in docs
1 parent 406e453 commit 529410f

3 files changed

Lines changed: 9 additions & 12 deletions

File tree

doc-requirements.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Requirements for building docs
2-
# You will first need a matching matplotlib installed
2+
# You will first need a matching matplotlib installation
33
# e.g (from the matplotlib root directory)
44
# pip install -e .
55
#
@@ -13,3 +13,4 @@ ipywidgets
1313
numpydoc>=0.8
1414
pillow>=3.4
1515
sphinx-gallery>=0.2
16+
sphinx-copybutton

doc/conf.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525
# General configuration
2626
# ---------------------
2727

28-
# Add any Sphinx extension module names here, as strings. They can be extensions
29-
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
28+
# Add any Sphinx extension module names here, as strings. They can be
29+
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
3030
extensions = [
3131
'sphinx.ext.autodoc',
3232
'sphinx.ext.autosummary',
@@ -45,6 +45,7 @@
4545
'sphinxext.math_symbol_table',
4646
'sphinxext.mock_gui_toolkits',
4747
'sphinxext.skip_deprecated',
48+
'sphinx_copybutton',
4849
]
4950

5051
exclude_patterns = ['api/api_changes/*', 'users/whats_new/*']

doc/devel/documenting_mpl.rst

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,10 @@ Installing dependencies
4747
The documentation for Matplotlib is generated from reStructuredText (ReST_)
4848
using the Sphinx_ documentation generation tool. There are several extra
4949
requirements that are needed to build the documentation. They are listed in
50-
:file:`doc-requirements.txt` and listed below:
51-
52-
* Sphinx>=1.3, !=1.5.0, !=1.6.4, !=1.7.3
53-
* colorspacious
54-
* IPython
55-
* numpydoc>=0.8
56-
* Pillow>=3.4
57-
* sphinx-gallery>=0.2
58-
* graphviz
50+
:file:`doc-requirements.txt`, which is shown below:
51+
52+
.. include:: ../../doc-requirements.txt
53+
:literal:
5954

6055
.. note::
6156

0 commit comments

Comments
 (0)