Debian Codegraph @

docs/conf.py

raw
1 #!/usr/bin/env python3
2 # -*- coding: utf-8 -*-
3 #
4 # aiocache documentation build configuration file, created by
5 # sphinx-quickstart on Sat Oct 1 16:53:45 2016.
6 #
7 # This file is execfile()d with the current directory set to its
8 # containing dir.
9 #
10 # Note that not all possible configuration values are present in this
11 # autogenerated file.
12 #
13 # All configuration values have a default; values that are commented out
14 # serve to show the default.
15
16 # If extensions (or modules to document with autodoc) are in another directory,
17 # add these directories to sys.path here. If the directory is relative to the
18 # documentation root, use os.path.abspath to make it absolute, like shown here.
19 #
20 import re
21 import os
22 import sys
23 from pathlib import Path
24
25 sys.path.insert(0, os.path.abspath(".."))
26 sys.path.insert(0, os.path.abspath("."))
27
28 # -- General configuration ------------------------------------------------
29
30 # If your documentation needs a minimal Sphinx version, state it here.
31 #
32 # needs_sphinx = '1.0'
33
34 # Add any Sphinx extension module names here, as strings. They can be
35 # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
36 # ones.
37 extensions = [
38 "sphinx.ext.autodoc",
39 "sphinx.ext.viewcode",
40 ]
41
42 # Add any paths that contain templates here, relative to this directory.
43 templates_path = ["_templates"]
44
45 # The suffix(es) of source filenames.
46 # You can specify multiple suffix as a list of string:
47 #
48 # source_suffix = ['.rst', '.md']
49 source_suffix = ".rst"
50
51 # The encoding of source files.
52 #
53 # source_encoding = 'utf-8-sig'
54
55 # The master toctree document.
56 master_doc = "index"
57
58 # General information about the project.
59 project = "aiocache"
60 copyright = "2016, Manuel Miranda"
61 author = "Manuel Miranda"
62
63 # The version info for the project you're documenting, acts as replacement for
64 # |version| and |release|, also used in various other places throughout the
65 # built documents.
66 #
67
68 _path = Path(__file__).parent.parent / "aiocache/__init__.py"
69 try:
70 version = re.findall(r'__version__ = "(.+?)"', _path.read_text())[0]
71 release = version
72 except IndexError:
73 raise RuntimeError("Unable to determine version.")
74
75 # The language for content autogenerated by Sphinx. Refer to documentation
76 # for a list of supported languages.
77 #
78 # This is also used if you do content translation via gettext catalogs.
79 # Usually you set "language" from the command line for these cases.
80 language = None
81
82 # There are two options for replacing |today|: either, you set today to some
83 # non-false value, then it is used:
84 #
85 # today = ''
86 #
87 # Else, today_fmt is used as the format for a strftime call.
88 #
89 # today_fmt = '%B %d, %Y'
90
91 # List of patterns, relative to source directory, that match files and
92 # directories to ignore when looking for source files.
93 # This patterns also effect to html_static_path and html_extra_path
94 exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
95
96 # The reST default role (used for this markup: `text`) to use for all
97 # documents.
98 #
99 # default_role = None
100
101 # If true, '()' will be appended to :func: etc. cross-reference text.
102 #
103 # add_function_parentheses = True
104
105 # If true, the current module name will be prepended to all description
106 # unit titles (such as .. function::).
107 #
108 # add_module_names = True
109
110 # If true, sectionauthor and moduleauthor directives will be shown in the
111 # output. They are ignored by default.
112 #
113 # show_authors = False
114
115 # The name of the Pygments (syntax highlighting) style to use.
116 pygments_style = "sphinx"
117
118 # A list of ignored prefixes for module index sorting.
119 # modindex_common_prefix = []
120
121 # If true, keep warnings as "system message" paragraphs in the built documents.
122 # keep_warnings = False
123
124 # If true, `todo` and `todoList` produce output, else they produce nothing.
125 todo_include_todos = False
126
127
128 # -- Options for HTML output ----------------------------------------------
129
130 # The theme to use for HTML and HTML Help pages. See the documentation for
131 # a list of builtin themes.
132 #
133 html_theme = "default"
134 on_rtd = os.environ.get("READTHEDOCS", None) == "True"
135 if not on_rtd:
136 import sphinx_rtd_theme
137 html_theme = "sphinx_rtd_theme"
138 html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
139
140 # Theme options are theme-specific and customize the look and feel of a theme
141 # further. For a list of options available for each theme, see the
142 # documentation.
143 #
144 # html_theme_options = {}
145
146 # Add any paths that contain custom themes here, relative to this directory.
147 # html_theme_path = []
148
149 # The name for this set of Sphinx documents.
150 # "<project> v<release> documentation" by default.
151 #
152 # html_title = 'aiocache v0.0.1'
153
154 # A shorter title for the navigation bar. Default is the same as html_title.
155 #
156 # html_short_title = None
157
158 # The name of an image file (relative to this directory) to place at the top
159 # of the sidebar.
160 #
161 # html_logo = None
162
163 # The name of an image file (relative to this directory) to use as a favicon of
164 # the docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
165 # pixels large.
166 #
167 # html_favicon = None
168
169 # Add any paths that contain custom static files (such as style sheets) here,
170 # relative to this directory. They are copied after the builtin static files,
171 # so a file named "default.css" will overwrite the builtin "default.css".
172 html_static_path = ["_static"]
173
174 # Add any extra paths that contain custom files (such as robots.txt or
175 # .htaccess) here, relative to this directory. These files are copied
176 # directly to the root of the documentation.
177 #
178 # html_extra_path = []
179
180 # If not None, a 'Last updated on:' timestamp is inserted at every page
181 # bottom, using the given strftime format.
182 # The empty string is equivalent to '%b %d, %Y'.
183 #
184 # html_last_updated_fmt = None
185
186 # If true, SmartyPants will be used to convert quotes and dashes to
187 # typographically correct entities.
188 #
189 # html_use_smartypants = True
190
191 # Custom sidebar templates, maps document names to template names.
192 #
193 # html_sidebars = {}
194
195 # Additional templates that should be rendered to pages, maps page names to
196 # template names.
197 #
198 # html_additional_pages = {}
199
200 # If false, no module index is generated.
201 #
202 # html_domain_indices = True
203
204 # If false, no index is generated.
205 #
206 # html_use_index = True
207
208 # If true, the index is split into individual pages for each letter.
209 #
210 # html_split_index = False
211
212 # If true, links to the reST sources are added to the pages.
213 #
214 # html_show_sourcelink = True
215
216 # If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
217 #
218 # html_show_sphinx = True
219
220 # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
221 #
222 # html_show_copyright = True
223
224 # If true, an OpenSearch description file will be output, and all pages will
225 # contain a <link> tag referring to it. The value of this option must be the
226 # base URL from which the finished HTML is served.
227 #
228 # html_use_opensearch = ''
229
230 # This is the file name suffix for HTML files (e.g. ".xhtml").
231 # html_file_suffix = None
232
233 # Language to be used for generating the HTML full-text search index.
234 # Sphinx supports the following languages:
235 # 'da', 'de', 'en', 'es', 'fi', 'fr', 'h', 'it', 'ja'
236 # 'nl', 'no', 'pt', 'ro', 'r', 'sv', 'tr', 'zh'
237 #
238 # html_search_language = 'en'
239
240 # A dictionary with options for the search language support, empty by default.
241 # 'ja' uses this config value.
242 # 'zh' user can custom change `jieba` dictionary path.
243 #
244 # html_search_options = {'type': 'default'}
245
246 # The name of a javascript file (relative to the configuration directory) that
247 # implements a search results scorer. If empty, the default will be used.
248 #
249 # html_search_scorer = 'scorer.js'
250
251 # Output file base name for HTML help builder.
252 htmlhelp_basename = "aiocachedoc"
253
254 # -- Options for LaTeX output ---------------------------------------------
255
256 latex_elements = {
257 # The paper size ('letterpaper' or 'a4paper').
258 #
259 # 'papersize': 'letterpaper',
260
261 # The font size ('10pt', '11pt' or '12pt').
262 #
263 # 'pointsize': '10pt',
264
265 # Additional stuff for the LaTeX preamble.
266 #
267 # 'preamble': '',
268
269 # Latex figure (float) alignment
270 #
271 # 'figure_align': 'htbp',
272 }
273
274 # Grouping the document tree into LaTeX files. List of tuples
275 # (source start file, target name, title,
276 # author, documentclass [howto, manual, or own class]).
277 latex_documents = [
278 (master_doc, "aiocache.tex", "aiocache Documentation", "Manuel Miranda", "manual"),
279 ]
280
281 # The name of an image file (relative to this directory) to place at the top of
282 # the title page.
283 #
284 # latex_logo = None
285
286 # For "manual" documents, if this is true, then toplevel headings are parts,
287 # not chapters.
288 #
289 # latex_use_parts = False
290
291 # If true, show page references after internal links.
292 #
293 # latex_show_pagerefs = False
294
295 # If true, show URL addresses after external links.
296 #
297 # latex_show_urls = False
298
299 # Documents to append as an appendix to all manuals.
300 #
301 # latex_appendices = []
302
303 # It false, will not define \strong, \code, itleref, \crossref ... but only
304 # \sphinxstrong, ..., \sphinxtitleref, ... To help avoid clash with user added
305 # packages.
306 #
307 # latex_keep_old_macro_names = True
308
309 # If false, no module index is generated.
310 #
311 # latex_domain_indices = True
312
313
314 # -- Options for manual page output ---------------------------------------
315
316 # One entry per manual page. List of tuples
317 # (source start file, name, description, authors, manual section).
318 man_pages = [(master_doc, "aiocache", "aiocache Documentation", [author], 1)]
319
320 # If true, show URL addresses after external links.
321 #
322 # man_show_urls = False
323
324
325 # -- Options for Texinfo output -------------------------------------------
326
327 # Grouping the document tree into Texinfo files. List of tuples
328 # (source start file, target name, title, author,
329 # dir menu entry, description, category)
330 texinfo_documents = [
331 (
332 master_doc,
333 "aiocache",
334 "aiocache Documentation",
335 author,
336 "aiocache",
337 "One line description of project.",
338 "Miscellaneous"
339 ),
340 ]
341
342 # Documents to append as an appendix to all manuals.
343 #
344 # texinfo_appendices = []
345
346 # If false, no module index is generated.
347 #
348 # texinfo_domain_indices = True
349
350 # How to display URL addresses: 'footnote', 'no', or 'inline'.
351 #
352 # texinfo_show_urls = 'footnote'
353
354 # If true, do not generate a @detailmenu in the "Top" node's menu.
355 #
356 # texinfo_no_detailmenu = False