diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index a9fcd07..2567653 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -1,3 +1,3 @@ docker: - image: gcr.io/repo-automation-bots/owlbot-python:latest - digest: sha256:9743664022bd63a8084be67f144898314c7ca12f0a03e422ac17c733c129d803 + image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest + digest: sha256:87eee22d276554e4e52863ec9b1cb6a7245815dfae20439712bf644348215a5a diff --git a/.github/.OwlBot.yaml b/.github/.OwlBot.yaml index c902419..b8ea298 100644 --- a/.github/.OwlBot.yaml +++ b/.github/.OwlBot.yaml @@ -13,7 +13,7 @@ # limitations under the License. docker: - image: gcr.io/repo-automation-bots/owlbot-python:latest + image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest deep-remove-regex: - /owl-bot-staging diff --git a/.kokoro/build.sh b/.kokoro/build.sh index 52fe52f..19ae4f3 100755 --- a/.kokoro/build.sh +++ b/.kokoro/build.sh @@ -41,7 +41,7 @@ python3 -m pip install --upgrade --quiet nox python3 -m nox --version # If this is a continuous build, send the test log to the FlakyBot. -# See https://github.com/googleapis/repo-automation-bots/tree/master/packages/flakybot. +# See https://github.com/googleapis/repo-automation-bots/tree/main/packages/flakybot. if [[ $KOKORO_BUILD_ARTIFACTS_SUBDIR = *"continuous"* ]]; then cleanup() { chmod +x $KOKORO_GFILE_DIR/linux_amd64/flakybot diff --git a/.kokoro/test-samples-impl.sh b/.kokoro/test-samples-impl.sh index 311a8d5..8a324c9 100755 --- a/.kokoro/test-samples-impl.sh +++ b/.kokoro/test-samples-impl.sh @@ -80,7 +80,7 @@ for file in samples/**/requirements.txt; do EXIT=$? # If this is a periodic build, send the test log to the FlakyBot. - # See https://github.com/googleapis/repo-automation-bots/tree/master/packages/flakybot. + # See https://github.com/googleapis/repo-automation-bots/tree/main/packages/flakybot. if [[ $KOKORO_BUILD_ARTIFACTS_SUBDIR = *"periodic"* ]]; then chmod +x $KOKORO_GFILE_DIR/linux_amd64/flakybot $KOKORO_GFILE_DIR/linux_amd64/flakybot diff --git a/CHANGELOG.md b/CHANGELOG.md index 42e6826..ebd6900 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### [0.2.2](https://www.github.com/googleapis/python-gke-hub/compare/v0.2.1...v0.2.2) (2021-09-24) + + +### Bug Fixes + +* add 'dict' annotation type to 'request' ([7b07616](https://www.github.com/googleapis/python-gke-hub/commit/7b07616c8da7dc504a917634c3749c03e3445148)) + ### [0.2.1](https://www.github.com/googleapis/python-gke-hub/compare/v0.2.0...v0.2.1) (2021-08-20) diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index e5eb2e5..714084c 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -50,9 +50,9 @@ You'll have to create a development environment using a Git checkout: # Configure remotes such that you can pull changes from the googleapis/python-gke-hub # repository into your local repository. $ git remote add upstream git@github.com:googleapis/python-gke-hub.git - # fetch and merge changes from upstream into master + # fetch and merge changes from upstream into main $ git fetch upstream - $ git merge upstream/master + $ git merge upstream/main Now your local repo is set up such that you will push changes to your GitHub repo, from which you can submit a pull request. @@ -110,12 +110,12 @@ Coding Style variables:: export GOOGLE_CLOUD_TESTING_REMOTE="upstream" - export GOOGLE_CLOUD_TESTING_BRANCH="master" + export GOOGLE_CLOUD_TESTING_BRANCH="main" By doing this, you are specifying the location of the most up-to-date - version of ``python-gke-hub``. The the suggested remote name ``upstream`` - should point to the official ``googleapis`` checkout and the - the branch should be the main branch on that remote (``master``). + version of ``python-gke-hub``. The + remote name ``upstream`` should point to the official ``googleapis`` + checkout and the branch should be the default branch on that remote (``main``). - This repository contains configuration for the `pre-commit `__ tool, which automates checking @@ -209,7 +209,7 @@ The `description on PyPI`_ for the project comes directly from the ``README``. Due to the reStructuredText (``rst``) parser used by PyPI, relative links which will work on GitHub (e.g. ``CONTRIBUTING.rst`` instead of -``https://github.com/googleapis/python-gke-hub/blob/master/CONTRIBUTING.rst``) +``https://github.com/googleapis/python-gke-hub/blob/main/CONTRIBUTING.rst``) may cause problems creating links or rendering the description. .. _description on PyPI: https://pypi.org/project/google-cloud-gke-hub @@ -234,7 +234,7 @@ We support: Supported versions can be found in our ``noxfile.py`` `config`_. -.. _config: https://github.com/googleapis/python-gke-hub/blob/master/noxfile.py +.. _config: https://github.com/googleapis/python-gke-hub/blob/main/noxfile.py We also explicitly decided to support Python 3 beginning with version 3.6. diff --git a/README.rst b/README.rst index bdddff0..5ecdd4e 100644 --- a/README.rst +++ b/README.rst @@ -13,7 +13,7 @@ multiple public clouds. - `Product Documentation`_ .. |beta| image:: https://img.shields.io/badge/support-beta-orange.svg - :target: https://github.com/googleapis/google-cloud-python/blob/master/README.rst#beta-support + :target: https://github.com/googleapis/google-cloud-python/blob/main/README.rst#beta-support .. |pypi| image:: https://img.shields.io/pypi/v/google-cloud-gke-hub.svg :target: https://pypi.org/project/google-cloud-gke-hub/ .. |versions| image:: https://img.shields.io/pypi/pyversions/google-cloud-gke-hub.svg @@ -83,4 +83,4 @@ Next Steps APIs that we cover. .. _GKE Hub Product documentation: https://cloud.google.com/anthos/gke/docs/ -.. _README: https://github.com/googleapis/google-cloud-python/blob/master/README.rst +.. _README: https://github.com/googleapis/google-cloud-python/blob/main/README.rst diff --git a/docs/conf.py b/docs/conf.py index a8c0a31..e6a076b 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -76,8 +76,8 @@ # The encoding of source files. # source_encoding = 'utf-8-sig' -# The master toctree document. -master_doc = "index" +# The root toctree document. +root_doc = "index" # General information about the project. project = "google-cloud-gke-hub" @@ -280,7 +280,7 @@ # author, documentclass [howto, manual, or own class]). latex_documents = [ ( - master_doc, + root_doc, "google-cloud-gke-hub.tex", "google-cloud-gke-hub Documentation", author, @@ -315,7 +315,7 @@ # (source start file, name, description, authors, manual section). man_pages = [ ( - master_doc, + root_doc, "google-cloud-gke-hub", "google-cloud-gke-hub Documentation", [author], @@ -334,7 +334,7 @@ # dir menu entry, description, category) texinfo_documents = [ ( - master_doc, + root_doc, "google-cloud-gke-hub", "google-cloud-gke-hub Documentation", author, diff --git a/google/cloud/gkehub_v1/services/gke_hub/client.py b/google/cloud/gkehub_v1/services/gke_hub/client.py index f3ed8f7..13791ab 100644 --- a/google/cloud/gkehub_v1/services/gke_hub/client.py +++ b/google/cloud/gkehub_v1/services/gke_hub/client.py @@ -17,7 +17,7 @@ from distutils import util import os import re -from typing import Callable, Dict, Optional, Sequence, Tuple, Type, Union +from typing import Dict, Optional, Sequence, Tuple, Type, Union import pkg_resources from google.api_core import client_options as client_options_lib # type: ignore @@ -387,7 +387,7 @@ def __init__( def list_memberships( self, - request: service.ListMembershipsRequest = None, + request: Union[service.ListMembershipsRequest, dict] = None, *, parent: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -397,7 +397,7 @@ def list_memberships( r"""Lists Memberships in a given project and location. Args: - request (google.cloud.gkehub_v1.types.ListMembershipsRequest): + request (Union[google.cloud.gkehub_v1.types.ListMembershipsRequest, dict]): The request object. Request message for `GkeHub.ListMemberships` method. parent (str): @@ -467,7 +467,7 @@ def list_memberships( def list_features( self, - request: service.ListFeaturesRequest = None, + request: Union[service.ListFeaturesRequest, dict] = None, *, parent: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -477,7 +477,7 @@ def list_features( r"""Lists Features in a given project and location. Args: - request (google.cloud.gkehub_v1.types.ListFeaturesRequest): + request (Union[google.cloud.gkehub_v1.types.ListFeaturesRequest, dict]): The request object. Request message for `GkeHub.ListFeatures` method. parent (str): @@ -547,7 +547,7 @@ def list_features( def get_membership( self, - request: service.GetMembershipRequest = None, + request: Union[service.GetMembershipRequest, dict] = None, *, name: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -557,7 +557,7 @@ def get_membership( r"""Gets the details of a Membership. Args: - request (google.cloud.gkehub_v1.types.GetMembershipRequest): + request (Union[google.cloud.gkehub_v1.types.GetMembershipRequest, dict]): The request object. Request message for `GkeHub.GetMembership` method. name (str): @@ -618,7 +618,7 @@ def get_membership( def get_feature( self, - request: service.GetFeatureRequest = None, + request: Union[service.GetFeatureRequest, dict] = None, *, name: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -628,7 +628,7 @@ def get_feature( r"""Gets details of a single Feature. Args: - request (google.cloud.gkehub_v1.types.GetFeatureRequest): + request (Union[google.cloud.gkehub_v1.types.GetFeatureRequest, dict]): The request object. Request message for `GkeHub.GetFeature` method. name (str): @@ -689,7 +689,7 @@ def get_feature( def create_membership( self, - request: service.CreateMembershipRequest = None, + request: Union[service.CreateMembershipRequest, dict] = None, *, parent: str = None, resource: membership.Membership = None, @@ -705,7 +705,7 @@ def create_membership( https://cloud.google.com/anthos/multicluster-management/connect/registering-a-cluster. Args: - request (google.cloud.gkehub_v1.types.CreateMembershipRequest): + request (Union[google.cloud.gkehub_v1.types.CreateMembershipRequest, dict]): The request object. Request message for the `GkeHub.CreateMembership` method. parent (str): @@ -804,7 +804,7 @@ def create_membership( def create_feature( self, - request: service.CreateFeatureRequest = None, + request: Union[service.CreateFeatureRequest, dict] = None, *, parent: str = None, resource: feature.Feature = None, @@ -816,7 +816,7 @@ def create_feature( r"""Adds a new Feature. Args: - request (google.cloud.gkehub_v1.types.CreateFeatureRequest): + request (Union[google.cloud.gkehub_v1.types.CreateFeatureRequest, dict]): The request object. Request message for the `GkeHub.CreateFeature` method. parent (str): @@ -903,7 +903,7 @@ def create_feature( def delete_membership( self, - request: service.DeleteMembershipRequest = None, + request: Union[service.DeleteMembershipRequest, dict] = None, *, name: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -918,7 +918,7 @@ def delete_membership( https://cloud.google.com/anthos/multicluster-management/connect/unregistering-a-cluster. Args: - request (google.cloud.gkehub_v1.types.DeleteMembershipRequest): + request (Union[google.cloud.gkehub_v1.types.DeleteMembershipRequest, dict]): The request object. Request message for `GkeHub.DeleteMembership` method. name (str): @@ -1000,7 +1000,7 @@ def delete_membership( def delete_feature( self, - request: service.DeleteFeatureRequest = None, + request: Union[service.DeleteFeatureRequest, dict] = None, *, name: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -1010,7 +1010,7 @@ def delete_feature( r"""Removes a Feature. Args: - request (google.cloud.gkehub_v1.types.DeleteFeatureRequest): + request (Union[google.cloud.gkehub_v1.types.DeleteFeatureRequest, dict]): The request object. Request message for `GkeHub.DeleteFeature` method. name (str): @@ -1092,7 +1092,7 @@ def delete_feature( def update_membership( self, - request: service.UpdateMembershipRequest = None, + request: Union[service.UpdateMembershipRequest, dict] = None, *, name: str = None, resource: membership.Membership = None, @@ -1104,7 +1104,7 @@ def update_membership( r"""Updates an existing Membership. Args: - request (google.cloud.gkehub_v1.types.UpdateMembershipRequest): + request (Union[google.cloud.gkehub_v1.types.UpdateMembershipRequest, dict]): The request object. Request message for `GkeHub.UpdateMembership` method. name (str): @@ -1199,7 +1199,7 @@ def update_membership( def update_feature( self, - request: service.UpdateFeatureRequest = None, + request: Union[service.UpdateFeatureRequest, dict] = None, *, name: str = None, resource: feature.Feature = None, @@ -1211,7 +1211,7 @@ def update_feature( r"""Updates an existing Feature. Args: - request (google.cloud.gkehub_v1.types.UpdateFeatureRequest): + request (Union[google.cloud.gkehub_v1.types.UpdateFeatureRequest, dict]): The request object. Request message for `GkeHub.UpdateFeature` method. name (str): @@ -1306,7 +1306,7 @@ def update_feature( def generate_connect_manifest( self, - request: service.GenerateConnectManifestRequest = None, + request: Union[service.GenerateConnectManifestRequest, dict] = None, *, retry: retries.Retry = gapic_v1.method.DEFAULT, timeout: float = None, @@ -1318,7 +1318,7 @@ def generate_connect_manifest( Most clients should not need to call this method directly. Args: - request (google.cloud.gkehub_v1.types.GenerateConnectManifestRequest): + request (Union[google.cloud.gkehub_v1.types.GenerateConnectManifestRequest, dict]): The request object. Request message for `GkeHub.GenerateConnectManifest` method. . diff --git a/google/cloud/gkehub_v1/services/gke_hub/transports/base.py b/google/cloud/gkehub_v1/services/gke_hub/transports/base.py index 9b814e6..c8635df 100644 --- a/google/cloud/gkehub_v1/services/gke_hub/transports/base.py +++ b/google/cloud/gkehub_v1/services/gke_hub/transports/base.py @@ -119,7 +119,7 @@ def __init__( **scopes_kwargs, quota_project_id=quota_project_id ) - # If the credentials is service account credentials, then always try to use self signed JWT. + # If the credentials are service account credentials, then always try to use self signed JWT. if ( always_use_jwt_access and isinstance(credentials, service_account.Credentials) diff --git a/google/cloud/gkehub_v1/services/gke_hub/transports/grpc.py b/google/cloud/gkehub_v1/services/gke_hub/transports/grpc.py index 0d1dff5..f4dcee3 100644 --- a/google/cloud/gkehub_v1/services/gke_hub/transports/grpc.py +++ b/google/cloud/gkehub_v1/services/gke_hub/transports/grpc.py @@ -97,16 +97,16 @@ def __init__( api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint. If provided, it overrides the ``host`` argument and tries to create a mutual TLS channel with client SSL credentials from - ``client_cert_source`` or applicatin default SSL credentials. + ``client_cert_source`` or application default SSL credentials. client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]): Deprecated. A callback to provide client SSL certificate bytes and private key bytes, both in PEM format. It is ignored if ``api_mtls_endpoint`` is None. ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials - for grpc channel. It is ignored if ``channel`` is provided. + for the grpc channel. It is ignored if ``channel`` is provided. client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]): A callback to provide client certificate bytes and private key bytes, - both in PEM format. It is used to configure mutual TLS channel. It is + both in PEM format. It is used to configure a mutual TLS channel. It is ignored if ``channel`` or ``ssl_channel_credentials`` is provided. quota_project_id (Optional[str]): An optional project to use for billing and quota. diff --git a/google/cloud/gkehub_v1/services/gke_hub/transports/grpc_asyncio.py b/google/cloud/gkehub_v1/services/gke_hub/transports/grpc_asyncio.py index 2b75938..7438d46 100644 --- a/google/cloud/gkehub_v1/services/gke_hub/transports/grpc_asyncio.py +++ b/google/cloud/gkehub_v1/services/gke_hub/transports/grpc_asyncio.py @@ -144,16 +144,16 @@ def __init__( api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint. If provided, it overrides the ``host`` argument and tries to create a mutual TLS channel with client SSL credentials from - ``client_cert_source`` or applicatin default SSL credentials. + ``client_cert_source`` or application default SSL credentials. client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]): Deprecated. A callback to provide client SSL certificate bytes and private key bytes, both in PEM format. It is ignored if ``api_mtls_endpoint`` is None. ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials - for grpc channel. It is ignored if ``channel`` is provided. + for the grpc channel. It is ignored if ``channel`` is provided. client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]): A callback to provide client certificate bytes and private key bytes, - both in PEM format. It is used to configure mutual TLS channel. It is + both in PEM format. It is used to configure a mutual TLS channel. It is ignored if ``channel`` or ``ssl_channel_credentials`` is provided. quota_project_id (Optional[str]): An optional project to use for billing and quota. diff --git a/owlbot.py b/owlbot.py index 0a23467..5cf3d42 100644 --- a/owlbot.py +++ b/owlbot.py @@ -117,3 +117,4 @@ ) s.shell.run(["nox", "-s", "blacken"], hide_output=False) + diff --git a/renovate.json b/renovate.json index c048955..c21036d 100644 --- a/renovate.json +++ b/renovate.json @@ -1,6 +1,9 @@ { "extends": [ - "config:base", ":preserveSemverRanges" + "config:base", + "group:all", + ":preserveSemverRanges", + ":disableDependencyDashboard" ], "ignorePaths": [".pre-commit-config.yaml"], "pip_requirements": { diff --git a/scripts/fixup_configmanagement_v1_keywords.py b/scripts/fixup_configmanagement_v1_keywords.py index b06f1d0..d05df20 100644 --- a/scripts/fixup_configmanagement_v1_keywords.py +++ b/scripts/fixup_configmanagement_v1_keywords.py @@ -57,7 +57,7 @@ def leave_Call(self, original: cst.Call, updated: cst.Call) -> cst.CSTNode: return updated kwargs, ctrl_kwargs = partition( - lambda a: not a.keyword.value in self.CTRL_PARAMS, + lambda a: a.keyword.value not in self.CTRL_PARAMS, kwargs ) diff --git a/scripts/fixup_gkehub_v1_keywords.py b/scripts/fixup_gkehub_v1_keywords.py index a8a2a9b..fb73262 100644 --- a/scripts/fixup_gkehub_v1_keywords.py +++ b/scripts/fixup_gkehub_v1_keywords.py @@ -39,17 +39,17 @@ def partition( class gkehubCallTransformer(cst.CSTTransformer): CTRL_PARAMS: Tuple[str] = ('retry', 'timeout', 'metadata') METHOD_TO_PARAMS: Dict[str, Tuple[str]] = { - 'create_feature': ('parent', 'feature_id', 'resource', 'request_id', ), - 'create_membership': ('parent', 'membership_id', 'resource', 'request_id', ), - 'delete_feature': ('name', 'force', 'request_id', ), - 'delete_membership': ('name', 'request_id', ), - 'generate_connect_manifest': ('name', 'namespace', 'proxy', 'version', 'is_upgrade', 'registry', 'image_pull_secret_content', ), - 'get_feature': ('name', ), - 'get_membership': ('name', ), - 'list_features': ('parent', 'page_size', 'page_token', 'filter', 'order_by', ), - 'list_memberships': ('parent', 'page_size', 'page_token', 'filter', 'order_by', ), - 'update_feature': ('name', 'update_mask', 'resource', 'request_id', ), - 'update_membership': ('name', 'update_mask', 'resource', 'request_id', ), + 'create_feature': ('parent', 'feature_id', 'resource', 'request_id', ), + 'create_membership': ('parent', 'membership_id', 'resource', 'request_id', ), + 'delete_feature': ('name', 'force', 'request_id', ), + 'delete_membership': ('name', 'request_id', ), + 'generate_connect_manifest': ('name', 'namespace', 'proxy', 'version', 'is_upgrade', 'registry', 'image_pull_secret_content', ), + 'get_feature': ('name', ), + 'get_membership': ('name', ), + 'list_features': ('parent', 'page_size', 'page_token', 'filter', 'order_by', ), + 'list_memberships': ('parent', 'page_size', 'page_token', 'filter', 'order_by', ), + 'update_feature': ('name', 'update_mask', 'resource', 'request_id', ), + 'update_membership': ('name', 'update_mask', 'resource', 'request_id', ), } def leave_Call(self, original: cst.Call, updated: cst.Call) -> cst.CSTNode: @@ -68,7 +68,7 @@ def leave_Call(self, original: cst.Call, updated: cst.Call) -> cst.CSTNode: return updated kwargs, ctrl_kwargs = partition( - lambda a: not a.keyword.value in self.CTRL_PARAMS, + lambda a: a.keyword.value not in self.CTRL_PARAMS, kwargs ) diff --git a/scripts/fixup_multiclusteringress_v1_keywords.py b/scripts/fixup_multiclusteringress_v1_keywords.py index e15ebbc..8bcb5cd 100644 --- a/scripts/fixup_multiclusteringress_v1_keywords.py +++ b/scripts/fixup_multiclusteringress_v1_keywords.py @@ -57,7 +57,7 @@ def leave_Call(self, original: cst.Call, updated: cst.Call) -> cst.CSTNode: return updated kwargs, ctrl_kwargs = partition( - lambda a: not a.keyword.value in self.CTRL_PARAMS, + lambda a: a.keyword.value not in self.CTRL_PARAMS, kwargs ) diff --git a/setup.py b/setup.py index e3b8a6e..2582f4b 100644 --- a/setup.py +++ b/setup.py @@ -20,7 +20,7 @@ import setuptools # type: ignore name = "google-cloud-gke-hub" -version = "0.2.1" +version = "0.2.2" description = "GKE Hub API client library" release_status = "Development Status :: 4 - Beta" url = "https://github.com/googleapis/python-gke-hub"