1# -*- coding: utf-8 -*- 2# 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. 15# 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 36# 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 40__version__ = "" 41 42# -- General configuration ------------------------------------------------ 43 44# If your documentation needs a minimal Sphinx version, state it here. 45needs_sphinx = "1.5.5" 46 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", 55 "sphinx.ext.doctest", 56 "sphinx.ext.napoleon", 57 "sphinx.ext.todo", 58 "sphinx.ext.viewcode", 59 "recommonmark", 60] 61 62# autodoc/autosummary flags 63autoclass_content = "both" 64autodoc_default_options = {"members": True} 65autosummary_generate = True 66 67 68# Add any paths that contain templates here, relative to this directory. 69templates_path = ["_templates"] 70 71# 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 root toctree document. 80root_doc = "index" 81 82# General information about the project. 83project = "google-api-core" 84copyright = "2019, Google" 85author = "Google APIs" 86 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. 111exclude_patterns = [ 112 "_build", 113 "**/.nox/**/*", 114 "samples/AUTHORING_GUIDE.md", 115 "samples/CONTRIBUTING.md", 116 "samples/snippets/README.rst", 117] 118 119# The reST default role (used for this markup: `text`) to use for all 120# documents. 121# default_role = None 122 123# If true, '()' will be appended to :func: etc. cross-reference text. 124# add_function_parentheses = True 125 126# If true, the current module name will be prepended to all description 127# unit titles (such as .. function::). 128# add_module_names = True 129 130# If true, sectionauthor and moduleauthor directives will be shown in the 131# output. They are ignored by default. 132# show_authors = False 133 134# The name of the Pygments (syntax highlighting) style to use. 135pygments_style = "sphinx" 136 137# A list of ignored prefixes for module index sorting. 138# modindex_common_prefix = [] 139 140# If true, keep warnings as "system message" paragraphs in the built documents. 141# keep_warnings = False 142 143# If true, `todo` and `todoList` produce output, else they produce nothing. 144todo_include_todos = True 145 146 147# -- Options for HTML output ---------------------------------------------- 148 149# The theme to use for HTML and HTML Help pages. See the documentation for 150# a list of builtin themes. 151html_theme = "alabaster" 152 153# Theme options are theme-specific and customize the look and feel of a theme 154# further. For a list of options available for each theme, see the 155# documentation. 156html_theme_options = { 157 "description": "Google Cloud Client Libraries for google-api-core", 158 "github_user": "googleapis", 159 "github_repo": "python-api-core", 160 "github_banner": True, 161 "font_family": "'Roboto', Georgia, sans", 162 "head_font_family": "'Roboto', Georgia, serif", 163 "code_font_family": "'Roboto Mono', 'Consolas', monospace", 164} 165 166# Add any paths that contain custom themes here, relative to this directory. 167# html_theme_path = [] 168 169# The name for this set of Sphinx documents. If None, it defaults to 170# "<project> v<release> documentation". 171# html_title = None 172 173# A shorter title for the navigation bar. Default is the same as html_title. 174# html_short_title = None 175 176# The name of an image file (relative to this directory) to place at the top 177# of the sidebar. 178# html_logo = None 179 180# The name of an image file (within the static path) to use as favicon of the 181# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 182# pixels large. 183# html_favicon = None 184 185# Add any paths that contain custom static files (such as style sheets) here, 186# relative to this directory. They are copied after the builtin static files, 187# so a file named "default.css" will overwrite the builtin "default.css". 188html_static_path = ["_static"] 189 190# Add any extra paths that contain custom files (such as robots.txt or 191# .htaccess) here, relative to this directory. These files are copied 192# directly to the root of the documentation. 193# html_extra_path = [] 194 195# If not '', a 'Last updated on:' timestamp is inserted at every page bottom, 196# using the given strftime format. 197# html_last_updated_fmt = '%b %d, %Y' 198 199# If true, SmartyPants will be used to convert quotes and dashes to 200# typographically correct entities. 201# html_use_smartypants = True 202 203# Custom sidebar templates, maps document names to template names. 204# html_sidebars = {} 205 206# Additional templates that should be rendered to pages, maps page names to 207# template names. 208# html_additional_pages = {} 209 210# If false, no module index is generated. 211# html_domain_indices = True 212 213# If false, no index is generated. 214# html_use_index = True 215 216# If true, the index is split into individual pages for each letter. 217# html_split_index = False 218 219# If true, links to the reST sources are added to the pages. 220# html_show_sourcelink = True 221 222# If true, "Created using Sphinx" is shown in the HTML footer. Default is True. 223# html_show_sphinx = True 224 225# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. 226# html_show_copyright = True 227 228# If true, an OpenSearch description file will be output, and all pages will 229# contain a <link> tag referring to it. The value of this option must be the 230# base URL from which the finished HTML is served. 231# html_use_opensearch = '' 232 233# This is the file name suffix for HTML files (e.g. ".xhtml"). 234# html_file_suffix = None 235 236# Language to be used for generating the HTML full-text search index. 237# Sphinx supports the following languages: 238# 'da', 'de', 'en', 'es', 'fi', 'fr', 'hu', 'it', 'ja' 239# 'nl', 'no', 'pt', 'ro', 'ru', 'sv', 'tr' 240# html_search_language = 'en' 241 242# A dictionary with options for the search language support, empty by default. 243# Now only 'ja' uses this config value 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# html_search_scorer = 'scorer.js' 249 250# Output file base name for HTML help builder. 251htmlhelp_basename = "google-api-core-doc" 252 253# -- Options for warnings ------------------------------------------------------ 254 255 256suppress_warnings = [ 257 # Temporarily suppress this to avoid "more than one target found for 258 # cross-reference" warning, which are intractable for us to avoid while in 259 # a mono-repo. 260 # See https://github.com/sphinx-doc/sphinx/blob 261 # /2a65ffeef5c107c19084fabdd706cdff3f52d93c/sphinx/domains/python.py#L843 262 "ref.python" 263] 264 265# -- Options for LaTeX output --------------------------------------------- 266 267latex_elements = { 268 # The paper size ('letterpaper' or 'a4paper'). 269 #'papersize': 'letterpaper', 270 # The font size ('10pt', '11pt' or '12pt'). 271 #'pointsize': '10pt', 272 # Additional stuff for the LaTeX preamble. 273 #'preamble': '', 274 # Latex figure (float) alignment 275 #'figure_align': 'htbp', 276} 277 278# Grouping the document tree into LaTeX files. List of tuples 279# (source start file, target name, title, 280# author, documentclass [howto, manual, or own class]). 281latex_documents = [ 282 ( 283 root_doc, 284 "google-api-core.tex", 285 "google-api-core Documentation", 286 author, 287 "manual", 288 ) 289] 290 291# The name of an image file (relative to this directory) to place at the top of 292# the title page. 293# latex_logo = None 294 295# For "manual" documents, if this is true, then toplevel headings are parts, 296# not chapters. 297# latex_use_parts = False 298 299# If true, show page references after internal links. 300# latex_show_pagerefs = False 301 302# If true, show URL addresses after external links. 303# latex_show_urls = False 304 305# Documents to append as an appendix to all manuals. 306# latex_appendices = [] 307 308# If false, no module index is generated. 309# latex_domain_indices = True 310 311 312# -- Options for manual page output --------------------------------------- 313 314# One entry per manual page. List of tuples 315# (source start file, name, description, authors, manual section). 316man_pages = [ 317 (root_doc, "google-api-core", "google-api-core Documentation", [author], 1,) 318] 319 320# If true, show URL addresses after external links. 321# man_show_urls = False 322 323 324# -- Options for Texinfo output ------------------------------------------- 325 326# Grouping the document tree into Texinfo files. List of tuples 327# (source start file, target name, title, author, 328# dir menu entry, description, category) 329texinfo_documents = [ 330 ( 331 root_doc, 332 "google-api-core", 333 "google-api-core Documentation", 334 author, 335 "google-api-core", 336 "google-api-core Library", 337 "APIs", 338 ) 339] 340 341# Documents to append as an appendix to all manuals. 342# texinfo_appendices = [] 343 344# If false, no module index is generated. 345# texinfo_domain_indices = True 346 347# How to display URL addresses: 'footnote', 'no', or 'inline'. 348# texinfo_show_urls = 'footnote' 349 350# If true, do not generate a @detailmenu in the "Top" node's menu. 351# texinfo_no_detailmenu = False 352 353 354# Example configuration for intersphinx: refer to the Python standard library. 355intersphinx_mapping = { 356 "python": ("https://python.readthedocs.org/en/latest/", None), 357 "google-auth": ("https://googleapis.dev/python/google-auth/latest/", None), 358 "google.api_core": ("https://googleapis.dev/python/google-api-core/latest/", None,), 359 "grpc": ("https://grpc.github.io/grpc/python/", None), 360 "proto-plus": ("https://proto-plus-python.readthedocs.io/en/latest/", None), 361 "protobuf": ("https://googleapis.dev/python/protobuf/latest/", None), 362} 363 364 365# Napoleon settings 366napoleon_google_docstring = True 367napoleon_numpy_docstring = True 368napoleon_include_private_with_doc = False 369napoleon_include_special_with_doc = True 370napoleon_use_admonition_for_examples = False 371napoleon_use_admonition_for_notes = False 372napoleon_use_admonition_for_references = False 373napoleon_use_ivar = False 374napoleon_use_param = True 375napoleon_use_rtype = True 376