@@ -23,12 +23,16 @@ import shlex
2323# documentation root, use os.path.abspath to make it absolute, like shown here.
2424sys.path.insert(0, os.path.abspath(".."))
2525
26- __version__ = "0.1.0"
26+ # For plugins that can not read conf.py.
27+ # See also: https://github.com/docascode/sphinx-docfx-yaml/issues/85
28+ sys.path.insert(0, os.path.abspath("."))
29+
30+ __version__ = ""
2731
2832# -- General configuration ------------------------------------------------
2933
3034# If your documentation needs a minimal Sphinx version, state it here.
31- needs_sphinx = "4.0.1 "
35+ needs_sphinx = "4.5.0 "
3236
3337# Add any Sphinx extension module names here, as strings. They can be
3438# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
@@ -38,26 +42,25 @@ extensions = [
3842 "sphinx.ext.autosummary",
3943 "sphinx.ext.intersphinx",
4044 "sphinx.ext.coverage",
45+ "sphinx.ext.doctest",
4146 "sphinx.ext.napoleon",
4247 "sphinx.ext.todo",
4348 "sphinx.ext.viewcode",
49+ "recommonmark",
4450]
4551
4652# autodoc/autosummary flags
4753autoclass_content = "both"
48- autodoc_default_flags = [ "members"]
54+ autodoc_default_options = { "members": True}
4955autosummary_generate = True
5056
5157
5258# Add any paths that contain templates here, relative to this directory.
5359templates_path = ["_templates"]
5460
55- # Allow markdown includes (so releases.md can include CHANGLEOG.md)
56- # http://www.sphinx-doc.org/en/master/markdown.html
57- source_parsers = {".md": "recommonmark.parser.CommonMarkParser"}
58-
5961# The suffix(es) of source filenames.
6062# You can specify multiple suffix as a list of string:
63+ # source_suffix = ['.rst', '.md']
6164source_suffix = [".rst", ".md"]
6265
6366# The encoding of source files.
@@ -68,8 +71,8 @@ root_doc = "index"
6871
6972# General information about the project.
7073project = u"{{ api.naming.warehouse_package_name }}"
71- copyright = u"2023 , Google, LLC"
72- author = u"Google APIs" # TODO: autogenerate this bit
74+ copyright = u"2025 , Google, LLC"
75+ author = u"Google APIs"
7376
7477# The version info for the project you're documenting, acts as replacement for
7578# |version| and |release|, also used in various other places throughout the
@@ -85,7 +88,7 @@ version = ".".join(release.split(".")[0:2])
8588#
8689# This is also used if you do content translation via gettext catalogs.
8790# Usually you set "language" from the command line for these cases.
88- language = 'en'
91+ language = None
8992
9093# There are two options for replacing |today|: either, you set today to some
9194# non-false value, then it is used:
@@ -95,7 +98,13 @@ language = 'en'
9598
9699# List of patterns, relative to source directory, that match files and
97100# directories to ignore when looking for source files.
98- exclude_patterns = ["_build"]
101+ exclude_patterns = [
102+ "_build",
103+ "**/.nox/**/*",
104+ "samples/AUTHORING_GUIDE.md",
105+ "samples/CONTRIBUTING.md",
106+ "samples/snippets/README.rst",
107+ ]
99108
100109# The reST default role (used for this markup: `text`) to use for all
101110# documents.
@@ -135,7 +144,7 @@ html_theme = "alabaster"
135144# further. For a list of options available for each theme, see the
136145# documentation.
137146html_theme_options = {
138- "description": "{{ api.naming.namespace|join(' ') }} Client Libraries for Python ",
147+ "description": "{{ api.naming.namespace|join(' ') }} Client Libraries for {{ api.naming.warehouse_package_name }} ",
139148 "github_user": "googleapis",
140149 "github_repo": "google-cloud-python",
141150 "github_banner": True,
@@ -298,7 +307,7 @@ man_pages = [
298307 (
299308 root_doc,
300309 "{{ api.naming.warehouse_package_name }}",
301- u "{{ api.naming.long_name }} Documentation",
310+ "{{ api.naming.warehouse_package_name }} Documentation",
302311 [author],
303312 1,
304313 )
@@ -317,10 +326,10 @@ texinfo_documents = [
317326 (
318327 root_doc,
319328 "{{ api.naming.warehouse_package_name }}",
320- u "{{ api.naming.warehouse_package_name }} Documentation",
329+ "{{ api.naming.warehouse_package_name }} Documentation",
321330 author,
322331 "{{ api.naming.warehouse_package_name }}",
323- "GAPIC library for {{ api.naming.long_name }} API ",
332+ "{{ api.naming.warehouse_package_name }} Library ",
324333 "APIs",
325334 )
326335]
@@ -340,14 +349,14 @@ texinfo_documents = [
340349
341350# Example configuration for intersphinx: refer to the Python standard library.
342351intersphinx_mapping = {
343- "python": ("http ://python.readthedocs.org/en/latest/", None),
344- "gax ": ("https://gax-python.readthedocs.org/en /latest/", None),
345- "google-auth ": ("https://google-auth.readthedocs.io/en/stable", None),
346- "google-gax": ( "https://gax-python.readthedocs.io/en/ latest/", None) ,
347- "google.api_core": ("https://googleapis.dev/python/google-api-core/latest/", None) ,
348- "grpc": ("https://grpc.io/grpc/python/", None ),
349- "requests ": ("http ://requests.kennethreitz.org/en/stable /", None),
350- "proto": ("https://proto-plus-python.readthedocs.io/en/stable ", None),
352+ "python": ("https ://python.readthedocs.org/en/latest/", None),
353+ "google-auth ": ("https://googleapis.dev/python/google-auth /latest/", None),
354+ "google.api_core ": (
355+ "https://googleapis.dev/python/google-api-core/ latest/",
356+ None,
357+ ),
358+ "grpc ": ("https ://grpc.github.io/grpc/python /", None),
359+ "proto-plus ": ("https://proto-plus-python.readthedocs.io/en/latest/ ", None),
351360 "protobuf": ("https://googleapis.dev/python/protobuf/latest/", None),
352361}
353362
0 commit comments