From 2f32e7ef9c42241027e870ee9512f7b8c36951c2 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 22 Nov 2022 12:53:51 -0500 Subject: [PATCH] chore: Update gapic-generator-python to v1.6.1 (#149) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: update to gapic-generator-python 1.5.0 feat: add support for `google.cloud..__version__` PiperOrigin-RevId: 484665853 Source-Link: https://github.com/googleapis/googleapis/commit/8eb249a19db926c2fbc4ecf1dc09c0e521a88b22 Source-Link: https://github.com/googleapis/googleapis-gen/commit/c8aa327b5f478865fc3fd91e3c2768e54e26ad44 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYzhhYTMyN2I1ZjQ3ODg2NWZjM2ZkOTFlM2MyNzY4ZTU0ZTI2YWQ0NCJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * update version in gapic_version.py * add .release-please-manifest.json with correct version * add owlbot.py to exclude generated gapic_version.py * set manifest to true in .github/release-please.yml * add release-please-config.json * chore: Update to gapic-generator-python 1.6.0 feat(python): Add typing to proto.Message based class attributes feat(python): Snippetgen handling of repeated enum field PiperOrigin-RevId: 487326846 Source-Link: https://github.com/googleapis/googleapis/commit/da380c77bb87ba0f752baf07605dd1db30e1f7e1 Source-Link: https://github.com/googleapis/googleapis-gen/commit/61ef5762ee6731a0cbbfea22fd0eecee51ab1c8e Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNjFlZjU3NjJlZTY3MzFhMGNiYmZlYTIyZmQwZWVjZWU1MWFiMWM4ZSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * feat: new APIs added to reflect updates to the filestore service - Add ENTERPRISE Tier - Add snapshot APIs: RevertInstance, ListSnapshots, CreateSnapshot, DeleteSnapshot, UpdateSnapshot - Add multi-share APIs: ListShares, GetShare, CreateShare, DeleteShare, UpdateShare - Add ConnectMode to NetworkConfig (for Private Service Access support) - New status codes (SUSPENDED/SUSPENDING, REVERTING/RESUMING) - Add SuspensionReason (for KMS related suspension) - Add new fields to Instance information: max_capacity_gb, capacity_step_size_gb, max_share_count, capacity_gb, multi_share_enabled PiperOrigin-RevId: 487492758 Source-Link: https://github.com/googleapis/googleapis/commit/5be5981f50322cf0c7388595e0f31ac5d0693469 Source-Link: https://github.com/googleapis/googleapis-gen/commit/ab0e217f560cc2c1afc11441c2eab6b6950efd2b Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYWIwZTIxN2Y1NjBjYzJjMWFmYzExNDQxYzJlYWI2YjY5NTBlZmQyYiJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * update path to snippet metadata json * chore: Update gapic-generator-python to v1.6.1 PiperOrigin-RevId: 488036204 Source-Link: https://github.com/googleapis/googleapis/commit/08f275f5c1c0d99056e1cb68376323414459ee19 Source-Link: https://github.com/googleapis/googleapis-gen/commit/555c0945e60649e38739ae64bc45719cdf72178f Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNTU1YzA5NDVlNjA2NDllMzg3MzlhZTY0YmM0NTcxOWNkZjcyMTc4ZiJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot Co-authored-by: Anthonios Partheniou --- .../.github/release-please.yml | 1 + .../.release-please-manifest.json | 3 + .../docs/data_fusion_v1/types.rst | 1 - .../google/cloud/data_fusion/__init__.py | 4 + .../google/cloud/data_fusion/gapic_version.py | 16 ++ .../google/cloud/data_fusion_v1/__init__.py | 4 + .../services/data_fusion/async_client.py | 72 ++++---- .../services/data_fusion/client.py | 64 ++++--- .../services/data_fusion/transports/base.py | 2 +- .../services/data_fusion/transports/grpc.py | 20 +-- .../data_fusion/transports/grpc_asyncio.py | 16 +- .../cloud/data_fusion_v1/types/datafusion.py | 156 +++++++++--------- packages/google-cloud-data-fusion/owlbot.py | 56 +++++++ .../release-please-config.json | 23 +++ ..._metadata_google.cloud.datafusion.v1.json} | 3 +- packages/google-cloud-data-fusion/setup.py | 35 ++-- .../testing/constraints-3.10.txt | 6 + .../testing/constraints-3.11.txt | 6 + .../testing/constraints-3.7.txt | 2 +- .../testing/constraints-3.8.txt | 6 + .../testing/constraints-3.9.txt | 6 + .../gapic/data_fusion_v1/test_data_fusion.py | 1 + 22 files changed, 336 insertions(+), 167 deletions(-) create mode 100644 packages/google-cloud-data-fusion/.release-please-manifest.json create mode 100644 packages/google-cloud-data-fusion/google/cloud/data_fusion/gapic_version.py create mode 100644 packages/google-cloud-data-fusion/owlbot.py create mode 100644 packages/google-cloud-data-fusion/release-please-config.json rename packages/google-cloud-data-fusion/samples/generated_samples/{snippet_metadata_data fusion_v1.json => snippet_metadata_google.cloud.datafusion.v1.json} (99%) diff --git a/packages/google-cloud-data-fusion/.github/release-please.yml b/packages/google-cloud-data-fusion/.github/release-please.yml index 6def37a84c98..e9a4f0085128 100644 --- a/packages/google-cloud-data-fusion/.github/release-please.yml +++ b/packages/google-cloud-data-fusion/.github/release-please.yml @@ -1,5 +1,6 @@ releaseType: python handleGHRelease: true +manifest: true # NOTE: this section is generated by synthtool.languages.python # See https://github.com/googleapis/synthtool/blob/master/synthtool/languages/python.py branches: diff --git a/packages/google-cloud-data-fusion/.release-please-manifest.json b/packages/google-cloud-data-fusion/.release-please-manifest.json new file mode 100644 index 000000000000..1adaf630d278 --- /dev/null +++ b/packages/google-cloud-data-fusion/.release-please-manifest.json @@ -0,0 +1,3 @@ +{ + ".": "1.5.3" +} diff --git a/packages/google-cloud-data-fusion/docs/data_fusion_v1/types.rst b/packages/google-cloud-data-fusion/docs/data_fusion_v1/types.rst index 8375804ed200..bbe632444b6e 100644 --- a/packages/google-cloud-data-fusion/docs/data_fusion_v1/types.rst +++ b/packages/google-cloud-data-fusion/docs/data_fusion_v1/types.rst @@ -3,5 +3,4 @@ Types for Google Cloud Data Fusion v1 API .. automodule:: google.cloud.data_fusion_v1.types :members: - :undoc-members: :show-inheritance: diff --git a/packages/google-cloud-data-fusion/google/cloud/data_fusion/__init__.py b/packages/google-cloud-data-fusion/google/cloud/data_fusion/__init__.py index 60c0bb1f6166..0ba0c0653f49 100644 --- a/packages/google-cloud-data-fusion/google/cloud/data_fusion/__init__.py +++ b/packages/google-cloud-data-fusion/google/cloud/data_fusion/__init__.py @@ -13,6 +13,10 @@ # See the License for the specific language governing permissions and # limitations under the License. # +from google.cloud.data_fusion import gapic_version as package_version + +__version__ = package_version.__version__ + from google.cloud.data_fusion_v1.services.data_fusion.async_client import ( DataFusionAsyncClient, diff --git a/packages/google-cloud-data-fusion/google/cloud/data_fusion/gapic_version.py b/packages/google-cloud-data-fusion/google/cloud/data_fusion/gapic_version.py new file mode 100644 index 000000000000..943734048cd8 --- /dev/null +++ b/packages/google-cloud-data-fusion/google/cloud/data_fusion/gapic_version.py @@ -0,0 +1,16 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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. +# +__version__ = "1.5.3" # {x-release-please-version} diff --git a/packages/google-cloud-data-fusion/google/cloud/data_fusion_v1/__init__.py b/packages/google-cloud-data-fusion/google/cloud/data_fusion_v1/__init__.py index 9a6461b7a345..e1e02b328325 100644 --- a/packages/google-cloud-data-fusion/google/cloud/data_fusion_v1/__init__.py +++ b/packages/google-cloud-data-fusion/google/cloud/data_fusion_v1/__init__.py @@ -13,6 +13,10 @@ # See the License for the specific language governing permissions and # limitations under the License. # +from google.cloud.data_fusion import gapic_version as package_version + +__version__ = package_version.__version__ + from .services.data_fusion import DataFusionAsyncClient, DataFusionClient from .types.datafusion import ( diff --git a/packages/google-cloud-data-fusion/google/cloud/data_fusion_v1/services/data_fusion/async_client.py b/packages/google-cloud-data-fusion/google/cloud/data_fusion_v1/services/data_fusion/async_client.py index 3d188be5d939..5f7d8c6bdd7f 100644 --- a/packages/google-cloud-data-fusion/google/cloud/data_fusion_v1/services/data_fusion/async_client.py +++ b/packages/google-cloud-data-fusion/google/cloud/data_fusion_v1/services/data_fusion/async_client.py @@ -16,7 +16,17 @@ from collections import OrderedDict import functools import re -from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union +from typing import ( + Dict, + Mapping, + MutableMapping, + MutableSequence, + Optional, + Sequence, + Tuple, + Type, + Union, +) from google.api_core import exceptions as core_exceptions from google.api_core import gapic_v1 @@ -164,9 +174,9 @@ def transport(self) -> DataFusionTransport: def __init__( self, *, - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, transport: Union[str, DataFusionTransport] = "grpc_asyncio", - client_options: ClientOptions = None, + client_options: Optional[ClientOptions] = None, client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, ) -> None: """Instantiates the data fusion client. @@ -210,11 +220,11 @@ def __init__( async def list_available_versions( self, - request: Union[datafusion.ListAvailableVersionsRequest, dict] = None, + request: Optional[Union[datafusion.ListAvailableVersionsRequest, dict]] = None, *, - parent: str = None, + parent: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListAvailableVersionsAsyncPager: r"""Lists possible versions for Data Fusion instances in @@ -248,7 +258,7 @@ async def sample_list_available_versions(): print(response) Args: - request (Union[google.cloud.data_fusion_v1.types.ListAvailableVersionsRequest, dict]): + request (Optional[Union[google.cloud.data_fusion_v1.types.ListAvailableVersionsRequest, dict]]): The request object. Request message for the list available versions request. parent (:class:`str`): @@ -328,10 +338,10 @@ async def sample_list_available_versions(): async def list_instances( self, - request: Union[datafusion.ListInstancesRequest, dict] = None, + request: Optional[Union[datafusion.ListInstancesRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListInstancesAsyncPager: r"""Lists Data Fusion instances in the specified project @@ -365,7 +375,7 @@ async def sample_list_instances(): print(response) Args: - request (Union[google.cloud.data_fusion_v1.types.ListInstancesRequest, dict]): + request (Optional[Union[google.cloud.data_fusion_v1.types.ListInstancesRequest, dict]]): The request object. Request message for listing Data Fusion instances. retry (google.api_core.retry.Retry): Designation of what errors, if any, @@ -422,10 +432,10 @@ async def sample_list_instances(): async def get_instance( self, - request: Union[datafusion.GetInstanceRequest, dict] = None, + request: Optional[Union[datafusion.GetInstanceRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> datafusion.Instance: r"""Gets details of a single Data Fusion instance. @@ -457,7 +467,7 @@ async def sample_get_instance(): print(response) Args: - request (Union[google.cloud.data_fusion_v1.types.GetInstanceRequest, dict]): + request (Optional[Union[google.cloud.data_fusion_v1.types.GetInstanceRequest, dict]]): The request object. Request message for getting details about a Data Fusion instance. retry (google.api_core.retry.Retry): Designation of what errors, if any, @@ -500,13 +510,13 @@ async def sample_get_instance(): async def create_instance( self, - request: Union[datafusion.CreateInstanceRequest, dict] = None, + request: Optional[Union[datafusion.CreateInstanceRequest, dict]] = None, *, - parent: str = None, - instance: datafusion.Instance = None, - instance_id: str = None, + parent: Optional[str] = None, + instance: Optional[datafusion.Instance] = None, + instance_id: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> operation_async.AsyncOperation: r"""Creates a new Data Fusion instance in the specified @@ -544,7 +554,7 @@ async def sample_create_instance(): print(response) Args: - request (Union[google.cloud.data_fusion_v1.types.CreateInstanceRequest, dict]): + request (Optional[Union[google.cloud.data_fusion_v1.types.CreateInstanceRequest, dict]]): The request object. Request message for creating a Data Fusion instance. parent (:class:`str`): @@ -638,11 +648,11 @@ async def sample_create_instance(): async def delete_instance( self, - request: Union[datafusion.DeleteInstanceRequest, dict] = None, + request: Optional[Union[datafusion.DeleteInstanceRequest, dict]] = None, *, - name: str = None, + name: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> operation_async.AsyncOperation: r"""Deletes a single Date Fusion instance. @@ -678,7 +688,7 @@ async def sample_delete_instance(): print(response) Args: - request (Union[google.cloud.data_fusion_v1.types.DeleteInstanceRequest, dict]): + request (Optional[Union[google.cloud.data_fusion_v1.types.DeleteInstanceRequest, dict]]): The request object. Request message for deleting a Data Fusion instance. name (:class:`str`): @@ -763,12 +773,12 @@ async def sample_delete_instance(): async def update_instance( self, - request: Union[datafusion.UpdateInstanceRequest, dict] = None, + request: Optional[Union[datafusion.UpdateInstanceRequest, dict]] = None, *, - instance: datafusion.Instance = None, - update_mask: field_mask_pb2.FieldMask = None, + instance: Optional[datafusion.Instance] = None, + update_mask: Optional[field_mask_pb2.FieldMask] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> operation_async.AsyncOperation: r"""Updates a single Data Fusion instance. @@ -807,7 +817,7 @@ async def sample_update_instance(): print(response) Args: - request (Union[google.cloud.data_fusion_v1.types.UpdateInstanceRequest, dict]): + request (Optional[Union[google.cloud.data_fusion_v1.types.UpdateInstanceRequest, dict]]): The request object. Request message for updating a Data Fusion instance. Data Fusion allows updating the labels, options, and stack driver settings. This is also used @@ -906,10 +916,10 @@ async def sample_update_instance(): async def restart_instance( self, - request: Union[datafusion.RestartInstanceRequest, dict] = None, + request: Optional[Union[datafusion.RestartInstanceRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> operation_async.AsyncOperation: r"""Restart a single Data Fusion instance. @@ -946,7 +956,7 @@ async def sample_restart_instance(): print(response) Args: - request (Union[google.cloud.data_fusion_v1.types.RestartInstanceRequest, dict]): + request (Optional[Union[google.cloud.data_fusion_v1.types.RestartInstanceRequest, dict]]): The request object. Request message for restarting a Data Fusion instance. retry (google.api_core.retry.Retry): Designation of what errors, if any, diff --git a/packages/google-cloud-data-fusion/google/cloud/data_fusion_v1/services/data_fusion/client.py b/packages/google-cloud-data-fusion/google/cloud/data_fusion_v1/services/data_fusion/client.py index 13b6c230f626..307a346417c4 100644 --- a/packages/google-cloud-data-fusion/google/cloud/data_fusion_v1/services/data_fusion/client.py +++ b/packages/google-cloud-data-fusion/google/cloud/data_fusion_v1/services/data_fusion/client.py @@ -16,7 +16,18 @@ from collections import OrderedDict import os import re -from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union +from typing import ( + Dict, + Mapping, + MutableMapping, + MutableSequence, + Optional, + Sequence, + Tuple, + Type, + Union, + cast, +) from google.api_core import client_options as client_options_lib from google.api_core import exceptions as core_exceptions @@ -62,7 +73,7 @@ class DataFusionClientMeta(type): def get_transport_class( cls, - label: str = None, + label: Optional[str] = None, ) -> Type[DataFusionTransport]: """Returns an appropriate transport class. @@ -364,8 +375,8 @@ def __init__( self, *, credentials: Optional[ga_credentials.Credentials] = None, - transport: Union[str, DataFusionTransport, None] = None, - client_options: Optional[client_options_lib.ClientOptions] = None, + transport: Optional[Union[str, DataFusionTransport]] = None, + client_options: Optional[Union[client_options_lib.ClientOptions, dict]] = None, client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, ) -> None: """Instantiates the data fusion client. @@ -379,7 +390,7 @@ def __init__( transport (Union[str, DataFusionTransport]): The transport to use. If set to None, a transport is chosen automatically. - client_options (google.api_core.client_options.ClientOptions): Custom options for the + client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. It won't take effect if a ``transport`` instance is provided. (1) The ``api_endpoint`` property can be used to override the default endpoint provided by the client. GOOGLE_API_USE_MTLS_ENDPOINT @@ -409,6 +420,7 @@ def __init__( client_options = client_options_lib.from_dict(client_options) if client_options is None: client_options = client_options_lib.ClientOptions() + client_options = cast(client_options_lib.ClientOptions, client_options) api_endpoint, client_cert_source_func = self.get_mtls_endpoint_and_cert_source( client_options @@ -461,11 +473,11 @@ def __init__( def list_available_versions( self, - request: Union[datafusion.ListAvailableVersionsRequest, dict] = None, + request: Optional[Union[datafusion.ListAvailableVersionsRequest, dict]] = None, *, - parent: str = None, + parent: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListAvailableVersionsPager: r"""Lists possible versions for Data Fusion instances in @@ -579,10 +591,10 @@ def sample_list_available_versions(): def list_instances( self, - request: Union[datafusion.ListInstancesRequest, dict] = None, + request: Optional[Union[datafusion.ListInstancesRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListInstancesPager: r"""Lists Data Fusion instances in the specified project @@ -674,10 +686,10 @@ def sample_list_instances(): def get_instance( self, - request: Union[datafusion.GetInstanceRequest, dict] = None, + request: Optional[Union[datafusion.GetInstanceRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> datafusion.Instance: r"""Gets details of a single Data Fusion instance. @@ -753,13 +765,13 @@ def sample_get_instance(): def create_instance( self, - request: Union[datafusion.CreateInstanceRequest, dict] = None, + request: Optional[Union[datafusion.CreateInstanceRequest, dict]] = None, *, - parent: str = None, - instance: datafusion.Instance = None, - instance_id: str = None, + parent: Optional[str] = None, + instance: Optional[datafusion.Instance] = None, + instance_id: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> operation.Operation: r"""Creates a new Data Fusion instance in the specified @@ -891,11 +903,11 @@ def sample_create_instance(): def delete_instance( self, - request: Union[datafusion.DeleteInstanceRequest, dict] = None, + request: Optional[Union[datafusion.DeleteInstanceRequest, dict]] = None, *, - name: str = None, + name: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> operation.Operation: r"""Deletes a single Date Fusion instance. @@ -1016,12 +1028,12 @@ def sample_delete_instance(): def update_instance( self, - request: Union[datafusion.UpdateInstanceRequest, dict] = None, + request: Optional[Union[datafusion.UpdateInstanceRequest, dict]] = None, *, - instance: datafusion.Instance = None, - update_mask: field_mask_pb2.FieldMask = None, + instance: Optional[datafusion.Instance] = None, + update_mask: Optional[field_mask_pb2.FieldMask] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> operation.Operation: r"""Updates a single Data Fusion instance. @@ -1159,10 +1171,10 @@ def sample_update_instance(): def restart_instance( self, - request: Union[datafusion.RestartInstanceRequest, dict] = None, + request: Optional[Union[datafusion.RestartInstanceRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> operation.Operation: r"""Restart a single Data Fusion instance. diff --git a/packages/google-cloud-data-fusion/google/cloud/data_fusion_v1/services/data_fusion/transports/base.py b/packages/google-cloud-data-fusion/google/cloud/data_fusion_v1/services/data_fusion/transports/base.py index e051521a84ef..3c6d7a204cdb 100644 --- a/packages/google-cloud-data-fusion/google/cloud/data_fusion_v1/services/data_fusion/transports/base.py +++ b/packages/google-cloud-data-fusion/google/cloud/data_fusion_v1/services/data_fusion/transports/base.py @@ -49,7 +49,7 @@ def __init__( self, *, host: str = DEFAULT_HOST, - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, quota_project_id: Optional[str] = None, diff --git a/packages/google-cloud-data-fusion/google/cloud/data_fusion_v1/services/data_fusion/transports/grpc.py b/packages/google-cloud-data-fusion/google/cloud/data_fusion_v1/services/data_fusion/transports/grpc.py index d2ec5c169c4b..110d25cec72d 100644 --- a/packages/google-cloud-data-fusion/google/cloud/data_fusion_v1/services/data_fusion/transports/grpc.py +++ b/packages/google-cloud-data-fusion/google/cloud/data_fusion_v1/services/data_fusion/transports/grpc.py @@ -49,14 +49,14 @@ def __init__( self, *, host: str = "datafusion.googleapis.com", - credentials: ga_credentials.Credentials = None, - credentials_file: str = None, - scopes: Sequence[str] = None, - channel: grpc.Channel = None, - api_mtls_endpoint: str = None, - client_cert_source: Callable[[], Tuple[bytes, bytes]] = None, - ssl_channel_credentials: grpc.ChannelCredentials = None, - client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None, + credentials: Optional[ga_credentials.Credentials] = None, + credentials_file: Optional[str] = None, + scopes: Optional[Sequence[str]] = None, + channel: Optional[grpc.Channel] = None, + api_mtls_endpoint: Optional[str] = None, + client_cert_source: Optional[Callable[[], Tuple[bytes, bytes]]] = None, + ssl_channel_credentials: Optional[grpc.ChannelCredentials] = None, + client_cert_source_for_mtls: Optional[Callable[[], Tuple[bytes, bytes]]] = None, quota_project_id: Optional[str] = None, client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, always_use_jwt_access: Optional[bool] = False, @@ -184,8 +184,8 @@ def __init__( def create_channel( cls, host: str = "datafusion.googleapis.com", - credentials: ga_credentials.Credentials = None, - credentials_file: str = None, + credentials: Optional[ga_credentials.Credentials] = None, + credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, quota_project_id: Optional[str] = None, **kwargs, diff --git a/packages/google-cloud-data-fusion/google/cloud/data_fusion_v1/services/data_fusion/transports/grpc_asyncio.py b/packages/google-cloud-data-fusion/google/cloud/data_fusion_v1/services/data_fusion/transports/grpc_asyncio.py index e4c670c0c0d1..e1b8f7eb872d 100644 --- a/packages/google-cloud-data-fusion/google/cloud/data_fusion_v1/services/data_fusion/transports/grpc_asyncio.py +++ b/packages/google-cloud-data-fusion/google/cloud/data_fusion_v1/services/data_fusion/transports/grpc_asyncio.py @@ -51,7 +51,7 @@ class DataFusionGrpcAsyncIOTransport(DataFusionTransport): def create_channel( cls, host: str = "datafusion.googleapis.com", - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, quota_project_id: Optional[str] = None, @@ -94,15 +94,15 @@ def __init__( self, *, host: str = "datafusion.googleapis.com", - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, - channel: aio.Channel = None, - api_mtls_endpoint: str = None, - client_cert_source: Callable[[], Tuple[bytes, bytes]] = None, - ssl_channel_credentials: grpc.ChannelCredentials = None, - client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None, - quota_project_id=None, + channel: Optional[aio.Channel] = None, + api_mtls_endpoint: Optional[str] = None, + client_cert_source: Optional[Callable[[], Tuple[bytes, bytes]]] = None, + ssl_channel_credentials: Optional[grpc.ChannelCredentials] = None, + client_cert_source_for_mtls: Optional[Callable[[], Tuple[bytes, bytes]]] = None, + quota_project_id: Optional[str] = None, client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, always_use_jwt_access: Optional[bool] = False, api_audience: Optional[str] = None, diff --git a/packages/google-cloud-data-fusion/google/cloud/data_fusion_v1/types/datafusion.py b/packages/google-cloud-data-fusion/google/cloud/data_fusion_v1/types/datafusion.py index 522955397846..a47359f8154f 100644 --- a/packages/google-cloud-data-fusion/google/cloud/data_fusion_v1/types/datafusion.py +++ b/packages/google-cloud-data-fusion/google/cloud/data_fusion_v1/types/datafusion.py @@ -13,6 +13,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # +from typing import MutableMapping, MutableSequence + from google.protobuf import field_mask_pb2 # type: ignore from google.protobuf import timestamp_pb2 # type: ignore import proto # type: ignore @@ -64,11 +66,11 @@ class NetworkConfig(proto.Message): the customer network. """ - network = proto.Field( + network: str = proto.Field( proto.STRING, number=1, ) - ip_allocation = proto.Field( + ip_allocation: str = proto.Field( proto.STRING, number=2, ) @@ -86,7 +88,7 @@ class Version(proto.Message): default_version (bool): Whether this is currently the default version for Cloud Data Fusion - available_features (Sequence[str]): + available_features (MutableSequence[str]): Represents a list of available feature names for a given version. type_ (google.cloud.data_fusion_v1.types.Version.Type): @@ -102,19 +104,19 @@ class Type(proto.Enum): TYPE_PREVIEW = 1 TYPE_GENERAL_AVAILABILITY = 2 - version_number = proto.Field( + version_number: str = proto.Field( proto.STRING, number=1, ) - default_version = proto.Field( + default_version: bool = proto.Field( proto.BOOL, number=2, ) - available_features = proto.RepeatedField( + available_features: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=3, ) - type_ = proto.Field( + type_: Type = proto.Field( proto.ENUM, number=4, enum=Type, @@ -147,12 +149,12 @@ class State(proto.Enum): DISABLED = 2 UNKNOWN = 3 - accelerator_type = proto.Field( + accelerator_type: AcceleratorType = proto.Field( proto.ENUM, number=1, enum=AcceleratorType, ) - state = proto.Field( + state: State = proto.Field( proto.ENUM, number=2, enum=State, @@ -171,7 +173,7 @@ class CryptoKeyConfig(proto.Message): ``projects/*/locations/*/keyRings/*/cryptoKeys/*``. """ - key_reference = proto.Field( + key_reference: str = proto.Field( proto.STRING, number=1, ) @@ -202,12 +204,12 @@ class Instance(proto.Message): Network configuration options. These are required when a private Data Fusion instance is to be created. - labels (Mapping[str, str]): + labels (MutableMapping[str, str]): The resource labels for instance to use to annotate any related underlying resources such as Compute Engine VMs. The character '=' is not allowed to be used within the labels. - options (Mapping[str, str]): + options (MutableMapping[str, str]): Map of additional options used to configure the behavior of Data Fusion instance. create_time (google.protobuf.timestamp_pb2.Timestamp): @@ -238,7 +240,7 @@ class Instance(proto.Message): extract the tenant project ID. display_name (str): Display name for an instance. - available_version (Sequence[google.cloud.data_fusion_v1.types.Version]): + available_version (MutableSequence[google.cloud.data_fusion_v1.types.Version]): Available versions that the instance can be upgraded to using UpdateInstanceRequest. api_endpoint (str): @@ -247,7 +249,7 @@ class Instance(proto.Message): gcs_bucket (str): Output only. Cloud Storage bucket generated by Data Fusion in the customer project. - accelerators (Sequence[google.cloud.data_fusion_v1.types.Accelerator]): + accelerators (MutableSequence[google.cloud.data_fusion_v1.types.Accelerator]): List of accelerators enabled for this CDF instance. p4_service_account (str): @@ -269,7 +271,7 @@ class Instance(proto.Message): The crypto key configuration. This field is used by the Customer-Managed Encryption Keys (CMEK) feature. - disabled_reason (Sequence[google.cloud.data_fusion_v1.types.Instance.DisabledReason]): + disabled_reason (MutableSequence[google.cloud.data_fusion_v1.types.Instance.DisabledReason]): Output only. If the instance state is DISABLED, the reason for disabling the instance. """ @@ -304,125 +306,125 @@ class DisabledReason(proto.Enum): DISABLED_REASON_UNSPECIFIED = 0 KMS_KEY_ISSUE = 1 - name = proto.Field( + name: str = proto.Field( proto.STRING, number=1, ) - description = proto.Field( + description: str = proto.Field( proto.STRING, number=2, ) - type_ = proto.Field( + type_: Type = proto.Field( proto.ENUM, number=3, enum=Type, ) - enable_stackdriver_logging = proto.Field( + enable_stackdriver_logging: bool = proto.Field( proto.BOOL, number=4, ) - enable_stackdriver_monitoring = proto.Field( + enable_stackdriver_monitoring: bool = proto.Field( proto.BOOL, number=5, ) - private_instance = proto.Field( + private_instance: bool = proto.Field( proto.BOOL, number=6, ) - network_config = proto.Field( + network_config: "NetworkConfig" = proto.Field( proto.MESSAGE, number=7, message="NetworkConfig", ) - labels = proto.MapField( + labels: MutableMapping[str, str] = proto.MapField( proto.STRING, proto.STRING, number=8, ) - options = proto.MapField( + options: MutableMapping[str, str] = proto.MapField( proto.STRING, proto.STRING, number=9, ) - create_time = proto.Field( + create_time: timestamp_pb2.Timestamp = proto.Field( proto.MESSAGE, number=10, message=timestamp_pb2.Timestamp, ) - update_time = proto.Field( + update_time: timestamp_pb2.Timestamp = proto.Field( proto.MESSAGE, number=11, message=timestamp_pb2.Timestamp, ) - state = proto.Field( + state: State = proto.Field( proto.ENUM, number=12, enum=State, ) - state_message = proto.Field( + state_message: str = proto.Field( proto.STRING, number=13, ) - service_endpoint = proto.Field( + service_endpoint: str = proto.Field( proto.STRING, number=14, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=15, ) - version = proto.Field( + version: str = proto.Field( proto.STRING, number=16, ) - service_account = proto.Field( + service_account: str = proto.Field( proto.STRING, number=17, ) - display_name = proto.Field( + display_name: str = proto.Field( proto.STRING, number=18, ) - available_version = proto.RepeatedField( + available_version: MutableSequence["Version"] = proto.RepeatedField( proto.MESSAGE, number=19, message="Version", ) - api_endpoint = proto.Field( + api_endpoint: str = proto.Field( proto.STRING, number=20, ) - gcs_bucket = proto.Field( + gcs_bucket: str = proto.Field( proto.STRING, number=21, ) - accelerators = proto.RepeatedField( + accelerators: MutableSequence["Accelerator"] = proto.RepeatedField( proto.MESSAGE, number=22, message="Accelerator", ) - p4_service_account = proto.Field( + p4_service_account: str = proto.Field( proto.STRING, number=23, ) - tenant_project_id = proto.Field( + tenant_project_id: str = proto.Field( proto.STRING, number=24, ) - dataproc_service_account = proto.Field( + dataproc_service_account: str = proto.Field( proto.STRING, number=25, ) - enable_rbac = proto.Field( + enable_rbac: bool = proto.Field( proto.BOOL, number=27, ) - crypto_key_config = proto.Field( + crypto_key_config: "CryptoKeyConfig" = proto.Field( proto.MESSAGE, number=28, message="CryptoKeyConfig", ) - disabled_reason = proto.RepeatedField( + disabled_reason: MutableSequence[DisabledReason] = proto.RepeatedField( proto.ENUM, number=29, enum=DisabledReason, @@ -452,23 +454,23 @@ class ListInstancesRequest(proto.Message): "name desc", or "" (unsorted). """ - parent = proto.Field( + parent: str = proto.Field( proto.STRING, number=1, ) - page_size = proto.Field( + page_size: int = proto.Field( proto.INT32, number=2, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=3, ) - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=4, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=5, ) @@ -478,12 +480,12 @@ class ListInstancesResponse(proto.Message): r"""Response message for the list instance request. Attributes: - instances (Sequence[google.cloud.data_fusion_v1.types.Instance]): + instances (MutableSequence[google.cloud.data_fusion_v1.types.Instance]): Represents a list of Data Fusion instances. next_page_token (str): Token to retrieve the next page of results or empty if there are no more results in the list. - unreachable (Sequence[str]): + unreachable (MutableSequence[str]): Locations that could not be reached. """ @@ -491,16 +493,16 @@ class ListInstancesResponse(proto.Message): def raw_page(self): return self - instances = proto.RepeatedField( + instances: MutableSequence["Instance"] = proto.RepeatedField( proto.MESSAGE, number=1, message="Instance", ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=2, ) - unreachable = proto.RepeatedField( + unreachable: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=3, ) @@ -526,19 +528,19 @@ class ListAvailableVersionsRequest(proto.Message): then response will be [6.1.2, 6.2.0] """ - parent = proto.Field( + parent: str = proto.Field( proto.STRING, number=1, ) - page_size = proto.Field( + page_size: int = proto.Field( proto.INT32, number=2, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=3, ) - latest_patch_only = proto.Field( + latest_patch_only: bool = proto.Field( proto.BOOL, number=4, ) @@ -548,7 +550,7 @@ class ListAvailableVersionsResponse(proto.Message): r"""Response message for the list available versions request. Attributes: - available_versions (Sequence[google.cloud.data_fusion_v1.types.Version]): + available_versions (MutableSequence[google.cloud.data_fusion_v1.types.Version]): Represents a list of versions that are supported. next_page_token (str): @@ -560,12 +562,12 @@ class ListAvailableVersionsResponse(proto.Message): def raw_page(self): return self - available_versions = proto.RepeatedField( + available_versions: MutableSequence["Version"] = proto.RepeatedField( proto.MESSAGE, number=1, message="Version", ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=2, ) @@ -582,7 +584,7 @@ class GetInstanceRequest(proto.Message): projects/{project}/locations/{location}/instances/{instance}. """ - name = proto.Field( + name: str = proto.Field( proto.STRING, number=1, ) @@ -602,15 +604,15 @@ class CreateInstanceRequest(proto.Message): An instance resource. """ - parent = proto.Field( + parent: str = proto.Field( proto.STRING, number=1, ) - instance_id = proto.Field( + instance_id: str = proto.Field( proto.STRING, number=2, ) - instance = proto.Field( + instance: "Instance" = proto.Field( proto.MESSAGE, number=3, message="Instance", @@ -627,7 +629,7 @@ class DeleteInstanceRequest(proto.Message): projects/{project}/locations/{location}/instances/{instance} """ - name = proto.Field( + name: str = proto.Field( proto.STRING, number=1, ) @@ -655,12 +657,12 @@ class UpdateInstanceRequest(proto.Message): overwritten. """ - instance = proto.Field( + instance: "Instance" = proto.Field( proto.MESSAGE, number=1, message="Instance", ) - update_mask = proto.Field( + update_mask: field_mask_pb2.FieldMask = proto.Field( proto.MESSAGE, number=2, message=field_mask_pb2.FieldMask, @@ -677,7 +679,7 @@ class RestartInstanceRequest(proto.Message): projects/{project}/locations/{location}/instances/{instance} """ - name = proto.Field( + name: str = proto.Field( proto.STRING, number=1, ) @@ -707,7 +709,7 @@ class OperationMetadata(proto.Message): corresponding to ``Code.CANCELLED``. api_version (str): API version used to start the operation. - additional_status (Mapping[str, str]): + additional_status (MutableMapping[str, str]): Map to hold any additional status info for the operation If there is an accelerator being enabled/disabled/deleted, this will be populated @@ -715,37 +717,37 @@ class OperationMetadata(proto.Message): ENABLING, DISABLING or DELETING """ - create_time = proto.Field( + create_time: timestamp_pb2.Timestamp = proto.Field( proto.MESSAGE, number=1, message=timestamp_pb2.Timestamp, ) - end_time = proto.Field( + end_time: timestamp_pb2.Timestamp = proto.Field( proto.MESSAGE, number=2, message=timestamp_pb2.Timestamp, ) - target = proto.Field( + target: str = proto.Field( proto.STRING, number=3, ) - verb = proto.Field( + verb: str = proto.Field( proto.STRING, number=4, ) - status_detail = proto.Field( + status_detail: str = proto.Field( proto.STRING, number=5, ) - requested_cancellation = proto.Field( + requested_cancellation: bool = proto.Field( proto.BOOL, number=6, ) - api_version = proto.Field( + api_version: str = proto.Field( proto.STRING, number=7, ) - additional_status = proto.MapField( + additional_status: MutableMapping[str, str] = proto.MapField( proto.STRING, proto.STRING, number=8, diff --git a/packages/google-cloud-data-fusion/owlbot.py b/packages/google-cloud-data-fusion/owlbot.py new file mode 100644 index 000000000000..ce738f01d012 --- /dev/null +++ b/packages/google-cloud-data-fusion/owlbot.py @@ -0,0 +1,56 @@ +# Copyright 2022 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. + +import json +from pathlib import Path +import shutil + +import synthtool as s +import synthtool.gcp as gcp +from synthtool.languages import python + +# ---------------------------------------------------------------------------- +# Copy the generated client from the owl-bot staging directory +# ---------------------------------------------------------------------------- + +clean_up_generated_samples = True + +# Load the default version defined in .repo-metadata.json. +default_version = json.load(open(".repo-metadata.json", "rt")).get( + "default_version" +) + +for library in s.get_staging_dirs(default_version): + if clean_up_generated_samples: + shutil.rmtree("samples/generated_samples", ignore_errors=True) + clean_up_generated_samples = False + s.move([library], excludes=["**/gapic_version.py"]) +s.remove_staging_dirs() + +# ---------------------------------------------------------------------------- +# Add templated files +# ---------------------------------------------------------------------------- + +templated_files = gcp.CommonTemplates().py_library( + cov_level=100, + microgenerator=True, + versions=gcp.common.detect_versions(path="./google", default_first=True), +) +s.move(templated_files, excludes=[".coveragerc", ".github/release-please.yml"]) + +python.py_samples(skip_readmes=True) + +# run format session for all directories which have a noxfile +for noxfile in Path(".").glob("**/noxfile.py"): + s.shell.run(["nox", "-s", "format"], cwd=noxfile.parent, hide_output=False) diff --git a/packages/google-cloud-data-fusion/release-please-config.json b/packages/google-cloud-data-fusion/release-please-config.json new file mode 100644 index 000000000000..88cd06aea21a --- /dev/null +++ b/packages/google-cloud-data-fusion/release-please-config.json @@ -0,0 +1,23 @@ +{ + "$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json", + "packages": { + ".": { + "release-type": "python", + "extra-files": [ + "google/cloud/data_fusion/gapic_version.py", + { + "type": "json", + "path": "samples/generated_samples/snippet_metadata_google.cloud.datafusion.v1.json", + "jsonpath": "$.clientLibrary.version" + } + ] + } + }, + "release-type": "python", + "plugins": [ + { + "type": "sentence-case" + } + ], + "initial-version": "0.1.0" +} diff --git a/packages/google-cloud-data-fusion/samples/generated_samples/snippet_metadata_data fusion_v1.json b/packages/google-cloud-data-fusion/samples/generated_samples/snippet_metadata_google.cloud.datafusion.v1.json similarity index 99% rename from packages/google-cloud-data-fusion/samples/generated_samples/snippet_metadata_data fusion_v1.json rename to packages/google-cloud-data-fusion/samples/generated_samples/snippet_metadata_google.cloud.datafusion.v1.json index 01d9a4e60fad..1c5648e25de2 100644 --- a/packages/google-cloud-data-fusion/samples/generated_samples/snippet_metadata_data fusion_v1.json +++ b/packages/google-cloud-data-fusion/samples/generated_samples/snippet_metadata_google.cloud.datafusion.v1.json @@ -7,7 +7,8 @@ } ], "language": "PYTHON", - "name": "google-cloud-data-fusion" + "name": "google-cloud-data-fusion", + "version": "0.1.0" }, "snippets": [ { diff --git a/packages/google-cloud-data-fusion/setup.py b/packages/google-cloud-data-fusion/setup.py index 9350c1bb9e66..bf221a340b91 100644 --- a/packages/google-cloud-data-fusion/setup.py +++ b/packages/google-cloud-data-fusion/setup.py @@ -1,34 +1,48 @@ # -*- coding: utf-8 -*- -# -# Copyright 2020 Google LLC +# Copyright 2022 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 # -# https://www.apache.org/licenses/LICENSE-2.0 +# 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. - +# import io import os -import setuptools +import setuptools # type: ignore + +package_root = os.path.abspath(os.path.dirname(__file__)) name = "google-cloud-data-fusion" -description = "Cloud Data Fusion API client library" -version = "1.5.3" -release_status = "Development Status :: 5 - Production/Stable" -url = "https://github.com/googleapis/python-data-fusion" + + +description = "Google Cloud Data Fusion API client library" + +version = {} +with open( + os.path.join(package_root, "google/cloud/data_fusion/gapic_version.py") +) as fp: + exec(fp.read(), version) +version = version["__version__"] + +if version[0] == "0": + release_status = "Development Status :: 4 - Beta" +else: + release_status = "Development Status :: 5 - Production/Stable" + dependencies = [ - "google-api-core[grpc] >= 1.32.0, <3.0.0dev,!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.*,!=2.4.*,!=2.5.*,!=2.6.*,!=2.7.*", + "google-api-core[grpc] >= 1.33.2, <3.0.0dev,!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.*,!=2.4.*,!=2.5.*,!=2.6.*,!=2.7.*", "proto-plus >= 1.22.0, <2.0.0dev", "protobuf>=3.19.5,<5.0.0dev,!=3.20.0,!=3.20.1,!=4.21.0,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5", ] +url = "https://github.com/googleapis/python-data-fusion" package_root = os.path.abspath(os.path.dirname(__file__)) @@ -46,7 +60,6 @@ if "google.cloud" in packages: namespaces.append("google.cloud") - setuptools.setup( name=name, version=version, diff --git a/packages/google-cloud-data-fusion/testing/constraints-3.10.txt b/packages/google-cloud-data-fusion/testing/constraints-3.10.txt index e69de29bb2d1..ed7f9aed2559 100644 --- a/packages/google-cloud-data-fusion/testing/constraints-3.10.txt +++ b/packages/google-cloud-data-fusion/testing/constraints-3.10.txt @@ -0,0 +1,6 @@ +# -*- coding: utf-8 -*- +# This constraints file is required for unit tests. +# List all library dependencies and extras in this file. +google-api-core +proto-plus +protobuf diff --git a/packages/google-cloud-data-fusion/testing/constraints-3.11.txt b/packages/google-cloud-data-fusion/testing/constraints-3.11.txt index e69de29bb2d1..ed7f9aed2559 100644 --- a/packages/google-cloud-data-fusion/testing/constraints-3.11.txt +++ b/packages/google-cloud-data-fusion/testing/constraints-3.11.txt @@ -0,0 +1,6 @@ +# -*- coding: utf-8 -*- +# This constraints file is required for unit tests. +# List all library dependencies and extras in this file. +google-api-core +proto-plus +protobuf diff --git a/packages/google-cloud-data-fusion/testing/constraints-3.7.txt b/packages/google-cloud-data-fusion/testing/constraints-3.7.txt index 4005dc5bf25e..6f3158cc2034 100644 --- a/packages/google-cloud-data-fusion/testing/constraints-3.7.txt +++ b/packages/google-cloud-data-fusion/testing/constraints-3.7.txt @@ -4,6 +4,6 @@ # Pin the version to the lower bound. # e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0dev", # Then this file should have google-cloud-foo==1.14.0 -google-api-core==1.32.0 +google-api-core==1.33.2 proto-plus==1.22.0 protobuf==3.19.5 diff --git a/packages/google-cloud-data-fusion/testing/constraints-3.8.txt b/packages/google-cloud-data-fusion/testing/constraints-3.8.txt index e69de29bb2d1..ed7f9aed2559 100644 --- a/packages/google-cloud-data-fusion/testing/constraints-3.8.txt +++ b/packages/google-cloud-data-fusion/testing/constraints-3.8.txt @@ -0,0 +1,6 @@ +# -*- coding: utf-8 -*- +# This constraints file is required for unit tests. +# List all library dependencies and extras in this file. +google-api-core +proto-plus +protobuf diff --git a/packages/google-cloud-data-fusion/testing/constraints-3.9.txt b/packages/google-cloud-data-fusion/testing/constraints-3.9.txt index e69de29bb2d1..ed7f9aed2559 100644 --- a/packages/google-cloud-data-fusion/testing/constraints-3.9.txt +++ b/packages/google-cloud-data-fusion/testing/constraints-3.9.txt @@ -0,0 +1,6 @@ +# -*- coding: utf-8 -*- +# This constraints file is required for unit tests. +# List all library dependencies and extras in this file. +google-api-core +proto-plus +protobuf diff --git a/packages/google-cloud-data-fusion/tests/unit/gapic/data_fusion_v1/test_data_fusion.py b/packages/google-cloud-data-fusion/tests/unit/gapic/data_fusion_v1/test_data_fusion.py index 28c344263882..1514ac90a9c2 100644 --- a/packages/google-cloud-data-fusion/tests/unit/gapic/data_fusion_v1/test_data_fusion.py +++ b/packages/google-cloud-data-fusion/tests/unit/gapic/data_fusion_v1/test_data_fusion.py @@ -41,6 +41,7 @@ from google.auth.exceptions import MutualTLSChannelError from google.longrunning import operations_pb2 from google.oauth2 import service_account +from google.protobuf import empty_pb2 # type: ignore from google.protobuf import field_mask_pb2 # type: ignore from google.protobuf import timestamp_pb2 # type: ignore import grpc