Skip to content
This repository has been archived by the owner on Sep 5, 2023. It is now read-only.

Commit

Permalink
chore(python): fix warehouse-package-name for dataqna v1alpha (#195)
Browse files Browse the repository at this point in the history
* chore: update to gapic-generator-python 1.5.0

feat: add support for `google.cloud.<api>.__version__`
PiperOrigin-RevId: 484665853

Source-Link: googleapis/googleapis@8eb249a

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

* 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: googleapis/googleapis@da380c7

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: googleapis/googleapis@5be5981

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: googleapis/googleapis@08f275f

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

* chore(python): fix warehouse-package-name for dataqna v1alpha

PiperOrigin-RevId: 490515684

Source-Link: googleapis/googleapis@cfe5068

Source-Link: https://github.com/googleapis/googleapis-gen/commit/e42503d009c31e064e4141e809cfbf1873ac64ae
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZTQyNTAzZDAwOWMzMWUwNjRlNDE0MWU4MDljZmJmMTg3M2FjNjRhZSJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* configure release-please to use manifest

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 Nov 28, 2022
1 parent c219ed6 commit 9fb86c9
Show file tree
Hide file tree
Showing 52 changed files with 505 additions and 1,096 deletions.
1 change: 1 addition & 0 deletions .github/release-please.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
releaseType: python
handleGHRelease: true
manifest: true
3 changes: 3 additions & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
".": "0.8.2"
}
1 change: 0 additions & 1 deletion docs/dataqna_v1alpha/types.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@ Types for Google Cloud Dataqna v1alpha API

.. automodule:: google.cloud.dataqna_v1alpha.types
:members:
:undoc-members:
:show-inheritance:
4 changes: 4 additions & 0 deletions google/cloud/dataqna/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
from google.cloud.dataqna import gapic_version as package_version

__version__ = package_version.__version__


