From b68df446daa7983cad1d31553ece6df569c932b2 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 3 Jun 2020 21:39:27 -0700 Subject: [PATCH] docs: change relative URLs to absolute URLs to fix broken links (#40) * changes without context autosynth cannot find the source of changes triggered by earlier changes in this repository, or by version upgrades to tools such as linters. * docs: change relative URLs to absolute URLs to fix broken links. PiperOrigin-RevId: 314438331 Source-Author: Google APIs Source-Date: Tue Jun 2 17:40:38 2020 -0700 Source-Repo: googleapis/googleapis Source-Sha: 55094be6405640329ddc93730962b9f7e68a0fc1 Source-Link: https://github.com/googleapis/googleapis/commit/55094be6405640329ddc93730962b9f7e68a0fc1 --- docs/conf.py | 5 +--- .../cloud/texttospeech_v1/types/cloud_tts.py | 2 +- .../texttospeech_v1beta1/types/cloud_tts.py | 2 +- noxfile.py | 2 +- samples/snippets/noxfile.py | 28 ++++++++++--------- synth.metadata | 22 ++++++++++++--- 6 files changed, 37 insertions(+), 24 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index d98858fc..08deeece 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -38,6 +38,7 @@ "sphinx.ext.napoleon", "sphinx.ext.todo", "sphinx.ext.viewcode", + "recommonmark", ] # autodoc/autosummary flags @@ -49,10 +50,6 @@ # Add any paths that contain templates here, relative to this directory. templates_path = ["_templates"] -# Allow markdown includes (so releases.md can include CHANGLEOG.md) -# http://www.sphinx-doc.org/en/master/markdown.html -source_parsers = {".md": "recommonmark.parser.CommonMarkParser"} - # The suffix(es) of source filenames. # You can specify multiple suffix as a list of string: # source_suffix = ['.rst', '.md'] diff --git a/google/cloud/texttospeech_v1/types/cloud_tts.py b/google/cloud/texttospeech_v1/types/cloud_tts.py index 1221344b..c62376d5 100644 --- a/google/cloud/texttospeech_v1/types/cloud_tts.py +++ b/google/cloud/texttospeech_v1/types/cloud_tts.py @@ -146,7 +146,7 @@ class SynthesisInput(proto.Message): be valid and well-formed. Otherwise the RPC will fail and return [google.rpc.Code.INVALID_ARGUMENT][]. For more information, see - `SSML `__. + `SSML `__. """ text = proto.Field(proto.STRING, number=1) diff --git a/google/cloud/texttospeech_v1beta1/types/cloud_tts.py b/google/cloud/texttospeech_v1beta1/types/cloud_tts.py index f0dfb5f5..848d1559 100644 --- a/google/cloud/texttospeech_v1beta1/types/cloud_tts.py +++ b/google/cloud/texttospeech_v1beta1/types/cloud_tts.py @@ -146,7 +146,7 @@ class SynthesisInput(proto.Message): be valid and well-formed. Otherwise the RPC will fail and return [google.rpc.Code.INVALID_ARGUMENT][]. For more information, see - `SSML `__. + `SSML `__. """ text = proto.Field(proto.STRING, number=1) diff --git a/noxfile.py b/noxfile.py index 640ccd4f..3dd79725 100644 --- a/noxfile.py +++ b/noxfile.py @@ -139,7 +139,7 @@ def docs(session): """Build the docs for this library.""" session.install("-e", ".") - session.install("sphinx<3.0.0", "alabaster", "recommonmark") + session.install("sphinx", "alabaster", "recommonmark") shutil.rmtree(os.path.join("docs", "_build"), ignore_errors=True) session.run( diff --git a/samples/snippets/noxfile.py b/samples/snippets/noxfile.py index c92cf2ab..b23055f1 100644 --- a/samples/snippets/noxfile.py +++ b/samples/snippets/noxfile.py @@ -37,22 +37,24 @@ TEST_CONFIG = { # You can opt out from the test for specific Python versions. - "ignored_versions": ["2.7"], + 'ignored_versions': ["2.7"], + # An envvar key for determining the project id to use. Change it # to 'BUILD_SPECIFIC_GCLOUD_PROJECT' if you want to opt in using a # build specific Cloud project. You can also use your own string # to use your own Cloud project. - "gcloud_project_env": "GCLOUD_PROJECT", + 'gcloud_project_env': 'GCLOUD_PROJECT', # 'gcloud_project_env': 'BUILD_SPECIFIC_GCLOUD_PROJECT', + # A dictionary you want to inject into your test. Don't put any # secrets here. These values will override predefined values. - "envs": {}, + 'envs': {}, } try: # Ensure we can import noxfile_config in the project's directory. - sys.path.append(".") + sys.path.append('.') from noxfile_config import TEST_CONFIG_OVERRIDE except ImportError as e: print("No user noxfile_config found: detail: {}".format(e)) @@ -67,13 +69,13 @@ def get_pytest_env_vars(): ret = {} # Override the GCLOUD_PROJECT and the alias. - env_key = TEST_CONFIG["gcloud_project_env"] + env_key = TEST_CONFIG['gcloud_project_env'] # This should error out if not set. - ret["GOOGLE_CLOUD_PROJECT"] = os.environ[env_key] - ret["GCLOUD_PROJECT"] = os.environ[env_key] + ret['GOOGLE_CLOUD_PROJECT'] = os.environ[env_key] + ret['GCLOUD_PROJECT'] = os.environ[env_key] # Apply user supplied envs. - ret.update(TEST_CONFIG["envs"]) + ret.update(TEST_CONFIG['envs']) return ret @@ -82,7 +84,7 @@ def get_pytest_env_vars(): ALL_VERSIONS = ["2.7", "3.6", "3.7", "3.8"] # Any default versions that should be ignored. -IGNORED_VERSIONS = TEST_CONFIG["ignored_versions"] +IGNORED_VERSIONS = TEST_CONFIG['ignored_versions'] TESTED_VERSIONS = sorted([v for v in ALL_VERSIONS if v not in IGNORED_VERSIONS]) @@ -137,7 +139,7 @@ def lint(session): args = FLAKE8_COMMON_ARGS + [ "--application-import-names", ",".join(local_names), - ".", + "." ] session.run("flake8", *args) @@ -181,9 +183,9 @@ def py(session): if session.python in TESTED_VERSIONS: _session_tests(session) else: - session.skip( - "SKIPPED: {} tests are disabled for this sample.".format(session.python) - ) + session.skip("SKIPPED: {} tests are disabled for this sample.".format( + session.python + )) # diff --git a/synth.metadata b/synth.metadata index f3c65bcc..f4f9a8c1 100644 --- a/synth.metadata +++ b/synth.metadata @@ -3,16 +3,30 @@ { "git": { "name": ".", - "remote": "git@github.com:googleapis/python-texttospeech", - "sha": "b265df8e43ac71d22ee3bbdf96b5e3a457b9f956" + "remote": "https://github.com/googleapis/python-texttospeech.git", + "sha": "6ce76b62f41c354ee47b6cb13c52574f91e7a80c" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "eafa840ceec23b44a5c21670288107c661252711", - "internalRef": "313488995" + "sha": "55094be6405640329ddc93730962b9f7e68a0fc1", + "internalRef": "314438331" + } + }, + { + "git": { + "name": "synthtool", + "remote": "https://github.com/googleapis/synthtool.git", + "sha": "cb3c683e958a4b5c016bb3734436fc1cb887eb7b" + } + }, + { + "git": { + "name": "synthtool", + "remote": "https://github.com/googleapis/synthtool.git", + "sha": "cb3c683e958a4b5c016bb3734436fc1cb887eb7b" } } ],