Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 052583d

Browse filesBrowse files
committed
DOC: Switch to napoleon instead of numpydoc.
1 parent 1d89de2 commit 052583d
Copy full SHA for 052583d

File tree

Expand file treeCollapse file tree

3 files changed

+12
-9
lines changed
Filter options
Expand file treeCollapse file tree

3 files changed

+12
-9
lines changed

‎doc/README.txt

Copy file name to clipboardExpand all lines: doc/README.txt
+4-5Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,10 @@ python documentation system built on top of ReST. This directory contains
3333
* mpl_examples - a link to the matplotlib examples in case any
3434
documentation wants to literal include them
3535

36-
To build the HTML documentation, install sphinx (1.0 or greater
37-
required), then type "python make.py html" in this directory. Wait
38-
for the initial run (which builds the example gallery) to be done,
39-
then run "python make.py html" again. The top file of the results will
40-
be ./build/html/index.html
36+
To build the HTML documentation, install sphinx (1.0 or greater required) and,
37+
if sphinx older than 1.3, sphinxcontrib-napoleon, then type "python make.py
38+
html" in this directory. The top file of the results will be
39+
./build/html/index.html
4140

4241
Note that Sphinx uses the installed version of the package to build
4342
the documentation, so matplotlib must be installed *before* the docs

‎doc/conf.py

Copy file name to clipboardExpand all lines: doc/conf.py
+7-3Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,11 @@
3232
'sphinx.ext.inheritance_diagram',
3333
'sphinxext.gen_gallery', 'sphinxext.gen_rst',
3434
'sphinxext.github',
35-
'numpydoc']
35+
]
36+
if hasattr(sphinx, 'version_info') and sphinx.version_info[:2] >= (1, 3):
37+
extensions += ['sphinx.ext.napoleon']
38+
else:
39+
extensions += ['sphinxcontrib.napoleon']
3640

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

@@ -328,5 +332,5 @@ def getapi(*args):
328332
sys.modules['sip'] = mocksip
329333
sys.modules['PyQt4'] = mockpyqt4
330334

331-
################# numpydoc config ####################
332-
numpydoc_show_class_members = False
335+
################# napoleon config ####################
336+
napoleon_google_docstring = False

‎doc/make.py

Copy file name to clipboardExpand all lines: doc/make.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ def htmlhelp():
6060
with open('build/htmlhelp/index.html', 'r+') as fh:
6161
content = fh.read()
6262
fh.seek(0)
63-
content = re.sub(r'<script>.*?</script>', '', content,
63+
content = re.sub(r'<script>.*?</script>', '', content,
6464
flags=re.MULTILINE| re.DOTALL)
6565
fh.write(content)
6666
fh.truncate()

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.