Skip to content

Commit

Permalink
docs: change relative URLs to absolute URLs to fix broken links (#40)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>
Source-Date: Tue Jun 2 17:40:38 2020 -0700
Source-Repo: googleapis/googleapis
Source-Sha: 55094be6405640329ddc93730962b9f7e68a0fc1
Source-Link: googleapis/googleapis@55094be
  • Loading branch information
yoshi-automation authored Jun 4, 2020
1 parent 26e9cc6 commit bb5c03d
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 24 deletions.
5 changes: 1 addition & 4 deletions packages/google-cloud-texttospeech/docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
"sphinx.ext.napoleon",
"sphinx.ext.todo",
"sphinx.ext.viewcode",
"recommonmark",
]

# autodoc/autosummary flags
Expand All @@ -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']
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 </speech/text-to-speech/docs/ssml>`__.
`SSML <https://cloud.google.com/text-to-speech/docs/ssml>`__.
"""

text = proto.Field(proto.STRING, number=1)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 </speech/text-to-speech/docs/ssml>`__.
`SSML <https://cloud.google.com/text-to-speech/docs/ssml>`__.
"""

text = proto.Field(proto.STRING, number=1)
Expand Down
2 changes: 1 addition & 1 deletion packages/google-cloud-texttospeech/noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
28 changes: 15 additions & 13 deletions packages/google-cloud-texttospeech/samples/snippets/noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand All @@ -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


Expand All @@ -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])

Expand Down Expand Up @@ -137,7 +139,7 @@ def lint(session):
args = FLAKE8_COMMON_ARGS + [
"--application-import-names",
",".join(local_names),
".",
"."
]
session.run("flake8", *args)

Expand Down Expand Up @@ -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
))


#
Expand Down
22 changes: 18 additions & 4 deletions packages/google-cloud-texttospeech/synth.metadata
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
],
Expand Down

0 comments on commit bb5c03d

Please sign in to comment.