from google.cloud.dataqna_v1alpha.services.auto_suggestion_service.async_client import (
AutoSuggestionServiceAsyncClient,
Expand Down
16 changes: 16 additions & 0 deletions google/cloud/dataqna/gapic_version.py
Original file line number Diff line number Diff line change
@@ -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__ = "0.8.2" # {x-release-please-version}
2 changes: 1 addition & 1 deletion google/cloud/dataqna/py.typed
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# Marker file for PEP 561.
# The google-cloud-dataqna package uses inline types.
# The google-cloud-data-qna package uses inline types.
4 changes: 4 additions & 0 deletions google/cloud/dataqna_v1alpha/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
from google.cloud.dataqna import gapic_version as package_version

__version__ = package_version.__version__


from .services.auto_suggestion_service import (
AutoSuggestionServiceAsyncClient,
Expand Down
2 changes: 1 addition & 1 deletion google/cloud/dataqna_v1alpha/py.typed
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# Marker file for PEP 561.
# The google-cloud-dataqna package uses inline types.
# The google-cloud-data-qna package uses inline types.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -230,9 +240,9 @@ def transport(self) -> AutoSuggestionServiceTransport:
def __init__(
self,
*,
credentials: ga_credentials.Credentials = None,
credentials: Optional[ga_credentials.Credentials] = None,
transport: Union[str, AutoSuggestionServiceTransport] = "grpc_asyncio",
client_options: ClientOptions = None,
client_options: Optional[ClientOptions] = None,
client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
) -> None:
"""Instantiates the auto suggestion service client.
Expand Down Expand Up @@ -276,10 +286,12 @@ def __init__(

async def suggest_queries(
self,
request: Union[auto_suggestion_service.SuggestQueriesRequest, dict] = None,
request: Optional[
Union[auto_suggestion_service.SuggestQueriesRequest, dict]
] = None,
*,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
timeout: Optional[float] = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> auto_suggestion_service.SuggestQueriesResponse:
r"""Gets a list of suggestions based on a prefix string.
Expand Down Expand Up @@ -312,7 +324,7 @@ async def sample_suggest_queries():
print(response)
Args:
request (Union[google.cloud.dataqna_v1alpha.types.SuggestQueriesRequest, dict]):
request (Optional[Union[google.cloud.dataqna_v1alpha.types.SuggestQueriesRequest, dict]]):
The request object. Request for query suggestions.
retry (google.api_core.retry.Retry): Designation of what errors, if any,
should be retried.
Expand Down Expand Up @@ -362,7 +374,7 @@ async def __aexit__(self, exc_type, exc, tb):
try:
DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo(
gapic_version=pkg_resources.get_distribution(
"google-cloud-dataqna",
"google-cloud-data-qna",
).version,
)
except pkg_resources.DistributionNotFound:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -59,7 +70,7 @@ class AutoSuggestionServiceClientMeta(type):

def get_transport_class(
cls,
label: str = None,
label: Optional[str] = None,
) -> Type[AutoSuggestionServiceTransport]:
"""Returns an appropriate transport class.
Expand Down Expand Up @@ -383,8 +394,8 @@ def __init__(
self,
*,
credentials: Optional[ga_credentials.Credentials] = None,
transport: Union[str, AutoSuggestionServiceTransport, None] = None,
client_options: Optional[client_options_lib.ClientOptions] = None,
transport: Optional[Union[str, AutoSuggestionServiceTransport]] = None,
client_options: Optional[Union[client_options_lib.ClientOptions, dict]] = None,
client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
) -> None:
"""Instantiates the auto suggestion service client.
Expand All @@ -401,7 +412,7 @@ def __init__(
NOTE: "rest" transport functionality is currently in a
beta state (preview). We welcome your feedback via an
issue in this library's source repository.
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
Expand Down Expand Up @@ -431,6 +442,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
Expand Down Expand Up @@ -483,10 +495,12 @@ def __init__(

def suggest_queries(
self,
request: Union[auto_suggestion_service.SuggestQueriesRequest, dict] = None,
request: Optional[
Union[auto_suggestion_service.SuggestQueriesRequest, dict]
] = None,
*,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
timeout: Optional[float] = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> auto_suggestion_service.SuggestQueriesResponse:
r"""Gets a list of suggestions based on a prefix string.
Expand Down Expand Up @@ -577,7 +591,7 @@ def __exit__(self, type, value, traceback):
try:
DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo(
gapic_version=pkg_resources.get_distribution(
"google-cloud-dataqna",
"google-cloud-data-qna",
).version,
)
except pkg_resources.DistributionNotFound:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
try:
DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo(
gapic_version=pkg_resources.get_distribution(
"google-cloud-dataqna",
"google-cloud-data-qna",
).version,
)
except pkg_resources.DistributionNotFound:
Expand All @@ -48,7 +48,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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,14 +116,14 @@ def __init__(
self,
*,
host: str = "dataqna.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,
Expand Down Expand Up @@ -250,8 +250,8 @@ def __init__(
def create_channel(
cls,
host: str = "dataqna.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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ class AutoSuggestionServiceGrpcAsyncIOTransport(AutoSuggestionServiceTransport):
def create_channel(
cls,
host: str = "dataqna.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,
Expand Down Expand Up @@ -161,15 +161,15 @@ def __init__(
self,
*,
host: str = "dataqna.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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,10 +199,10 @@ def __init__(
self,
*,
host: str = "dataqna.googleapis.com",
credentials: ga_credentials.Credentials = None,
credentials_file: str = None,
scopes: Sequence[str] = 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,
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,
Expand Down Expand Up @@ -294,7 +294,7 @@ def __call__(
request: auto_suggestion_service.SuggestQueriesRequest,
*,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
timeout: Optional[float] = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> auto_suggestion_service.SuggestQueriesResponse:
r"""Call the suggest queries method over HTTP.
Expand Down
Loading

0 comments on commit 9fb86c9

Please sign in to comment.