Skip to content

Commit b992a29

Browse files
test: add 3.9 tests (googleapis#96)
This PR was generated using Autosynth. 🌈 Synth log will be available here: https://source.cloud.google.com/results/invocations/6490b6f9-79ee-41b3-8813-ec1cd161dafb/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: googleapis/synthtool@778d8be Source-Link: googleapis/synthtool@573f765 Source-Link: googleapis/synthtool@ba960d7 Source-Link: googleapis/synthtool@56ddc68 Source-Link: googleapis/synthtool@16ec872 Source-Link: googleapis/synthtool@fb53b6f
1 parent 7c3035a commit b992a29

File tree

14 files changed

+62
-18
lines changed

14 files changed

+62
-18
lines changed

.github/header-checker-lint.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{"allowedCopyrightHolders": ["Google LLC"],
2+
"allowedLicenses": ["Apache-2.0", "MIT", "BSD-3"],
3+
"ignoreFiles": ["**/requirements.txt", "**/requirements-test.txt"],
4+
"sourceFileExtensions": [
5+
"ts",
6+
"js",
7+
"java",
8+
"sh",
9+
"Dockerfile",
10+
"yaml",
11+
"py",
12+
"html",
13+
"txt"
14+
]
15+
}

.kokoro/build.sh

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,11 @@
1515

1616
set -eo pipefail
1717

18-
cd github/python-vision
18+
if [[ -z "${PROJECT_ROOT:-}" ]]; then
19+
PROJECT_ROOT="github/python-vision"
20+
fi
21+
22+
cd "${PROJECT_ROOT}"
1923

2024
# Disable buffering, so that the logs stream through.
2125
export PYTHONUNBUFFERED=1
@@ -30,16 +34,16 @@ export GOOGLE_APPLICATION_CREDENTIALS=${KOKORO_GFILE_DIR}/service-account.json
3034
export PROJECT_ID=$(cat "${KOKORO_GFILE_DIR}/project-id.json")
3135

3236
# Remove old nox
33-
python3.6 -m pip uninstall --yes --quiet nox-automation
37+
python3 -m pip uninstall --yes --quiet nox-automation
3438

3539
# Install nox
36-
python3.6 -m pip install --upgrade --quiet nox
37-
python3.6 -m nox --version
40+
python3 -m pip install --upgrade --quiet nox
41+
python3 -m nox --version
3842

3943
# If NOX_SESSION is set, it only runs the specified session,
4044
# otherwise run all the sessions.
4145
if [[ -n "${NOX_SESSION:-}" ]]; then
42-
python3.6 -m nox -s "${NOX_SESSION:-}"
46+
python3 -m nox -s ${NOX_SESSION:-}
4347
else
44-
python3.6 -m nox
48+
python3 -m nox
4549
fi

.kokoro/docs/docs-presubmit.cfg

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,14 @@ env_vars: {
1515
key: "TRAMPOLINE_IMAGE_UPLOAD"
1616
value: "false"
1717
}
18+
19+
env_vars: {
20+
key: "TRAMPOLINE_BUILD_FILE"
21+
value: "github/python-vision/.kokoro/build.sh"
22+
}
23+
24+
# Only run this nox session.
25+
env_vars: {
26+
key: "NOX_SESSION"
27+
value: "docs docfx"
28+
}

.trampolinerc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ required_envvars+=(
2424
pass_down_envvars+=(
2525
"STAGING_BUCKET"
2626
"V2_STAGING_BUCKET"
27+
"NOX_SESSION"
2728
)
2829

2930
# Prevent unintentional override on the default image.

google/cloud/vision_v1p4beta1/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,6 @@ class ImageAnnotatorClient(VisionHelpers, IacImageAnnotatorClient):
158158
"GetReferenceImageRequest",
159159
"Image",
160160
"ImageAnnotationContext",
161-
"ImageAnnotatorClient",
162161
"ImageContext",
163162
"ImageProperties",
164163
"ImageSource",
@@ -186,6 +185,7 @@ class ImageAnnotatorClient(VisionHelpers, IacImageAnnotatorClient):
186185
"Paragraph",
187186
"Position",
188187
"Product",
188+
"ProductSearchClient",
189189
"ProductSearchParams",
190190
"ProductSearchResults",
191191
"ProductSet",
@@ -204,5 +204,5 @@ class ImageAnnotatorClient(VisionHelpers, IacImageAnnotatorClient):
204204
"WebDetection",
205205
"WebDetectionParams",
206206
"Word",
207-
"ProductSearchClient",
207+
"ImageAnnotatorClient",
208208
)

noxfile.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,17 @@
3030
SYSTEM_TEST_PYTHON_VERSIONS = ["3.8"]
3131
UNIT_TEST_PYTHON_VERSIONS = ["3.6", "3.7", "3.8", "3.9"]
3232

33+
# 'docfx' is excluded since it only needs to run in 'docs-presubmit'
34+
nox.options.sessions = [
35+
"unit",
36+
"system",
37+
"cover",
38+
"lint",
39+
"lint_setup_py",
40+
"blacken",
41+
"docs",
42+
]
43+
3344

3445
@nox.session(python=DEFAULT_PYTHON_VERSION)
3546
def lint(session):
@@ -75,6 +86,7 @@ def default(session):
7586
session.install(
7687
"mock", "pytest", "pytest-cov",
7788
)
89+
7890
session.install("-e", ".")
7991

8092
# Run py.test against the unit tests.

samples/snippets/crop_hints/noxfile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ def get_pytest_env_vars() -> Dict[str, str]:
8585

8686
# DO NOT EDIT - automatically generated.
8787
# All versions used to tested samples.
88-
ALL_VERSIONS = ["2.7", "3.6", "3.7", "3.8"]
88+
ALL_VERSIONS = ["2.7", "3.6", "3.7", "3.8", "3.9"]
8989

9090
# Any default versions that should be ignored.
9191
IGNORED_VERSIONS = TEST_CONFIG['ignored_versions']

samples/snippets/detect/noxfile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ def get_pytest_env_vars() -> Dict[str, str]:
8585

8686
# DO NOT EDIT - automatically generated.
8787
# All versions used to tested samples.
88-
ALL_VERSIONS = ["2.7", "3.6", "3.7", "3.8"]
88+
ALL_VERSIONS = ["2.7", "3.6", "3.7", "3.8", "3.9"]
8989

9090
# Any default versions that should be ignored.
9191
IGNORED_VERSIONS = TEST_CONFIG['ignored_versions']

samples/snippets/document_text/noxfile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ def get_pytest_env_vars() -> Dict[str, str]:
8585

8686
# DO NOT EDIT - automatically generated.
8787
# All versions used to tested samples.
88-
ALL_VERSIONS = ["2.7", "3.6", "3.7", "3.8"]
88+
ALL_VERSIONS = ["2.7", "3.6", "3.7", "3.8", "3.9"]
8989

9090
# Any default versions that should be ignored.
9191
IGNORED_VERSIONS = TEST_CONFIG['ignored_versions']

samples/snippets/face_detection/noxfile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ def get_pytest_env_vars() -> Dict[str, str]:
8585

8686
# DO NOT EDIT - automatically generated.
8787
# All versions used to tested samples.
88-
ALL_VERSIONS = ["2.7", "3.6", "3.7", "3.8"]
88+
ALL_VERSIONS = ["2.7", "3.6", "3.7", "3.8", "3.9"]
8989

9090
# Any default versions that should be ignored.
9191
IGNORED_VERSIONS = TEST_CONFIG['ignored_versions']

0 commit comments

Comments
 (0)