Skip to content

Commit 9e526a9

Browse files
authored
Merge pull request #153 from jnothman/strict-warnings
Require that sphinx issue no warnings in CI
2 parents 75b74d3 + 6be9f33 commit 9e526a9

File tree

3 files changed

+18
-10
lines changed

3 files changed

+18
-10
lines changed

.travis.yml

+8-5
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,15 @@
22
# http://lint.travis-ci.org/
33
language: python
44
sudo: false
5-
python:
6-
- 3.6
7-
- 2.7
85
env:
96
- SPHINX_SPEC="Sphinx==1.2.3"
107
- SPHINX_SPEC="Sphinx"
8+
matrix:
9+
include:
10+
- python: 3.6
11+
- python: 2.7
12+
env:
13+
- SPHINXOPTS='-W'
1114
cache:
1215
directories:
1316
- $HOME/.cache/pip
@@ -23,5 +26,5 @@ script:
2326
- nosetests numpydoc
2427
- |
2528
cd ../doc
26-
make html
27-
make latexpdf
29+
make SPHINXOPTS=$SPHINXOPTS html
30+
make SPHINXOPTS=$SPHINXOPTS latexpdf

doc/conf.py

+9-4
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,19 @@
4141
'sphinx.ext.autosummary',
4242
'sphinx.ext.doctest',
4343
'sphinx.ext.intersphinx',
44-
'sphinx.ext.pngmath',
4544
'sphinx.ext.todo',
4645
'numpydoc',
4746
'sphinx.ext.ifconfig',
4847
'sphinx.ext.viewcode',
4948
]
5049

50+
try:
51+
import sphinx.ext.imgmath # noqa
52+
except ImportError:
53+
extensions.append('sphinx.ext.pngmath')
54+
else:
55+
extensions.append('sphinx.ext.imgmath')
56+
5157
# Add any paths that contain templates here, relative to this directory.
5258
templates_path = ['_templates']
5359

@@ -149,13 +155,12 @@
149155
html_sidebars = {}
150156

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

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

160165
# Add any extra paths that contain custom files (such as robots.txt or
161166
# .htaccess) here, relative to this directory. These files are copied
@@ -264,5 +269,5 @@
264269
# Example configuration for intersphinx: refer to the Python standard library.
265270
intersphinx_mapping = {
266271
'python': ('http://docs.python.org/', None),
267-
'scikit-learn': ('http://scikit-learn.org/stable/', None),
272+
'scikitlearn': ('http://scikit-learn.org/stable/', None),
268273
}

doc/format.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ The sections of a function's docstring are:
374374
and neural-network techniques," Computers & Geosciences, vol. 22,
375375
pp. 585-588, 1996.
376376

377-
which renders as
377+
which renders as [1]_:
378378

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

0 commit comments

Comments
 (0)