blob: 3b2d6de5a07c925951a956db1f050f2b66b46285 [file] [log] [blame]
Bu Sun Kimbee4b072019-06-25 12:44:16 -07001# -*- coding: utf-8 -*-
2#
3# google-api-core documentation build configuration file
4#
5# This file is execfile()d with the current directory set to its
6# containing dir.
7#
8# Note that not all possible configuration values are present in this
9# autogenerated file.
10#
11# All configuration values have a default; values that are commented out
12# serve to show the default.
13
14import sys
15import os
16import shlex
17
18# If extensions (or modules to document with autodoc) are in another directory,
19# add these directories to sys.path here. If the directory is relative to the
20# documentation root, use os.path.abspath to make it absolute, like shown here.
21sys.path.insert(0, os.path.abspath(".."))
22
Tres Seaver000d0a02020-10-06 15:47:28 -040023# For plugins that can not read conf.py.
24# See also: https://github.com/docascode/sphinx-docfx-yaml/issues/85
25sys.path.insert(0, os.path.abspath("."))
26
Bu Sun Kime72202e2020-02-19 17:58:47 -080027__version__ = ""
Bu Sun Kimbee4b072019-06-25 12:44:16 -070028
29# -- General configuration ------------------------------------------------
30
31# If your documentation needs a minimal Sphinx version, state it here.
Tres Seaver000d0a02020-10-06 15:47:28 -040032needs_sphinx = "1.5.5"
Bu Sun Kimbee4b072019-06-25 12:44:16 -070033
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.
37extensions = [
38 "sphinx.ext.autodoc",
39 "sphinx.ext.autosummary",
40 "sphinx.ext.intersphinx",
41 "sphinx.ext.coverage",
Tres Seaver000d0a02020-10-06 15:47:28 -040042 "sphinx.ext.doctest",
Bu Sun Kimbee4b072019-06-25 12:44:16 -070043 "sphinx.ext.napoleon",
44 "sphinx.ext.todo",
45 "sphinx.ext.viewcode",
Bu Sun Kim945bafc2020-06-09 10:57:48 -070046 "recommonmark",
Bu Sun Kimbee4b072019-06-25 12:44:16 -070047]
48
49# autodoc/autosummary flags
50autoclass_content = "both"
Yoshi Automation Botcc567332020-06-19 18:53:24 -070051autodoc_default_options = {"members": True}
Bu Sun Kimbee4b072019-06-25 12:44:16 -070052autosummary_generate = True
53
54
55# Add any paths that contain templates here, relative to this directory.
56templates_path = ["_templates"]
57
Bu Sun Kimbee4b072019-06-25 12:44:16 -070058# The suffix(es) of source filenames.
59# You can specify multiple suffix as a list of string:
60# source_suffix = ['.rst', '.md']
61source_suffix = [".rst", ".md"]
62
63# The encoding of source files.
64# source_encoding = 'utf-8-sig'
65
66# The master toctree document.
67master_doc = "index"
68
69# General information about the project.
70project = u"google-api-core"
Bu Sun Kime72202e2020-02-19 17:58:47 -080071copyright = u"2019, Google"
Bu Sun Kimbee4b072019-06-25 12:44:16 -070072author = u"Google APIs"
73
74# The version info for the project you're documenting, acts as replacement for
75# |version| and |release|, also used in various other places throughout the
76# built documents.
77#
78# The full version, including alpha/beta/rc tags.
79release = __version__
80# The short X.Y version.
81version = ".".join(release.split(".")[0:2])
82
83# The language for content autogenerated by Sphinx. Refer to documentation
84# for a list of supported languages.
85#
86# This is also used if you do content translation via gettext catalogs.
87# Usually you set "language" from the command line for these cases.
88language = None
89
90# There are two options for replacing |today|: either, you set today to some
91# non-false value, then it is used:
92# today = ''
93# Else, today_fmt is used as the format for a strftime call.
94# today_fmt = '%B %d, %Y'
95
96# List of patterns, relative to source directory, that match files and
97# directories to ignore when looking for source files.
Tres Seaver000d0a02020-10-06 15:47:28 -040098exclude_patterns = [
99 "_build",
100 "samples/AUTHORING_GUIDE.md",
101 "samples/CONTRIBUTING.md",
102 "samples/snippets/README.rst",
103]
Bu Sun Kimbee4b072019-06-25 12:44:16 -0700104
105# The reST default role (used for this markup: `text`) to use for all
106# documents.
107# default_role = None
108
109# If true, '()' will be appended to :func: etc. cross-reference text.
110# add_function_parentheses = True
111
112# If true, the current module name will be prepended to all description
113# unit titles (such as .. function::).
114# add_module_names = True
115
116# If true, sectionauthor and moduleauthor directives will be shown in the
117# output. They are ignored by default.
118# show_authors = False
119
120# The name of the Pygments (syntax highlighting) style to use.
121pygments_style = "sphinx"
122
123# A list of ignored prefixes for module index sorting.
124# modindex_common_prefix = []
125
126# If true, keep warnings as "system message" paragraphs in the built documents.
127# keep_warnings = False
128
129# If true, `todo` and `todoList` produce output, else they produce nothing.
130todo_include_todos = True
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.
137html_theme = "alabaster"
138
139# Theme options are theme-specific and customize the look and feel of a theme
140# further. For a list of options available for each theme, see the
141# documentation.
142html_theme_options = {
Bu Sun Kime72202e2020-02-19 17:58:47 -0800143 "description": "Google Cloud Client Libraries for google-api-core",
Bu Sun Kimbee4b072019-06-25 12:44:16 -0700144 "github_user": "googleapis",
Bu Sun Kime72202e2020-02-19 17:58:47 -0800145 "github_repo": "python-api-core",
Bu Sun Kimbee4b072019-06-25 12:44:16 -0700146 "github_banner": True,
147 "font_family": "'Roboto', Georgia, sans",
148 "head_font_family": "'Roboto', Georgia, serif",
149 "code_font_family": "'Roboto Mono', 'Consolas', monospace",
150}
151
152# Add any paths that contain custom themes here, relative to this directory.
153# html_theme_path = []
154
155# The name for this set of Sphinx documents. If None, it defaults to
156# "<project> v<release> documentation".
157# html_title = None
158
159# A shorter title for the navigation bar. Default is the same as html_title.
160# html_short_title = None
161
162# The name of an image file (relative to this directory) to place at the top
163# of the sidebar.
164# html_logo = None
165
166# The name of an image file (within the static path) to use as favicon of the
167# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
168# pixels large.
169# html_favicon = None
170
171# Add any paths that contain custom static files (such as style sheets) here,
172# relative to this directory. They are copied after the builtin static files,
173# so a file named "default.css" will overwrite the builtin "default.css".
Bu Sun Kim0f6ad2a2019-11-11 15:15:32 -0800174html_static_path = ["_static"]
Bu Sun Kimbee4b072019-06-25 12:44:16 -0700175
176# Add any extra paths that contain custom files (such as robots.txt or
177# .htaccess) here, relative to this directory. These files are copied
178# directly to the root of the documentation.
179# html_extra_path = []
180
181# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
182# using the given strftime format.
183# html_last_updated_fmt = '%b %d, %Y'
184
185# If true, SmartyPants will be used to convert quotes and dashes to
186# typographically correct entities.
187# html_use_smartypants = True
188
189# Custom sidebar templates, maps document names to template names.
190# html_sidebars = {}
191
192# Additional templates that should be rendered to pages, maps page names to
193# template names.
194# html_additional_pages = {}
195
196# If false, no module index is generated.
197# html_domain_indices = True
198
199# If false, no index is generated.
200# html_use_index = True
201
202# If true, the index is split into individual pages for each letter.
203# html_split_index = False
204
205# If true, links to the reST sources are added to the pages.
206# html_show_sourcelink = True
207
208# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
209# html_show_sphinx = True
210
211# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
212# html_show_copyright = True
213
214# If true, an OpenSearch description file will be output, and all pages will
215# contain a <link> tag referring to it. The value of this option must be the
216# base URL from which the finished HTML is served.
217# html_use_opensearch = ''
218
219# This is the file name suffix for HTML files (e.g. ".xhtml").
220# html_file_suffix = None
221
222# Language to be used for generating the HTML full-text search index.
223# Sphinx supports the following languages:
224# 'da', 'de', 'en', 'es', 'fi', 'fr', 'hu', 'it', 'ja'
225# 'nl', 'no', 'pt', 'ro', 'ru', 'sv', 'tr'
226# html_search_language = 'en'
227
228# A dictionary with options for the search language support, empty by default.
229# Now only 'ja' uses this config value
230# html_search_options = {'type': 'default'}
231
232# The name of a javascript file (relative to the configuration directory) that
233# implements a search results scorer. If empty, the default will be used.
234# html_search_scorer = 'scorer.js'
235
236# Output file base name for HTML help builder.
237htmlhelp_basename = "google-api-core-doc"
238
239# -- Options for warnings ------------------------------------------------------
240
241
242suppress_warnings = [
243 # Temporarily suppress this to avoid "more than one target found for
244 # cross-reference" warning, which are intractable for us to avoid while in
245 # a mono-repo.
246 # See https://github.com/sphinx-doc/sphinx/blob
247 # /2a65ffeef5c107c19084fabdd706cdff3f52d93c/sphinx/domains/python.py#L843
248 "ref.python"
249]
250
251# -- Options for LaTeX output ---------------------------------------------
252
253latex_elements = {
254 # The paper size ('letterpaper' or 'a4paper').
255 #'papersize': 'letterpaper',
256 # The font size ('10pt', '11pt' or '12pt').
257 #'pointsize': '10pt',
258 # Additional stuff for the LaTeX preamble.
259 #'preamble': '',
260 # Latex figure (float) alignment
261 #'figure_align': 'htbp',
262}
263
264# Grouping the document tree into LaTeX files. List of tuples
265# (source start file, target name, title,
266# author, documentclass [howto, manual, or own class]).
267latex_documents = [
268 (
269 master_doc,
270 "google-api-core.tex",
271 u"google-api-core Documentation",
272 author,
273 "manual",
274 )
275]
276
277# The name of an image file (relative to this directory) to place at the top of
278# the title page.
279# latex_logo = None
280
281# For "manual" documents, if this is true, then toplevel headings are parts,
282# not chapters.
283# latex_use_parts = False
284
285# If true, show page references after internal links.
286# latex_show_pagerefs = False
287
288# If true, show URL addresses after external links.
289# latex_show_urls = False
290
291# Documents to append as an appendix to all manuals.
292# latex_appendices = []
293
294# If false, no module index is generated.
295# latex_domain_indices = True
296
297
298# -- Options for manual page output ---------------------------------------
299
300# One entry per manual page. List of tuples
301# (source start file, name, description, authors, manual section).
302man_pages = [
Yoshi Automation Botbd1e12a2020-02-20 09:46:50 -0800303 (
304 master_doc,
305 "google-api-core",
306 u"google-api-core Documentation",
307 [author],
308 1,
309 )
Bu Sun Kimbee4b072019-06-25 12:44:16 -0700310]
311
312# If true, show URL addresses after external links.
313# man_show_urls = False
314
315
316# -- Options for Texinfo output -------------------------------------------
317
318# Grouping the document tree into Texinfo files. List of tuples
319# (source start file, target name, title, author,
320# dir menu entry, description, category)
321texinfo_documents = [
322 (
323 master_doc,
324 "google-api-core",
325 u"google-api-core Documentation",
326 author,
327 "google-api-core",
Bu Sun Kime72202e2020-02-19 17:58:47 -0800328 "google-api-core Library",
Bu Sun Kimbee4b072019-06-25 12:44:16 -0700329 "APIs",
330 )
331]
332
333# Documents to append as an appendix to all manuals.
334# texinfo_appendices = []
335
336# If false, no module index is generated.
337# texinfo_domain_indices = True
338
339# How to display URL addresses: 'footnote', 'no', or 'inline'.
340# texinfo_show_urls = 'footnote'
341
342# If true, do not generate a @detailmenu in the "Top" node's menu.
343# texinfo_no_detailmenu = False
344
345
346# Example configuration for intersphinx: refer to the Python standard library.
347intersphinx_mapping = {
Yoshi Automation Bot93976932020-12-01 08:55:40 -0800348 "python": ("https://python.readthedocs.org/en/latest/", None),
349 "google-auth": ("https://googleapis.dev/python/google-auth/latest/", None),
Yoshi Automation Botbd1e12a2020-02-20 09:46:50 -0800350 "google.api_core": (
351 "https://googleapis.dev/python/google-api-core/latest/",
352 None,
353 ),
Yoshi Automation Bot93976932020-12-01 08:55:40 -0800354 "grpc": ("https://grpc.github.io/grpc/python/", None),
355 "proto-plus": ("https://proto-plus-python.readthedocs.io/en/latest/", None),
Yoshi Automation Botbd1e12a2020-02-20 09:46:50 -0800356
Bu Sun Kimbee4b072019-06-25 12:44:16 -0700357}
358
359
360# Napoleon settings
361napoleon_google_docstring = True
362napoleon_numpy_docstring = True
363napoleon_include_private_with_doc = False
364napoleon_include_special_with_doc = True
365napoleon_use_admonition_for_examples = False
366napoleon_use_admonition_for_notes = False
367napoleon_use_admonition_for_references = False
368napoleon_use_ivar = False
369napoleon_use_param = True
370napoleon_use_rtype = True