From b1b42634b8af2b768671b28bbcef1168c2dc2415 Mon Sep 17 00:00:00 2001 From: Anthonios Partheniou Date: Thu, 4 Nov 2021 10:59:54 +0000 Subject: [PATCH 1/5] chore: delete owlbot.py --- owlbot.py | 50 -------------------------------------------------- 1 file changed, 50 deletions(-) delete mode 100644 owlbot.py diff --git a/owlbot.py b/owlbot.py deleted file mode 100644 index cbfa79e..0000000 --- a/owlbot.py +++ /dev/null @@ -1,50 +0,0 @@ -# Copyright 2020 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -"""This script is used to synthesize generated parts of this library.""" -import synthtool as s -import synthtool.gcp as gcp -from synthtool.languages import python - -common = gcp.CommonTemplates() - -# ---------------------------------------------------------------------------- -# Generate reCAPTCHA Enterprise GAPIC layer -# ---------------------------------------------------------------------------- -versions = ["v1"] - -for library in s.get_staging_dirs("v1"): - # rename to google-cloud-recaptcha-enterprise - s.replace( - [library / "google/**/*.py", library / "tests/**/*.py"], - "google-cloud-recaptchaenterprise", - "google-cloud-recaptcha-enterprise", - ) - - s.move(library, excludes=["setup.py", "README.rst", "docs/index.rst", "*.tar.gz"]) - -s.remove_staging_dirs() - -# ---------------------------------------------------------------------------- -# Add templated files -# ---------------------------------------------------------------------------- -templated_files = common.py_library(cov_level=98, microgenerator=True, custom_samples_dockerfile=True) - -s.move( - templated_files, excludes=[".coveragerc"] -) # the microgenerator has a good coveragerc file - -python.py_samples(skip_readmes=True) - -s.shell.run(["nox", "-s", "blacken"], hide_output=False) From 6d91d03cf7c5c6b90e4bfdbe23ac96cf06af17b4 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Thu, 4 Nov 2021 11:02:11 +0000 Subject: [PATCH 2/5] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- .kokoro/samples/lint/common.cfg | 9 ++------- .kokoro/samples/python3.10/common.cfg | 9 ++------- .kokoro/samples/python3.10/periodic-head.cfg | 6 ------ .kokoro/samples/python3.10/periodic.cfg | 6 ------ .kokoro/samples/python3.6/common.cfg | 9 ++------- .kokoro/samples/python3.6/periodic-head.cfg | 6 ------ .kokoro/samples/python3.6/periodic.cfg | 6 ------ .kokoro/samples/python3.7/common.cfg | 9 ++------- .kokoro/samples/python3.7/periodic.cfg | 6 ------ .kokoro/samples/python3.8/common.cfg | 9 ++------- .kokoro/samples/python3.8/periodic-head.cfg | 6 ------ .kokoro/samples/python3.8/periodic.cfg | 6 ------ .kokoro/samples/python3.9/common.cfg | 9 ++------- .kokoro/samples/python3.9/periodic-head.cfg | 6 ------ .kokoro/samples/python3.9/periodic.cfg | 6 ------ docs/index.rst | 9 +++++++-- noxfile.py | 2 +- 17 files changed, 20 insertions(+), 99 deletions(-) diff --git a/.kokoro/samples/lint/common.cfg b/.kokoro/samples/lint/common.cfg index 0bb8c19..9c1f551 100644 --- a/.kokoro/samples/lint/common.cfg +++ b/.kokoro/samples/lint/common.cfg @@ -18,15 +18,10 @@ env_vars: { value: "github/python-recaptcha-enterprise/.kokoro/test-samples.sh" } -env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/python-recaptcha-enterprise-samples-docker" -} - # Configure the docker image for kokoro-trampoline. env_vars: { - key: "TRAMPOLINE_DOCKERFILE" - value: ".kokoro/docker/samples/Dockerfile" + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/python-samples-testing-docker" } # Download secrets for samples diff --git a/.kokoro/samples/python3.10/common.cfg b/.kokoro/samples/python3.10/common.cfg index 6555f4d..653825f 100644 --- a/.kokoro/samples/python3.10/common.cfg +++ b/.kokoro/samples/python3.10/common.cfg @@ -24,15 +24,10 @@ env_vars: { value: "github/python-recaptcha-enterprise/.kokoro/test-samples.sh" } -env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/python-recaptcha-enterprise-samples-docker" -} - # Configure the docker image for kokoro-trampoline. env_vars: { - key: "TRAMPOLINE_DOCKERFILE" - value: ".kokoro/docker/samples/Dockerfile" + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/python-samples-testing-docker" } # Download secrets for samples diff --git a/.kokoro/samples/python3.10/periodic-head.cfg b/.kokoro/samples/python3.10/periodic-head.cfg index 4f55dae..14ad83d 100644 --- a/.kokoro/samples/python3.10/periodic-head.cfg +++ b/.kokoro/samples/python3.10/periodic-head.cfg @@ -9,9 +9,3 @@ env_vars: { key: "TRAMPOLINE_BUILD_FILE" value: "github/python-recaptcha-enterprise/.kokoro/test-samples-against-head.sh" } - -# Upload the docker image after successful builds. -env_vars: { - key: "TRAMPOLINE_IMAGE_UPLOAD" - value: "true" -} diff --git a/.kokoro/samples/python3.10/periodic.cfg b/.kokoro/samples/python3.10/periodic.cfg index 4c4f37a..71cd1e5 100644 --- a/.kokoro/samples/python3.10/periodic.cfg +++ b/.kokoro/samples/python3.10/periodic.cfg @@ -4,9 +4,3 @@ env_vars: { key: "INSTALL_LIBRARY_FROM_SOURCE" value: "False" } - -# Upload the docker image after successful builds. -env_vars: { - key: "TRAMPOLINE_IMAGE_UPLOAD" - value: "true" -} diff --git a/.kokoro/samples/python3.6/common.cfg b/.kokoro/samples/python3.6/common.cfg index 28a3202..1deec64 100644 --- a/.kokoro/samples/python3.6/common.cfg +++ b/.kokoro/samples/python3.6/common.cfg @@ -24,15 +24,10 @@ env_vars: { value: "github/python-recaptcha-enterprise/.kokoro/test-samples.sh" } -env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/python-recaptcha-enterprise-samples-docker" -} - # Configure the docker image for kokoro-trampoline. env_vars: { - key: "TRAMPOLINE_DOCKERFILE" - value: ".kokoro/docker/samples/Dockerfile" + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/python-samples-testing-docker" } # Download secrets for samples diff --git a/.kokoro/samples/python3.6/periodic-head.cfg b/.kokoro/samples/python3.6/periodic-head.cfg index 4f55dae..14ad83d 100644 --- a/.kokoro/samples/python3.6/periodic-head.cfg +++ b/.kokoro/samples/python3.6/periodic-head.cfg @@ -9,9 +9,3 @@ env_vars: { key: "TRAMPOLINE_BUILD_FILE" value: "github/python-recaptcha-enterprise/.kokoro/test-samples-against-head.sh" } - -# Upload the docker image after successful builds. -env_vars: { - key: "TRAMPOLINE_IMAGE_UPLOAD" - value: "true" -} diff --git a/.kokoro/samples/python3.6/periodic.cfg b/.kokoro/samples/python3.6/periodic.cfg index 4c4f37a..71cd1e5 100644 --- a/.kokoro/samples/python3.6/periodic.cfg +++ b/.kokoro/samples/python3.6/periodic.cfg @@ -4,9 +4,3 @@ env_vars: { key: "INSTALL_LIBRARY_FROM_SOURCE" value: "False" } - -# Upload the docker image after successful builds. -env_vars: { - key: "TRAMPOLINE_IMAGE_UPLOAD" - value: "true" -} diff --git a/.kokoro/samples/python3.7/common.cfg b/.kokoro/samples/python3.7/common.cfg index d0dd036..c15e5f0 100644 --- a/.kokoro/samples/python3.7/common.cfg +++ b/.kokoro/samples/python3.7/common.cfg @@ -24,15 +24,10 @@ env_vars: { value: "github/python-recaptcha-enterprise/.kokoro/test-samples.sh" } -env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/python-recaptcha-enterprise-samples-docker" -} - # Configure the docker image for kokoro-trampoline. env_vars: { - key: "TRAMPOLINE_DOCKERFILE" - value: ".kokoro/docker/samples/Dockerfile" + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/python-samples-testing-docker" } # Download secrets for samples diff --git a/.kokoro/samples/python3.7/periodic.cfg b/.kokoro/samples/python3.7/periodic.cfg index 4c4f37a..71cd1e5 100644 --- a/.kokoro/samples/python3.7/periodic.cfg +++ b/.kokoro/samples/python3.7/periodic.cfg @@ -4,9 +4,3 @@ env_vars: { key: "INSTALL_LIBRARY_FROM_SOURCE" value: "False" } - -# Upload the docker image after successful builds. -env_vars: { - key: "TRAMPOLINE_IMAGE_UPLOAD" - value: "true" -} diff --git a/.kokoro/samples/python3.8/common.cfg b/.kokoro/samples/python3.8/common.cfg index bb65f54..293b6b3 100644 --- a/.kokoro/samples/python3.8/common.cfg +++ b/.kokoro/samples/python3.8/common.cfg @@ -24,15 +24,10 @@ env_vars: { value: "github/python-recaptcha-enterprise/.kokoro/test-samples.sh" } -env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/python-recaptcha-enterprise-samples-docker" -} - # Configure the docker image for kokoro-trampoline. env_vars: { - key: "TRAMPOLINE_DOCKERFILE" - value: ".kokoro/docker/samples/Dockerfile" + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/python-samples-testing-docker" } # Download secrets for samples diff --git a/.kokoro/samples/python3.8/periodic-head.cfg b/.kokoro/samples/python3.8/periodic-head.cfg index 4f55dae..14ad83d 100644 --- a/.kokoro/samples/python3.8/periodic-head.cfg +++ b/.kokoro/samples/python3.8/periodic-head.cfg @@ -9,9 +9,3 @@ env_vars: { key: "TRAMPOLINE_BUILD_FILE" value: "github/python-recaptcha-enterprise/.kokoro/test-samples-against-head.sh" } - -# Upload the docker image after successful builds. -env_vars: { - key: "TRAMPOLINE_IMAGE_UPLOAD" - value: "true" -} diff --git a/.kokoro/samples/python3.8/periodic.cfg b/.kokoro/samples/python3.8/periodic.cfg index 4c4f37a..71cd1e5 100644 --- a/.kokoro/samples/python3.8/periodic.cfg +++ b/.kokoro/samples/python3.8/periodic.cfg @@ -4,9 +4,3 @@ env_vars: { key: "INSTALL_LIBRARY_FROM_SOURCE" value: "False" } - -# Upload the docker image after successful builds. -env_vars: { - key: "TRAMPOLINE_IMAGE_UPLOAD" - value: "true" -} diff --git a/.kokoro/samples/python3.9/common.cfg b/.kokoro/samples/python3.9/common.cfg index c922225..170f6ef 100644 --- a/.kokoro/samples/python3.9/common.cfg +++ b/.kokoro/samples/python3.9/common.cfg @@ -24,15 +24,10 @@ env_vars: { value: "github/python-recaptcha-enterprise/.kokoro/test-samples.sh" } -env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/python-recaptcha-enterprise-samples-docker" -} - # Configure the docker image for kokoro-trampoline. env_vars: { - key: "TRAMPOLINE_DOCKERFILE" - value: ".kokoro/docker/samples/Dockerfile" + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/python-samples-testing-docker" } # Download secrets for samples diff --git a/.kokoro/samples/python3.9/periodic-head.cfg b/.kokoro/samples/python3.9/periodic-head.cfg index 4f55dae..14ad83d 100644 --- a/.kokoro/samples/python3.9/periodic-head.cfg +++ b/.kokoro/samples/python3.9/periodic-head.cfg @@ -9,9 +9,3 @@ env_vars: { key: "TRAMPOLINE_BUILD_FILE" value: "github/python-recaptcha-enterprise/.kokoro/test-samples-against-head.sh" } - -# Upload the docker image after successful builds. -env_vars: { - key: "TRAMPOLINE_IMAGE_UPLOAD" - value: "true" -} diff --git a/.kokoro/samples/python3.9/periodic.cfg b/.kokoro/samples/python3.9/periodic.cfg index 4c4f37a..71cd1e5 100644 --- a/.kokoro/samples/python3.9/periodic.cfg +++ b/.kokoro/samples/python3.9/periodic.cfg @@ -4,9 +4,3 @@ env_vars: { key: "INSTALL_LIBRARY_FROM_SOURCE" value: "False" } - -# Upload the docker image after successful builds. -env_vars: { - key: "TRAMPOLINE_IMAGE_UPLOAD" - value: "true" -} diff --git a/docs/index.rst b/docs/index.rst index abb4a0a..8195ae8 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -2,6 +2,7 @@ .. include:: multiprocessing.rst + API Reference ------------- .. toctree:: @@ -10,9 +11,13 @@ API Reference recaptchaenterprise_v1/services recaptchaenterprise_v1/types + +Changelog +--------- + For a list of all ``google-cloud-recaptcha-enterprise`` releases: .. toctree:: - :maxdepth: 2 + :maxdepth: 2 - changelog + changelog diff --git a/noxfile.py b/noxfile.py index f041f1f..2a2001c 100644 --- a/noxfile.py +++ b/noxfile.py @@ -175,7 +175,7 @@ def cover(session): test runs (not system test runs), and then erases coverage data. """ session.install("coverage", "pytest-cov") - session.run("coverage", "report", "--show-missing", "--fail-under=98") + session.run("coverage", "report", "--show-missing", "--fail-under=100") session.run("coverage", "erase") From af9079ba6051a982f0d37a1ae4ed29767dbae061 Mon Sep 17 00:00:00 2001 From: Anthonios Partheniou Date: Thu, 11 Nov 2021 01:54:13 +0000 Subject: [PATCH 3/5] use the latest post processor image --- .github/.OwlBot.lock.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 108063d..63bf76e 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -1,3 +1,3 @@ docker: image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest - digest: sha256:4ee57a76a176ede9087c14330c625a71553cf9c72828b2c0ca12f5338171ba60 + digest: sha256:39ad8c0570e4f5d2d3124a509de4fe975e799e2b97e0f58aed88f8880d5a8b60 From 526a057f213d8f93f5e229c3a7650f99448dcfc1 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Thu, 11 Nov 2021 01:56:10 +0000 Subject: [PATCH 4/5] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- .kokoro/samples/lint/common.cfg | 9 +++++++-- .kokoro/samples/python3.10/common.cfg | 9 +++++++-- .kokoro/samples/python3.10/periodic-head.cfg | 6 ++++++ .kokoro/samples/python3.10/periodic.cfg | 6 ++++++ .kokoro/samples/python3.6/common.cfg | 9 +++++++-- .kokoro/samples/python3.6/periodic-head.cfg | 6 ++++++ .kokoro/samples/python3.6/periodic.cfg | 6 ++++++ .kokoro/samples/python3.7/common.cfg | 9 +++++++-- .kokoro/samples/python3.7/periodic.cfg | 6 ++++++ .kokoro/samples/python3.8/common.cfg | 9 +++++++-- .kokoro/samples/python3.8/periodic-head.cfg | 6 ++++++ .kokoro/samples/python3.8/periodic.cfg | 6 ++++++ .kokoro/samples/python3.9/common.cfg | 9 +++++++-- .kokoro/samples/python3.9/periodic-head.cfg | 6 ++++++ .kokoro/samples/python3.9/periodic.cfg | 6 ++++++ samples/snippets/test_create_assessment.py | 8 ++++---- samples/snippets/test_site_key.py | 2 +- 17 files changed, 101 insertions(+), 17 deletions(-) diff --git a/.kokoro/samples/lint/common.cfg b/.kokoro/samples/lint/common.cfg index 9c1f551..0bb8c19 100644 --- a/.kokoro/samples/lint/common.cfg +++ b/.kokoro/samples/lint/common.cfg @@ -18,10 +18,15 @@ env_vars: { value: "github/python-recaptcha-enterprise/.kokoro/test-samples.sh" } -# Configure the docker image for kokoro-trampoline. env_vars: { key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/python-samples-testing-docker" + value: "gcr.io/cloud-devrel-kokoro-resources/python-recaptcha-enterprise-samples-docker" +} + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_DOCKERFILE" + value: ".kokoro/docker/samples/Dockerfile" } # Download secrets for samples diff --git a/.kokoro/samples/python3.10/common.cfg b/.kokoro/samples/python3.10/common.cfg index 653825f..6555f4d 100644 --- a/.kokoro/samples/python3.10/common.cfg +++ b/.kokoro/samples/python3.10/common.cfg @@ -24,10 +24,15 @@ env_vars: { value: "github/python-recaptcha-enterprise/.kokoro/test-samples.sh" } -# Configure the docker image for kokoro-trampoline. env_vars: { key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/python-samples-testing-docker" + value: "gcr.io/cloud-devrel-kokoro-resources/python-recaptcha-enterprise-samples-docker" +} + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_DOCKERFILE" + value: ".kokoro/docker/samples/Dockerfile" } # Download secrets for samples diff --git a/.kokoro/samples/python3.10/periodic-head.cfg b/.kokoro/samples/python3.10/periodic-head.cfg index 14ad83d..4f55dae 100644 --- a/.kokoro/samples/python3.10/periodic-head.cfg +++ b/.kokoro/samples/python3.10/periodic-head.cfg @@ -9,3 +9,9 @@ env_vars: { key: "TRAMPOLINE_BUILD_FILE" value: "github/python-recaptcha-enterprise/.kokoro/test-samples-against-head.sh" } + +# Upload the docker image after successful builds. +env_vars: { + key: "TRAMPOLINE_IMAGE_UPLOAD" + value: "true" +} diff --git a/.kokoro/samples/python3.10/periodic.cfg b/.kokoro/samples/python3.10/periodic.cfg index 71cd1e5..4c4f37a 100644 --- a/.kokoro/samples/python3.10/periodic.cfg +++ b/.kokoro/samples/python3.10/periodic.cfg @@ -4,3 +4,9 @@ env_vars: { key: "INSTALL_LIBRARY_FROM_SOURCE" value: "False" } + +# Upload the docker image after successful builds. +env_vars: { + key: "TRAMPOLINE_IMAGE_UPLOAD" + value: "true" +} diff --git a/.kokoro/samples/python3.6/common.cfg b/.kokoro/samples/python3.6/common.cfg index 1deec64..28a3202 100644 --- a/.kokoro/samples/python3.6/common.cfg +++ b/.kokoro/samples/python3.6/common.cfg @@ -24,10 +24,15 @@ env_vars: { value: "github/python-recaptcha-enterprise/.kokoro/test-samples.sh" } -# Configure the docker image for kokoro-trampoline. env_vars: { key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/python-samples-testing-docker" + value: "gcr.io/cloud-devrel-kokoro-resources/python-recaptcha-enterprise-samples-docker" +} + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_DOCKERFILE" + value: ".kokoro/docker/samples/Dockerfile" } # Download secrets for samples diff --git a/.kokoro/samples/python3.6/periodic-head.cfg b/.kokoro/samples/python3.6/periodic-head.cfg index 14ad83d..4f55dae 100644 --- a/.kokoro/samples/python3.6/periodic-head.cfg +++ b/.kokoro/samples/python3.6/periodic-head.cfg @@ -9,3 +9,9 @@ env_vars: { key: "TRAMPOLINE_BUILD_FILE" value: "github/python-recaptcha-enterprise/.kokoro/test-samples-against-head.sh" } + +# Upload the docker image after successful builds. +env_vars: { + key: "TRAMPOLINE_IMAGE_UPLOAD" + value: "true" +} diff --git a/.kokoro/samples/python3.6/periodic.cfg b/.kokoro/samples/python3.6/periodic.cfg index 71cd1e5..4c4f37a 100644 --- a/.kokoro/samples/python3.6/periodic.cfg +++ b/.kokoro/samples/python3.6/periodic.cfg @@ -4,3 +4,9 @@ env_vars: { key: "INSTALL_LIBRARY_FROM_SOURCE" value: "False" } + +# Upload the docker image after successful builds. +env_vars: { + key: "TRAMPOLINE_IMAGE_UPLOAD" + value: "true" +} diff --git a/.kokoro/samples/python3.7/common.cfg b/.kokoro/samples/python3.7/common.cfg index c15e5f0..d0dd036 100644 --- a/.kokoro/samples/python3.7/common.cfg +++ b/.kokoro/samples/python3.7/common.cfg @@ -24,10 +24,15 @@ env_vars: { value: "github/python-recaptcha-enterprise/.kokoro/test-samples.sh" } -# Configure the docker image for kokoro-trampoline. env_vars: { key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/python-samples-testing-docker" + value: "gcr.io/cloud-devrel-kokoro-resources/python-recaptcha-enterprise-samples-docker" +} + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_DOCKERFILE" + value: ".kokoro/docker/samples/Dockerfile" } # Download secrets for samples diff --git a/.kokoro/samples/python3.7/periodic.cfg b/.kokoro/samples/python3.7/periodic.cfg index 71cd1e5..4c4f37a 100644 --- a/.kokoro/samples/python3.7/periodic.cfg +++ b/.kokoro/samples/python3.7/periodic.cfg @@ -4,3 +4,9 @@ env_vars: { key: "INSTALL_LIBRARY_FROM_SOURCE" value: "False" } + +# Upload the docker image after successful builds. +env_vars: { + key: "TRAMPOLINE_IMAGE_UPLOAD" + value: "true" +} diff --git a/.kokoro/samples/python3.8/common.cfg b/.kokoro/samples/python3.8/common.cfg index 293b6b3..bb65f54 100644 --- a/.kokoro/samples/python3.8/common.cfg +++ b/.kokoro/samples/python3.8/common.cfg @@ -24,10 +24,15 @@ env_vars: { value: "github/python-recaptcha-enterprise/.kokoro/test-samples.sh" } -# Configure the docker image for kokoro-trampoline. env_vars: { key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/python-samples-testing-docker" + value: "gcr.io/cloud-devrel-kokoro-resources/python-recaptcha-enterprise-samples-docker" +} + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_DOCKERFILE" + value: ".kokoro/docker/samples/Dockerfile" } # Download secrets for samples diff --git a/.kokoro/samples/python3.8/periodic-head.cfg b/.kokoro/samples/python3.8/periodic-head.cfg index 14ad83d..4f55dae 100644 --- a/.kokoro/samples/python3.8/periodic-head.cfg +++ b/.kokoro/samples/python3.8/periodic-head.cfg @@ -9,3 +9,9 @@ env_vars: { key: "TRAMPOLINE_BUILD_FILE" value: "github/python-recaptcha-enterprise/.kokoro/test-samples-against-head.sh" } + +# Upload the docker image after successful builds. +env_vars: { + key: "TRAMPOLINE_IMAGE_UPLOAD" + value: "true" +} diff --git a/.kokoro/samples/python3.8/periodic.cfg b/.kokoro/samples/python3.8/periodic.cfg index 71cd1e5..4c4f37a 100644 --- a/.kokoro/samples/python3.8/periodic.cfg +++ b/.kokoro/samples/python3.8/periodic.cfg @@ -4,3 +4,9 @@ env_vars: { key: "INSTALL_LIBRARY_FROM_SOURCE" value: "False" } + +# Upload the docker image after successful builds. +env_vars: { + key: "TRAMPOLINE_IMAGE_UPLOAD" + value: "true" +} diff --git a/.kokoro/samples/python3.9/common.cfg b/.kokoro/samples/python3.9/common.cfg index 170f6ef..c922225 100644 --- a/.kokoro/samples/python3.9/common.cfg +++ b/.kokoro/samples/python3.9/common.cfg @@ -24,10 +24,15 @@ env_vars: { value: "github/python-recaptcha-enterprise/.kokoro/test-samples.sh" } -# Configure the docker image for kokoro-trampoline. env_vars: { key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/python-samples-testing-docker" + value: "gcr.io/cloud-devrel-kokoro-resources/python-recaptcha-enterprise-samples-docker" +} + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_DOCKERFILE" + value: ".kokoro/docker/samples/Dockerfile" } # Download secrets for samples diff --git a/.kokoro/samples/python3.9/periodic-head.cfg b/.kokoro/samples/python3.9/periodic-head.cfg index 14ad83d..4f55dae 100644 --- a/.kokoro/samples/python3.9/periodic-head.cfg +++ b/.kokoro/samples/python3.9/periodic-head.cfg @@ -9,3 +9,9 @@ env_vars: { key: "TRAMPOLINE_BUILD_FILE" value: "github/python-recaptcha-enterprise/.kokoro/test-samples-against-head.sh" } + +# Upload the docker image after successful builds. +env_vars: { + key: "TRAMPOLINE_IMAGE_UPLOAD" + value: "true" +} diff --git a/.kokoro/samples/python3.9/periodic.cfg b/.kokoro/samples/python3.9/periodic.cfg index 71cd1e5..4c4f37a 100644 --- a/.kokoro/samples/python3.9/periodic.cfg +++ b/.kokoro/samples/python3.9/periodic.cfg @@ -4,3 +4,9 @@ env_vars: { key: "INSTALL_LIBRARY_FROM_SOURCE" value: "False" } + +# Upload the docker image after successful builds. +env_vars: { + key: "TRAMPOLINE_IMAGE_UPLOAD" + value: "true" +} diff --git a/samples/snippets/test_create_assessment.py b/samples/snippets/test_create_assessment.py index fc1cdac..c28e0a2 100644 --- a/samples/snippets/test_create_assessment.py +++ b/samples/snippets/test_create_assessment.py @@ -51,10 +51,10 @@ def index() -> str: @pytest.fixture(scope="module") def browser() -> WebDriver: chrome_options = webdriver.ChromeOptions() - chrome_options.add_argument('--no-sandbox') - chrome_options.add_argument('--window-size=1420,1080') - chrome_options.add_argument('--headless') - chrome_options.add_argument('--disable-gpu') + chrome_options.add_argument("--no-sandbox") + chrome_options.add_argument("--window-size=1420,1080") + chrome_options.add_argument("--headless") + chrome_options.add_argument("--disable-gpu") browser = webdriver.Chrome(chrome_options=chrome_options) yield browser browser.close() diff --git a/samples/snippets/test_site_key.py b/samples/snippets/test_site_key.py index 1cc85c8..fb2f045 100644 --- a/samples/snippets/test_site_key.py +++ b/samples/snippets/test_site_key.py @@ -59,7 +59,7 @@ def test_update_site_key(capsys: CaptureFixture, recaptcha_site_key: str) -> Non update_site_key( project_id=GOOGLE_CLOUD_PROJECT, recaptcha_site_key=recaptcha_site_key, - domain_name=DOMAIN_NAME + domain_name=DOMAIN_NAME, ) out, _ = capsys.readouterr() assert re.search("reCAPTCHA Site key successfully updated ! ", out) From 7a1f183c94c04e06369ff311133bd8e810634f69 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Thu, 11 Nov 2021 01:56:17 +0000 Subject: [PATCH 5/5] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- .kokoro/samples/lint/common.cfg | 9 +++++++-- .kokoro/samples/python3.10/common.cfg | 9 +++++++-- .kokoro/samples/python3.10/periodic-head.cfg | 6 ++++++ .kokoro/samples/python3.10/periodic.cfg | 6 ++++++ .kokoro/samples/python3.6/common.cfg | 9 +++++++-- .kokoro/samples/python3.6/periodic-head.cfg | 6 ++++++ .kokoro/samples/python3.6/periodic.cfg | 6 ++++++ .kokoro/samples/python3.7/common.cfg | 9 +++++++-- .kokoro/samples/python3.7/periodic.cfg | 6 ++++++ .kokoro/samples/python3.8/common.cfg | 9 +++++++-- .kokoro/samples/python3.8/periodic-head.cfg | 6 ++++++ .kokoro/samples/python3.8/periodic.cfg | 6 ++++++ .kokoro/samples/python3.9/common.cfg | 9 +++++++-- .kokoro/samples/python3.9/periodic-head.cfg | 6 ++++++ .kokoro/samples/python3.9/periodic.cfg | 6 ++++++ samples/snippets/test_create_assessment.py | 8 ++++---- samples/snippets/test_site_key.py | 2 +- 17 files changed, 101 insertions(+), 17 deletions(-) diff --git a/.kokoro/samples/lint/common.cfg b/.kokoro/samples/lint/common.cfg index 9c1f551..0bb8c19 100644 --- a/.kokoro/samples/lint/common.cfg +++ b/.kokoro/samples/lint/common.cfg @@ -18,10 +18,15 @@ env_vars: { value: "github/python-recaptcha-enterprise/.kokoro/test-samples.sh" } -# Configure the docker image for kokoro-trampoline. env_vars: { key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/python-samples-testing-docker" + value: "gcr.io/cloud-devrel-kokoro-resources/python-recaptcha-enterprise-samples-docker" +} + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_DOCKERFILE" + value: ".kokoro/docker/samples/Dockerfile" } # Download secrets for samples diff --git a/.kokoro/samples/python3.10/common.cfg b/.kokoro/samples/python3.10/common.cfg index 653825f..6555f4d 100644 --- a/.kokoro/samples/python3.10/common.cfg +++ b/.kokoro/samples/python3.10/common.cfg @@ -24,10 +24,15 @@ env_vars: { value: "github/python-recaptcha-enterprise/.kokoro/test-samples.sh" } -# Configure the docker image for kokoro-trampoline. env_vars: { key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/python-samples-testing-docker" + value: "gcr.io/cloud-devrel-kokoro-resources/python-recaptcha-enterprise-samples-docker" +} + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_DOCKERFILE" + value: ".kokoro/docker/samples/Dockerfile" } # Download secrets for samples diff --git a/.kokoro/samples/python3.10/periodic-head.cfg b/.kokoro/samples/python3.10/periodic-head.cfg index 14ad83d..4f55dae 100644 --- a/.kokoro/samples/python3.10/periodic-head.cfg +++ b/.kokoro/samples/python3.10/periodic-head.cfg @@ -9,3 +9,9 @@ env_vars: { key: "TRAMPOLINE_BUILD_FILE" value: "github/python-recaptcha-enterprise/.kokoro/test-samples-against-head.sh" } + +# Upload the docker image after successful builds. +env_vars: { + key: "TRAMPOLINE_IMAGE_UPLOAD" + value: "true" +} diff --git a/.kokoro/samples/python3.10/periodic.cfg b/.kokoro/samples/python3.10/periodic.cfg index 71cd1e5..4c4f37a 100644 --- a/.kokoro/samples/python3.10/periodic.cfg +++ b/.kokoro/samples/python3.10/periodic.cfg @@ -4,3 +4,9 @@ env_vars: { key: "INSTALL_LIBRARY_FROM_SOURCE" value: "False" } + +# Upload the docker image after successful builds. +env_vars: { + key: "TRAMPOLINE_IMAGE_UPLOAD" + value: "true" +} diff --git a/.kokoro/samples/python3.6/common.cfg b/.kokoro/samples/python3.6/common.cfg index 1deec64..28a3202 100644 --- a/.kokoro/samples/python3.6/common.cfg +++ b/.kokoro/samples/python3.6/common.cfg @@ -24,10 +24,15 @@ env_vars: { value: "github/python-recaptcha-enterprise/.kokoro/test-samples.sh" } -# Configure the docker image for kokoro-trampoline. env_vars: { key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/python-samples-testing-docker" + value: "gcr.io/cloud-devrel-kokoro-resources/python-recaptcha-enterprise-samples-docker" +} + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_DOCKERFILE" + value: ".kokoro/docker/samples/Dockerfile" } # Download secrets for samples diff --git a/.kokoro/samples/python3.6/periodic-head.cfg b/.kokoro/samples/python3.6/periodic-head.cfg index 14ad83d..4f55dae 100644 --- a/.kokoro/samples/python3.6/periodic-head.cfg +++ b/.kokoro/samples/python3.6/periodic-head.cfg @@ -9,3 +9,9 @@ env_vars: { key: "TRAMPOLINE_BUILD_FILE" value: "github/python-recaptcha-enterprise/.kokoro/test-samples-against-head.sh" } + +# Upload the docker image after successful builds. +env_vars: { + key: "TRAMPOLINE_IMAGE_UPLOAD" + value: "true" +} diff --git a/.kokoro/samples/python3.6/periodic.cfg b/.kokoro/samples/python3.6/periodic.cfg index 71cd1e5..4c4f37a 100644 --- a/.kokoro/samples/python3.6/periodic.cfg +++ b/.kokoro/samples/python3.6/periodic.cfg @@ -4,3 +4,9 @@ env_vars: { key: "INSTALL_LIBRARY_FROM_SOURCE" value: "False" } + +# Upload the docker image after successful builds. +env_vars: { + key: "TRAMPOLINE_IMAGE_UPLOAD" + value: "true" +} diff --git a/.kokoro/samples/python3.7/common.cfg b/.kokoro/samples/python3.7/common.cfg index c15e5f0..d0dd036 100644 --- a/.kokoro/samples/python3.7/common.cfg +++ b/.kokoro/samples/python3.7/common.cfg @@ -24,10 +24,15 @@ env_vars: { value: "github/python-recaptcha-enterprise/.kokoro/test-samples.sh" } -# Configure the docker image for kokoro-trampoline. env_vars: { key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/python-samples-testing-docker" + value: "gcr.io/cloud-devrel-kokoro-resources/python-recaptcha-enterprise-samples-docker" +} + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_DOCKERFILE" + value: ".kokoro/docker/samples/Dockerfile" } # Download secrets for samples diff --git a/.kokoro/samples/python3.7/periodic.cfg b/.kokoro/samples/python3.7/periodic.cfg index 71cd1e5..4c4f37a 100644 --- a/.kokoro/samples/python3.7/periodic.cfg +++ b/.kokoro/samples/python3.7/periodic.cfg @@ -4,3 +4,9 @@ env_vars: { key: "INSTALL_LIBRARY_FROM_SOURCE" value: "False" } + +# Upload the docker image after successful builds. +env_vars: { + key: "TRAMPOLINE_IMAGE_UPLOAD" + value: "true" +} diff --git a/.kokoro/samples/python3.8/common.cfg b/.kokoro/samples/python3.8/common.cfg index 293b6b3..bb65f54 100644 --- a/.kokoro/samples/python3.8/common.cfg +++ b/.kokoro/samples/python3.8/common.cfg @@ -24,10 +24,15 @@ env_vars: { value: "github/python-recaptcha-enterprise/.kokoro/test-samples.sh" } -# Configure the docker image for kokoro-trampoline. env_vars: { key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/python-samples-testing-docker" + value: "gcr.io/cloud-devrel-kokoro-resources/python-recaptcha-enterprise-samples-docker" +} + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_DOCKERFILE" + value: ".kokoro/docker/samples/Dockerfile" } # Download secrets for samples diff --git a/.kokoro/samples/python3.8/periodic-head.cfg b/.kokoro/samples/python3.8/periodic-head.cfg index 14ad83d..4f55dae 100644 --- a/.kokoro/samples/python3.8/periodic-head.cfg +++ b/.kokoro/samples/python3.8/periodic-head.cfg @@ -9,3 +9,9 @@ env_vars: { key: "TRAMPOLINE_BUILD_FILE" value: "github/python-recaptcha-enterprise/.kokoro/test-samples-against-head.sh" } + +# Upload the docker image after successful builds. +env_vars: { + key: "TRAMPOLINE_IMAGE_UPLOAD" + value: "true" +} diff --git a/.kokoro/samples/python3.8/periodic.cfg b/.kokoro/samples/python3.8/periodic.cfg index 71cd1e5..4c4f37a 100644 --- a/.kokoro/samples/python3.8/periodic.cfg +++ b/.kokoro/samples/python3.8/periodic.cfg @@ -4,3 +4,9 @@ env_vars: { key: "INSTALL_LIBRARY_FROM_SOURCE" value: "False" } + +# Upload the docker image after successful builds. +env_vars: { + key: "TRAMPOLINE_IMAGE_UPLOAD" + value: "true" +} diff --git a/.kokoro/samples/python3.9/common.cfg b/.kokoro/samples/python3.9/common.cfg index 170f6ef..c922225 100644 --- a/.kokoro/samples/python3.9/common.cfg +++ b/.kokoro/samples/python3.9/common.cfg @@ -24,10 +24,15 @@ env_vars: { value: "github/python-recaptcha-enterprise/.kokoro/test-samples.sh" } -# Configure the docker image for kokoro-trampoline. env_vars: { key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/python-samples-testing-docker" + value: "gcr.io/cloud-devrel-kokoro-resources/python-recaptcha-enterprise-samples-docker" +} + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_DOCKERFILE" + value: ".kokoro/docker/samples/Dockerfile" } # Download secrets for samples diff --git a/.kokoro/samples/python3.9/periodic-head.cfg b/.kokoro/samples/python3.9/periodic-head.cfg index 14ad83d..4f55dae 100644 --- a/.kokoro/samples/python3.9/periodic-head.cfg +++ b/.kokoro/samples/python3.9/periodic-head.cfg @@ -9,3 +9,9 @@ env_vars: { key: "TRAMPOLINE_BUILD_FILE" value: "github/python-recaptcha-enterprise/.kokoro/test-samples-against-head.sh" } + +# Upload the docker image after successful builds. +env_vars: { + key: "TRAMPOLINE_IMAGE_UPLOAD" + value: "true" +} diff --git a/.kokoro/samples/python3.9/periodic.cfg b/.kokoro/samples/python3.9/periodic.cfg index 71cd1e5..4c4f37a 100644 --- a/.kokoro/samples/python3.9/periodic.cfg +++ b/.kokoro/samples/python3.9/periodic.cfg @@ -4,3 +4,9 @@ env_vars: { key: "INSTALL_LIBRARY_FROM_SOURCE" value: "False" } + +# Upload the docker image after successful builds. +env_vars: { + key: "TRAMPOLINE_IMAGE_UPLOAD" + value: "true" +} diff --git a/samples/snippets/test_create_assessment.py b/samples/snippets/test_create_assessment.py index fc1cdac..c28e0a2 100644 --- a/samples/snippets/test_create_assessment.py +++ b/samples/snippets/test_create_assessment.py @@ -51,10 +51,10 @@ def index() -> str: @pytest.fixture(scope="module") def browser() -> WebDriver: chrome_options = webdriver.ChromeOptions() - chrome_options.add_argument('--no-sandbox') - chrome_options.add_argument('--window-size=1420,1080') - chrome_options.add_argument('--headless') - chrome_options.add_argument('--disable-gpu') + chrome_options.add_argument("--no-sandbox") + chrome_options.add_argument("--window-size=1420,1080") + chrome_options.add_argument("--headless") + chrome_options.add_argument("--disable-gpu") browser = webdriver.Chrome(chrome_options=chrome_options) yield browser browser.close() diff --git a/samples/snippets/test_site_key.py b/samples/snippets/test_site_key.py index 1cc85c8..fb2f045 100644 --- a/samples/snippets/test_site_key.py +++ b/samples/snippets/test_site_key.py @@ -59,7 +59,7 @@ def test_update_site_key(capsys: CaptureFixture, recaptcha_site_key: str) -> Non update_site_key( project_id=GOOGLE_CLOUD_PROJECT, recaptcha_site_key=recaptcha_site_key, - domain_name=DOMAIN_NAME + domain_name=DOMAIN_NAME, ) out, _ = capsys.readouterr() assert re.search("reCAPTCHA Site key successfully updated ! ", out)