Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit b97149b

Browse filesBrowse files
chore: update templates (#127)
* chore: add pre-commit-config to renovate ignore paths Disable renovate PRs on the .pre-commit-config.yaml which is templated from synthtool. https://docs.renovatebot.com/configuration-options/#ignorepaths Source-Author: Bu Sun Kim <8822365+busunkim96@users.noreply.github.com> Source-Date: Mon Mar 15 09:05:39 2021 -0600 Source-Repo: googleapis/synthtool Source-Sha: 2c54c473779ea731128cea61a3a6c975a08a5378 Source-Link: googleapis/synthtool@2c54c47
1 parent 584f14d commit b97149b
Copy full SHA for b97149b

File tree

Expand file treeCollapse file tree

5 files changed

+43
-46
lines changed
Filter options
Expand file treeCollapse file tree

5 files changed

+43
-46
lines changed

‎packages/google-cloud-python-speech/google/cloud/speech_v1p1beta1/__init__.py

Copy file name to clipboardExpand all lines: packages/google-cloud-python-speech/google/cloud/speech_v1p1beta1/__init__.py
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ class SpeechClient(SpeechHelpers, SpeechClient):
5959

6060

6161
__all__ = (
62+
"AdaptationClient",
6263
"CreateCustomClassRequest",
6364
"CreatePhraseSetRequest",
6465
"CustomClass",
@@ -81,7 +82,6 @@ class SpeechClient(SpeechHelpers, SpeechClient):
8182
"RecognizeResponse",
8283
"SpeakerDiarizationConfig",
8384
"SpeechAdaptation",
84-
"SpeechClient",
8585
"SpeechContext",
8686
"SpeechRecognitionAlternative",
8787
"SpeechRecognitionResult",
@@ -92,5 +92,5 @@ class SpeechClient(SpeechHelpers, SpeechClient):
9292
"UpdateCustomClassRequest",
9393
"UpdatePhraseSetRequest",
9494
"WordInfo",
95-
"AdaptationClient",
95+
"SpeechClient",
9696
)
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"extends": [
33
"config:base", ":preserveSemverRanges"
4-
]
4+
],
5+
"ignorePaths": [".pre-commit-config.yaml"]
56
}

‎packages/google-cloud-python-speech/samples/microphone/noxfile.py

Copy file name to clipboardExpand all lines: packages/google-cloud-python-speech/samples/microphone/noxfile.py
+18-20Lines changed: 18 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -38,25 +38,28 @@
3838

3939
TEST_CONFIG = {
4040
# You can opt out from the test for specific Python versions.
41-
"ignored_versions": ["2.7"],
41+
'ignored_versions': ["2.7"],
42+
4243
# Old samples are opted out of enforcing Python type hints
4344
# All new samples should feature them
44-
"enforce_type_hints": False,
45+
'enforce_type_hints': False,
46+
4547
# An envvar key for determining the project id to use. Change it
4648
# to 'BUILD_SPECIFIC_GCLOUD_PROJECT' if you want to opt in using a
4749
# build specific Cloud project. You can also use your own string
4850
# to use your own Cloud project.
49-
"gcloud_project_env": "GOOGLE_CLOUD_PROJECT",
51+
'gcloud_project_env': 'GOOGLE_CLOUD_PROJECT',
5052
# 'gcloud_project_env': 'BUILD_SPECIFIC_GCLOUD_PROJECT',
53+
5154
# A dictionary you want to inject into your test. Don't put any
5255
# secrets here. These values will override predefined values.
53-
"envs": {},
56+
'envs': {},
5457
}
5558

5659

5760
try:
5861
# Ensure we can import noxfile_config in the project's directory.
59-
sys.path.append(".")
62+
sys.path.append('.')
6063
from noxfile_config import TEST_CONFIG_OVERRIDE
6164
except ImportError as e:
6265
print("No user noxfile_config found: detail: {}".format(e))
@@ -71,12 +74,12 @@ def get_pytest_env_vars() -> Dict[str, str]:
7174
ret = {}
7275

7376
# Override the GCLOUD_PROJECT and the alias.
74-
env_key = TEST_CONFIG["gcloud_project_env"]
77+
env_key = TEST_CONFIG['gcloud_project_env']
7578
# This should error out if not set.
76-
ret["GOOGLE_CLOUD_PROJECT"] = os.environ[env_key]
79+
ret['GOOGLE_CLOUD_PROJECT'] = os.environ[env_key]
7780

