|
11 | 11 | # All configuration values have a default value; values that are commented out
|
12 | 12 | # serve to show the default value.
|
13 | 13 |
|
14 |
| -import sys, os |
| 14 | +import os |
| 15 | +import sys |
| 16 | +import sphinx |
15 | 17 |
|
16 | 18 | # If your extensions are in another directory, add it here. If the directory
|
17 | 19 | # is relative to the documentation root, use os.path.abspath to make it
|
18 | 20 | # absolute, like shown here.
|
19 |
| -sys.path.append(os.path.abspath('sphinxext')) |
| 21 | +sys.path.insert(0, os.path.abspath('sphinxext')) |
20 | 22 |
|
21 | 23 | # General configuration
|
22 | 24 | # ---------------------
|
|
25 | 27 | # coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
|
26 | 28 | extensions = ['matplotlib.sphinxext.mathmpl', 'math_symbol_table',
|
27 | 29 | 'sphinx.ext.autodoc', 'matplotlib.sphinxext.only_directives',
|
28 |
| - 'sphinx.ext.doctest', |
| 30 | + 'sphinx.ext.doctest', 'sphinx.ext.autosummary', |
29 | 31 | 'matplotlib.sphinxext.plot_directive', 'sphinx.ext.inheritance_diagram',
|
30 | 32 | '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 |
32 | 48 |
|
33 | 49 | # Add any paths that contain templates here, relative to this directory.
|
34 | 50 | templates_path = ['_templates']
|
|
138 | 154 |
|
139 | 155 | # Additional templates that should be rendered to pages, maps page names to
|
140 | 156 | # 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'} |
142 | 160 |
|
143 | 161 | # If false, no module index is generated.
|
144 | 162 | #html_use_modindex = True
|
|
0 commit comments