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