8000 Merge pull request #1665 from NelleV/MEP10 · matplotlib/matplotlib@39a54e2 · GitHub
[go: up one dir, main page]

Skip to content

Commit 39a54e2

Browse files
committed
Merge pull request #1665 from NelleV/MEP10
MEP10: adding numpydoc and activating autosummary
2 parents ffdd946 + 2ca2664 commit 39a54e2

File tree

3 files changed

+56
-8
lines changed

3 files changed

+56
-8
lines changed

doc/_static/mpl.css

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -505,3 +505,33 @@ ul.search li div.context {
505505
ul.keywordmatches li.goodmatch a {
506506
font-weight: bold;
507507
}
508+
509+
table.docutils {
510+
border-spacing: 2px;
511+
border: collapse;
512+
border-top-width: 1px;
513+
border-right-width: 0px;
514+
border-bottom-width: 1px;
515+
border-left-width: 0px;
516+
}
517+
518+
table.docutils tr:nth-child(even) {
519+
background-color: #F3F3FF;
520+
}
521+
table.docutils tr:nth-child(odd) {
522+
background-color: #FFFFEE;
523+
}
524+
525+
table.docutils tr {
526+
border-style: solid none solid none;
527+
border-width: 1px 0 1px 0;
528+
border-color: #AAAAAA;
529+
}
530+
531+
table.docutils th {
532+
padding: 1px 8px 1px 5px;
533+
}
534+
535+
table.docutils td {
536+
border-width: 1px 0 1px 0;
537+
}

doc/conf.py

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,14 @@
1111
# All configuration values have a default value; values that are commented out
1212
# serve to show the default value.
1313

14-
import sys, os
14+
import os
15+
import sys
16+
import sphinx
1517

1618
# If your extensions are in another directory, add it here. If the directory
1719
# is relative to the documentation root, use os.path.abspath to make it
1820
# absolute, like shown here.
19-
sys.path.append(os.path.abspath('sphinxext'))
21+
sys.path.insert(0, os.path.abspath('sphinxext'))
2022

2123
# General configuration
2224
# ---------------------
@@ -25,10 +27,24 @@
2527
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
2628
extensions = ['matplotlib.sphinxext.mathmpl', 'math_symbol_table',
2729
'sphinx.ext.autodoc', 'matplotlib.sphinxext.only_directives',
28-
'sphinx.ext.doctest',
30+
'sphinx.ext.doctest', 'sphinx.ext.autosummary',
2931
'matplotlib.sphinxext.plot_directive', 'sphinx.ext.inheritance_diagram',
3032
'gen_gallery', 'gen_rst',
31-
'matplotlib.sphinxext.ipython_console_highlighting', 'github']
33+
'matplotlib.sphinxext.ipython_console_highlighting', 'github',
34+
'numpy_ext.numpydoc']
35+
36+
37+
try:
38+
import numpydoc
39+
except ImportError:
40+
raise ImportError("No modyle named numpydoc - you need to install "
41+
"numpydoc to build the documentation.")
42+
43+
44+
autosummary_generate = True
45+
46+
if sphinx.__version__ >= 1.1:
47+
autodoc_docstring_signature = True
3248

3349
# Add any paths that contain templates here, relative to this directory.
3450
templates_path = ['_templates']
@@ -138,7 +154,9 @@
138154

139155
# Additional templates that should be rendered to pages, maps page names to
140156
# template names.
141-
html_additional_pages = {'index': 'index.html', 'gallery':'gallery.html', 'citing':'citing.html'}
157+
html_additional_pages = {'index': 'index.html',
158+
'gallery':'gallery.html',
159+
'citing': 'citing.html'}
142160

143161
# If false, no module index is generated.
144162
#html_use_modindex = True

doc/devel/documenting_mpl.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ Documenting matplotlib
77
Getting started
88
===============
99

10-
The documentation for matplotlib is generated from ReStructured Text
11-
using the Sphinx_ documentation generation tool. Sphinx-1.0 or later
12-
is required.
10+
The documentation for matplotlib is generated from ReStructured Text using the
11+
Sphinx_ documentation generation tool. Sphinx-1.0 or later and numpydoc 0.4 or
12+
later is required.
1313

1414
The documentation sources are found in the :file:`doc/` directory in
1515
the trunk. To build the users guide in html format, cd into

0 commit comments

Comments
 (0)
0