7881
# Apply user supplied envs.
79-
ret.update(TEST_CONFIG["envs"])
82+
ret.update(TEST_CONFIG['envs'])
8083
return ret
8184

8285

@@ -85,7 +88,7 @@ def get_pytest_env_vars() -> Dict[str, str]:
8588
ALL_VERSIONS = ["2.7", "3.6", "3.7", "3.8", "3.9"]
8689

8790
# Any default versions that should be ignored.
88-
IGNORED_VERSIONS = TEST_CONFIG["ignored_versions"]
91+
IGNORED_VERSIONS = TEST_CONFIG['ignored_versions']
8992

9093
TESTED_VERSIONS = sorted([v for v in ALL_VERSIONS if v not in IGNORED_VERSIONS])
9194

@@ -134,7 +137,7 @@ def _determine_local_import_names(start_dir: str) -> List[str]:
134137

135138
@nox.session
136139
def lint(session: nox.sessions.Session) -> None:
137-
if not TEST_CONFIG["enforce_type_hints"]:
140+
if not TEST_CONFIG['enforce_type_hints']:
138141
session.install("flake8", "flake8-import-order")
139142
else:
140143
session.install("flake8", "flake8-import-order", "flake8-annotations")
@@ -143,11 +146,9 @@ def lint(session: nox.sessions.Session) -> None:
143146
args = FLAKE8_COMMON_ARGS + [
144147
"--application-import-names",
145148
",".join(local_names),
146-
".",
149+
"."
147150
]
148151
session.run("flake8", *args)
149-
150-
151152
#
152153
# Black
153154
#
@@ -160,7 +161,6 @@ def blacken(session: nox.sessions.Session) -> None:
160161

161162
session.run("black", *python_files)
162163

163-
164164
#
165165
# Sample Tests
166166
#
@@ -169,9 +169,7 @@ def blacken(session: nox.sessions.Session) -> None:
169169
PYTEST_COMMON_ARGS = ["--junitxml=sponge_log.xml"]
170170

171171

172-
def _session_tests(
173-
session: nox.sessions.Session, post_install: Callable = None
174-
) -> None:
172+
def _session_tests(session: nox.sessions.Session, post_install: Callable = None) -> None:
175173
"""Runs py.test for a particular project."""
176174
if os.path.exists("requirements.txt"):
177175
session.install("-r", "requirements.txt")
@@ -202,9 +200,9 @@ def py(session: nox.sessions.Session) -> None:
202200
if session.python in TESTED_VERSIONS:
203201
_session_tests(session)
204202
else:
205-
session.skip(
206-
"SKIPPED: {} tests are disabled for this sample.".format(session.python)
207-
)
203+
session.skip("SKIPPED: {} tests are disabled for this sample.".format(
204+
session.python
205+
))
208206

209207

210208
#

‎packages/google-cloud-python-speech/samples/snippets/noxfile.py

Copy file name to clipboardExpand all lines: packages/google-cloud-python-speech/samples/snippets/noxfile.py
+18-20Lines changed: 18 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -38,25 +38,28 @@
3838

3939
TEST_CONFIG = {
4040
# You can opt out from the test for specific Python versions.
41-
"ignored_versions": ["2.7"],
41+
'ignored_versions': ["2.7"],
42+
4243
# Old samples are opted out of enforcing Python type hints
4344
# All new samples should feature them
44-
"enforce_type_hints": False,
45+
'enforce_type_hints': False,
46+
4547
# An envvar key for determining the project id to use. Change it
4648
# to 'BUILD_SPECIFIC_GCLOUD_PROJECT' if you want to opt in using a
4749
# build specific Cloud project. You can also use your own string
4850
# to use your own Cloud project.
49-
"gcloud_project_env": "GOOGLE_CLOUD_PROJECT",
51+
'gcloud_project_env': 'GOOGLE_CLOUD_PROJECT',
5052
# 'gcloud_project_env': 'BUILD_SPECIFIC_GCLOUD_PROJECT',
53+
5154
# A dictionary you want to inject into your test. Don't put any
5255
# secrets here. These values will override predefined values.
53-
"envs": {},
56+
'envs': {},
5457
}
5558

5659

5760
try:
5861
# Ensure we can import noxfile_config in the project's directory.
59-
sys.path.append(".")
62+
sys.path.append('.')
6063
from noxfile_config import TEST_CONFIG_OVERRIDE
6164
except ImportError as e:
6265
print("No user noxfile_config found: detail: {}".format(e))
@@ -71,12 +74,12 @@ def get_pytest_env_vars() -> Dict[str, str]:
7174
ret = {}
7275

