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