Debian Codegraph @

docs/source/conf.py

raw
1 #!/usr/bin/env python3
2 # -*- coding: utf-8 -*-
3 #
4 # Boto3 documentation build configuration file, created by
5 # sphinx-quickstart on Wed Sep 3 11:11:30 2014.
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 datetime
16 import os
17
18 import boto3
19 import boto3.session
20 from boto3.docs import generate_docs
21
22 try:
23 from botocore.docs.translator import BotoHTML5Translator
24 CUSTOM_HTML_TRANSLATOR = BotoHTML5Translator
25 except ImportError:
26 CUSTOM_HTML_TRANSLATOR = None
27
28
29 session = boto3.session.Session(region_name='us-east-1')
30 generate_docs(os.path.dirname(os.path.abspath(__file__)), session)
31
32
33 # If extensions (or modules to document with autodoc) are in another directory,
34 # add these directories to sys.path here. If the directory is relative to the
35 # documentation root, use os.path.abspath to make it absolute, like shown here.
36 #sys.path.insert(0, os.path.abspath('.'))
37
38 # -- General configuration -----------------------------------------------------
39
40 # If your documentation needs a minimal Sphinx version, state it here.
41 #needs_sphinx = '1.0'
42
43 # Add any Sphinx extension module names here, as strings. They can be extensions
44 # coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
45 extensions = ['sphinx.ext.autodoc', 'sphinx.ext.viewcode', 'sphinx_copybutton', 'sphinx_remove_toctrees']
46
47 # Remove service docs from toctree to speed up writing phase.
48 remove_from_toctrees = ['reference/services/*/**/*']
49
50 # Add any paths that contain templates here, relative to this directory.
51 templates_path = ['_templates']
52
53 # The suffix of source filenames.
54 source_suffix = '.rst'
55
56 # The encoding of source files.
57 #source_encoding = 'utf-8-sig'
58
59 # The master toctree document.
60 master_doc = 'index'
61
62 # General information about the project.
63 project = 'Boto3'
64 current_year = datetime.date.today().year
65 copyright = f'{current_year}, Amazon Web Services, Inc'
66
67 # The version info for the project you're documenting, acts as replacement for
68 # |version| and |release|, also used in various other places throughout the
69 # built documents.
70 #
71 # The short X.Y version.
72 version = boto3.__version__
73 # The full version, including alpha/beta/rc tags.
74 release = boto3.__version__
75
76 # The language for content autogenerated by Sphinx. Refer to documentation
77 # for a list of supported languages.
78 #language = None
79
80 # There are two options for replacing |today|: either, you set today to some
81 # non-false value, then it is used:
82 #today = ''
83 # Else, today_fmt is used as the format for a strftime call.
84 #today_fmt = '%B %d, %Y'
85
86 # List of patterns, relative to source directory, that match files and
87 # directories to ignore when looking for source files.
88 exclude_patterns = []
89
90 # The reST default role (used for this markup: `text`) to use for all documents.
91 #default_role = None
92
93 # If true, '()' will be appended to :func: etc. cross-reference text.
94 #add_function_parentheses = True
95
96 # If true, the current module name will be prepended to all description
97 # unit titles (such as .. function::).
98 #add_module_names = True
99
100 # If true, sectionauthor and moduleauthor directives will be shown in the
101 # output. They are ignored by default.
102 #show_authors = False
103
104 # The name of the Pygments (syntax highlighting) style to use.
105 pygments_style = "default"
106 pygments_dark_style = "monokai"
107
108 # A list of ignored prefixes for module index sorting.
109 #modindex_common_prefix = []
110
111 html_theme = 'furo'
112
113
114
115
116 # -- Options for HTML output ---------------------------------------------------
117
118 # The theme to use for HTML and HTML Help pages. See the documentation for
119 # a list of builtin themes.
120 #html_theme = 'default'
121
122 # Theme options are theme-specific and customize the look and feel of a theme
123 # further. For a list of options available for each theme, see the
124 # documentation.
125 html_theme_options = {
126 "footer_icons": [
127 {
128 "name": "GitHub",
129 "url": "https://github.com/boto/boto3",
130 "html": """
131 <svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 16 16">
132 <path fill-rule="evenodd" d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0 0 16 8c0-4.42-3.58-8-8-8z"></path>
133 </svg>
134 """,
135 "class": "",
136 },
137 ],
138 "light_logo": "logos/aws_light_theme_logo.svg",
139 "dark_logo": "logos/aws_dark_theme_logo.svg",
140 }
141
142 # Add any paths that contain custom themes here, relative to this directory.
143 #html_theme_path = []
144
145 # The name for this set of Sphinx documents. If None, it defaults to
146 # "<project> v<release> documentation".
147 #html_title = None
148
149 # A shorter title for the navigation bar. Default is the same as html_title.
150 #html_short_title = None
151
152 # The name of an image file (relative to this directory) to place at the top
153 # of the sidebar.
154 #html_logo = None
155
156 # The name of an image file (within the static path) to use as favicon of the
157 # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
158 # pixels large.
159 #html_favicon = None
160
161 # Add any paths that contain custom static files (such as style sheets) here,
162 # relative to this directory. They are copied after the builtin static files,
163 # so a file named "default.css" will overwrite the builtin "default.css".
164 html_static_path = ['_static']
165
166 # List of custom CSS files relative to _static directory.
167 html_css_files = [
168 'css/custom.css',
169 'css/dark_light_mode.css',
170 ]
171 # List of custom JS files relative to _static directory.
172 html_js_files = [
173 'js/custom.js',
174 ]
175
176 # If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
177 # using the given strftime format.
178 #html_last_updated_fmt = '%b %d, %Y'
179
180 # If true, SmartyPants will be used to convert quotes and dashes to
181 # typographically correct entities.
182 #html_use_smartypants = True
183
184 # Custom sidebar templates, maps document names to template names.
185 html_show_sourcelink = False
186 html_sidebars = {
187 "**": [
188 "sidebar/close-icon.html",
189 "sidebar/brand.html",
190 "sidebar/search.html",
191 "sidebar/scroll-start.html",
192 "sidebar/feedback.html",
193 "sidebar/navigation.html",
194 "sidebar/scroll-end.html",
195 ]
196 }
197
198 # Additional templates that should be rendered to pages, maps page names to
199 # template names.
200 #html_additional_pages = {}
201
202 # If false, no module index is generated.
203 #html_domain_indices = True
204
205 # If false, no index is generated.
206 #html_use_index = True
207
208 # If true, the index is split into individual pages for each letter.
209 #html_split_index = False
210
211 # If true, links to the reST sources are added to the pages.
212 #html_show_sourcelink = True
213
214 # If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
215 html_show_sphinx = True
216
217 # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
218 html_show_copyright = True
219
220 # If true, an OpenSearch description file will be output, and all pages will
221 # contain a <link> tag referring to it. The value of this option must be the
222 # base URL from which the finished HTML is served.
223 #html_use_opensearch = ''
224
225 # This is the file name suffix for HTML files (e.g. ".xhtml").
226 #html_file_suffix = None
227
228 # Output file base name for HTML help builder.
229 htmlhelp_basename = 'Boto3doc'
230
231
232 # -- Options for LaTeX output --------------------------------------------------
233
234 latex_elements = {
235 # The paper size ('letterpaper' or 'a4paper').
236 #'papersize': 'letterpaper',
237
238 # The font size ('10pt', '11pt' or '12pt').
239 #'pointsize': '10pt',
240
241 # Additional stuff for the LaTeX preamble.
242 #'preamble': '',
243 }
244
245 # Grouping the document tree into LaTeX files. List of tuples
246 # (source start file, target name, title, author, documentclass [howto/manual]).
247 latex_documents = [
248 ('index', 'Boto3.tex', 'Boto3 Documentation',
249 'Amazon.com, Inc.', 'manual'),
250 ]
251
252 # The name of an image file (relative to this directory) to place at the top of
253 # the title page.
254 #latex_logo = None
255
256 # For "manual" documents, if this is true, then toplevel headings are parts,
257 # not chapters.
258 #latex_use_parts = False
259
260 # If true, show page references after internal links.
261 #latex_show_pagerefs = False
262
263 # If true, show URL addresses after external links.
264 #latex_show_urls = False
265
266 # Documents to append as an appendix to all manuals.
267 #latex_appendices = []
268
269 # If false, no module index is generated.
270 #latex_domain_indices = True
271
272
273 # -- Options for manual page output --------------------------------------------
274
275 # One entry per manual page. List of tuples
276 # (source start file, name, description, authors, manual section).
277 man_pages = [
278 ('index', 'boto3', 'Boto3 Documentation',
279 ['Amazon.com, Inc.'], 1)
280 ]
281
282 # If true, show URL addresses after external links.
283 #man_show_urls = False
284
285
286 # -- Options for Texinfo output ------------------------------------------------
287
288 # Grouping the document tree into Texinfo files. List of tuples
289 # (source start file, target name, title, author,
290 # dir menu entry, description, category)
291 texinfo_documents = [
292 ('index', 'Boto3', 'Boto3 Documentation',
293 'Amazon.com, Inc.', 'Boto3', 'One line description of project.',
294 'Miscellaneous'),
295 ]
296
297 # Documents to append as an appendix to all manuals.
298 #texinfo_appendices = []
299
300 # If false, no module index is generated.
301 #texinfo_domain_indices = True
302
303 # How to display URL addresses: 'footnote', 'no', or 'inline'.
304 #texinfo_show_urls = 'footnote'
305
306 autoclass_content = 'both'
307
308
309 def setup(app):
310 # Register our custom HTML translator.
311 if CUSTOM_HTML_TRANSLATOR:
312 app.set_translator("html", CUSTOM_HTML_TRANSLATOR)