##// END OF EJS Templates
Merge pull request #12211 from meeseeksmachine/auto-backport-of-pr-12210-on-7.x...
Matthias Bussonnier -
r25601:6d36b6b8 merge
parent child Browse files
Show More
@@ -1,295 +1,295 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 69 # Add any paths that contain templates here, relative to this directory.
70 70 templates_path = ['_templates']
71 71
72 72 # The suffix of source filenames.
73 73 source_suffix = '.rst'
74 74
75 75 rst_prolog = ''
76 76
77 77 def is_stable(extra):
78 78 for ext in {'dev', 'b', 'rc'}:
79 79 if ext in extra:
80 80 return False
81 81 return True
82 82
83 83 if is_stable(iprelease['_version_extra']):
84 84 tags.add('ipystable')
85 85 print('Adding Tag: ipystable')
86 86 else:
87 87 tags.add('ipydev')
88 88 print('Adding Tag: ipydev')
89 89 rst_prolog += """
90 90 .. warning::
91 91
92 92 This documentation covers a development version of IPython. The development
93 93 version may differ significantly from the latest stable release.
94 94 """
95 95
96 96 rst_prolog += """
97 97 .. important::
98 98
99 99 This documentation covers IPython versions 6.0 and higher. Beginning with
100 100 version 6.0, IPython stopped supporting compatibility with Python versions
101 101 lower than 3.3 including all versions of Python 2.7.
102 102
103 103 If you are looking for an IPython version compatible with Python 2.7,
104 104 please use the IPython 5.x LTS release and refer to its documentation (LTS
105 105 is the long term support release).
106 106
107 107 """
108 108
109 109 # The master toctree document.
110 110 master_doc = 'index'
111 111
112 112 # General substitutions.
113 113 project = 'IPython'
114 114 copyright = 'The IPython Development Team'
115 115
116 116 # ghissue config
117 117 github_project_url = "https://github.com/ipython/ipython"
118 118
119 119 # numpydoc config
120 120 numpydoc_show_class_members = False # Otherwise Sphinx emits thousands of warnings
121 121 numpydoc_class_members_toctree = False
122 122 warning_is_error = True
123 123
124 124 # The default replacements for |version| and |release|, also used in various
125 125 # other places throughout the built documents.
126 126 #
127 127 # The full version, including alpha/beta/rc tags.
128 128 release = "%s" % iprelease['version']
129 129 # Just the X.Y.Z part, no '-dev'
130 130 version = iprelease['version'].split('-', 1)[0]
131 131
132 132
133 133 # There are two options for replacing |today|: either, you set today to some
134 134 # non-false value, then it is used:
135 135 #today = ''
136 136 # Else, today_fmt is used as the format for a strftime call.
137 137 today_fmt = '%B %d, %Y'
138 138
139 139 # List of documents that shouldn't be included in the build.
140 140 #unused_docs = []
141 141
142 142 # Exclude these glob-style patterns when looking for source files. They are
143 143 # relative to the source/ directory.
144 144 exclude_patterns = []
145 145
146 146
147 147 # If true, '()' will be appended to :func: etc. cross-reference text.
148 148 #add_function_parentheses = True
149 149
150 150 # If true, the current module name will be prepended to all description
151 151 # unit titles (such as .. function::).
152 152 #add_module_names = True
153 153
154 154 # If true, sectionauthor and moduleauthor directives will be shown in the
155 155 # output. They are ignored by default.
156 156 #show_authors = False
157 157
158 158 # The name of the Pygments (syntax highlighting) style to use.
159 159 pygments_style = 'sphinx'
160 160
161 161 # Set the default role so we can use `foo` instead of ``foo``
162 162 default_role = 'literal'
163 163
164 164 # Options for HTML output
165 165 # -----------------------
166 166
167 167 # The style sheet to use for HTML and HTML Help pages. A file of that name
168 168 # must exist either in Sphinx' static/ path, or in one of the custom paths
169 169 # given in html_static_path.
170 170 # html_style = 'default.css'
171 171
172 172
173 173 # The name for this set of Sphinx documents. If None, it defaults to
174 174 # "<project> v<release> documentation".
175 175 #html_title = None
176 176
177 177 # The name of an image file (within the static path) to place at the top of
178 178 # the sidebar.
179 179 #html_logo = None
180 180
181 181 # Add any paths that contain custom static files (such as style sheets) here,
182 182 # relative to this directory. They are copied after the builtin static files,
183 183 # so a file named "default.css" will overwrite the builtin "default.css".
184 184 html_static_path = ['_static']
185 185
186 186 # Favicon needs the directory name
187 187 html_favicon = '_static/favicon.ico'
188 188 # If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
189 189 # using the given strftime format.
190 190 html_last_updated_fmt = '%b %d, %Y'
191 191
192 192 # If true, SmartyPants will be used to convert quotes and dashes to
193 193 # typographically correct entities.
194 194 #html_use_smartypants = True
195 195
196 196 # Custom sidebar templates, maps document names to template names.
197 197 #html_sidebars = {}
198 198
199 199 # Additional templates that should be rendered to pages, maps page names to
200 200 # template names.
201 201 html_additional_pages = {
202 202 'interactive/htmlnotebook': 'notebook_redirect.html',
203 203 'interactive/notebook': 'notebook_redirect.html',
204 204 'interactive/nbconvert': 'notebook_redirect.html',
205 205 'interactive/public_server': 'notebook_redirect.html',
206 206 }
207 207
208 208 # If false, no module index is generated.
209 209 #html_use_modindex = True
210 210
211 211 # If true, the reST sources are included in the HTML build as _sources/<name>.
212 212 #html_copy_source = True
213 213
214 214 # If true, an OpenSearch description file will be output, and all pages will
215 215 # contain a <link> tag referring to it. The value of this option must be the
216 216 # base URL from which the finished HTML is served.
217 217 #html_use_opensearch = ''
218 218
219 219 # If nonempty, this is the file name suffix for HTML files (e.g. ".xhtml").
220 220 #html_file_suffix = ''
221 221
222 222 # Output file base name for HTML help builder.
223 223 htmlhelp_basename = 'ipythondoc'
224 224
225 225 intersphinx_mapping = {'python': ('https://docs.python.org/3/', None),
226 'rpy2': ('https://rpy2.readthedocs.io/en/latest/', None),
226 'rpy2': ('https://rpy2.github.io/doc/latest/html/', None),
227 227 'jupyterclient': ('https://jupyter-client.readthedocs.io/en/latest/', None),
228 228 'jupyter': ('https://jupyter.readthedocs.io/en/latest/', None),
229 229 'jedi': ('https://jedi.readthedocs.io/en/latest/', None),
230 230 'traitlets': ('https://traitlets.readthedocs.io/en/latest/', None),
231 231 'ipykernel': ('https://ipykernel.readthedocs.io/en/latest/', None),
232 232 'prompt_toolkit' : ('https://python-prompt-toolkit.readthedocs.io/en/stable/', None),
233 233 'ipywidgets': ('https://ipywidgets.readthedocs.io/en/stable/', None),
234 234 'ipyparallel': ('https://ipyparallel.readthedocs.io/en/stable/', None),
235 235 'pip': ('https://pip.pypa.io/en/stable/', None)
236 236 }
237 237
238 238 # Options for LaTeX output
239 239 # ------------------------
240 240
241 241 # The paper size ('letter' or 'a4').
242 242 latex_paper_size = 'letter'
243 243
244 244 # The font size ('10pt', '11pt' or '12pt').
245 245 latex_font_size = '11pt'
246 246
247 247 # Grouping the document tree into LaTeX files. List of tuples
248 248 # (source start file, target name, title, author, document class [howto/manual]).
249 249
250 250 latex_documents = [
251 251 ('index', 'ipython.tex', 'IPython Documentation',
252 252 u"""The IPython Development Team""", 'manual', True),
253 253 ('parallel/winhpc_index', 'winhpc_whitepaper.tex',
254 254 'Using IPython on Windows HPC Server 2008',
255 255 u"Brian E. Granger", 'manual', True)
256 256 ]
257 257
258 258 # The name of an image file (relative to this directory) to place at the top of
259 259 # the title page.
260 260 #latex_logo = None
261 261
262 262 # For "manual" documents, if this is true, then toplevel headings are parts,
263 263 # not chapters.
264 264 #latex_use_parts = False
265 265
266 266 # Additional stuff for the LaTeX preamble.
267 267 #latex_preamble = ''
268 268
269 269 # Documents to append as an appendix to all manuals.
270 270 #latex_appendices = []
271 271
272 272 # If false, no module index is generated.
273 273 latex_use_modindex = True
274 274
275 275
276 276 # Options for texinfo output
277 277 # --------------------------
278 278
279 279 texinfo_documents = [
280 280 (master_doc, 'ipython', 'IPython Documentation',
281 281 'The IPython Development Team',
282 282 'IPython',
283 283 'IPython Documentation',
284 284 'Programming',
285 285 1),
286 286 ]
287 287
288 288 modindex_common_prefix = ['IPython.']
289 289
290 290
291 291 # Cleanup
292 292 # -------
293 293 # delete release info to avoid pickling errors from sphinx
294 294
295 295 del iprelease
General Comments 0
You need to be logged in to leave comments. Login now