Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit e2ff8f8

Browse filesBrowse files
feat: add support for google.area120.tables.__version__ (#204)
* 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: googleapis/googleapis-gen@c8aa327 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 * use autogenerated setup.py Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Anthonios Partheniou <partheniou@google.com>
1 parent dbbad42 commit e2ff8f8
Copy full SHA for e2ff8f8

File tree

Expand file treeCollapse file tree

39 files changed

+492
-1902
lines changed
Filter options
Expand file treeCollapse file tree

39 files changed

+492
-1902
lines changed
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
releaseType: python
2+
manifest: true
23
handleGHRelease: true
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
".": "0.8.2"
3+
}

‎packages/google-area120-tables/google/area120/tables/__init__.py

Copy file name to clipboardExpand all lines: packages/google-area120-tables/google/area120/tables/__init__.py
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16+
from google.area120.tables import gapic_version as package_version
17+
18+
__version__ = package_version.__version__
19+
1620

1721
from google.area120.tables_v1alpha1.services.tables_service.async_client import (
1822
TablesServiceAsyncClient,
+16Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# -*- coding: utf-8 -*-
2+
# Copyright 2022 Google LLC
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
__version__ = "0.8.2" # {x-release-please-version}

‎packages/google-area120-tables/google/area120/tables_v1alpha1/__init__.py

Copy file name to clipboardExpand all lines: packages/google-area120-tables/google/area120/tables_v1alpha1/__init__.py
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16+
from google.area120.tables import gapic_version as package_version
17+
18+
__version__ = package_version.__version__
19+
1620

1721
from .services.tables_service import TablesServiceAsyncClient, TablesServiceClient
1822
from .types.tables import (

‎packages/google-area120-tables/google/area120/tables_v1alpha1/services/tables_service/client.py

Copy file name to clipboardExpand all lines: packages/google-area120-tables/google/area120/tables_v1alpha1/services/tables_service/client.py
+4-3Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
from collections import OrderedDict
1717
import os
1818
import re
19-
from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union
19+
from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union, cast
2020

2121
from google.api_core import client_options as client_options_lib
2222
from google.api_core import exceptions as core_exceptions
@@ -375,7 +375,7 @@ def __init__(
375375
*,
376376
credentials: Optional[ga_credentials.Credentials] = None,
377377
transport: Union[str, TablesServiceTransport, None] = None,
378-
client_options: Optional[client_options_lib.ClientOptions] = None,
378+
client_options: Optional[Union[client_options_lib.ClientOptions, dict]] = None,
379379
client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
380380
) -> None:
381381
"""Instantiates the tables service client.
@@ -392,7 +392,7 @@ def __init__(
392392
NOTE: "rest" transport functionality is currently in a
393393
beta state (preview). We welcome your feedback via an
394394
issue in this library's source repository.
395-
client_options (google.api_core.client_options.ClientOptions): Custom options for the
395+
client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the
396396
client. It won't take effect if a ``transport`` instance is provided.
397397
(1) The ``api_endpoint`` property can be used to override the
398398
default endpoint provided by the client. GOOGLE_API_USE_MTLS_ENDPOINT
@@ -422,6 +422,7 @@ def __init__(
422422
client_options = client_options_lib.from_dict(client_options)
423423
if client_options is None:
424424
client_options = client_options_lib.ClientOptions()
425+
client_options = cast(client_options_lib.ClientOptions, client_options)
425426

426427
api_endpoint, client_cert_source_func = self.get_mtls_endpoint_and_cert_source(
427428
client_options
+56Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# Copyright 2022 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
import json
16+
from pathlib import Path
17+
import shutil
18+
19+
import synthtool as s
20+
import synthtool.gcp as gcp
21+
from synthtool.languages import python
22+
23+
# ----------------------------------------------------------------------------
24+
# Copy the generated client from the owl-bot staging directory
25+
# ----------------------------------------------------------------------------
26+
27+
clean_up_generated_samples = True
28+
29+
# Load the default version defined in .repo-metadata.json.
30+
default_version = json.load(open(".repo-metadata.json", "rt")).get(
31+
"default_version"
32+
)
33+
34+
for library in s.get_staging_dirs(default_version):
35+
if clean_up_generated_samples:
36+
shutil.rmtree("samples/generated_samples", ignore_errors=True)
37+
clean_up_generated_samples = False
38+
s.move([library], excludes=["**/gapic_version.py"])
39+
s.remove_staging_dirs()
40+
41+
# ----------------------------------------------------------------------------
42+
# Add templated files
43+
# ----------------------------------------------------------------------------
44+
45+
templated_files = gcp.CommonTemplates().py_library(
46+
cov_level=100,
47+
microgenerator=True,
48+
versions=gcp.common.detect_versions(path="./google", default_first=True),
49+
)
50+
s.move(templated_files, excludes=[".coveragerc", ".github/release-please.yml"])
51+
52+
python.py_samples(skip_readmes=True)
53+
54+
# run format session for all directories which have a noxfile
55+
for noxfile in Path(".").glob("**/noxfile.py"):
56+
s.shell.run(["nox", "-s", "format"], cwd=noxfile.parent, hide_output=False)
+23Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
3+
"packages": {
4+
".": {
5+
"release-type": "python",
6+
"extra-files": [
7+
"google/area120/tables/gapic_version.py",
8+
{
9+
"type": "json",
10+
"path": "samples/generated_samples/snippet_metadata_tables_v1alpha1.json",
11+
"jsonpath": "$.clientLibrary.version"
12+
}
13+
]
14+
}
15+
},
16+
"release-type": "python",
17+
"plugins": [
18+
{
19+
"type": "sentence-case"
20+
}
21+
],
22+
"initial-version": "0.1.0"
23+
}
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
# python3 -m pip install google-area120-tables
2424

2525

26-
# [START area120tables_v1alpha1_generated_TablesService_BatchCreateRows_sync_39533718]
26+
# [START area120tables_v1alpha1_generated_TablesService_BatchCreateRows_sync]
2727
# This snippet has been automatically generated and should be regarded as a
2828
# code template only.
2929
# It will require modifications to work:
@@ -53,4 +53,4 @@ def sample_batch_create_rows():
5353
# Handle the response
5454
print(response)
5555

56-
# [END area120tables_v1alpha1_generated_TablesService_BatchCreateRows_sync_39533718]
56+
# [END area120tables_v1alpha1_generated_TablesService_BatchCreateRows_sync]

‎packages/google-area120-tables/samples/generated_samples/area120tables_v1alpha1_generated_tables_service_batch_create_rows_sync_f62d407e.py

Copy file name to clipboardExpand all lines: packages/google-area120-tables/samples/generated_samples/area120tables_v1alpha1_generated_tables_service_batch_create_rows_sync_f62d407e.py
-56Lines changed: 0 additions & 56 deletions
This file was deleted.
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
# python3 -m pip install google-area120-tables
2424

2525

26-
# [START area120tables_v1alpha1_generated_TablesService_BatchDeleteRows_sync_7474ee2a]
26+
# [START area120tables_v1alpha1_generated_TablesService_BatchDeleteRows_sync]
2727
# This snippet has been automatically generated and should be regarded as a
2828
# code template only.
2929
# It will require modifications to work:
@@ -48,4 +48,4 @@ def sample_batch_delete_rows():
4848
client.batch_delete_rows(request=request)
4949

5050

51-
# [END area120tables_v1alpha1_generated_TablesService_BatchDeleteRows_sync_7474ee2a]
51+
# [END area120tables_v1alpha1_generated_TablesService_BatchDeleteRows_sync]

‎packages/google-area120-tables/samples/generated_samples/area120tables_v1alpha1_generated_tables_service_batch_delete_rows_sync_7b157843.py

Copy file name to clipboardExpand all lines: packages/google-area120-tables/samples/generated_samples/area120tables_v1alpha1_generated_tables_service_batch_delete_rows_sync_7b157843.py
-51Lines changed: 0 additions & 51 deletions
This file was deleted.
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
# python3 -m pip install google-area120-tables
2424

2525

26-
# [START area120tables_v1alpha1_generated_TablesService_BatchUpdateRows_sync_87153c6b]
26+
# [START area120tables_v1alpha1_generated_TablesService_BatchUpdateRows_sync]
2727
# This snippet has been automatically generated and should be regarded as a
2828
# code template only.
2929
# It will require modifications to work:
@@ -49,4 +49,4 @@ def sample_batch_update_rows():
4949
# Handle the response
5050
print(response)
5151

52-
# [END area120tables_v1alpha1_generated_TablesService_BatchUpdateRows_sync_87153c6b]
52+
# [END area120tables_v1alpha1_generated_TablesService_BatchUpdateRows_sync]

‎packages/google-area120-tables/samples/generated_samples/area120tables_v1alpha1_generated_tables_service_batch_update_rows_sync_cfa5adec.py

Copy file name to clipboardExpand all lines: packages/google-area120-tables/samples/generated_samples/area120tables_v1alpha1_generated_tables_service_batch_update_rows_sync_cfa5adec.py
-52Lines changed: 0 additions & 52 deletions
This file was deleted.
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
# python3 -m pip install google-area120-tables
2424

2525

26-
# [START area120tables_v1alpha1_generated_TablesService_CreateRow_sync_77db3520]
26+
# [START area120tables_v1alpha1_generated_TablesService_CreateRow_sync]
2727
# This snippet has been automatically generated and should be regarded as a
2828
# code template only.
2929
# It will require modifications to work:
@@ -49,4 +49,4 @@ def sample_create_row():
4949
# Handle the response
5050
print(response)
5151

52-
# [END area120tables_v1alpha1_generated_TablesService_CreateRow_sync_77db3520]
52+
# [END area120tables_v1alpha1_generated_TablesService_CreateRow_sync]

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.