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