From 23327b275fb5a3fefe6c47cb15b9d9ecb02aac1f Mon Sep 17 00:00:00 2001 From: Dov Shlachter Date: Wed, 21 Oct 2020 11:02:03 -0700 Subject: [PATCH] docs: generated message types reference proto-plus (#680) Multiple issues have been filed indicating that json marshalling has been broken and the fix is not obvious. This will hopefully be ameliorated by indicating the inheritance from proto.Message, with a link to the appropriate documentation. --- gapic/ads-templates/scripts/fixup_%name_%version_keywords.py.j2 | 1 + gapic/templates/docs/%name_%version/types.rst.j2 | 1 + gapic/templates/docs/conf.py.j2 | 1 + gapic/templates/scripts/fixup_%name_%version_keywords.py.j2 | 1 + noxfile.py | 2 +- 5 files changed, 5 insertions(+), 1 deletion(-) diff --git a/gapic/ads-templates/scripts/fixup_%name_%version_keywords.py.j2 b/gapic/ads-templates/scripts/fixup_%name_%version_keywords.py.j2 index 99681ed992..9c4afb35c8 100644 --- a/gapic/ads-templates/scripts/fixup_%name_%version_keywords.py.j2 +++ b/gapic/ads-templates/scripts/fixup_%name_%version_keywords.py.j2 @@ -1,3 +1,4 @@ +#! /usr/bin/env python3 {% extends '_base.py.j2' %} {% block content %} import argparse diff --git a/gapic/templates/docs/%name_%version/types.rst.j2 b/gapic/templates/docs/%name_%version/types.rst.j2 index 640641f211..a77df003f7 100644 --- a/gapic/templates/docs/%name_%version/types.rst.j2 +++ b/gapic/templates/docs/%name_%version/types.rst.j2 @@ -3,3 +3,4 @@ Types for {{ api.naming.long_name }} {{ api.naming.version }} API .. automodule:: {{ api.naming.namespace|join('.')|lower }}.{{ api.naming.versioned_module_name }}.types :members: + :show-inheritance: diff --git a/gapic/templates/docs/conf.py.j2 b/gapic/templates/docs/conf.py.j2 index 1e827b37d9..423c3ad088 100644 --- a/gapic/templates/docs/conf.py.j2 +++ b/gapic/templates/docs/conf.py.j2 @@ -346,6 +346,7 @@ intersphinx_mapping = { "google.api_core": ("https://googleapis.dev/python/google-api-core/latest/", None), "grpc": ("https://grpc.io/grpc/python/", None), "requests": ("http://requests.kennethreitz.org/en/stable/", None), + "proto": ("https://proto-plus-python.readthedocs.io/en/stable", None), } diff --git a/gapic/templates/scripts/fixup_%name_%version_keywords.py.j2 b/gapic/templates/scripts/fixup_%name_%version_keywords.py.j2 index 6688025184..d040ba8126 100644 --- a/gapic/templates/scripts/fixup_%name_%version_keywords.py.j2 +++ b/gapic/templates/scripts/fixup_%name_%version_keywords.py.j2 @@ -1,3 +1,4 @@ +#! /usr/bin/env python3 {% extends '_base.py.j2' %} {% block content %} import argparse diff --git a/noxfile.py b/noxfile.py index ba283480e1..9c2462b815 100644 --- a/noxfile.py +++ b/noxfile.py @@ -229,7 +229,7 @@ def showcase_mypy_alternative_templates(session): showcase_mypy(session, templates=ADS_TEMPLATES, other_opts=("old-naming",)) -@nox.session(python="3.6") +@nox.session(python="3.8") def docs(session): """Build the docs."""