Bu Sun Kim | bee4b07 | 2019-06-25 12:44:16 -0700 | [diff] [blame] | 1 | # -*- coding: utf-8 -*- |
Yoshi Automation Bot | 8c7ac29 | 2021-04-07 09:01:26 -0700 | [diff] [blame] | 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. |
Bu Sun Kim | bee4b07 | 2019-06-25 12:44:16 -0700 | [diff] [blame] | 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 | |
| 27 | import sys |
| 28 | import os |
| 29 | import 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. |
| 34 | sys.path.insert(0, os.path.abspath("..")) |
| 35 | |
Tres Seaver | 000d0a0 | 2020-10-06 15:47:28 -0400 | [diff] [blame] | 36 | # For plugins that can not read conf.py. |
| 37 | # See also: https://github.com/docascode/sphinx-docfx-yaml/issues/85 |
| 38 | sys.path.insert(0, os.path.abspath(".")) |
| 39 | |
Bu Sun Kim | e72202e | 2020-02-19 17:58:47 -0800 | [diff] [blame] | 40 | __version__ = "" |
Bu Sun Kim | bee4b07 | 2019-06-25 12:44:16 -0700 | [diff] [blame] | 41 | |
| 42 | # -- General configuration ------------------------------------------------ |
| 43 | |
| 44 | # If your documentation needs a minimal Sphinx version, state it here. |
Tres Seaver | 000d0a0 | 2020-10-06 15:47:28 -0400 | [diff] [blame] | 45 | needs_sphinx = "1.5.5" |
Bu Sun Kim | bee4b07 | 2019-06-25 12:44:16 -0700 | [diff] [blame] | 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. |
| 50 | extensions = [ |
| 51 | "sphinx.ext.autodoc", |
| 52 | "sphinx.ext.autosummary", |
| 53 | "sphinx.ext.intersphinx", |
| 54 | "sphinx.ext.coverage", |
Tres Seaver | 000d0a0 | 2020-10-06 15:47:28 -0400 | [diff] [blame] | 55 | "sphinx.ext.doctest", |
Bu Sun Kim | bee4b07 | 2019-06-25 12:44:16 -0700 | [diff] [blame] | 56 | "sphinx.ext.napoleon", |
| 57 | "sphinx.ext.todo", |
| 58 | "sphinx.ext.viewcode", |
Bu Sun Kim | 945bafc | 2020-06-09 10:57:48 -0700 | [diff] [blame] | 59 | "recommonmark", |
Bu Sun Kim | bee4b07 | 2019-06-25 12:44:16 -0700 | [diff] [blame] | 60 | ] |
| 61 | |
| 62 | # autodoc/autosummary flags |
| 63 | autoclass_content = "both" |
Yoshi Automation Bot | cc56733 | 2020-06-19 18:53:24 -0700 | [diff] [blame] | 64 | autodoc_default_options = {"members": True} |
Bu Sun Kim | bee4b07 | 2019-06-25 12:44:16 -0700 | [diff] [blame] | 65 | autosummary_generate = True |
| 66 | |
| 67 | |
| 68 | # Add any paths that contain templates here, relative to this directory. |
| 69 | templates_path = ["_templates"] |
| 70 | |
Bu Sun Kim | bee4b07 | 2019-06-25 12:44:16 -0700 | [diff] [blame] | 71 | # The suffix(es) of source filenames. |
| 72 | # You can specify multiple suffix as a list of string: |
| 73 | # source_suffix = ['.rst', '.md'] |
| 74 | source_suffix = [".rst", ".md"] |
| 75 | |
| 76 | # The encoding of source files. |
| 77 | # source_encoding = 'utf-8-sig' |
| 78 | |
Tres Seaver | 1db493c | 2021-08-30 13:45:35 -0400 | [diff] [blame] | 79 | # The root toctree document. |
| 80 | root_doc = "index" |
Bu Sun Kim | bee4b07 | 2019-06-25 12:44:16 -0700 | [diff] [blame] | 81 | |
| 82 | # General information about the project. |
gcf-owl-bot[bot] | d368c4b | 2021-06-17 10:52:03 +0000 | [diff] [blame] | 83 | project = "google-api-core" |
| 84 | copyright = "2019, Google" |
| 85 | author = "Google APIs" |
Bu Sun Kim | bee4b07 | 2019-06-25 12:44:16 -0700 | [diff] [blame] | 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. |
| 92 | release = __version__ |
| 93 | # The short X.Y version. |
| 94 | version = ".".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. |
| 101 | language = 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 Seaver | 000d0a0 | 2020-10-06 15:47:28 -0400 | [diff] [blame] | 111 | exclude_patterns = [ |
| 112 | "_build", |
gcf-owl-bot[bot] | 258ba4a | 2021-08-12 15:55:59 +0000 | [diff] [blame] | 113 | "**/.nox/**/*", |
Tres Seaver | 000d0a0 | 2020-10-06 15:47:28 -0400 | [diff] [blame] | 114 | "samples/AUTHORING_GUIDE.md", |
| 115 | "samples/CONTRIBUTING.md", |
| 116 | "samples/snippets/README.rst", |
| 117 | ] |
Bu Sun Kim | bee4b07 | 2019-06-25 12:44:16 -0700 | [diff] [blame] | 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. |
| 135 | pygments_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. |
| 144 | todo_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. |
| 151 | html_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. |
| 156 | html_theme_options = { |
Bu Sun Kim | e72202e | 2020-02-19 17:58:47 -0800 | [diff] [blame] | 157 | "description": "Google Cloud Client Libraries for google-api-core", |
Bu Sun Kim | bee4b07 | 2019-06-25 12:44:16 -0700 | [diff] [blame] | 158 | "github_user": "googleapis", |
Bu Sun Kim | e72202e | 2020-02-19 17:58:47 -0800 | [diff] [blame] | 159 | "github_repo": "python-api-core", |
Bu Sun Kim | bee4b07 | 2019-06-25 12:44:16 -0700 | [diff] [blame] | 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". |
Bu Sun Kim | 0f6ad2a | 2019-11-11 15:15:32 -0800 | [diff] [blame] | 188 | html_static_path = ["_static"] |
Bu Sun Kim | bee4b07 | 2019-06-25 12:44:16 -0700 | [diff] [blame] | 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. |
| 251 | htmlhelp_basename = "google-api-core-doc" |
| 252 | |
| 253 | # -- Options for warnings ------------------------------------------------------ |
| 254 | |
| 255 | |
| 256 | suppress_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 | |
| 267 | latex_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]). |
| 281 | latex_documents = [ |
| 282 | ( |
Tres Seaver | 1db493c | 2021-08-30 13:45:35 -0400 | [diff] [blame] | 283 | root_doc, |
Bu Sun Kim | bee4b07 | 2019-06-25 12:44:16 -0700 | [diff] [blame] | 284 | "google-api-core.tex", |
gcf-owl-bot[bot] | d368c4b | 2021-06-17 10:52:03 +0000 | [diff] [blame] | 285 | "google-api-core Documentation", |
Bu Sun Kim | bee4b07 | 2019-06-25 12:44:16 -0700 | [diff] [blame] | 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). |
| 316 | man_pages = [ |
Tres Seaver | 1db493c | 2021-08-30 13:45:35 -0400 | [diff] [blame] | 317 | (root_doc, "google-api-core", "google-api-core Documentation", [author], 1,) |
Bu Sun Kim | bee4b07 | 2019-06-25 12:44:16 -0700 | [diff] [blame] | 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) |
| 329 | texinfo_documents = [ |
| 330 | ( |
Tres Seaver | 1db493c | 2021-08-30 13:45:35 -0400 | [diff] [blame] | 331 | root_doc, |
Bu Sun Kim | bee4b07 | 2019-06-25 12:44:16 -0700 | [diff] [blame] | 332 | "google-api-core", |
gcf-owl-bot[bot] | d368c4b | 2021-06-17 10:52:03 +0000 | [diff] [blame] | 333 | "google-api-core Documentation", |
Bu Sun Kim | bee4b07 | 2019-06-25 12:44:16 -0700 | [diff] [blame] | 334 | author, |
| 335 | "google-api-core", |
Bu Sun Kim | e72202e | 2020-02-19 17:58:47 -0800 | [diff] [blame] | 336 | "google-api-core Library", |
Bu Sun Kim | bee4b07 | 2019-06-25 12:44:16 -0700 | [diff] [blame] | 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. |
| 355 | intersphinx_mapping = { |
Yoshi Automation Bot | 9397693 | 2020-12-01 08:55:40 -0800 | [diff] [blame] | 356 | "python": ("https://python.readthedocs.org/en/latest/", None), |
| 357 | "google-auth": ("https://googleapis.dev/python/google-auth/latest/", None), |
Tres Seaver | fbf447c | 2021-06-16 13:45:41 -0400 | [diff] [blame] | 358 | "google.api_core": ("https://googleapis.dev/python/google-api-core/latest/", None,), |
Yoshi Automation Bot | 9397693 | 2020-12-01 08:55:40 -0800 | [diff] [blame] | 359 | "grpc": ("https://grpc.github.io/grpc/python/", None), |
| 360 | "proto-plus": ("https://proto-plus-python.readthedocs.io/en/latest/", None), |
gcf-owl-bot[bot] | 7337c6b | 2021-05-28 16:50:03 +0000 | [diff] [blame] | 361 | "protobuf": ("https://googleapis.dev/python/protobuf/latest/", None), |
Bu Sun Kim | bee4b07 | 2019-06-25 12:44:16 -0700 | [diff] [blame] | 362 | } |
| 363 | |
| 364 | |
| 365 | # Napoleon settings |
| 366 | napoleon_google_docstring = True |
| 367 | napoleon_numpy_docstring = True |
| 368 | napoleon_include_private_with_doc = False |
| 369 | napoleon_include_special_with_doc = True |
| 370 | napoleon_use_admonition_for_examples = False |
| 371 | napoleon_use_admonition_for_notes = False |
| 372 | napoleon_use_admonition_for_references = False |
| 373 | napoleon_use_ivar = False |
| 374 | napoleon_use_param = True |
| 375 | napoleon_use_rtype = True |