7376
# Override the GCLOUD_PROJECT and the alias.
74-
env_key = TEST_CONFIG["gcloud_project_env"]
77+
env_key = TEST_CONFIG['gcloud_project_env']
7578
# This should error out if not set.
76-
ret["GOOGLE_CLOUD_PROJECT"] = os.environ[env_key]
79+
ret['GOOGLE_CLOUD_PROJECT'] = os.environ[env_key]
7780

7881
# Apply user supplied envs.
79-
ret.update(TEST_CONFIG["envs"])
82+
ret.update(TEST_CONFIG['envs'])
8083
return ret
8184

8285

@@ -85,7 +88,7 @@ def get_pytest_env_vars() -> Dict[str, str]:
8588
ALL_VERSIONS = ["2.7", "3.6", "3.7", "3.8", "3.9"]
8689

8790
# Any default versions that should be ignored.
88-
IGNORED_VERSIONS = TEST_CONFIG["ignored_versions"]
91+
IGNORED_VERSIONS = TEST_CONFIG['ignored_versions']
8992

9093
TESTED_VERSIONS = sorted([v for v in ALL_VERSIONS if v not in IGNORED_VERSIONS])
9194

@@ -134,7 +137,7 @@ def _determine_local_import_names(start_dir: str) -> List[str]:
134137

135138
@nox.session
136139
def lint(session: nox.sessions.Session) -> None:
137-
if not TEST_CONFIG["enforce_type_hints"]:
140+
if not TEST_CONFIG['enforce_type_hints']:
138141
session.install("flake8", "flake8-import-order")
139142
else:
140143
session.install("flake8", "flake8-import-order", "flake8-annotations")
@@ -143,11 +146,9 @@ def lint(session: nox.sessions.Session) -> None:
143146
args = FLAKE8_COMMON_ARGS + [
144147
"--application-import-names",
145148
",".join(local_names),
146-
".",
149+
"."
147150
]
148151
session.run("flake8", *args)
149-
150-
151152
#
152153
# Black
153154
#
@@ -160,7 +161,6 @@ def blacken(session: nox.sessions.Session) -> None:
160161

161162
session.run("black", *python_files)
162163

163-
164164
#
165165
# Sample Tests
166166
#
@@ -169,9 +169,7 @@ def blacken(session: nox.sessions.Session) -> None:
169169
PYTEST_COMMON_ARGS = ["--junitxml=sponge_log.xml"]
170170

171171

172-
def _session_tests(
173-
session: nox.sessions.Session, post_install: Callable = None
174-
) -> None:
172+
def _session_tests(session: nox.sessions.Session, post_install: Callable = None) -> None:
175173
"""Runs py.test for a particular project."""
176174
if os.path.exists("requirements.txt"):
177175
session.install("-r", "requirements.txt")
@@ -202,9 +200,9 @@ def py(session: nox.sessions.Session) -> None:
202200
if session.python in TESTED_VERSIONS:
203201
_session_tests(session)
204202
else:
205-
session.skip(
206-
"SKIPPED: {} tests are disabled for this sample.".format(session.python)
207-
)
203+
session.skip("SKIPPED: {} tests are disabled for this sample.".format(
204+
session.python
205+
))
208206

209207

210208
#

‎packages/google-cloud-python-speech/synth.metadata

Copy file name to clipboardExpand all lines: packages/google-cloud-python-speech/synth.metadata
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"git": {
55
"name": ".",
66
"remote": "https://github.com/googleapis/python-speech.git",
7-
"sha": "6d7ea1e8869e3d800220f1261b8be1d0c91c66d8"
7+
"sha": "24b94247bab22b8fad15a251bff06ec8620f0f90"
88
}
99
},
1010
{
@@ -19,14 +19,14 @@
1919
"git": {
2020
"name": "synthtool",
2121
"remote": "https://github.com/googleapis/synthtool.git",
22-
"sha": "0780323da96d5a53925fe0547757181fe76e8f1e"
22+
"sha": "2c54c473779ea731128cea61a3a6c975a08a5378"
2323
}
2424
},
2525
{
2626
"git": {
2727
"name": "synthtool",
2828
"remote": "https://github.com/googleapis/synthtool.git",
29-
"sha": "0780323da96d5a53925fe0547757181fe76e8f1e"
29+
"sha": "2c54c473779ea731128cea61a3a6c975a08a5378"
3030
}
3131
}
3232
],

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.