##// END OF EJS Templates
Fix rtd build and be more strict about builds (fail on warn)....
Matthias Bussonnier -
Show More
@@ -1,11 +1,14 b''
1 1 name: ipython_docs
2 2 dependencies:
3 3 - python=3.6
4 4 - setuptools>=18.5
5 5 - sphinx>=1.8
6 6 - sphinx_rtd_theme
7 - numpy
8 - nose
9 - testpath
10 - matplotlib
7 11 - pip:
8 12 - docrepr
9 13 - prompt_toolkit
10 - ipython
11 14 - ipykernel
@@ -1,300 +1,296 b''
1 1 # -*- coding: utf-8 -*-
2 2 #
3 3 # IPython documentation build configuration file.
4 4
5 5 # NOTE: This file has been edited manually from the auto-generated one from
6 6 # sphinx. Do NOT delete and re-generate. If any changes from sphinx are
7 7 # needed, generate a scratch one and merge by hand any new fields needed.
8 8
9 9 #
10 10 # This file is execfile()d with the current directory set to its containing dir.
11 11 #
12 12 # The contents of this file are pickled, so don't put values in the namespace
13 13 # that aren't pickleable (module imports are okay, they're removed automatically).
14 14 #
15 15 # All configuration values have a default value; values that are commented out
16 16 # serve to show the default value.
17 17
18 18 import sys, os
19 19
20 20 # http://read-the-docs.readthedocs.io/en/latest/faq.html
21 21 ON_RTD = os.environ.get('READTHEDOCS', None) == 'True'
22 22
23 23 if ON_RTD:
24 24 tags.add('rtd')
25 25
26 26 # RTD doesn't use the Makefile, so re-run autogen_{things}.py here.
27 27 for name in ('config', 'api', 'magics', 'shortcuts'):
28 28 fname = 'autogen_{}.py'.format(name)
29 29 fpath = os.path.abspath(os.path.join('..', fname))
30 30 with open(fpath) as f:
31 31 exec(compile(f.read(), fname, 'exec'), {
32 32 '__file__': fpath,
33 33 '__name__': '__main__',
34 34 })
35 35 else:
36 36 import sphinx_rtd_theme
37 37 html_theme = "sphinx_rtd_theme"
38 38 html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
39 39
40 40 # If your extensions are in another directory, add it here. If the directory
41 41 # is relative to the documentation root, use os.path.abspath to make it
42 42 # absolute, like shown here.
43 43 sys.path.insert(0, os.path.abspath('../sphinxext'))
44 44
45 45 # We load the ipython release info into a dict by explicit execution
46 46 iprelease = {}
47 47 exec(compile(open('../../IPython/core/release.py').read(), '../../IPython/core/release.py', 'exec'),iprelease)
48 48
49 49 # General configuration
50 50 # ---------------------
51 51
52 52 # Add any Sphinx extension module names here, as strings. They can be extensions
53 53 # coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
54 54 extensions = [
55 55 'sphinx.ext.autodoc',
56 56 'sphinx.ext.autosummary',
57 57 'sphinx.ext.doctest',
58 58 'sphinx.ext.inheritance_diagram',
59 59 'sphinx.ext.intersphinx',
60 60 'sphinx.ext.graphviz',
61 61 'IPython.sphinxext.ipython_console_highlighting',
62 62 'IPython.sphinxext.ipython_directive',
63 63 'sphinx.ext.napoleon', # to preprocess docstrings
64 64 'github', # for easy GitHub links
65 65 'magics',
66 66 'configtraits',
67 67 ]
68 68
69 if ON_RTD:
70 # Remove extensions not currently supported on RTD
71 extensions.remove('IPython.sphinxext.ipython_directive')
72 extensions.remove('IPython.sphinxext.ipython_console_highlighting')
73
74 69 # Add any paths that contain templates here, relative to this directory.
75 70 templates_path = ['_templates']
76 71
77 72 # The suffix of source filenames.
78 73 source_suffix = '.rst'
79 74
80 75 rst_prolog = ''
81 76
82 77 def is_stable(extra):
83 78 for ext in {'dev', 'b', 'rc'}:
84 79 if ext in extra:
85 80 return False
86 81 return True
87 82
88 83 if is_stable(iprelease['_version_extra']):
89 84 tags.add('ipystable')
90 85 print('Adding Tag: ipystable')
91 86 else:
92 87 tags.add('ipydev')
93 88 print('Adding Tag: ipydev')
94 89 rst_prolog += """
95 90 .. warning::
96 91
97 92 This documentation covers a development version of IPython. The development
98 93 version may differ significantly from the latest stable release.
99 94 """
100 95
101 96 rst_prolog += """
102 97 .. important::
103 98
104 99 This documentation covers IPython versions 6.0 and higher. Beginning with
105 100 version 6.0, IPython stopped supporting compatibility with Python versions
106 101 lower than 3.3 including all versions of Python 2.7.
107 102
108 103 If you are looking for an IPython version compatible with Python 2.7,
109 104 please use the IPython 5.x LTS release and refer to its documentation (LTS
110 105 is the long term support release).
111 106
112 107 """
113 108
114 109 # The master toctree document.
115 110 master_doc = 'index'
116 111
117 112 # General substitutions.
118 113 project = 'IPython'
119 114 copyright = 'The IPython Development Team'
120 115
121 116 # ghissue config
122 117 github_project_url = "https://github.com/ipython/ipython"
123 118
124 119 # numpydoc config
125 120 numpydoc_show_class_members = False # Otherwise Sphinx emits thousands of warnings
126 121 numpydoc_class_members_toctree = False
122 warning_is_error = True
127 123
128 124 # The default replacements for |version| and |release|, also used in various
129 125 # other places throughout the built documents.
130 126 #
131 127 # The full version, including alpha/beta/rc tags.
132 128 release = "%s" % iprelease['version']
133 129 # Just the X.Y.Z part, no '-dev'
134 130 version = iprelease['version'].split('-', 1)[0]
135 131
136 132
137 133 # There are two options for replacing |today|: either, you set today to some
138 134 # non-false value, then it is used:
139 135 #today = ''
140 136 # Else, today_fmt is used as the format for a strftime call.
141 137 today_fmt = '%B %d, %Y'
142 138
143 139 # List of documents that shouldn't be included in the build.
144 140 #unused_docs = []
145 141
146 142 # Exclude these glob-style patterns when looking for source files. They are
147 143 # relative to the source/ directory.
148 144 exclude_patterns = []
149 145
150 146
151 147 # If true, '()' will be appended to :func: etc. cross-reference text.
152 148 #add_function_parentheses = True
153 149
154 150 # If true, the current module name will be prepended to all description
155 151 # unit titles (such as .. function::).
156 152 #add_module_names = True
157 153
158 154 # If true, sectionauthor and moduleauthor directives will be shown in the
159 155 # output. They are ignored by default.
160 156 #show_authors = False
161 157
162 158 # The name of the Pygments (syntax highlighting) style to use.
163 159 pygments_style = 'sphinx'
164 160
165 161 # Set the default role so we can use `foo` instead of ``foo``
166 162 default_role = 'literal'
167 163
168 164 # Options for HTML output
169 165 # -----------------------
170 166
171 167 # The style sheet to use for HTML and HTML Help pages. A file of that name
172 168 # must exist either in Sphinx' static/ path, or in one of the custom paths
173 169 # given in html_static_path.
174 170 # html_style = 'default.css'
175 171
176 172
177 173 # The name for this set of Sphinx documents. If None, it defaults to
178 174 # "<project> v<release> documentation".
179 175 #html_title = None
180 176
181 177 # The name of an image file (within the static path) to place at the top of
182 178 # the sidebar.
183 179 #html_logo = None
184 180
185 181 # Add any paths that contain custom static files (such as style sheets) here,
186 182 # relative to this directory. They are copied after the builtin static files,
187 183 # so a file named "default.css" will overwrite the builtin "default.css".
188 184 html_static_path = ['_static']
189 185
190 186 # Favicon needs the directory name
191 187 html_favicon = '_static/favicon.ico'
192 188 # If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
193 189 # using the given strftime format.
194 190 html_last_updated_fmt = '%b %d, %Y'
195 191
196 192 # If true, SmartyPants will be used to convert quotes and dashes to
197 193 # typographically correct entities.
198 194 #html_use_smartypants = True
199 195
200 196 # Custom sidebar templates, maps document names to template names.
201 197 #html_sidebars = {}
202 198
203 199 # Additional templates that should be rendered to pages, maps page names to
204 200 # template names.
205 201 html_additional_pages = {
206 202 'interactive/htmlnotebook': 'notebook_redirect.html',
207 203 'interactive/notebook': 'notebook_redirect.html',
208 204 'interactive/nbconvert': 'notebook_redirect.html',
209 205 'interactive/public_server': 'notebook_redirect.html',
210 206 }
211 207
212 208 # If false, no module index is generated.
213 209 #html_use_modindex = True
214 210
215 211 # If true, the reST sources are included in the HTML build as _sources/<name>.
216 212 #html_copy_source = True
217 213
218 214 # If true, an OpenSearch description file will be output, and all pages will
219 215 # contain a <link> tag referring to it. The value of this option must be the
220 216 # base URL from which the finished HTML is served.
221 217 #html_use_opensearch = ''
222 218
223 219 # If nonempty, this is the file name suffix for HTML files (e.g. ".xhtml").
224 220 #html_file_suffix = ''
225 221
226 222 # Output file base name for HTML help builder.
227 223 htmlhelp_basename = 'ipythondoc'
228 224
229 225 intersphinx_mapping = {'python': ('https://docs.python.org/3/', None),
230 226 'rpy2': ('https://rpy2.readthedocs.io/en/version_2.8.x/', None),
231 227 'traitlets': ('https://traitlets.readthedocs.io/en/latest/', None),
232 228 'jupyterclient': ('https://jupyter-client.readthedocs.io/en/latest/', None),
233 229 'ipyparallel': ('https://ipyparallel.readthedocs.io/en/latest/', None),
234 230 'jupyter': ('https://jupyter.readthedocs.io/en/latest/', None),
235 231 'jedi': ('https://jedi.readthedocs.io/en/latest/', None),
236 232 'traitlets': ('https://traitlets.readthedocs.io/en/latest/', None),
237 233 'ipykernel': ('https://ipykernel.readthedocs.io/en/latest/', None),
238 234 'prompt_toolkit' : ('https://python-prompt-toolkit.readthedocs.io/en/stable/', None),
239 235 'ipywidgets': ('https://ipywidgets.readthedocs.io/en/stable/', None),
240 236 'ipyparallel': ('https://ipyparallel.readthedocs.io/en/stable/', None)
241 237 }
242 238
243 239 # Options for LaTeX output
244 240 # ------------------------
245 241
246 242 # The paper size ('letter' or 'a4').
247 243 latex_paper_size = 'letter'
248 244
249 245 # The font size ('10pt', '11pt' or '12pt').
250 246 latex_font_size = '11pt'
251 247
252 248 # Grouping the document tree into LaTeX files. List of tuples
253 249 # (source start file, target name, title, author, document class [howto/manual]).
254 250
255 251 latex_documents = [
256 252 ('index', 'ipython.tex', 'IPython Documentation',
257 253 u"""The IPython Development Team""", 'manual', True),
258 254 ('parallel/winhpc_index', 'winhpc_whitepaper.tex',
259 255 'Using IPython on Windows HPC Server 2008',
260 256 u"Brian E. Granger", 'manual', True)
261 257 ]
262 258
263 259 # The name of an image file (relative to this directory) to place at the top of
264 260 # the title page.
265 261 #latex_logo = None
266 262
267 263 # For "manual" documents, if this is true, then toplevel headings are parts,
268 264 # not chapters.
269 265 #latex_use_parts = False
270 266
271 267 # Additional stuff for the LaTeX preamble.
272 268 #latex_preamble = ''
273 269
274 270 # Documents to append as an appendix to all manuals.
275 271 #latex_appendices = []
276 272
277 273 # If false, no module index is generated.
278 274 latex_use_modindex = True
279 275
280 276
281 277 # Options for texinfo output
282 278 # --------------------------
283 279
284 280 texinfo_documents = [
285 281 (master_doc, 'ipython', 'IPython Documentation',
286 282 'The IPython Development Team',
287 283 'IPython',
288 284 'IPython Documentation',
289 285 'Programming',
290 286 1),
291 287 ]
292 288
293 289 modindex_common_prefix = ['IPython.']
294 290
295 291
296 292 # Cleanup
297 293 # -------
298 294 # delete release info to avoid pickling errors from sphinx
299 295
300 296 del iprelease
General Comments 0
You need to be logged in to leave comments. Login now