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

DOC: Use napoleon sphinx extension #5743

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

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
DOC: Switch to napoleon instead of numpydoc.
  • Loading branch information
QuLogic committed Apr 5, 2016
commit c7042adb736d7eab64f589424256c2d29e4aa37c
2 changes: 1 addition & 1 deletion 2 .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ install:
# Neihter is installed as a dependency of IPython since they are not used by the IPython console.
- |
if [[ $BUILD_DOCS == true ]]; then
pip install $PRE numpydoc ipython jsonschema mistune colorspacious
pip install $PRE ipython jsonschema mistune colorspacious
pip install -q $PRE linkchecker
wget https://github.com/google/fonts/blob/master/ofl/felipa/Felipa-Regular.ttf?raw=true -O Felipa-Regular.ttf
wget http://mirrors.kernel.org/ubuntu/pool/universe/f/fonts-humor-sans/fonts-humor-sans_1.0-1_all.deb
Expand Down
9 changes: 4 additions & 5 deletions 9 doc/README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,10 @@ python documentation system built on top of ReST. This directory contains
* mpl_examples - a link to the matplotlib examples in case any
documentation wants to literal include them

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

Note that Sphinx uses the installed version of the package to build
the documentation, so matplotlib must be installed *before* the docs
Expand Down
17 changes: 8 additions & 9 deletions 17 doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,11 @@
'sphinx.ext.inheritance_diagram',
'sphinxext.gen_gallery', 'sphinxext.gen_rst',
'sphinxext.github',
'numpydoc']
]
if hasattr(sphinx, 'version_info') and sphinx.version_info[:2] >= (1, 3):
extensions += ['sphinx.ext.napoleon']
else:
extensions += ['sphinxcontrib.napoleon']

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

Expand All @@ -46,12 +50,6 @@
extensions.append('IPython.sphinxext.ipython_console_highlighting')
extensions.append('IPython.sphinxext.ipython_directive')

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


autosummary_generate = True

Expand Down Expand Up @@ -333,5 +331,6 @@ def getapi(*args):
sys.modules['sip'] = mocksip
sys.modules['PyQt4'] = mockpyqt4

################# numpydoc config ####################
numpydoc_show_class_members = False
################# napoleon config ####################
napoleon_google_docstring = False
napoleon_use_param = False
2 changes: 1 addition & 1 deletion 2 doc/make.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def htmlhelp():
with open('build/htmlhelp/index.html', 'r+') as fh:
content = fh.read()
fh.seek(0)
content = re.sub(r'<script>.*?</script>', '', content,
content = re.sub(r'<script>.*?</script>', '', content,
flags=re.MULTILINE| re.DOTALL)
fh.write(content)
fh.truncate()
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.