Debian Codegraph @

docs/conf.py

raw
1 #!/usr/bin/env python3
2 # -*- coding: utf-8 -*-
3 #
4 # Errbot documentation build configuration file, created by
5 # sphinx-quickstart on Fri Sep 13 17:24:59 2013.
6 #
7 # This file is execfile()d with the current directory set to its containing dir.
8 #
9 # Note that not all possible configuration values are present in this
10 # autogenerated file.
11 #
12 # All configuration values have a default; values that are commented out
13 # serve to show the default.
14
15 import subprocess, sys, os
16 sys.path.append(os.path.abspath('_themes'))
17 sys.path.append(os.path.abspath('_themes/err'))
18 sys.path.append(os.path.abspath('../'))
19
20 __import__('errbot.config-template')
21 sys.modules['config'] = sys.modules['errbot.config-template']
22 from errbot.version import VERSION
23
24 # If extensions (or modules to document with autodoc) are in another directory,
25 # add these directories to sys.path here. If the directory is relative to the
26 # documentation root, use os.path.abspath to make it absolute, like shown here.
27 #sys.path.insert(0, os.path.abspath('.'))
28
29 # -- General configuration -----------------------------------------------------
30
31 # If your documentation needs a minimal Sphinx version, state it here.
32 #needs_sphinx = '1.0'
33
34 # Add any Sphinx extension module names here, as strings. They can be extensions
35 # coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
36 extensions = [
37 'sphinx.ext.autodoc',
38 'sphinx.ext.viewcode',
39 'sphinx_autodoc_annotation',
40 ]
41
42 # Add any paths that contain templates here, relative to this directory.
43 templates_path = ['_templates']
44
45 # The suffix of source filenames.
46 source_suffix = '.rst'
47
48 # The encoding of source files.
49 #source_encoding = 'utf-8-sig'
50
51 # The master toctree document.
52 master_doc = 'index'
53
54 # General information about the project.
55 project = 'Err'
56 copyright = '2013, Guillaume Binet, Tali Davidovich Petrover and Nick Groenen'
57
58 # The version info for the project you're documenting, acts as replacement for
59 # |version| and |release|, also used in various other places throughout the
60 # built documents.
61 #
62 # The short X.Y version.
63 version = VERSION
64 # The full version, including alpha/beta/rc tags.
65 release = VERSION
66
67 # The language for content autogenerated by Sphinx. Refer to documentation
68 # for a list of supported languages.
69 #language = None
70
71 # There are two options for replacing |today|: either, you set today to some
72 # non-false value, then it is used:
73 #today = ''
74 # Else, today_fmt is used as the format for a strftime call.
75 #today_fmt = '%B %d, %Y'
76
77 # List of patterns, relative to source directory, that match files and
78 # directories to ignore when looking for source files.
79 exclude_patterns = [
80 '_build',
81 'error_pages/*',
82 'errbot.backends.tox.rst', # Also quite a pain to build at this stage
83 '_gh-pages',
84 ]
85
86 # The reST default role (used for this markup: `text`) to use for all documents.
87 #default_role = None
88
89 # If true, '()' will be appended to :func: etc. cross-reference text.
90 #add_function_parentheses = True
91
92 # If true, the current module name will be prepended to all description
93 # unit titles (such as .. function::).
94 #add_module_names = True
95
96 # If true, sectionauthor and moduleauthor directives will be shown in the
97 # output. They are ignored by default.
98 #show_authors = False
99
100 # The name of the Pygments (syntax highlighting) style to use.
101 #pygments_style = 'sphinx'
102
103 # A list of ignored prefixes for module index sorting.
104 #modindex_common_prefix = []
105
106 # If true, keep warnings as "system message" paragraphs in the built documents.
107 #keep_warnings = False
108
109 # -- Autodoc configuration -----------------------------------------------------
110
111
112 def autodoc_skip_member(app, what, name, obj, skip, options):
113 if name == "__init__":
114 return False
115 return skip
116
117
118 # -- Apidoc --------------------------------------------------------------------
119
120
121 def run_apidoc(_):
122 subprocess.check_call("sphinx-apidoc --separate -f -o . ../errbot", shell=True)
123
124
125 def run_repos_builder(*_):
126 last_dir = os.getcwd()
127 os.chdir('../tools/')
128 subprocess.check_call("python plugin-gen.py", shell=True, env=os.environ)
129 subprocess.check_call("pwd; cp repos.json ../docs/html_extras/", shell=True)
130 os.chdir(last_dir)
131
132
133 # -- Options for HTML output ---------------------------------------------------
134
135 # The theme to use for HTML and HTML Help pages. See the documentation for
136 # a list of builtin themes.
137 html_theme = 'err'
138
139 # Add any paths that contain custom themes here, relative to this directory.
140 html_theme_path = ['_themes']
141
142 # Add any paths that contain custom static files (such as style sheets) here,
143 # relative to this directory. They are copied after the builtin static files,
144 # so a file named "default.css" will overwrite the builtin "default.css".
145 html_static_path = ['_static']
146
147 # If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
148 # using the given strftime format.
149 html_last_updated_fmt = '%b %d, %Y'
150
151 # If true, SmartyPants will be used to convert quotes and dashes to
152 # typographically correct entities.
153 #
154 # Note: Best leave this off until Sphinx issue #1496 gets resolved
155 # (https://bitbucket.org/birkenfeld/sphinx/issue/1496/smartypants-should-not-convert-text-in-a)
156 html_use_smartypants = False
157
158 # Additional templates that should be rendered to pages, maps page names to
159 # template names.
160 #html_additional_pages = {}
161
162 # If false, no module index is generated.
163 html_domain_indices = True
164
165 # If false, no index is generated.
166 html_use_index = True
167
168 # If true, the index is split into individual pages for each letter.
169 html_split_index = False
170
171 # If true, links to the reST sources are added to the pages.
172 html_show_sourcelink = True
173
174 # If true, an OpenSearch description file will be output, and all pages will
175 # contain a <link> tag referring to it. The value of this option must be the
176 # base URL from which the finished HTML is served.
177 #html_use_opensearch = ''
178
179 # This is the file name suffix for HTML files (e.g. ".xhtml").
180 #html_file_suffix = None
181
182 # Output file base name for HTML help builder.
183 htmlhelp_basename = 'Errdoc'
184
185 html_extra_path = ['html_extras']
186
187 # -- Options for LaTeX output --------------------------------------------------
188
189 latex_elements = {
190 # The paper size ('letterpaper' or 'a4paper').
191 #'papersize': 'letterpaper',
192
193 # The font size ('10pt', '11pt' or '12pt').
194 #'pointsize': '10pt',
195
196 # Additional stuff for the LaTeX preamble.
197 #'preamble': '',
198 }
199
200 # Grouping the document tree into LaTeX files. List of tuples
201 # (source start file, target name, title, author, documentclass [howto/manual]).
202 latex_documents = [
203 ('index', 'Err.tex', 'Err Documentation', 'Guillaume Binet, Tali Davidovich Petrover and Nick Groenen', 'manual'),
204 ]
205
206 # The name of an image file (relative to this directory) to place at the top of
207 # the title page.
208 #latex_logo = None
209
210 # For "manual" documents, if this is true, then toplevel headings are parts,
211 # not chapters.
212 #latex_use_parts = False
213
214 # If true, show page references after internal links.
215 #latex_show_pagerefs = False
216
217 # If true, show URL addresses after external links.
218 #latex_show_urls = False
219
220 # Documents to append as an appendix to all manuals.
221 #latex_appendices = []
222
223 # If false, no module index is generated.
224 #latex_domain_indices = True
225
226 # -- Options for manual page output --------------------------------------------
227
228 # One entry per manual page. List of tuples
229 # (source start file, name, description, authors, manual section).
230 man_pages = [('index', 'err', 'Err Documentation', ['Guillaume Binet, Tali Davidovich Petrover and Nick Groenen'], 1)]
231
232 # If true, show URL addresses after external links.
233 #man_show_urls = False
234
235 # -- Options for Texinfo output ------------------------------------------------
236
237 # Grouping the document tree into Texinfo files. List of tuples
238 # (source start file, target name, title, author,
239 # dir menu entry, description, category)
240 texinfo_documents = [
241 ('index', 'Err', 'Err Documentation', 'Guillaume Binet, Tali Davidovich Petrover and Nick Groenen', 'Err',
242 'One line description of project.', 'Miscellaneous'),
243 ]
244
245 # Documents to append as an appendix to all manuals.
246 #texinfo_appendices = []
247
248 # If false, no module index is generated.
249 #texinfo_domain_indices = True
250
251 # How to display URL addresses: 'footnote', 'no', or 'inline'.
252 #texinfo_show_urls = 'footnote'
253
254 # If true, do not generate a @detailmenu in the "Top" node's menu.
255 #texinfo_no_detailmenu = False
256
257 # -- Options for Epub output ---------------------------------------------------
258
259 # Bibliographic Dublin Core info.
260 epub_title = 'Err'
261 epub_author = 'Guillaume Binet, Tali Davidovich Petrover and Nick Groenen'
262 epub_publisher = 'Guillaume Binet, Tali Davidovich Petrover and Nick Groenen'
263 epub_copyright = '2013, Guillaume Binet, Tali Davidovich Petrover and Nick Groenen'
264
265 # The language of the text. It defaults to the language option
266 # or en if the language is not set.
267 #epub_language = ''
268
269 # The scheme of the identifier. Typical schemes are ISBN or URL.
270 #epub_scheme = ''
271
272 # The unique identifier of the text. This can be a ISBN number
273 # or the project homepage.
274 #epub_identifier = ''
275
276 # A unique identification for the text.
277 #epub_uid = ''
278
279 # A tuple containing the cover image and cover page html template filenames.
280 #epub_cover = ()
281
282 # A sequence of (type, uri, title) tuples for the guide element of content.opf.
283 #epub_guide = ()
284
285 # HTML files that should be inserted before the pages created by sphinx.
286 # The format is a list of tuples containing the path and title.
287 #epub_pre_files = []
288
289 # HTML files shat should be inserted after the pages created by sphinx.
290 # The format is a list of tuples containing the path and title.
291 #epub_post_files = []
292
293 # A list of files that should not be packed into the epub file.
294 #epub_exclude_files = []
295
296 # The depth of the table of contents in toc.ncx.
297 #epub_tocdepth = 3
298
299 # Allow duplicate toc entries.
300 #epub_tocdup = True
301
302 # Fix unsupported image types using the PIL.
303 #epub_fix_images = False
304
305 # Scale large images.
306 #epub_max_image_width = 0
307
308 # If 'no', URL addresses will not be shown.
309 #epub_show_urls = 'inline'
310
311 # If false, no index is generated.
312 #epub_use_index = True
313
314 # -- Misc options -------------------------------------------------------------
315
316 intersphinx_mapping = {'http://docs.python.org/': None}
317
318
319 def setup(app):
320 app.connect("autodoc-skip-member", autodoc_skip_member)
321 app.connect("builder-inited", run_apidoc)
322 #app.connect("html-page-context", run_repos_builder)