|
20 | 20 | import sphinx
|
21 | 21 |
|
22 | 22 | from datetime import datetime
|
| 23 | +import warnings |
23 | 24 |
|
24 | 25 | # If your extensions are in another directory, add it here. If the directory
|
25 | 26 | # is relative to the documentation root, use os.path.abspath to make it
|
|
30 | 31 | # General configuration
|
31 | 32 | # ---------------------
|
32 | 33 |
|
| 34 | +# Unless we catch the warning explicitly somewhere, a warning should cause the |
| 35 | +# docs build to fail. This is especially useful for getting rid of deprecated |
| 36 | +# usage in the gallery. |
| 37 | +warnings.filterwarnings('error', append=True) |
| 38 | + |
33 | 39 | # Strip backslahes in function's signature
|
34 | 40 | # To be removed when numpydoc > 0.9.x
|
35 | 41 | strip_signature_backslash = True
|
@@ -108,6 +114,11 @@ def _check_dependencies():
|
108 | 114 |
|
109 | 115 | autosummary_generate = True
|
110 | 116 |
|
| 117 | +# we should ignore warnings coming from importing deprecated modules for |
| 118 | +# autodoc purposes, as this will disappear automatically when they are removed |
| 119 | +warnings.filterwarnings('ignore', message='.*module was deprecated.*', |
| 120 | + category=MatplotlibDeprecationWarning) |
| 121 | + |
111 | 122 | autodoc_docstring_signature = True
|
112 | 123 | autodoc_default_options = {'members': None, 'undoc-members': None}
|
113 | 124 |
|
@@ -155,6 +166,7 @@ def _check_dependencies():
|
155 | 166 | 'thumbnail_size': (320, 224),
|
156 | 167 | 'compress_images': ('thumbnails', 'images'),
|
157 | 168 | 'matplotlib_animations': True,
|
| 169 | + 'abort_on_example_error': True, |
158 | 170 | }
|
159 | 171 |
|
160 | 172 | plot_gallery = 'True'
|
|
0 commit comments