Skip to content

Commit

Permalink
chore: use gapic-generator-python 1.2.0 (#192)
Browse files Browse the repository at this point in the history
* chore: use gapic-generator-python 1.2.0

PiperOrigin-RevId: 467286830

Source-Link: googleapis/googleapis@e6e875a

Source-Link: googleapis/googleapis-gen@0295ea1
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 <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: Anthonios Partheniou <partheniou@google.com>
  • Loading branch information
3 people authored Aug 16, 2022
1 parent cdea04e commit 8b2ee04
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 44 deletions.
2 changes: 1 addition & 1 deletion packages/google-cloud-gke-hub/.coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ branch = True
[report]
show_missing = True
omit =
google/cloud/gkehub/multiclusteringress/__init__.py
google/cloud/gkehub/__init__.py
exclude_lines =
# Re-enable the standard pragma
pragma: NO COVER
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,4 @@ jobs:
- name: Report coverage results
run: |
coverage combine .coverage-results/.coverage*
coverage report --show-missing --fail-under=99
coverage report --show-missing --fail-under=100
Original file line number Diff line number Diff line change
Expand Up @@ -1329,9 +1329,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.
.. code-block:: python
**JSON Example**
::
{
"bindings": [
Expand Down Expand Up @@ -1376,6 +1378,7 @@ async def set_iam_policy(
description: Does not grant access after Sep 2020
expression: request.time < timestamp('2020-10-01T00:00:00.000Z')
For a description of IAM and its features, see the `IAM
developer's
guide <https://cloud.google.com/iam/docs>`__.
Expand Down Expand Up @@ -1448,9 +1451,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.
.. code-block:: python
**JSON Example**
::
{
"bindings": [
Expand Down Expand Up @@ -1495,6 +1500,7 @@ async def get_iam_policy(
description: Does not grant access after Sep 2020
expression: request.time < timestamp('2020-10-01T00:00:00.000Z')
For a description of IAM and its features, see the `IAM
developer's
guide <https://cloud.google.com/iam/docs>`__.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1569,9 +1569,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.
.. code-block:: python
**JSON Example**
::
{
"bindings": [
Expand Down Expand Up @@ -1616,6 +1618,7 @@ def set_iam_policy(
description: Does not grant access after Sep 2020
expression: request.time < timestamp('2020-10-01T00:00:00.000Z')
For a description of IAM and its features, see the `IAM
developer's
guide <https://cloud.google.com/iam/docs>`__.
Expand Down Expand Up @@ -1688,9 +1691,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.
.. code-block:: python
**JSON Example**
::
{
"bindings": [
Expand Down Expand Up @@ -1735,6 +1740,7 @@ def get_iam_policy(
description: Does not grant access after Sep 2020
expression: request.time < timestamp('2020-10-01T00:00:00.000Z')
For a description of IAM and its features, see the `IAM
developer's
guide <https://cloud.google.com/iam/docs>`__.
Expand Down
2 changes: 1 addition & 1 deletion packages/google-cloud-gke-hub/noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -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=99")
session.run("coverage", "report", "--show-missing", "--fail-under=100")

session.run("coverage", "erase")

Expand Down
29 changes: 1 addition & 28 deletions packages/google-cloud-gke-hub/owlbot.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,33 +80,6 @@
//container.googleapis.com/projects/my-"""
)

# 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"""
)

excludes=[
"setup.py",
"README.rst",
Expand Down Expand Up @@ -166,7 +139,7 @@
# Add templated files
# ----------------------------------------------------------------------------

templated_files = common.py_library(cov_level=99, microgenerator=True)
templated_files = common.py_library(microgenerator=True)
python.py_samples(skip_readmes=True)

# the microgenerator has a good coveragerc file
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3371,7 +3371,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 = GkeHubMembershipServiceAsyncClient(
credentials=ga_credentials.AnonymousCredentials(),
transport=transport,
Expand Down Expand Up @@ -3510,7 +3510,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 = GkeHubMembershipServiceAsyncClient(
credentials=ga_credentials.AnonymousCredentials(),
transport=transport,
Expand Down Expand Up @@ -3649,7 +3649,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 = GkeHubMembershipServiceAsyncClient(
credentials=ga_credentials.AnonymousCredentials(),
transport=transport,
Expand Down Expand Up @@ -3794,7 +3794,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 = GkeHubMembershipServiceAsyncClient(
credentials=ga_credentials.AnonymousCredentials(),
transport=transport,
Expand Down Expand Up @@ -3939,7 +3939,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 = GkeHubMembershipServiceAsyncClient(
credentials=ga_credentials.AnonymousCredentials(),
transport=transport,
Expand Down

0 comments on commit 8b2ee04

Please sign in to comment.