Skip to content

Commit

Permalink
Merge pull request #153 from jnothman/strict-warnings
Browse files Browse the repository at this point in the history
Require that sphinx issue no warnings in CI
  • Loading branch information
rgommers committed Apr 1, 2018
2 parents 75b74d3 + 6be9f33 commit 9e526a9
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 10 deletions.
13 changes: 8 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,15 @@
# http://lint.travis-ci.org/
language: python
sudo: false
python:
- 3.6
- 2.7
env:
- SPHINX_SPEC="Sphinx==1.2.3"
- SPHINX_SPEC="Sphinx"
matrix:
include:
- python: 3.6
- python: 2.7
env:
- SPHINXOPTS='-W'
cache:
directories:
- $HOME/.cache/pip
Expand All @@ -23,5 +26,5 @@ script:
- nosetests numpydoc
- |
cd ../doc
make html
make latexpdf
make SPHINXOPTS=$SPHINXOPTS html
make SPHINXOPTS=$SPHINXOPTS latexpdf
13 changes: 9 additions & 4 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,19 @@
'sphinx.ext.autosummary',
'sphinx.ext.doctest',
'sphinx.ext.intersphinx',
'sphinx.ext.pngmath',
'sphinx.ext.todo',
'numpydoc',
'sphinx.ext.ifconfig',
'sphinx.ext.viewcode',
]

try:
import sphinx.ext.imgmath # noqa
except ImportError:
extensions.append('sphinx.ext.pngmath')
else:
extensions.append('sphinx.ext.imgmath')

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']

Expand Down Expand Up @@ -149,13 +155,12 @@
html_sidebars = {}

html_title = "%s v%s Manual" % (project, version)
html_static_path = ['_static']
html_last_updated_fmt = '%b %d, %Y'

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
html_static_path = [] # ['_static']

# Add any extra paths that contain custom files (such as robots.txt or
# .htaccess) here, relative to this directory. These files are copied
Expand Down Expand Up @@ -264,5 +269,5 @@
# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {
'python': ('http://docs.python.org/', None),
'scikit-learn': ('http://scikit-learn.org/stable/', None),
'scikitlearn': ('http://scikit-learn.org/stable/', None),
}
2 changes: 1 addition & 1 deletion doc/format.rst
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ The sections of a function's docstring are:
and neural-network techniques," Computers & Geosciences, vol. 22,
pp. 585-588, 1996.

which renders as
which renders as [1]_:

.. [1] O. McNoleg, "The integration of GIS, remote sensing,
expert systems and adaptive co-kriging for environmental habitat
Expand Down

0 comments on commit 9e526a9

Please sign in to comment.