From 117ef9a733418ef0e19b8036fce0c104808615d6 Mon Sep 17 00:00:00 2001 From: Anthonios Partheniou Date: Wed, 30 Nov 2022 16:12:50 +0000 Subject: [PATCH 1/3] chore: move version to gapic_version.py --- .github/release-please.yml | 1 + .github/workflows/unittest.yml | 2 +- .release-please-manifest.json | 4 + google/cloud/bigquery_storage/__init__.py | 1 - .../cloud/bigquery_storage/gapic_version.py | 2 +- google/cloud/bigquery_storage_v1/__init__.py | 6 +- .../bigquery_storage_v1/gapic_version.py | 16 + .../bigquery_storage_v1beta2/__init__.py | 6 +- .../bigquery_storage_v1beta2/gapic_version.py | 16 + noxfile.py | 2 +- owlbot.py | 96 +- release-please-config.json | 31 + .../snippet_metadata_bigquery storage_v1.json | 1479 ----------------- ...pet_metadata_bigquery storage_v1beta2.json | 1479 ----------------- setup.py | 37 +- 15 files changed, 136 insertions(+), 3042 deletions(-) create mode 100644 .release-please-manifest.json create mode 100644 google/cloud/bigquery_storage_v1/gapic_version.py create mode 100644 google/cloud/bigquery_storage_v1beta2/gapic_version.py create mode 100644 release-please-config.json delete mode 100644 samples/generated_samples/snippet_metadata_bigquery storage_v1.json delete mode 100644 samples/generated_samples/snippet_metadata_bigquery storage_v1beta2.json diff --git a/.github/release-please.yml b/.github/release-please.yml index 29601ad4..fe749ff6 100644 --- a/.github/release-please.yml +++ b/.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/.github/workflows/unittest.yml b/.github/workflows/unittest.yml index 97699c66..23000c05 100644 --- a/.github/workflows/unittest.yml +++ b/.github/workflows/unittest.yml @@ -54,4 +54,4 @@ jobs: - name: Report coverage results run: | coverage combine .coverage-results/.coverage* - coverage report --show-missing --fail-under=98 + coverage report --show-missing --fail-under=100 diff --git a/.release-please-manifest.json b/.release-please-manifest.json new file mode 100644 index 00000000..156b3a43 --- /dev/null +++ b/.release-please-manifest.json @@ -0,0 +1,4 @@ +{ + ".": "2.16.2" +} + \ No newline at end of file diff --git a/google/cloud/bigquery_storage/__init__.py b/google/cloud/bigquery_storage/__init__.py index 311d42a9..5c611990 100644 --- a/google/cloud/bigquery_storage/__init__.py +++ b/google/cloud/bigquery_storage/__init__.py @@ -27,7 +27,6 @@ ) from google.cloud.bigquery_storage_v1 import gapic_types as types -from google.cloud.bigquery_storage_v1 import __version__ from google.cloud.bigquery_storage_v1.types.arrow import ArrowRecordBatch from google.cloud.bigquery_storage_v1.types.arrow import ArrowSchema from google.cloud.bigquery_storage_v1.types.arrow import ArrowSerializationOptions diff --git a/google/cloud/bigquery_storage/gapic_version.py b/google/cloud/bigquery_storage/gapic_version.py index 35859c3f..e1ac7978 100644 --- a/google/cloud/bigquery_storage/gapic_version.py +++ b/google/cloud/bigquery_storage/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.1.0" +__version__ = "2.16.2" # {x-release-please-version} diff --git a/google/cloud/bigquery_storage_v1/__init__.py b/google/cloud/bigquery_storage_v1/__init__.py index 4ccfd350..cb732fdd 100644 --- a/google/cloud/bigquery_storage_v1/__init__.py +++ b/google/cloud/bigquery_storage_v1/__init__.py @@ -16,11 +16,9 @@ from __future__ import absolute_import -import pkg_resources +from google.cloud.bigquery_storage_v1 import gapic_version as package_version -__version__ = pkg_resources.get_distribution( - "google-cloud-bigquery-storage" -).version # noqa +__version__ = package_version.__version__ from google.cloud.bigquery_storage_v1 import client from google.cloud.bigquery_storage_v1 import types diff --git a/google/cloud/bigquery_storage_v1/gapic_version.py b/google/cloud/bigquery_storage_v1/gapic_version.py new file mode 100644 index 00000000..e1ac7978 --- /dev/null +++ b/google/cloud/bigquery_storage_v1/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__ = "2.16.2" # {x-release-please-version} diff --git a/google/cloud/bigquery_storage_v1beta2/__init__.py b/google/cloud/bigquery_storage_v1beta2/__init__.py index 8efde268..c1ec2745 100644 --- a/google/cloud/bigquery_storage_v1beta2/__init__.py +++ b/google/cloud/bigquery_storage_v1beta2/__init__.py @@ -16,11 +16,9 @@ from __future__ import absolute_import -import pkg_resources +from google.cloud.bigquery_storage_v1beta2 import gapic_version as package_version -__version__ = pkg_resources.get_distribution( - "google-cloud-bigquery-storage" -).version # noqa +__version__ = package_version.__version__ from google.cloud.bigquery_storage_v1beta2 import client from google.cloud.bigquery_storage_v1beta2 import types diff --git a/google/cloud/bigquery_storage_v1beta2/gapic_version.py b/google/cloud/bigquery_storage_v1beta2/gapic_version.py new file mode 100644 index 00000000..e1ac7978 --- /dev/null +++ b/google/cloud/bigquery_storage_v1beta2/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__ = "2.16.2" # {x-release-please-version} diff --git a/noxfile.py b/noxfile.py index 6d619687..49b3f084 100644 --- a/noxfile.py +++ b/noxfile.py @@ -278,7 +278,7 @@ def cover(session): test runs (not system test runs), and then erases coverage data. """ session.install("coverage", "pytest-cov") - session.run("coverage", "report", "--show-missing", "--fail-under=98") + session.run("coverage", "report", "--show-missing", "--fail-under=100") session.run("coverage", "erase") diff --git a/owlbot.py b/owlbot.py index 4c874ea9..d29fef3e 100644 --- a/owlbot.py +++ b/owlbot.py @@ -1,4 +1,4 @@ -# Copyright 2018 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. @@ -12,25 +12,27 @@ # See the License for the specific language governing permissions and # limitations under the License. -"""This script is used to synthesize generated parts of this library.""" +import json +from pathlib import Path +import shutil import synthtool as s -from synthtool import gcp +import synthtool.gcp as gcp from synthtool.languages import python -common = gcp.CommonTemplates() +# ---------------------------------------------------------------------------- +# Copy the generated client from the owl-bot staging directory +# ---------------------------------------------------------------------------- -default_version = "v1" +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): - # Work around gapic generator bug https://github.com/googleapis/gapic-generator-python/issues/902 - s.replace( - library / f"google/cloud/bigquery_storage_{library.name}/types/arrow.py", - r""". - Attributes:""", - r""".\n - Attributes:""", - ) + if clean_up_generated_samples: + shutil.rmtree("samples/generated_samples", ignore_errors=True) + clean_up_generated_samples = False # We don't want the generated client to be accessible through # "google.cloud.bigquery_storage", replace it with the hand written client that @@ -57,30 +59,20 @@ "", ) - # We want types and __version__ to be accessible through the "main" library - # entry point. - s.replace( - library / "google/cloud/bigquery_storage/__init__.py", - f"from google\\.cloud\\.bigquery_storage_{library.name}\\.types\\.arrow import ArrowRecordBatch", - ( - f"from google.cloud.bigquery_storage_{library.name} import types\n" - f"from google.cloud.bigquery_storage_{library.name} import __version__\n" - "\\g<0>" - ), - ) s.replace( library / "google/cloud/bigquery_storage/__init__.py", r"""["']ArrowRecordBatch["']""", ('"__version__",\n' ' "types",\n' " \\g<0>"), ) - # We want to expose all types through "google.cloud.bigquery_storage.types", - # not just the types generated for the BQ Storage library. For example, we also - # want to include common proto types such as Timestamp. + # We want types to be accessible through the "main" library s.replace( library / "google/cloud/bigquery_storage/__init__.py", - r"import types", - "import gapic_types as types", + f"from google\\.cloud\\.bigquery_storage_{library.name}\\.types\\.arrow import ArrowRecordBatch", + ( + f"from google.cloud.bigquery_storage_{library.name} import gapic_types as types\n" + "\\g<0>" + ), ) # The DataFormat enum is not exposed in bigquery_storage_v1/types, add it there. @@ -95,59 +87,41 @@ '"DataFormat",\n \\g<0>', ) - # The append_rows method doesn't contain keyword arguments that build request - # objects, so flattened tests are not needed and break with TypeError. - s.replace( - library - / f"tests/unit/gapic/bigquery_storage_{library.name}*/test_big_query_write.py", - r"(@[a-z.()\n]*\n)?(async )?" - r"def test_append_rows_flattened[_a-z]*\(\):\n" - r"( {4}.*|\n)+", - "\n", - ) - s.move( - library, + [library], excludes=[ - "bigquery-storage-*-py.tar.gz", - "docs/conf.py", - "docs/index.rst", + "setup.py", f"google/cloud/bigquery_storage_{library.name}/__init__.py", # v1beta2 was first generated after the microgenerator migration. "scripts/fixup_bigquery_storage_v1beta2_keywords.py", - "README.rst", - "nox*.py", - "setup.py", - "setup.cfg", + "**/gapic_version.py", + "docs/index.rst", ], ) - s.remove_staging_dirs() # ---------------------------------------------------------------------------- # Add templated files # ---------------------------------------------------------------------------- + extras = ["fastavro", "pandas", "pyarrow"] unit_test_extras = ["tests"] + extras -templated_files = common.py_library( +templated_files = gcp.CommonTemplates().py_library( + cov_level=100, microgenerator=True, - samples=True, unit_test_extras=unit_test_extras, system_test_extras=extras, system_test_external_dependencies=["google-cloud-bigquery"], - cov_level=98, + versions=gcp.common.detect_versions(path="./google", default_first=True), ) s.move( - templated_files, excludes=[".coveragerc"] -) # microgenerator has a good .coveragerc file - -python.configure_previous_major_version_branches() - -# ---------------------------------------------------------------------------- -# Samples templates -# ---------------------------------------------------------------------------- + templated_files, + excludes=[".coveragerc", ".github/release-please.yml", "docs/index.rst"], +) python.py_samples(skip_readmes=True) -s.shell.run(["nox", "-s", "blacken"], hide_output=False) +# run format session for all directories which have a noxfile +for noxfile in Path(".").glob("**/noxfile.py"): + s.shell.run(["nox", "-s", "blacken"], cwd=noxfile.parent, hide_output=False) diff --git a/release-please-config.json b/release-please-config.json new file mode 100644 index 00000000..d90665b1 --- /dev/null +++ b/release-please-config.json @@ -0,0 +1,31 @@ +{ + "$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json", + "packages": { + ".": { + "release-type": "python", + "extra-files": [ + "google/cloud/bigquery_storage_v1/gapic_version.py", + "google/cloud/bigquery_storage_v1beta2/gapic_version.py", + "google/cloud/bigquery_storage/gapic_version.py", + { + "type": "json", + "path": "samples/generated_samples/snippet_metadata_google.cloud.bigquery.storage.v1.json", + "jsonpath": "$.clientLibrary.version" + }, + { + "type": "json", + "path": "samples/generated_samples/snippet_metadata_google.cloud.bigquery.storage.v1beta2.json", + "jsonpath": "$.clientLibrary.version" + } + ] + } + }, + "release-type": "python", + "plugins": [ + { + "type": "sentence-case" + } + ], + "initial-version": "0.1.0" +} + \ No newline at end of file diff --git a/samples/generated_samples/snippet_metadata_bigquery storage_v1.json b/samples/generated_samples/snippet_metadata_bigquery storage_v1.json deleted file mode 100644 index 28ddb574..00000000 --- a/samples/generated_samples/snippet_metadata_bigquery storage_v1.json +++ /dev/null @@ -1,1479 +0,0 @@ -{ - "clientLibrary": { - "apis": [ - { - "id": "google.cloud.bigquery.storage.v1", - "version": "v1" - } - ], - "language": "PYTHON", - "name": "google-cloud-bigquery-storage" - }, - "snippets": [ - { - "canonical": true, - "clientMethod": { - "async": true, - "client": { - "fullName": "google.cloud.bigquery_storage_v1.BigQueryReadAsyncClient", - "shortName": "BigQueryReadAsyncClient" - }, - "fullName": "google.cloud.bigquery_storage_v1.BigQueryReadAsyncClient.create_read_session", - "method": { - "fullName": "google.cloud.bigquery.storage.v1.BigQueryRead.CreateReadSession", - "service": { - "fullName": "google.cloud.bigquery.storage.v1.BigQueryRead", - "shortName": "BigQueryRead" - }, - "shortName": "CreateReadSession" - }, - "parameters": [ - { - "name": "request", - "type": "google.cloud.bigquery_storage_v1.types.CreateReadSessionRequest" - }, - { - "name": "parent", - "type": "str" - }, - { - "name": "read_session", - "type": "google.cloud.bigquery_storage_v1.types.ReadSession" - }, - { - "name": "max_stream_count", - "type": "int" - }, - { - "name": "retry", - "type": "google.api_core.retry.Retry" - }, - { - "name": "timeout", - "type": "float" - }, - { - "name": "metadata", - "type": "Sequence[Tuple[str, str]" - } - ], - "resultType": "google.cloud.bigquery_storage_v1.types.ReadSession", - "shortName": "create_read_session" - }, - "description": "Sample for CreateReadSession", - "file": "bigquerystorage_v1_generated_big_query_read_create_read_session_async.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "bigquerystorage_v1_generated_BigQueryRead_CreateReadSession_async", - "segments": [ - { - "end": 51, - "start": 27, - "type": "FULL" - }, - { - "end": 51, - "start": 27, - "type": "SHORT" - }, - { - "end": 40, - "start": 38, - "type": "CLIENT_INITIALIZATION" - }, - { - "end": 45, - "start": 41, - "type": "REQUEST_INITIALIZATION" - }, - { - "end": 48, - "start": 46, - "type": "REQUEST_EXECUTION" - }, - { - "end": 52, - "start": 49, - "type": "RESPONSE_HANDLING" - } - ], - "title": "bigquerystorage_v1_generated_big_query_read_create_read_session_async.py" - }, - { - "canonical": true, - "clientMethod": { - "client": { - "fullName": "google.cloud.bigquery_storage_v1.BigQueryReadClient", - "shortName": "BigQueryReadClient" - }, - "fullName": "google.cloud.bigquery_storage_v1.BigQueryReadClient.create_read_session", - "method": { - "fullName": "google.cloud.bigquery.storage.v1.BigQueryRead.CreateReadSession", - "service": { - "fullName": "google.cloud.bigquery.storage.v1.BigQueryRead", - "shortName": "BigQueryRead" - }, - "shortName": "CreateReadSession" - }, - "parameters": [ - { - "name": "request", - "type": "google.cloud.bigquery_storage_v1.types.CreateReadSessionRequest" - }, - { - "name": "parent", - "type": "str" - }, - { - "name": "read_session", - "type": "google.cloud.bigquery_storage_v1.types.ReadSession" - }, - { - "name": "max_stream_count", - "type": "int" - }, - { - "name": "retry", - "type": "google.api_core.retry.Retry" - }, - { - "name": "timeout", - "type": "float" - }, - { - "name": "metadata", - "type": "Sequence[Tuple[str, str]" - } - ], - "resultType": "google.cloud.bigquery_storage_v1.types.ReadSession", - "shortName": "create_read_session" - }, - "description": "Sample for CreateReadSession", - "file": "bigquerystorage_v1_generated_big_query_read_create_read_session_sync.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "bigquerystorage_v1_generated_BigQueryRead_CreateReadSession_sync", - "segments": [ - { - "end": 51, - "start": 27, - "type": "FULL" - }, - { - "end": 51, - "start": 27, - "type": "SHORT" - }, - { - "end": 40, - "start": 38, - "type": "CLIENT_INITIALIZATION" - }, - { - "end": 45, - "start": 41, - "type": "REQUEST_INITIALIZATION" - }, - { - "end": 48, - "start": 46, - "type": "REQUEST_EXECUTION" - }, - { - "end": 52, - "start": 49, - "type": "RESPONSE_HANDLING" - } - ], - "title": "bigquerystorage_v1_generated_big_query_read_create_read_session_sync.py" - }, - { - "canonical": true, - "clientMethod": { - "async": true, - "client": { - "fullName": "google.cloud.bigquery_storage_v1.BigQueryReadAsyncClient", - "shortName": "BigQueryReadAsyncClient" - }, - "fullName": "google.cloud.bigquery_storage_v1.BigQueryReadAsyncClient.read_rows", - "method": { - "fullName": "google.cloud.bigquery.storage.v1.BigQueryRead.ReadRows", - "service": { - "fullName": "google.cloud.bigquery.storage.v1.BigQueryRead", - "shortName": "BigQueryRead" - }, - "shortName": "ReadRows" - }, - "parameters": [ - { - "name": "request", - "type": "google.cloud.bigquery_storage_v1.types.ReadRowsRequest" - }, - { - "name": "read_stream", - "type": "str" - }, - { - "name": "offset", - "type": "int" - }, - { - "name": "retry", - "type": "google.api_core.retry.Retry" - }, - { - "name": "timeout", - "type": "float" - }, - { - "name": "metadata", - "type": "Sequence[Tuple[str, str]" - } - ], - "resultType": "Iterable[google.cloud.bigquery_storage_v1.types.ReadRowsResponse]", - "shortName": "read_rows" - }, - "description": "Sample for ReadRows", - "file": "bigquerystorage_v1_generated_big_query_read_read_rows_async.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "bigquerystorage_v1_generated_BigQueryRead_ReadRows_async", - "segments": [ - { - "end": 52, - "start": 27, - "type": "FULL" - }, - { - "end": 52, - "start": 27, - "type": "SHORT" - }, - { - "end": 40, - "start": 38, - "type": "CLIENT_INITIALIZATION" - }, - { - "end": 45, - "start": 41, - "type": "REQUEST_INITIALIZATION" - }, - { - "end": 48, - "start": 46, - "type": "REQUEST_EXECUTION" - }, - { - "end": 53, - "start": 49, - "type": "RESPONSE_HANDLING" - } - ], - "title": "bigquerystorage_v1_generated_big_query_read_read_rows_async.py" - }, - { - "canonical": true, - "clientMethod": { - "client": { - "fullName": "google.cloud.bigquery_storage_v1.BigQueryReadClient", - "shortName": "BigQueryReadClient" - }, - "fullName": "google.cloud.bigquery_storage_v1.BigQueryReadClient.read_rows", - "method": { - "fullName": "google.cloud.bigquery.storage.v1.BigQueryRead.ReadRows", - "service": { - "fullName": "google.cloud.bigquery.storage.v1.BigQueryRead", - "shortName": "BigQueryRead" - }, - "shortName": "ReadRows" - }, - "parameters": [ - { - "name": "request", - "type": "google.cloud.bigquery_storage_v1.types.ReadRowsRequest" - }, - { - "name": "read_stream", - "type": "str" - }, - { - "name": "offset", - "type": "int" - }, - { - "name": "retry", - "type": "google.api_core.retry.Retry" - }, - { - "name": "timeout", - "type": "float" - }, - { - "name": "metadata", - "type": "Sequence[Tuple[str, str]" - } - ], - "resultType": "Iterable[google.cloud.bigquery_storage_v1.types.ReadRowsResponse]", - "shortName": "read_rows" - }, - "description": "Sample for ReadRows", - "file": "bigquerystorage_v1_generated_big_query_read_read_rows_sync.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "bigquerystorage_v1_generated_BigQueryRead_ReadRows_sync", - "segments": [ - { - "end": 52, - "start": 27, - "type": "FULL" - }, - { - "end": 52, - "start": 27, - "type": "SHORT" - }, - { - "end": 40, - "start": 38, - "type": "CLIENT_INITIALIZATION" - }, - { - "end": 45, - "start": 41, - "type": "REQUEST_INITIALIZATION" - }, - { - "end": 48, - "start": 46, - "type": "REQUEST_EXECUTION" - }, - { - "end": 53, - "start": 49, - "type": "RESPONSE_HANDLING" - } - ], - "title": "bigquerystorage_v1_generated_big_query_read_read_rows_sync.py" - }, - { - "canonical": true, - "clientMethod": { - "async": true, - "client": { - "fullName": "google.cloud.bigquery_storage_v1.BigQueryReadAsyncClient", - "shortName": "BigQueryReadAsyncClient" - }, - "fullName": "google.cloud.bigquery_storage_v1.BigQueryReadAsyncClient.split_read_stream", - "method": { - "fullName": "google.cloud.bigquery.storage.v1.BigQueryRead.SplitReadStream", - "service": { - "fullName": "google.cloud.bigquery.storage.v1.BigQueryRead", - "shortName": "BigQueryRead" - }, - "shortName": "SplitReadStream" - }, - "parameters": [ - { - "name": "request", - "type": "google.cloud.bigquery_storage_v1.types.SplitReadStreamRequest" - }, - { - "name": "retry", - "type": "google.api_core.retry.Retry" - }, - { - "name": "timeout", - "type": "float" - }, - { - "name": "metadata", - "type": "Sequence[Tuple[str, str]" - } - ], - "resultType": "google.cloud.bigquery_storage_v1.types.SplitReadStreamResponse", - "shortName": "split_read_stream" - }, - "description": "Sample for SplitReadStream", - "file": "bigquerystorage_v1_generated_big_query_read_split_read_stream_async.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "bigquerystorage_v1_generated_BigQueryRead_SplitReadStream_async", - "segments": [ - { - "end": 51, - "start": 27, - "type": "FULL" - }, - { - "end": 51, - "start": 27, - "type": "SHORT" - }, - { - "end": 40, - "start": 38, - "type": "CLIENT_INITIALIZATION" - }, - { - "end": 45, - "start": 41, - "type": "REQUEST_INITIALIZATION" - }, - { - "end": 48, - "start": 46, - "type": "REQUEST_EXECUTION" - }, - { - "end": 52, - "start": 49, - "type": "RESPONSE_HANDLING" - } - ], - "title": "bigquerystorage_v1_generated_big_query_read_split_read_stream_async.py" - }, - { - "canonical": true, - "clientMethod": { - "client": { - "fullName": "google.cloud.bigquery_storage_v1.BigQueryReadClient", - "shortName": "BigQueryReadClient" - }, - "fullName": "google.cloud.bigquery_storage_v1.BigQueryReadClient.split_read_stream", - "method": { - "fullName": "google.cloud.bigquery.storage.v1.BigQueryRead.SplitReadStream", - "service": { - "fullName": "google.cloud.bigquery.storage.v1.BigQueryRead", - "shortName": "BigQueryRead" - }, - "shortName": "SplitReadStream" - }, - "parameters": [ - { - "name": "request", - "type": "google.cloud.bigquery_storage_v1.types.SplitReadStreamRequest" - }, - { - "name": "retry", - "type": "google.api_core.retry.Retry" - }, - { - "name": "timeout", - "type": "float" - }, - { - "name": "metadata", - "type": "Sequence[Tuple[str, str]" - } - ], - "resultType": "google.cloud.bigquery_storage_v1.types.SplitReadStreamResponse", - "shortName": "split_read_stream" - }, - "description": "Sample for SplitReadStream", - "file": "bigquerystorage_v1_generated_big_query_read_split_read_stream_sync.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "bigquerystorage_v1_generated_BigQueryRead_SplitReadStream_sync", - "segments": [ - { - "end": 51, - "start": 27, - "type": "FULL" - }, - { - "end": 51, - "start": 27, - "type": "SHORT" - }, - { - "end": 40, - "start": 38, - "type": "CLIENT_INITIALIZATION" - }, - { - "end": 45, - "start": 41, - "type": "REQUEST_INITIALIZATION" - }, - { - "end": 48, - "start": 46, - "type": "REQUEST_EXECUTION" - }, - { - "end": 52, - "start": 49, - "type": "RESPONSE_HANDLING" - } - ], - "title": "bigquerystorage_v1_generated_big_query_read_split_read_stream_sync.py" - }, - { - "canonical": true, - "clientMethod": { - "async": true, - "client": { - "fullName": "google.cloud.bigquery_storage_v1.BigQueryWriteAsyncClient", - "shortName": "BigQueryWriteAsyncClient" - }, - "fullName": "google.cloud.bigquery_storage_v1.BigQueryWriteAsyncClient.append_rows", - "method": { - "fullName": "google.cloud.bigquery.storage.v1.BigQueryWrite.AppendRows", - "service": { - "fullName": "google.cloud.bigquery.storage.v1.BigQueryWrite", - "shortName": "BigQueryWrite" - }, - "shortName": "AppendRows" - }, - "parameters": [ - { - "name": "requests", - "type": "Iterator[google.cloud.bigquery_storage_v1.types.AppendRowsRequest]" - }, - { - "name": "retry", - "type": "google.api_core.retry.Retry" - }, - { - "name": "timeout", - "type": "float" - }, - { - "name": "metadata", - "type": "Sequence[Tuple[str, str]" - } - ], - "resultType": "Iterable[google.cloud.bigquery_storage_v1.types.AppendRowsResponse]", - "shortName": "append_rows" - }, - "description": "Sample for AppendRows", - "file": "bigquerystorage_v1_generated_big_query_write_append_rows_async.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "bigquerystorage_v1_generated_BigQueryWrite_AppendRows_async", - "segments": [ - { - "end": 62, - "start": 27, - "type": "FULL" - }, - { - "end": 62, - "start": 27, - "type": "SHORT" - }, - { - "end": 40, - "start": 38, - "type": "CLIENT_INITIALIZATION" - }, - { - "end": 55, - "start": 41, - "type": "REQUEST_INITIALIZATION" - }, - { - "end": 58, - "start": 56, - "type": "REQUEST_EXECUTION" - }, - { - "end": 63, - "start": 59, - "type": "RESPONSE_HANDLING" - } - ], - "title": "bigquerystorage_v1_generated_big_query_write_append_rows_async.py" - }, - { - "canonical": true, - "clientMethod": { - "client": { - "fullName": "google.cloud.bigquery_storage_v1.BigQueryWriteClient", - "shortName": "BigQueryWriteClient" - }, - "fullName": "google.cloud.bigquery_storage_v1.BigQueryWriteClient.append_rows", - "method": { - "fullName": "google.cloud.bigquery.storage.v1.BigQueryWrite.AppendRows", - "service": { - "fullName": "google.cloud.bigquery.storage.v1.BigQueryWrite", - "shortName": "BigQueryWrite" - }, - "shortName": "AppendRows" - }, - "parameters": [ - { - "name": "requests", - "type": "Iterator[google.cloud.bigquery_storage_v1.types.AppendRowsRequest]" - }, - { - "name": "retry", - "type": "google.api_core.retry.Retry" - }, - { - "name": "timeout", - "type": "float" - }, - { - "name": "metadata", - "type": "Sequence[Tuple[str, str]" - } - ], - "resultType": "Iterable[google.cloud.bigquery_storage_v1.types.AppendRowsResponse]", - "shortName": "append_rows" - }, - "description": "Sample for AppendRows", - "file": "bigquerystorage_v1_generated_big_query_write_append_rows_sync.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "bigquerystorage_v1_generated_BigQueryWrite_AppendRows_sync", - "segments": [ - { - "end": 62, - "start": 27, - "type": "FULL" - }, - { - "end": 62, - "start": 27, - "type": "SHORT" - }, - { - "end": 40, - "start": 38, - "type": "CLIENT_INITIALIZATION" - }, - { - "end": 55, - "start": 41, - "type": "REQUEST_INITIALIZATION" - }, - { - "end": 58, - "start": 56, - "type": "REQUEST_EXECUTION" - }, - { - "end": 63, - "start": 59, - "type": "RESPONSE_HANDLING" - } - ], - "title": "bigquerystorage_v1_generated_big_query_write_append_rows_sync.py" - }, - { - "canonical": true, - "clientMethod": { - "async": true, - "client": { - "fullName": "google.cloud.bigquery_storage_v1.BigQueryWriteAsyncClient", - "shortName": "BigQueryWriteAsyncClient" - }, - "fullName": "google.cloud.bigquery_storage_v1.BigQueryWriteAsyncClient.batch_commit_write_streams", - "method": { - "fullName": "google.cloud.bigquery.storage.v1.BigQueryWrite.BatchCommitWriteStreams", - "service": { - "fullName": "google.cloud.bigquery.storage.v1.BigQueryWrite", - "shortName": "BigQueryWrite" - }, - "shortName": "BatchCommitWriteStreams" - }, - "parameters": [ - { - "name": "request", - "type": "google.cloud.bigquery_storage_v1.types.BatchCommitWriteStreamsRequest" - }, - { - "name": "parent", - "type": "str" - }, - { - "name": "retry", - "type": "google.api_core.retry.Retry" - }, - { - "name": "timeout", - "type": "float" - }, - { - "name": "metadata", - "type": "Sequence[Tuple[str, str]" - } - ], - "resultType": "google.cloud.bigquery_storage_v1.types.BatchCommitWriteStreamsResponse", - "shortName": "batch_commit_write_streams" - }, - "description": "Sample for BatchCommitWriteStreams", - "file": "bigquerystorage_v1_generated_big_query_write_batch_commit_write_streams_async.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "bigquerystorage_v1_generated_BigQueryWrite_BatchCommitWriteStreams_async", - "segments": [ - { - "end": 52, - "start": 27, - "type": "FULL" - }, - { - "end": 52, - "start": 27, - "type": "SHORT" - }, - { - "end": 40, - "start": 38, - "type": "CLIENT_INITIALIZATION" - }, - { - "end": 46, - "start": 41, - "type": "REQUEST_INITIALIZATION" - }, - { - "end": 49, - "start": 47, - "type": "REQUEST_EXECUTION" - }, - { - "end": 53, - "start": 50, - "type": "RESPONSE_HANDLING" - } - ], - "title": "bigquerystorage_v1_generated_big_query_write_batch_commit_write_streams_async.py" - }, - { - "canonical": true, - "clientMethod": { - "client": { - "fullName": "google.cloud.bigquery_storage_v1.BigQueryWriteClient", - "shortName": "BigQueryWriteClient" - }, - "fullName": "google.cloud.bigquery_storage_v1.BigQueryWriteClient.batch_commit_write_streams", - "method": { - "fullName": "google.cloud.bigquery.storage.v1.BigQueryWrite.BatchCommitWriteStreams", - "service": { - "fullName": "google.cloud.bigquery.storage.v1.BigQueryWrite", - "shortName": "BigQueryWrite" - }, - "shortName": "BatchCommitWriteStreams" - }, - "parameters": [ - { - "name": "request", - "type": "google.cloud.bigquery_storage_v1.types.BatchCommitWriteStreamsRequest" - }, - { - "name": "parent", - "type": "str" - }, - { - "name": "retry", - "type": "google.api_core.retry.Retry" - }, - { - "name": "timeout", - "type": "float" - }, - { - "name": "metadata", - "type": "Sequence[Tuple[str, str]" - } - ], - "resultType": "google.cloud.bigquery_storage_v1.types.BatchCommitWriteStreamsResponse", - "shortName": "batch_commit_write_streams" - }, - "description": "Sample for BatchCommitWriteStreams", - "file": "bigquerystorage_v1_generated_big_query_write_batch_commit_write_streams_sync.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "bigquerystorage_v1_generated_BigQueryWrite_BatchCommitWriteStreams_sync", - "segments": [ - { - "end": 52, - "start": 27, - "type": "FULL" - }, - { - "end": 52, - "start": 27, - "type": "SHORT" - }, - { - "end": 40, - "start": 38, - "type": "CLIENT_INITIALIZATION" - }, - { - "end": 46, - "start": 41, - "type": "REQUEST_INITIALIZATION" - }, - { - "end": 49, - "start": 47, - "type": "REQUEST_EXECUTION" - }, - { - "end": 53, - "start": 50, - "type": "RESPONSE_HANDLING" - } - ], - "title": "bigquerystorage_v1_generated_big_query_write_batch_commit_write_streams_sync.py" - }, - { - "canonical": true, - "clientMethod": { - "async": true, - "client": { - "fullName": "google.cloud.bigquery_storage_v1.BigQueryWriteAsyncClient", - "shortName": "BigQueryWriteAsyncClient" - }, - "fullName": "google.cloud.bigquery_storage_v1.BigQueryWriteAsyncClient.create_write_stream", - "method": { - "fullName": "google.cloud.bigquery.storage.v1.BigQueryWrite.CreateWriteStream", - "service": { - "fullName": "google.cloud.bigquery.storage.v1.BigQueryWrite", - "shortName": "BigQueryWrite" - }, - "shortName": "CreateWriteStream" - }, - "parameters": [ - { - "name": "request", - "type": "google.cloud.bigquery_storage_v1.types.CreateWriteStreamRequest" - }, - { - "name": "parent", - "type": "str" - }, - { - "name": "write_stream", - "type": "google.cloud.bigquery_storage_v1.types.WriteStream" - }, - { - "name": "retry", - "type": "google.api_core.retry.Retry" - }, - { - "name": "timeout", - "type": "float" - }, - { - "name": "metadata", - "type": "Sequence[Tuple[str, str]" - } - ], - "resultType": "google.cloud.bigquery_storage_v1.types.WriteStream", - "shortName": "create_write_stream" - }, - "description": "Sample for CreateWriteStream", - "file": "bigquerystorage_v1_generated_big_query_write_create_write_stream_async.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "bigquerystorage_v1_generated_BigQueryWrite_CreateWriteStream_async", - "segments": [ - { - "end": 51, - "start": 27, - "type": "FULL" - }, - { - "end": 51, - "start": 27, - "type": "SHORT" - }, - { - "end": 40, - "start": 38, - "type": "CLIENT_INITIALIZATION" - }, - { - "end": 45, - "start": 41, - "type": "REQUEST_INITIALIZATION" - }, - { - "end": 48, - "start": 46, - "type": "REQUEST_EXECUTION" - }, - { - "end": 52, - "start": 49, - "type": "RESPONSE_HANDLING" - } - ], - "title": "bigquerystorage_v1_generated_big_query_write_create_write_stream_async.py" - }, - { - "canonical": true, - "clientMethod": { - "client": { - "fullName": "google.cloud.bigquery_storage_v1.BigQueryWriteClient", - "shortName": "BigQueryWriteClient" - }, - "fullName": "google.cloud.bigquery_storage_v1.BigQueryWriteClient.create_write_stream", - "method": { - "fullName": "google.cloud.bigquery.storage.v1.BigQueryWrite.CreateWriteStream", - "service": { - "fullName": "google.cloud.bigquery.storage.v1.BigQueryWrite", - "shortName": "BigQueryWrite" - }, - "shortName": "CreateWriteStream" - }, - "parameters": [ - { - "name": "request", - "type": "google.cloud.bigquery_storage_v1.types.CreateWriteStreamRequest" - }, - { - "name": "parent", - "type": "str" - }, - { - "name": "write_stream", - "type": "google.cloud.bigquery_storage_v1.types.WriteStream" - }, - { - "name": "retry", - "type": "google.api_core.retry.Retry" - }, - { - "name": "timeout", - "type": "float" - }, - { - "name": "metadata", - "type": "Sequence[Tuple[str, str]" - } - ], - "resultType": "google.cloud.bigquery_storage_v1.types.WriteStream", - "shortName": "create_write_stream" - }, - "description": "Sample for CreateWriteStream", - "file": "bigquerystorage_v1_generated_big_query_write_create_write_stream_sync.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "bigquerystorage_v1_generated_BigQueryWrite_CreateWriteStream_sync", - "segments": [ - { - "end": 51, - "start": 27, - "type": "FULL" - }, - { - "end": 51, - "start": 27, - "type": "SHORT" - }, - { - "end": 40, - "start": 38, - "type": "CLIENT_INITIALIZATION" - }, - { - "end": 45, - "start": 41, - "type": "REQUEST_INITIALIZATION" - }, - { - "end": 48, - "start": 46, - "type": "REQUEST_EXECUTION" - }, - { - "end": 52, - "start": 49, - "type": "RESPONSE_HANDLING" - } - ], - "title": "bigquerystorage_v1_generated_big_query_write_create_write_stream_sync.py" - }, - { - "canonical": true, - "clientMethod": { - "async": true, - "client": { - "fullName": "google.cloud.bigquery_storage_v1.BigQueryWriteAsyncClient", - "shortName": "BigQueryWriteAsyncClient" - }, - "fullName": "google.cloud.bigquery_storage_v1.BigQueryWriteAsyncClient.finalize_write_stream", - "method": { - "fullName": "google.cloud.bigquery.storage.v1.BigQueryWrite.FinalizeWriteStream", - "service": { - "fullName": "google.cloud.bigquery.storage.v1.BigQueryWrite", - "shortName": "BigQueryWrite" - }, - "shortName": "FinalizeWriteStream" - }, - "parameters": [ - { - "name": "request", - "type": "google.cloud.bigquery_storage_v1.types.FinalizeWriteStreamRequest" - }, - { - "name": "name", - "type": "str" - }, - { - "name": "retry", - "type": "google.api_core.retry.Retry" - }, - { - "name": "timeout", - "type": "float" - }, - { - "name": "metadata", - "type": "Sequence[Tuple[str, str]" - } - ], - "resultType": "google.cloud.bigquery_storage_v1.types.FinalizeWriteStreamResponse", - "shortName": "finalize_write_stream" - }, - "description": "Sample for FinalizeWriteStream", - "file": "bigquerystorage_v1_generated_big_query_write_finalize_write_stream_async.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "bigquerystorage_v1_generated_BigQueryWrite_FinalizeWriteStream_async", - "segments": [ - { - "end": 51, - "start": 27, - "type": "FULL" - }, - { - "end": 51, - "start": 27, - "type": "SHORT" - }, - { - "end": 40, - "start": 38, - "type": "CLIENT_INITIALIZATION" - }, - { - "end": 45, - "start": 41, - "type": "REQUEST_INITIALIZATION" - }, - { - "end": 48, - "start": 46, - "type": "REQUEST_EXECUTION" - }, - { - "end": 52, - "start": 49, - "type": "RESPONSE_HANDLING" - } - ], - "title": "bigquerystorage_v1_generated_big_query_write_finalize_write_stream_async.py" - }, - { - "canonical": true, - "clientMethod": { - "client": { - "fullName": "google.cloud.bigquery_storage_v1.BigQueryWriteClient", - "shortName": "BigQueryWriteClient" - }, - "fullName": "google.cloud.bigquery_storage_v1.BigQueryWriteClient.finalize_write_stream", - "method": { - "fullName": "google.cloud.bigquery.storage.v1.BigQueryWrite.FinalizeWriteStream", - "service": { - "fullName": "google.cloud.bigquery.storage.v1.BigQueryWrite", - "shortName": "BigQueryWrite" - }, - "shortName": "FinalizeWriteStream" - }, - "parameters": [ - { - "name": "request", - "type": "google.cloud.bigquery_storage_v1.types.FinalizeWriteStreamRequest" - }, - { - "name": "name", - "type": "str" - }, - { - "name": "retry", - "type": "google.api_core.retry.Retry" - }, - { - "name": "timeout", - "type": "float" - }, - { - "name": "metadata", - "type": "Sequence[Tuple[str, str]" - } - ], - "resultType": "google.cloud.bigquery_storage_v1.types.FinalizeWriteStreamResponse", - "shortName": "finalize_write_stream" - }, - "description": "Sample for FinalizeWriteStream", - "file": "bigquerystorage_v1_generated_big_query_write_finalize_write_stream_sync.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "bigquerystorage_v1_generated_BigQueryWrite_FinalizeWriteStream_sync", - "segments": [ - { - "end": 51, - "start": 27, - "type": "FULL" - }, - { - "end": 51, - "start": 27, - "type": "SHORT" - }, - { - "end": 40, - "start": 38, - "type": "CLIENT_INITIALIZATION" - }, - { - "end": 45, - "start": 41, - "type": "REQUEST_INITIALIZATION" - }, - { - "end": 48, - "start": 46, - "type": "REQUEST_EXECUTION" - }, - { - "end": 52, - "start": 49, - "type": "RESPONSE_HANDLING" - } - ], - "title": "bigquerystorage_v1_generated_big_query_write_finalize_write_stream_sync.py" - }, - { - "canonical": true, - "clientMethod": { - "async": true, - "client": { - "fullName": "google.cloud.bigquery_storage_v1.BigQueryWriteAsyncClient", - "shortName": "BigQueryWriteAsyncClient" - }, - "fullName": "google.cloud.bigquery_storage_v1.BigQueryWriteAsyncClient.flush_rows", - "method": { - "fullName": "google.cloud.bigquery.storage.v1.BigQueryWrite.FlushRows", - "service": { - "fullName": "google.cloud.bigquery.storage.v1.BigQueryWrite", - "shortName": "BigQueryWrite" - }, - "shortName": "FlushRows" - }, - "parameters": [ - { - "name": "request", - "type": "google.cloud.bigquery_storage_v1.types.FlushRowsRequest" - }, - { - "name": "write_stream", - "type": "str" - }, - { - "name": "retry", - "type": "google.api_core.retry.Retry" - }, - { - "name": "timeout", - "type": "float" - }, - { - "name": "metadata", - "type": "Sequence[Tuple[str, str]" - } - ], - "resultType": "google.cloud.bigquery_storage_v1.types.FlushRowsResponse", - "shortName": "flush_rows" - }, - "description": "Sample for FlushRows", - "file": "bigquerystorage_v1_generated_big_query_write_flush_rows_async.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "bigquerystorage_v1_generated_BigQueryWrite_FlushRows_async", - "segments": [ - { - "end": 51, - "start": 27, - "type": "FULL" - }, - { - "end": 51, - "start": 27, - "type": "SHORT" - }, - { - "end": 40, - "start": 38, - "type": "CLIENT_INITIALIZATION" - }, - { - "end": 45, - "start": 41, - "type": "REQUEST_INITIALIZATION" - }, - { - "end": 48, - "start": 46, - "type": "REQUEST_EXECUTION" - }, - { - "end": 52, - "start": 49, - "type": "RESPONSE_HANDLING" - } - ], - "title": "bigquerystorage_v1_generated_big_query_write_flush_rows_async.py" - }, - { - "canonical": true, - "clientMethod": { - "client": { - "fullName": "google.cloud.bigquery_storage_v1.BigQueryWriteClient", - "shortName": "BigQueryWriteClient" - }, - "fullName": "google.cloud.bigquery_storage_v1.BigQueryWriteClient.flush_rows", - "method": { - "fullName": "google.cloud.bigquery.storage.v1.BigQueryWrite.FlushRows", - "service": { - "fullName": "google.cloud.bigquery.storage.v1.BigQueryWrite", - "shortName": "BigQueryWrite" - }, - "shortName": "FlushRows" - }, - "parameters": [ - { - "name": "request", - "type": "google.cloud.bigquery_storage_v1.types.FlushRowsRequest" - }, - { - "name": "write_stream", - "type": "str" - }, - { - "name": "retry", - "type": "google.api_core.retry.Retry" - }, - { - "name": "timeout", - "type": "float" - }, - { - "name": "metadata", - "type": "Sequence[Tuple[str, str]" - } - ], - "resultType": "google.cloud.bigquery_storage_v1.types.FlushRowsResponse", - "shortName": "flush_rows" - }, - "description": "Sample for FlushRows", - "file": "bigquerystorage_v1_generated_big_query_write_flush_rows_sync.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "bigquerystorage_v1_generated_BigQueryWrite_FlushRows_sync", - "segments": [ - { - "end": 51, - "start": 27, - "type": "FULL" - }, - { - "end": 51, - "start": 27, - "type": "SHORT" - }, - { - "end": 40, - "start": 38, - "type": "CLIENT_INITIALIZATION" - }, - { - "end": 45, - "start": 41, - "type": "REQUEST_INITIALIZATION" - }, - { - "end": 48, - "start": 46, - "type": "REQUEST_EXECUTION" - }, - { - "end": 52, - "start": 49, - "type": "RESPONSE_HANDLING" - } - ], - "title": "bigquerystorage_v1_generated_big_query_write_flush_rows_sync.py" - }, - { - "canonical": true, - "clientMethod": { - "async": true, - "client": { - "fullName": "google.cloud.bigquery_storage_v1.BigQueryWriteAsyncClient", - "shortName": "BigQueryWriteAsyncClient" - }, - "fullName": "google.cloud.bigquery_storage_v1.BigQueryWriteAsyncClient.get_write_stream", - "method": { - "fullName": "google.cloud.bigquery.storage.v1.BigQueryWrite.GetWriteStream", - "service": { - "fullName": "google.cloud.bigquery.storage.v1.BigQueryWrite", - "shortName": "BigQueryWrite" - }, - "shortName": "GetWriteStream" - }, - "parameters": [ - { - "name": "request", - "type": "google.cloud.bigquery_storage_v1.types.GetWriteStreamRequest" - }, - { - "name": "name", - "type": "str" - }, - { - "name": "retry", - "type": "google.api_core.retry.Retry" - }, - { - "name": "timeout", - "type": "float" - }, - { - "name": "metadata", - "type": "Sequence[Tuple[str, str]" - } - ], - "resultType": "google.cloud.bigquery_storage_v1.types.WriteStream", - "shortName": "get_write_stream" - }, - "description": "Sample for GetWriteStream", - "file": "bigquerystorage_v1_generated_big_query_write_get_write_stream_async.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "bigquerystorage_v1_generated_BigQueryWrite_GetWriteStream_async", - "segments": [ - { - "end": 51, - "start": 27, - "type": "FULL" - }, - { - "end": 51, - "start": 27, - "type": "SHORT" - }, - { - "end": 40, - "start": 38, - "type": "CLIENT_INITIALIZATION" - }, - { - "end": 45, - "start": 41, - "type": "REQUEST_INITIALIZATION" - }, - { - "end": 48, - "start": 46, - "type": "REQUEST_EXECUTION" - }, - { - "end": 52, - "start": 49, - "type": "RESPONSE_HANDLING" - } - ], - "title": "bigquerystorage_v1_generated_big_query_write_get_write_stream_async.py" - }, - { - "canonical": true, - "clientMethod": { - "client": { - "fullName": "google.cloud.bigquery_storage_v1.BigQueryWriteClient", - "shortName": "BigQueryWriteClient" - }, - "fullName": "google.cloud.bigquery_storage_v1.BigQueryWriteClient.get_write_stream", - "method": { - "fullName": "google.cloud.bigquery.storage.v1.BigQueryWrite.GetWriteStream", - "service": { - "fullName": "google.cloud.bigquery.storage.v1.BigQueryWrite", - "shortName": "BigQueryWrite" - }, - "shortName": "GetWriteStream" - }, - "parameters": [ - { - "name": "request", - "type": "google.cloud.bigquery_storage_v1.types.GetWriteStreamRequest" - }, - { - "name": "name", - "type": "str" - }, - { - "name": "retry", - "type": "google.api_core.retry.Retry" - }, - { - "name": "timeout", - "type": "float" - }, - { - "name": "metadata", - "type": "Sequence[Tuple[str, str]" - } - ], - "resultType": "google.cloud.bigquery_storage_v1.types.WriteStream", - "shortName": "get_write_stream" - }, - "description": "Sample for GetWriteStream", - "file": "bigquerystorage_v1_generated_big_query_write_get_write_stream_sync.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "bigquerystorage_v1_generated_BigQueryWrite_GetWriteStream_sync", - "segments": [ - { - "end": 51, - "start": 27, - "type": "FULL" - }, - { - "end": 51, - "start": 27, - "type": "SHORT" - }, - { - "end": 40, - "start": 38, - "type": "CLIENT_INITIALIZATION" - }, - { - "end": 45, - "start": 41, - "type": "REQUEST_INITIALIZATION" - }, - { - "end": 48, - "start": 46, - "type": "REQUEST_EXECUTION" - }, - { - "end": 52, - "start": 49, - "type": "RESPONSE_HANDLING" - } - ], - "title": "bigquerystorage_v1_generated_big_query_write_get_write_stream_sync.py" - } - ] -} diff --git a/samples/generated_samples/snippet_metadata_bigquery storage_v1beta2.json b/samples/generated_samples/snippet_metadata_bigquery storage_v1beta2.json deleted file mode 100644 index e58914b7..00000000 --- a/samples/generated_samples/snippet_metadata_bigquery storage_v1beta2.json +++ /dev/null @@ -1,1479 +0,0 @@ -{ - "clientLibrary": { - "apis": [ - { - "id": "google.cloud.bigquery.storage.v1beta2", - "version": "v1beta2" - } - ], - "language": "PYTHON", - "name": "google-cloud-bigquery-storage" - }, - "snippets": [ - { - "canonical": true, - "clientMethod": { - "async": true, - "client": { - "fullName": "google.cloud.bigquery_storage_v1beta2.BigQueryReadAsyncClient", - "shortName": "BigQueryReadAsyncClient" - }, - "fullName": "google.cloud.bigquery_storage_v1beta2.BigQueryReadAsyncClient.create_read_session", - "method": { - "fullName": "google.cloud.bigquery.storage.v1beta2.BigQueryRead.CreateReadSession", - "service": { - "fullName": "google.cloud.bigquery.storage.v1beta2.BigQueryRead", - "shortName": "BigQueryRead" - }, - "shortName": "CreateReadSession" - }, - "parameters": [ - { - "name": "request", - "type": "google.cloud.bigquery_storage_v1beta2.types.CreateReadSessionRequest" - }, - { - "name": "parent", - "type": "str" - }, - { - "name": "read_session", - "type": "google.cloud.bigquery_storage_v1beta2.types.ReadSession" - }, - { - "name": "max_stream_count", - "type": "int" - }, - { - "name": "retry", - "type": "google.api_core.retry.Retry" - }, - { - "name": "timeout", - "type": "float" - }, - { - "name": "metadata", - "type": "Sequence[Tuple[str, str]" - } - ], - "resultType": "google.cloud.bigquery_storage_v1beta2.types.ReadSession", - "shortName": "create_read_session" - }, - "description": "Sample for CreateReadSession", - "file": "bigquerystorage_v1beta2_generated_big_query_read_create_read_session_async.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "bigquerystorage_v1beta2_generated_BigQueryRead_CreateReadSession_async", - "segments": [ - { - "end": 51, - "start": 27, - "type": "FULL" - }, - { - "end": 51, - "start": 27, - "type": "SHORT" - }, - { - "end": 40, - "start": 38, - "type": "CLIENT_INITIALIZATION" - }, - { - "end": 45, - "start": 41, - "type": "REQUEST_INITIALIZATION" - }, - { - "end": 48, - "start": 46, - "type": "REQUEST_EXECUTION" - }, - { - "end": 52, - "start": 49, - "type": "RESPONSE_HANDLING" - } - ], - "title": "bigquerystorage_v1beta2_generated_big_query_read_create_read_session_async.py" - }, - { - "canonical": true, - "clientMethod": { - "client": { - "fullName": "google.cloud.bigquery_storage_v1beta2.BigQueryReadClient", - "shortName": "BigQueryReadClient" - }, - "fullName": "google.cloud.bigquery_storage_v1beta2.BigQueryReadClient.create_read_session", - "method": { - "fullName": "google.cloud.bigquery.storage.v1beta2.BigQueryRead.CreateReadSession", - "service": { - "fullName": "google.cloud.bigquery.storage.v1beta2.BigQueryRead", - "shortName": "BigQueryRead" - }, - "shortName": "CreateReadSession" - }, - "parameters": [ - { - "name": "request", - "type": "google.cloud.bigquery_storage_v1beta2.types.CreateReadSessionRequest" - }, - { - "name": "parent", - "type": "str" - }, - { - "name": "read_session", - "type": "google.cloud.bigquery_storage_v1beta2.types.ReadSession" - }, - { - "name": "max_stream_count", - "type": "int" - }, - { - "name": "retry", - "type": "google.api_core.retry.Retry" - }, - { - "name": "timeout", - "type": "float" - }, - { - "name": "metadata", - "type": "Sequence[Tuple[str, str]" - } - ], - "resultType": "google.cloud.bigquery_storage_v1beta2.types.ReadSession", - "shortName": "create_read_session" - }, - "description": "Sample for CreateReadSession", - "file": "bigquerystorage_v1beta2_generated_big_query_read_create_read_session_sync.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "bigquerystorage_v1beta2_generated_BigQueryRead_CreateReadSession_sync", - "segments": [ - { - "end": 51, - "start": 27, - "type": "FULL" - }, - { - "end": 51, - "start": 27, - "type": "SHORT" - }, - { - "end": 40, - "start": 38, - "type": "CLIENT_INITIALIZATION" - }, - { - "end": 45, - "start": 41, - "type": "REQUEST_INITIALIZATION" - }, - { - "end": 48, - "start": 46, - "type": "REQUEST_EXECUTION" - }, - { - "end": 52, - "start": 49, - "type": "RESPONSE_HANDLING" - } - ], - "title": "bigquerystorage_v1beta2_generated_big_query_read_create_read_session_sync.py" - }, - { - "canonical": true, - "clientMethod": { - "async": true, - "client": { - "fullName": "google.cloud.bigquery_storage_v1beta2.BigQueryReadAsyncClient", - "shortName": "BigQueryReadAsyncClient" - }, - "fullName": "google.cloud.bigquery_storage_v1beta2.BigQueryReadAsyncClient.read_rows", - "method": { - "fullName": "google.cloud.bigquery.storage.v1beta2.BigQueryRead.ReadRows", - "service": { - "fullName": "google.cloud.bigquery.storage.v1beta2.BigQueryRead", - "shortName": "BigQueryRead" - }, - "shortName": "ReadRows" - }, - "parameters": [ - { - "name": "request", - "type": "google.cloud.bigquery_storage_v1beta2.types.ReadRowsRequest" - }, - { - "name": "read_stream", - "type": "str" - }, - { - "name": "offset", - "type": "int" - }, - { - "name": "retry", - "type": "google.api_core.retry.Retry" - }, - { - "name": "timeout", - "type": "float" - }, - { - "name": "metadata", - "type": "Sequence[Tuple[str, str]" - } - ], - "resultType": "Iterable[google.cloud.bigquery_storage_v1beta2.types.ReadRowsResponse]", - "shortName": "read_rows" - }, - "description": "Sample for ReadRows", - "file": "bigquerystorage_v1beta2_generated_big_query_read_read_rows_async.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "bigquerystorage_v1beta2_generated_BigQueryRead_ReadRows_async", - "segments": [ - { - "end": 52, - "start": 27, - "type": "FULL" - }, - { - "end": 52, - "start": 27, - "type": "SHORT" - }, - { - "end": 40, - "start": 38, - "type": "CLIENT_INITIALIZATION" - }, - { - "end": 45, - "start": 41, - "type": "REQUEST_INITIALIZATION" - }, - { - "end": 48, - "start": 46, - "type": "REQUEST_EXECUTION" - }, - { - "end": 53, - "start": 49, - "type": "RESPONSE_HANDLING" - } - ], - "title": "bigquerystorage_v1beta2_generated_big_query_read_read_rows_async.py" - }, - { - "canonical": true, - "clientMethod": { - "client": { - "fullName": "google.cloud.bigquery_storage_v1beta2.BigQueryReadClient", - "shortName": "BigQueryReadClient" - }, - "fullName": "google.cloud.bigquery_storage_v1beta2.BigQueryReadClient.read_rows", - "method": { - "fullName": "google.cloud.bigquery.storage.v1beta2.BigQueryRead.ReadRows", - "service": { - "fullName": "google.cloud.bigquery.storage.v1beta2.BigQueryRead", - "shortName": "BigQueryRead" - }, - "shortName": "ReadRows" - }, - "parameters": [ - { - "name": "request", - "type": "google.cloud.bigquery_storage_v1beta2.types.ReadRowsRequest" - }, - { - "name": "read_stream", - "type": "str" - }, - { - "name": "offset", - "type": "int" - }, - { - "name": "retry", - "type": "google.api_core.retry.Retry" - }, - { - "name": "timeout", - "type": "float" - }, - { - "name": "metadata", - "type": "Sequence[Tuple[str, str]" - } - ], - "resultType": "Iterable[google.cloud.bigquery_storage_v1beta2.types.ReadRowsResponse]", - "shortName": "read_rows" - }, - "description": "Sample for ReadRows", - "file": "bigquerystorage_v1beta2_generated_big_query_read_read_rows_sync.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "bigquerystorage_v1beta2_generated_BigQueryRead_ReadRows_sync", - "segments": [ - { - "end": 52, - "start": 27, - "type": "FULL" - }, - { - "end": 52, - "start": 27, - "type": "SHORT" - }, - { - "end": 40, - "start": 38, - "type": "CLIENT_INITIALIZATION" - }, - { - "end": 45, - "start": 41, - "type": "REQUEST_INITIALIZATION" - }, - { - "end": 48, - "start": 46, - "type": "REQUEST_EXECUTION" - }, - { - "end": 53, - "start": 49, - "type": "RESPONSE_HANDLING" - } - ], - "title": "bigquerystorage_v1beta2_generated_big_query_read_read_rows_sync.py" - }, - { - "canonical": true, - "clientMethod": { - "async": true, - "client": { - "fullName": "google.cloud.bigquery_storage_v1beta2.BigQueryReadAsyncClient", - "shortName": "BigQueryReadAsyncClient" - }, - "fullName": "google.cloud.bigquery_storage_v1beta2.BigQueryReadAsyncClient.split_read_stream", - "method": { - "fullName": "google.cloud.bigquery.storage.v1beta2.BigQueryRead.SplitReadStream", - "service": { - "fullName": "google.cloud.bigquery.storage.v1beta2.BigQueryRead", - "shortName": "BigQueryRead" - }, - "shortName": "SplitReadStream" - }, - "parameters": [ - { - "name": "request", - "type": "google.cloud.bigquery_storage_v1beta2.types.SplitReadStreamRequest" - }, - { - "name": "retry", - "type": "google.api_core.retry.Retry" - }, - { - "name": "timeout", - "type": "float" - }, - { - "name": "metadata", - "type": "Sequence[Tuple[str, str]" - } - ], - "resultType": "google.cloud.bigquery_storage_v1beta2.types.SplitReadStreamResponse", - "shortName": "split_read_stream" - }, - "description": "Sample for SplitReadStream", - "file": "bigquerystorage_v1beta2_generated_big_query_read_split_read_stream_async.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "bigquerystorage_v1beta2_generated_BigQueryRead_SplitReadStream_async", - "segments": [ - { - "end": 51, - "start": 27, - "type": "FULL" - }, - { - "end": 51, - "start": 27, - "type": "SHORT" - }, - { - "end": 40, - "start": 38, - "type": "CLIENT_INITIALIZATION" - }, - { - "end": 45, - "start": 41, - "type": "REQUEST_INITIALIZATION" - }, - { - "end": 48, - "start": 46, - "type": "REQUEST_EXECUTION" - }, - { - "end": 52, - "start": 49, - "type": "RESPONSE_HANDLING" - } - ], - "title": "bigquerystorage_v1beta2_generated_big_query_read_split_read_stream_async.py" - }, - { - "canonical": true, - "clientMethod": { - "client": { - "fullName": "google.cloud.bigquery_storage_v1beta2.BigQueryReadClient", - "shortName": "BigQueryReadClient" - }, - "fullName": "google.cloud.bigquery_storage_v1beta2.BigQueryReadClient.split_read_stream", - "method": { - "fullName": "google.cloud.bigquery.storage.v1beta2.BigQueryRead.SplitReadStream", - "service": { - "fullName": "google.cloud.bigquery.storage.v1beta2.BigQueryRead", - "shortName": "BigQueryRead" - }, - "shortName": "SplitReadStream" - }, - "parameters": [ - { - "name": "request", - "type": "google.cloud.bigquery_storage_v1beta2.types.SplitReadStreamRequest" - }, - { - "name": "retry", - "type": "google.api_core.retry.Retry" - }, - { - "name": "timeout", - "type": "float" - }, - { - "name": "metadata", - "type": "Sequence[Tuple[str, str]" - } - ], - "resultType": "google.cloud.bigquery_storage_v1beta2.types.SplitReadStreamResponse", - "shortName": "split_read_stream" - }, - "description": "Sample for SplitReadStream", - "file": "bigquerystorage_v1beta2_generated_big_query_read_split_read_stream_sync.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "bigquerystorage_v1beta2_generated_BigQueryRead_SplitReadStream_sync", - "segments": [ - { - "end": 51, - "start": 27, - "type": "FULL" - }, - { - "end": 51, - "start": 27, - "type": "SHORT" - }, - { - "end": 40, - "start": 38, - "type": "CLIENT_INITIALIZATION" - }, - { - "end": 45, - "start": 41, - "type": "REQUEST_INITIALIZATION" - }, - { - "end": 48, - "start": 46, - "type": "REQUEST_EXECUTION" - }, - { - "end": 52, - "start": 49, - "type": "RESPONSE_HANDLING" - } - ], - "title": "bigquerystorage_v1beta2_generated_big_query_read_split_read_stream_sync.py" - }, - { - "canonical": true, - "clientMethod": { - "async": true, - "client": { - "fullName": "google.cloud.bigquery_storage_v1beta2.BigQueryWriteAsyncClient", - "shortName": "BigQueryWriteAsyncClient" - }, - "fullName": "google.cloud.bigquery_storage_v1beta2.BigQueryWriteAsyncClient.append_rows", - "method": { - "fullName": "google.cloud.bigquery.storage.v1beta2.BigQueryWrite.AppendRows", - "service": { - "fullName": "google.cloud.bigquery.storage.v1beta2.BigQueryWrite", - "shortName": "BigQueryWrite" - }, - "shortName": "AppendRows" - }, - "parameters": [ - { - "name": "requests", - "type": "Iterator[google.cloud.bigquery_storage_v1beta2.types.AppendRowsRequest]" - }, - { - "name": "retry", - "type": "google.api_core.retry.Retry" - }, - { - "name": "timeout", - "type": "float" - }, - { - "name": "metadata", - "type": "Sequence[Tuple[str, str]" - } - ], - "resultType": "Iterable[google.cloud.bigquery_storage_v1beta2.types.AppendRowsResponse]", - "shortName": "append_rows" - }, - "description": "Sample for AppendRows", - "file": "bigquerystorage_v1beta2_generated_big_query_write_append_rows_async.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "bigquerystorage_v1beta2_generated_BigQueryWrite_AppendRows_async", - "segments": [ - { - "end": 62, - "start": 27, - "type": "FULL" - }, - { - "end": 62, - "start": 27, - "type": "SHORT" - }, - { - "end": 40, - "start": 38, - "type": "CLIENT_INITIALIZATION" - }, - { - "end": 55, - "start": 41, - "type": "REQUEST_INITIALIZATION" - }, - { - "end": 58, - "start": 56, - "type": "REQUEST_EXECUTION" - }, - { - "end": 63, - "start": 59, - "type": "RESPONSE_HANDLING" - } - ], - "title": "bigquerystorage_v1beta2_generated_big_query_write_append_rows_async.py" - }, - { - "canonical": true, - "clientMethod": { - "client": { - "fullName": "google.cloud.bigquery_storage_v1beta2.BigQueryWriteClient", - "shortName": "BigQueryWriteClient" - }, - "fullName": "google.cloud.bigquery_storage_v1beta2.BigQueryWriteClient.append_rows", - "method": { - "fullName": "google.cloud.bigquery.storage.v1beta2.BigQueryWrite.AppendRows", - "service": { - "fullName": "google.cloud.bigquery.storage.v1beta2.BigQueryWrite", - "shortName": "BigQueryWrite" - }, - "shortName": "AppendRows" - }, - "parameters": [ - { - "name": "requests", - "type": "Iterator[google.cloud.bigquery_storage_v1beta2.types.AppendRowsRequest]" - }, - { - "name": "retry", - "type": "google.api_core.retry.Retry" - }, - { - "name": "timeout", - "type": "float" - }, - { - "name": "metadata", - "type": "Sequence[Tuple[str, str]" - } - ], - "resultType": "Iterable[google.cloud.bigquery_storage_v1beta2.types.AppendRowsResponse]", - "shortName": "append_rows" - }, - "description": "Sample for AppendRows", - "file": "bigquerystorage_v1beta2_generated_big_query_write_append_rows_sync.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "bigquerystorage_v1beta2_generated_BigQueryWrite_AppendRows_sync", - "segments": [ - { - "end": 62, - "start": 27, - "type": "FULL" - }, - { - "end": 62, - "start": 27, - "type": "SHORT" - }, - { - "end": 40, - "start": 38, - "type": "CLIENT_INITIALIZATION" - }, - { - "end": 55, - "start": 41, - "type": "REQUEST_INITIALIZATION" - }, - { - "end": 58, - "start": 56, - "type": "REQUEST_EXECUTION" - }, - { - "end": 63, - "start": 59, - "type": "RESPONSE_HANDLING" - } - ], - "title": "bigquerystorage_v1beta2_generated_big_query_write_append_rows_sync.py" - }, - { - "canonical": true, - "clientMethod": { - "async": true, - "client": { - "fullName": "google.cloud.bigquery_storage_v1beta2.BigQueryWriteAsyncClient", - "shortName": "BigQueryWriteAsyncClient" - }, - "fullName": "google.cloud.bigquery_storage_v1beta2.BigQueryWriteAsyncClient.batch_commit_write_streams", - "method": { - "fullName": "google.cloud.bigquery.storage.v1beta2.BigQueryWrite.BatchCommitWriteStreams", - "service": { - "fullName": "google.cloud.bigquery.storage.v1beta2.BigQueryWrite", - "shortName": "BigQueryWrite" - }, - "shortName": "BatchCommitWriteStreams" - }, - "parameters": [ - { - "name": "request", - "type": "google.cloud.bigquery_storage_v1beta2.types.BatchCommitWriteStreamsRequest" - }, - { - "name": "parent", - "type": "str" - }, - { - "name": "retry", - "type": "google.api_core.retry.Retry" - }, - { - "name": "timeout", - "type": "float" - }, - { - "name": "metadata", - "type": "Sequence[Tuple[str, str]" - } - ], - "resultType": "google.cloud.bigquery_storage_v1beta2.types.BatchCommitWriteStreamsResponse", - "shortName": "batch_commit_write_streams" - }, - "description": "Sample for BatchCommitWriteStreams", - "file": "bigquerystorage_v1beta2_generated_big_query_write_batch_commit_write_streams_async.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "bigquerystorage_v1beta2_generated_BigQueryWrite_BatchCommitWriteStreams_async", - "segments": [ - { - "end": 52, - "start": 27, - "type": "FULL" - }, - { - "end": 52, - "start": 27, - "type": "SHORT" - }, - { - "end": 40, - "start": 38, - "type": "CLIENT_INITIALIZATION" - }, - { - "end": 46, - "start": 41, - "type": "REQUEST_INITIALIZATION" - }, - { - "end": 49, - "start": 47, - "type": "REQUEST_EXECUTION" - }, - { - "end": 53, - "start": 50, - "type": "RESPONSE_HANDLING" - } - ], - "title": "bigquerystorage_v1beta2_generated_big_query_write_batch_commit_write_streams_async.py" - }, - { - "canonical": true, - "clientMethod": { - "client": { - "fullName": "google.cloud.bigquery_storage_v1beta2.BigQueryWriteClient", - "shortName": "BigQueryWriteClient" - }, - "fullName": "google.cloud.bigquery_storage_v1beta2.BigQueryWriteClient.batch_commit_write_streams", - "method": { - "fullName": "google.cloud.bigquery.storage.v1beta2.BigQueryWrite.BatchCommitWriteStreams", - "service": { - "fullName": "google.cloud.bigquery.storage.v1beta2.BigQueryWrite", - "shortName": "BigQueryWrite" - }, - "shortName": "BatchCommitWriteStreams" - }, - "parameters": [ - { - "name": "request", - "type": "google.cloud.bigquery_storage_v1beta2.types.BatchCommitWriteStreamsRequest" - }, - { - "name": "parent", - "type": "str" - }, - { - "name": "retry", - "type": "google.api_core.retry.Retry" - }, - { - "name": "timeout", - "type": "float" - }, - { - "name": "metadata", - "type": "Sequence[Tuple[str, str]" - } - ], - "resultType": "google.cloud.bigquery_storage_v1beta2.types.BatchCommitWriteStreamsResponse", - "shortName": "batch_commit_write_streams" - }, - "description": "Sample for BatchCommitWriteStreams", - "file": "bigquerystorage_v1beta2_generated_big_query_write_batch_commit_write_streams_sync.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "bigquerystorage_v1beta2_generated_BigQueryWrite_BatchCommitWriteStreams_sync", - "segments": [ - { - "end": 52, - "start": 27, - "type": "FULL" - }, - { - "end": 52, - "start": 27, - "type": "SHORT" - }, - { - "end": 40, - "start": 38, - "type": "CLIENT_INITIALIZATION" - }, - { - "end": 46, - "start": 41, - "type": "REQUEST_INITIALIZATION" - }, - { - "end": 49, - "start": 47, - "type": "REQUEST_EXECUTION" - }, - { - "end": 53, - "start": 50, - "type": "RESPONSE_HANDLING" - } - ], - "title": "bigquerystorage_v1beta2_generated_big_query_write_batch_commit_write_streams_sync.py" - }, - { - "canonical": true, - "clientMethod": { - "async": true, - "client": { - "fullName": "google.cloud.bigquery_storage_v1beta2.BigQueryWriteAsyncClient", - "shortName": "BigQueryWriteAsyncClient" - }, - "fullName": "google.cloud.bigquery_storage_v1beta2.BigQueryWriteAsyncClient.create_write_stream", - "method": { - "fullName": "google.cloud.bigquery.storage.v1beta2.BigQueryWrite.CreateWriteStream", - "service": { - "fullName": "google.cloud.bigquery.storage.v1beta2.BigQueryWrite", - "shortName": "BigQueryWrite" - }, - "shortName": "CreateWriteStream" - }, - "parameters": [ - { - "name": "request", - "type": "google.cloud.bigquery_storage_v1beta2.types.CreateWriteStreamRequest" - }, - { - "name": "parent", - "type": "str" - }, - { - "name": "write_stream", - "type": "google.cloud.bigquery_storage_v1beta2.types.WriteStream" - }, - { - "name": "retry", - "type": "google.api_core.retry.Retry" - }, - { - "name": "timeout", - "type": "float" - }, - { - "name": "metadata", - "type": "Sequence[Tuple[str, str]" - } - ], - "resultType": "google.cloud.bigquery_storage_v1beta2.types.WriteStream", - "shortName": "create_write_stream" - }, - "description": "Sample for CreateWriteStream", - "file": "bigquerystorage_v1beta2_generated_big_query_write_create_write_stream_async.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "bigquerystorage_v1beta2_generated_BigQueryWrite_CreateWriteStream_async", - "segments": [ - { - "end": 51, - "start": 27, - "type": "FULL" - }, - { - "end": 51, - "start": 27, - "type": "SHORT" - }, - { - "end": 40, - "start": 38, - "type": "CLIENT_INITIALIZATION" - }, - { - "end": 45, - "start": 41, - "type": "REQUEST_INITIALIZATION" - }, - { - "end": 48, - "start": 46, - "type": "REQUEST_EXECUTION" - }, - { - "end": 52, - "start": 49, - "type": "RESPONSE_HANDLING" - } - ], - "title": "bigquerystorage_v1beta2_generated_big_query_write_create_write_stream_async.py" - }, - { - "canonical": true, - "clientMethod": { - "client": { - "fullName": "google.cloud.bigquery_storage_v1beta2.BigQueryWriteClient", - "shortName": "BigQueryWriteClient" - }, - "fullName": "google.cloud.bigquery_storage_v1beta2.BigQueryWriteClient.create_write_stream", - "method": { - "fullName": "google.cloud.bigquery.storage.v1beta2.BigQueryWrite.CreateWriteStream", - "service": { - "fullName": "google.cloud.bigquery.storage.v1beta2.BigQueryWrite", - "shortName": "BigQueryWrite" - }, - "shortName": "CreateWriteStream" - }, - "parameters": [ - { - "name": "request", - "type": "google.cloud.bigquery_storage_v1beta2.types.CreateWriteStreamRequest" - }, - { - "name": "parent", - "type": "str" - }, - { - "name": "write_stream", - "type": "google.cloud.bigquery_storage_v1beta2.types.WriteStream" - }, - { - "name": "retry", - "type": "google.api_core.retry.Retry" - }, - { - "name": "timeout", - "type": "float" - }, - { - "name": "metadata", - "type": "Sequence[Tuple[str, str]" - } - ], - "resultType": "google.cloud.bigquery_storage_v1beta2.types.WriteStream", - "shortName": "create_write_stream" - }, - "description": "Sample for CreateWriteStream", - "file": "bigquerystorage_v1beta2_generated_big_query_write_create_write_stream_sync.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "bigquerystorage_v1beta2_generated_BigQueryWrite_CreateWriteStream_sync", - "segments": [ - { - "end": 51, - "start": 27, - "type": "FULL" - }, - { - "end": 51, - "start": 27, - "type": "SHORT" - }, - { - "end": 40, - "start": 38, - "type": "CLIENT_INITIALIZATION" - }, - { - "end": 45, - "start": 41, - "type": "REQUEST_INITIALIZATION" - }, - { - "end": 48, - "start": 46, - "type": "REQUEST_EXECUTION" - }, - { - "end": 52, - "start": 49, - "type": "RESPONSE_HANDLING" - } - ], - "title": "bigquerystorage_v1beta2_generated_big_query_write_create_write_stream_sync.py" - }, - { - "canonical": true, - "clientMethod": { - "async": true, - "client": { - "fullName": "google.cloud.bigquery_storage_v1beta2.BigQueryWriteAsyncClient", - "shortName": "BigQueryWriteAsyncClient" - }, - "fullName": "google.cloud.bigquery_storage_v1beta2.BigQueryWriteAsyncClient.finalize_write_stream", - "method": { - "fullName": "google.cloud.bigquery.storage.v1beta2.BigQueryWrite.FinalizeWriteStream", - "service": { - "fullName": "google.cloud.bigquery.storage.v1beta2.BigQueryWrite", - "shortName": "BigQueryWrite" - }, - "shortName": "FinalizeWriteStream" - }, - "parameters": [ - { - "name": "request", - "type": "google.cloud.bigquery_storage_v1beta2.types.FinalizeWriteStreamRequest" - }, - { - "name": "name", - "type": "str" - }, - { - "name": "retry", - "type": "google.api_core.retry.Retry" - }, - { - "name": "timeout", - "type": "float" - }, - { - "name": "metadata", - "type": "Sequence[Tuple[str, str]" - } - ], - "resultType": "google.cloud.bigquery_storage_v1beta2.types.FinalizeWriteStreamResponse", - "shortName": "finalize_write_stream" - }, - "description": "Sample for FinalizeWriteStream", - "file": "bigquerystorage_v1beta2_generated_big_query_write_finalize_write_stream_async.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "bigquerystorage_v1beta2_generated_BigQueryWrite_FinalizeWriteStream_async", - "segments": [ - { - "end": 51, - "start": 27, - "type": "FULL" - }, - { - "end": 51, - "start": 27, - "type": "SHORT" - }, - { - "end": 40, - "start": 38, - "type": "CLIENT_INITIALIZATION" - }, - { - "end": 45, - "start": 41, - "type": "REQUEST_INITIALIZATION" - }, - { - "end": 48, - "start": 46, - "type": "REQUEST_EXECUTION" - }, - { - "end": 52, - "start": 49, - "type": "RESPONSE_HANDLING" - } - ], - "title": "bigquerystorage_v1beta2_generated_big_query_write_finalize_write_stream_async.py" - }, - { - "canonical": true, - "clientMethod": { - "client": { - "fullName": "google.cloud.bigquery_storage_v1beta2.BigQueryWriteClient", - "shortName": "BigQueryWriteClient" - }, - "fullName": "google.cloud.bigquery_storage_v1beta2.BigQueryWriteClient.finalize_write_stream", - "method": { - "fullName": "google.cloud.bigquery.storage.v1beta2.BigQueryWrite.FinalizeWriteStream", - "service": { - "fullName": "google.cloud.bigquery.storage.v1beta2.BigQueryWrite", - "shortName": "BigQueryWrite" - }, - "shortName": "FinalizeWriteStream" - }, - "parameters": [ - { - "name": "request", - "type": "google.cloud.bigquery_storage_v1beta2.types.FinalizeWriteStreamRequest" - }, - { - "name": "name", - "type": "str" - }, - { - "name": "retry", - "type": "google.api_core.retry.Retry" - }, - { - "name": "timeout", - "type": "float" - }, - { - "name": "metadata", - "type": "Sequence[Tuple[str, str]" - } - ], - "resultType": "google.cloud.bigquery_storage_v1beta2.types.FinalizeWriteStreamResponse", - "shortName": "finalize_write_stream" - }, - "description": "Sample for FinalizeWriteStream", - "file": "bigquerystorage_v1beta2_generated_big_query_write_finalize_write_stream_sync.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "bigquerystorage_v1beta2_generated_BigQueryWrite_FinalizeWriteStream_sync", - "segments": [ - { - "end": 51, - "start": 27, - "type": "FULL" - }, - { - "end": 51, - "start": 27, - "type": "SHORT" - }, - { - "end": 40, - "start": 38, - "type": "CLIENT_INITIALIZATION" - }, - { - "end": 45, - "start": 41, - "type": "REQUEST_INITIALIZATION" - }, - { - "end": 48, - "start": 46, - "type": "REQUEST_EXECUTION" - }, - { - "end": 52, - "start": 49, - "type": "RESPONSE_HANDLING" - } - ], - "title": "bigquerystorage_v1beta2_generated_big_query_write_finalize_write_stream_sync.py" - }, - { - "canonical": true, - "clientMethod": { - "async": true, - "client": { - "fullName": "google.cloud.bigquery_storage_v1beta2.BigQueryWriteAsyncClient", - "shortName": "BigQueryWriteAsyncClient" - }, - "fullName": "google.cloud.bigquery_storage_v1beta2.BigQueryWriteAsyncClient.flush_rows", - "method": { - "fullName": "google.cloud.bigquery.storage.v1beta2.BigQueryWrite.FlushRows", - "service": { - "fullName": "google.cloud.bigquery.storage.v1beta2.BigQueryWrite", - "shortName": "BigQueryWrite" - }, - "shortName": "FlushRows" - }, - "parameters": [ - { - "name": "request", - "type": "google.cloud.bigquery_storage_v1beta2.types.FlushRowsRequest" - }, - { - "name": "write_stream", - "type": "str" - }, - { - "name": "retry", - "type": "google.api_core.retry.Retry" - }, - { - "name": "timeout", - "type": "float" - }, - { - "name": "metadata", - "type": "Sequence[Tuple[str, str]" - } - ], - "resultType": "google.cloud.bigquery_storage_v1beta2.types.FlushRowsResponse", - "shortName": "flush_rows" - }, - "description": "Sample for FlushRows", - "file": "bigquerystorage_v1beta2_generated_big_query_write_flush_rows_async.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "bigquerystorage_v1beta2_generated_BigQueryWrite_FlushRows_async", - "segments": [ - { - "end": 51, - "start": 27, - "type": "FULL" - }, - { - "end": 51, - "start": 27, - "type": "SHORT" - }, - { - "end": 40, - "start": 38, - "type": "CLIENT_INITIALIZATION" - }, - { - "end": 45, - "start": 41, - "type": "REQUEST_INITIALIZATION" - }, - { - "end": 48, - "start": 46, - "type": "REQUEST_EXECUTION" - }, - { - "end": 52, - "start": 49, - "type": "RESPONSE_HANDLING" - } - ], - "title": "bigquerystorage_v1beta2_generated_big_query_write_flush_rows_async.py" - }, - { - "canonical": true, - "clientMethod": { - "client": { - "fullName": "google.cloud.bigquery_storage_v1beta2.BigQueryWriteClient", - "shortName": "BigQueryWriteClient" - }, - "fullName": "google.cloud.bigquery_storage_v1beta2.BigQueryWriteClient.flush_rows", - "method": { - "fullName": "google.cloud.bigquery.storage.v1beta2.BigQueryWrite.FlushRows", - "service": { - "fullName": "google.cloud.bigquery.storage.v1beta2.BigQueryWrite", - "shortName": "BigQueryWrite" - }, - "shortName": "FlushRows" - }, - "parameters": [ - { - "name": "request", - "type": "google.cloud.bigquery_storage_v1beta2.types.FlushRowsRequest" - }, - { - "name": "write_stream", - "type": "str" - }, - { - "name": "retry", - "type": "google.api_core.retry.Retry" - }, - { - "name": "timeout", - "type": "float" - }, - { - "name": "metadata", - "type": "Sequence[Tuple[str, str]" - } - ], - "resultType": "google.cloud.bigquery_storage_v1beta2.types.FlushRowsResponse", - "shortName": "flush_rows" - }, - "description": "Sample for FlushRows", - "file": "bigquerystorage_v1beta2_generated_big_query_write_flush_rows_sync.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "bigquerystorage_v1beta2_generated_BigQueryWrite_FlushRows_sync", - "segments": [ - { - "end": 51, - "start": 27, - "type": "FULL" - }, - { - "end": 51, - "start": 27, - "type": "SHORT" - }, - { - "end": 40, - "start": 38, - "type": "CLIENT_INITIALIZATION" - }, - { - "end": 45, - "start": 41, - "type": "REQUEST_INITIALIZATION" - }, - { - "end": 48, - "start": 46, - "type": "REQUEST_EXECUTION" - }, - { - "end": 52, - "start": 49, - "type": "RESPONSE_HANDLING" - } - ], - "title": "bigquerystorage_v1beta2_generated_big_query_write_flush_rows_sync.py" - }, - { - "canonical": true, - "clientMethod": { - "async": true, - "client": { - "fullName": "google.cloud.bigquery_storage_v1beta2.BigQueryWriteAsyncClient", - "shortName": "BigQueryWriteAsyncClient" - }, - "fullName": "google.cloud.bigquery_storage_v1beta2.BigQueryWriteAsyncClient.get_write_stream", - "method": { - "fullName": "google.cloud.bigquery.storage.v1beta2.BigQueryWrite.GetWriteStream", - "service": { - "fullName": "google.cloud.bigquery.storage.v1beta2.BigQueryWrite", - "shortName": "BigQueryWrite" - }, - "shortName": "GetWriteStream" - }, - "parameters": [ - { - "name": "request", - "type": "google.cloud.bigquery_storage_v1beta2.types.GetWriteStreamRequest" - }, - { - "name": "name", - "type": "str" - }, - { - "name": "retry", - "type": "google.api_core.retry.Retry" - }, - { - "name": "timeout", - "type": "float" - }, - { - "name": "metadata", - "type": "Sequence[Tuple[str, str]" - } - ], - "resultType": "google.cloud.bigquery_storage_v1beta2.types.WriteStream", - "shortName": "get_write_stream" - }, - "description": "Sample for GetWriteStream", - "file": "bigquerystorage_v1beta2_generated_big_query_write_get_write_stream_async.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "bigquerystorage_v1beta2_generated_BigQueryWrite_GetWriteStream_async", - "segments": [ - { - "end": 51, - "start": 27, - "type": "FULL" - }, - { - "end": 51, - "start": 27, - "type": "SHORT" - }, - { - "end": 40, - "start": 38, - "type": "CLIENT_INITIALIZATION" - }, - { - "end": 45, - "start": 41, - "type": "REQUEST_INITIALIZATION" - }, - { - "end": 48, - "start": 46, - "type": "REQUEST_EXECUTION" - }, - { - "end": 52, - "start": 49, - "type": "RESPONSE_HANDLING" - } - ], - "title": "bigquerystorage_v1beta2_generated_big_query_write_get_write_stream_async.py" - }, - { - "canonical": true, - "clientMethod": { - "client": { - "fullName": "google.cloud.bigquery_storage_v1beta2.BigQueryWriteClient", - "shortName": "BigQueryWriteClient" - }, - "fullName": "google.cloud.bigquery_storage_v1beta2.BigQueryWriteClient.get_write_stream", - "method": { - "fullName": "google.cloud.bigquery.storage.v1beta2.BigQueryWrite.GetWriteStream", - "service": { - "fullName": "google.cloud.bigquery.storage.v1beta2.BigQueryWrite", - "shortName": "BigQueryWrite" - }, - "shortName": "GetWriteStream" - }, - "parameters": [ - { - "name": "request", - "type": "google.cloud.bigquery_storage_v1beta2.types.GetWriteStreamRequest" - }, - { - "name": "name", - "type": "str" - }, - { - "name": "retry", - "type": "google.api_core.retry.Retry" - }, - { - "name": "timeout", - "type": "float" - }, - { - "name": "metadata", - "type": "Sequence[Tuple[str, str]" - } - ], - "resultType": "google.cloud.bigquery_storage_v1beta2.types.WriteStream", - "shortName": "get_write_stream" - }, - "description": "Sample for GetWriteStream", - "file": "bigquerystorage_v1beta2_generated_big_query_write_get_write_stream_sync.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "bigquerystorage_v1beta2_generated_BigQueryWrite_GetWriteStream_sync", - "segments": [ - { - "end": 51, - "start": 27, - "type": "FULL" - }, - { - "end": 51, - "start": 27, - "type": "SHORT" - }, - { - "end": 40, - "start": 38, - "type": "CLIENT_INITIALIZATION" - }, - { - "end": 45, - "start": 41, - "type": "REQUEST_INITIALIZATION" - }, - { - "end": 48, - "start": 46, - "type": "REQUEST_EXECUTION" - }, - { - "end": 52, - "start": 49, - "type": "RESPONSE_HANDLING" - } - ], - "title": "bigquerystorage_v1beta2_generated_big_query_write_get_write_stream_sync.py" - } - ] -} diff --git a/setup.py b/setup.py index 52df2348..857b13ab 100644 --- a/setup.py +++ b/setup.py @@ -1,30 +1,44 @@ # -*- coding: utf-8 -*- -# -# Copyright 2018 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-bigquery-storage" -description = "BigQuery Storage API API client library" -version = "2.16.2" -release_status = "Development Status :: 5 - Production/Stable" + + +description = "Google Cloud Bigquery Storage API client library" + +version = {} +with open( + os.path.join(package_root, "google/cloud/bigquery_storage/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", ] @@ -33,6 +47,7 @@ "fastavro": ["fastavro>=0.21.2"], "pyarrow": ["pyarrow>=0.15.0"], } +url = "https://github.com/googleapis/python-bigquery-storage" package_root = os.path.abspath(os.path.dirname(__file__)) @@ -58,7 +73,7 @@ author="Google LLC", author_email="googleapis-packages@google.com", license="Apache 2.0", - url="https://github.com/googleapis/python-bigquery-storage", + url=url, classifiers=[ release_status, "Intended Audience :: Developers", @@ -74,10 +89,10 @@ ], platforms="Posix; MacOS X; Windows", packages=packages, + python_requires=">=3.7", namespace_packages=namespaces, install_requires=dependencies, extras_require=extras, - python_requires=">=3.7", scripts=["scripts/fixup_bigquery_storage_v1_keywords.py"], include_package_data=True, zip_safe=False, From 559cd782db5147018a0543fb528a1964bc0940f3 Mon Sep 17 00:00:00 2001 From: Anthonios Partheniou Date: Wed, 30 Nov 2022 16:19:16 +0000 Subject: [PATCH 2/3] customize testing/constraints-3.7.txt --- owlbot.py | 1 + testing/constraints-3.7.txt | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/owlbot.py b/owlbot.py index d29fef3e..4c84f477 100644 --- a/owlbot.py +++ b/owlbot.py @@ -96,6 +96,7 @@ "scripts/fixup_bigquery_storage_v1beta2_keywords.py", "**/gapic_version.py", "docs/index.rst", + "testing/constraints-3.7.txt", ], ) s.remove_staging_dirs() diff --git a/testing/constraints-3.7.txt b/testing/constraints-3.7.txt index 6f3158cc..2bf3d3d0 100644 --- a/testing/constraints-3.7.txt +++ b/testing/constraints-3.7.txt @@ -6,4 +6,8 @@ # Then this file should have google-cloud-foo==1.14.0 google-api-core==1.33.2 proto-plus==1.22.0 +libcst==0.2.5 +fastavro==0.21.2 +pandas==1.0.5 +pyarrow==0.15.0 protobuf==3.19.5 From 40724a813722533fb23b990c4988edd5ae54597f Mon Sep 17 00:00:00 2001 From: Anthonios Partheniou Date: Wed, 30 Nov 2022 16:35:40 +0000 Subject: [PATCH 3/3] set coverage level to 98% --- .github/workflows/unittest.yml | 2 +- noxfile.py | 2 +- owlbot.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/unittest.yml b/.github/workflows/unittest.yml index 23000c05..97699c66 100644 --- a/.github/workflows/unittest.yml +++ b/.github/workflows/unittest.yml @@ -54,4 +54,4 @@ jobs: - name: Report coverage results run: | coverage combine .coverage-results/.coverage* - coverage report --show-missing --fail-under=100 + coverage report --show-missing --fail-under=98 diff --git a/noxfile.py b/noxfile.py index 49b3f084..6d619687 100644 --- a/noxfile.py +++ b/noxfile.py @@ -278,7 +278,7 @@ def cover(session): test runs (not system test runs), and then erases coverage data. """ session.install("coverage", "pytest-cov") - session.run("coverage", "report", "--show-missing", "--fail-under=100") + session.run("coverage", "report", "--show-missing", "--fail-under=98") session.run("coverage", "erase") diff --git a/owlbot.py b/owlbot.py index 4c84f477..a55304ba 100644 --- a/owlbot.py +++ b/owlbot.py @@ -109,7 +109,7 @@ unit_test_extras = ["tests"] + extras templated_files = gcp.CommonTemplates().py_library( - cov_level=100, + cov_level=98, microgenerator=True, unit_test_extras=unit_test_extras, system_test_extras=extras,