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