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

Skip to content

MEP10: adding numpydoc and activating autosummary #1665

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 5 commits into from
Jan 23, 2013
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
30 changes: 30 additions & 0 deletions doc/_static/mpl.css
Original file line number Diff line number Diff line change
Expand Up @@ -505,3 +505,33 @@ ul.search li div.context {
ul.keywordmatches li.goodmatch a {
font-weight: bold;
}

table.docutils {
border-spacing: 2px;
border: collapse;
border-top-width: 1px;
border-right-width: 0px;
border-bottom-width: 1px;
border-left-width: 0px;
}

table.docutils tr:nth-child(even) {
background-color: #F3F3FF;
}
table.docutils tr:nth-child(odd) {
background-color: #FFFFEE;
}

table.docutils tr {
border-style: solid none solid none;
border-width: 1px 0 1px 0;
border-color: #AAAAAA;
}

table.docutils th {
padding: 1px 8px 1px 5px;
}

table.docutils td {
border-width: 1px 0 1px 0;
}
28 changes: 23 additions & 5 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,14 @@
# All configuration values have a default value; values that are commented out
# serve to show the default value.

import sys, os
import os
import sys
import sphinx

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

# General configuration
# ---------------------
Expand All @@ -25,10 +27,24 @@
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = ['matplotlib.sphinxext.mathmpl', 'math_symbol_table',
'sphinx.ext.autodoc', 'matplotlib.sphinxext.only_directives',
'sphinx.ext.doctest',
'sphinx.ext.doctest', 'sphinx.ext.autosummary',
'matplotlib.sphinxext.plot_directive', 'sphinx.ext.inheritance_diagram',
'gen_gallery', 'gen_rst',
'matplotlib.sphinxext.ipython_console_highlighting', 'github']
'matplotlib.sphinxext.ipython_console_highlighting', 'github',
'numpy_ext.numpydoc']
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be numpydoc. I've submitted a PR to fix this.



try:
import numpydoc
except ImportError:
raise ImportError("No modyle named numpydoc - you need to install "
"numpydoc to build the documentation.")


autosummary_generate = True

if sphinx.__version__ >= 1.1:
autodoc_docstring_signature = True

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
Expand Down Expand Up @@ -133,7 +149,9 @@

# Additional templates that should be rendered to pages, maps page names to
# template names.
html_additional_pages = {'index': 'index.html', 'gallery':'gallery.html', 'citing':'citing.html'}
html_additional_pages = {'index': 'index.html',
'gallery':'gallery.html',
'citing': 'citing.html'}

# If false, no module index is generated.
#html_use_modindex = True
Expand Down
6 changes: 3 additions & 3 deletions doc/devel/documenting_mpl.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ Documenting matplotlib
Getting started
===============

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

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