From 2db1d852c70416e191dbba83a92fddd64524f7b2 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 15 Aug 2022 10:50:41 -0400 Subject: [PATCH] chore: use gapic-generator-python 1.2.0 (#15) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: use gapic-generator-python 1.2.0 PiperOrigin-RevId: 467286830 Source-Link: https://github.com/googleapis/googleapis/commit/e6e875a456c046e94eeb5a76211daa046a8e72c9 Source-Link: https://github.com/googleapis/googleapis-gen/commit/0295ea14d9cd4d47ddb23b9ebd39a31e2035e28f Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMDI5NWVhMTRkOWNkNGQ0N2RkYjIzYjllYmQzOWEzMWUyMDM1ZTI4ZiJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * remove workarounds in owlbot.py; restore 100% coverge Co-authored-by: Owl Bot Co-authored-by: Anthonios Partheniou --- .../.github/workflows/unittest.yml | 2 +- .../app_connectors_service/async_client.py | 12 +++++--- .../services/app_connectors_service/client.py | 12 +++++--- .../noxfile.py | 2 +- .../owlbot.py | 28 +------------------ .../test_app_connectors_service.py | 10 +++---- 6 files changed, 24 insertions(+), 42 deletions(-) diff --git a/packages/google-cloud-beyondcorp-appconnectors/.github/workflows/unittest.yml b/packages/google-cloud-beyondcorp-appconnectors/.github/workflows/unittest.yml index 805d71f55803..87ade4d54362 100644 --- a/packages/google-cloud-beyondcorp-appconnectors/.github/workflows/unittest.yml +++ b/packages/google-cloud-beyondcorp-appconnectors/.github/workflows/unittest.yml @@ -54,4 +54,4 @@ jobs: - name: Report coverage results run: | coverage combine .coverage-results/.coverage* - coverage report --show-missing --fail-under=98 + coverage report --show-missing --fail-under=100 diff --git a/packages/google-cloud-beyondcorp-appconnectors/google/cloud/beyondcorp_appconnectors_v1/services/app_connectors_service/async_client.py b/packages/google-cloud-beyondcorp-appconnectors/google/cloud/beyondcorp_appconnectors_v1/services/app_connectors_service/async_client.py index 341ef42c7ff3..94623d28f6e6 100644 --- a/packages/google-cloud-beyondcorp-appconnectors/google/cloud/beyondcorp_appconnectors_v1/services/app_connectors_service/async_client.py +++ b/packages/google-cloud-beyondcorp-appconnectors/google/cloud/beyondcorp_appconnectors_v1/services/app_connectors_service/async_client.py @@ -1218,9 +1218,11 @@ async def set_iam_policy( optionally specify a ``condition``, which is a logic expression that further constrains the role binding based on attributes about the request and/or target - resource. JSON Example. + resource. + + **JSON Example** - .. code-block:: python + :: { "bindings": [ @@ -1337,9 +1339,11 @@ async def get_iam_policy( optionally specify a ``condition``, which is a logic expression that further constrains the role binding based on attributes about the request and/or target - resource. JSON Example. + resource. + + **JSON Example** - .. code-block:: python + :: { "bindings": [ diff --git a/packages/google-cloud-beyondcorp-appconnectors/google/cloud/beyondcorp_appconnectors_v1/services/app_connectors_service/client.py b/packages/google-cloud-beyondcorp-appconnectors/google/cloud/beyondcorp_appconnectors_v1/services/app_connectors_service/client.py index 49ffd9bf43b0..3c594c2813a1 100644 --- a/packages/google-cloud-beyondcorp-appconnectors/google/cloud/beyondcorp_appconnectors_v1/services/app_connectors_service/client.py +++ b/packages/google-cloud-beyondcorp-appconnectors/google/cloud/beyondcorp_appconnectors_v1/services/app_connectors_service/client.py @@ -1453,9 +1453,11 @@ def set_iam_policy( optionally specify a ``condition``, which is a logic expression that further constrains the role binding based on attributes about the request and/or target - resource. JSON Example. + resource. + + **JSON Example** - .. code-block:: python + :: { "bindings": [ @@ -1572,9 +1574,11 @@ def get_iam_policy( optionally specify a ``condition``, which is a logic expression that further constrains the role binding based on attributes about the request and/or target - resource. JSON Example. + resource. + + **JSON Example** - .. code-block:: python + :: { "bindings": [ diff --git a/packages/google-cloud-beyondcorp-appconnectors/noxfile.py b/packages/google-cloud-beyondcorp-appconnectors/noxfile.py index 6019f7590a12..70739b12dd8c 100644 --- a/packages/google-cloud-beyondcorp-appconnectors/noxfile.py +++ b/packages/google-cloud-beyondcorp-appconnectors/noxfile.py @@ -265,7 +265,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") diff --git a/packages/google-cloud-beyondcorp-appconnectors/owlbot.py b/packages/google-cloud-beyondcorp-appconnectors/owlbot.py index f439659b7b2d..e13fe74f5f4e 100644 --- a/packages/google-cloud-beyondcorp-appconnectors/owlbot.py +++ b/packages/google-cloud-beyondcorp-appconnectors/owlbot.py @@ -25,32 +25,6 @@ default_version = "v1" for library in s.get_staging_dirs(default_version): - # work around issues with docstrings - s.replace( - library / "google/cloud/**/*.py", - """resource. - \*\*JSON Example\*\* - ::""", - """resource. JSON Example. - - .. code-block:: python\n""", - ) - - s.replace( - library / "google/cloud/**/*.py", - """\*\*YAML Example\*\* - ::""", - """\n **YAML Example** - - ::\n""", - ) - - s.replace(library / "google/cloud/**/*.py", - """ For a description of IAM and its features, see the `IAM - developer's""", - """\n For a description of IAM and its features, see the `IAM - developer's""" - ) s.replace(library / "google/cloud/**/*.py","\n ------------\n\n ",":") s.replace(library / "google/cloud/**/*.py","\n ----------\n\n ",":") s.move(library, excludes=["google/cloud/beyondcorp_appconnectors", "setup.py"]) @@ -61,7 +35,7 @@ # ---------------------------------------------------------------------------- templated_files = gcp.CommonTemplates().py_library( - cov_level=98, + cov_level=100, microgenerator=True, versions=gcp.common.detect_versions(path="./google", default_first=True), ) diff --git a/packages/google-cloud-beyondcorp-appconnectors/tests/unit/gapic/beyondcorp_appconnectors_v1/test_app_connectors_service.py b/packages/google-cloud-beyondcorp-appconnectors/tests/unit/gapic/beyondcorp_appconnectors_v1/test_app_connectors_service.py index d8f88700538a..5677fc8ce304 100644 --- a/packages/google-cloud-beyondcorp-appconnectors/tests/unit/gapic/beyondcorp_appconnectors_v1/test_app_connectors_service.py +++ b/packages/google-cloud-beyondcorp-appconnectors/tests/unit/gapic/beyondcorp_appconnectors_v1/test_app_connectors_service.py @@ -3158,7 +3158,7 @@ def test_delete_operation(transport: str = "grpc"): @pytest.mark.asyncio -async def test_delete_operation(transport: str = "grpc"): +async def test_delete_operation_async(transport: str = "grpc"): client = AppConnectorsServiceAsyncClient( credentials=ga_credentials.AnonymousCredentials(), transport=transport, @@ -3297,7 +3297,7 @@ def test_cancel_operation(transport: str = "grpc"): @pytest.mark.asyncio -async def test_cancel_operation(transport: str = "grpc"): +async def test_cancel_operation_async(transport: str = "grpc"): client = AppConnectorsServiceAsyncClient( credentials=ga_credentials.AnonymousCredentials(), transport=transport, @@ -3436,7 +3436,7 @@ def test_get_operation(transport: str = "grpc"): @pytest.mark.asyncio -async def test_get_operation(transport: str = "grpc"): +async def test_get_operation_async(transport: str = "grpc"): client = AppConnectorsServiceAsyncClient( credentials=ga_credentials.AnonymousCredentials(), transport=transport, @@ -3581,7 +3581,7 @@ def test_list_operations(transport: str = "grpc"): @pytest.mark.asyncio -async def test_list_operations(transport: str = "grpc"): +async def test_list_operations_async(transport: str = "grpc"): client = AppConnectorsServiceAsyncClient( credentials=ga_credentials.AnonymousCredentials(), transport=transport, @@ -3726,7 +3726,7 @@ def test_list_locations(transport: str = "grpc"): @pytest.mark.asyncio -async def test_list_locations(transport: str = "grpc"): +async def test_list_locations_async(transport: str = "grpc"): client = AppConnectorsServiceAsyncClient( credentials=ga_credentials.AnonymousCredentials(), transport=transport,