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