From df333806d02236730da565ae78b798902480c365 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Wed, 1 Mar 2023 10:06:45 +0000 Subject: [PATCH 1/7] chore(deps): update dependency google-cloud-bigquery-datatransfer to v3.11.0 (#446) --- samples/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/snippets/requirements.txt b/samples/snippets/requirements.txt index 13e5c5de..047407db 100644 --- a/samples/snippets/requirements.txt +++ b/samples/snippets/requirements.txt @@ -1 +1 @@ -google-cloud-bigquery-datatransfer==3.10.1 +google-cloud-bigquery-datatransfer==3.11.0 From 16421b54e8950b72a3f80265752008d1daed4c14 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Sat, 4 Mar 2023 11:30:08 +0000 Subject: [PATCH 2/7] chore(deps): update dependency pytest to v7.2.2 (#447) --- samples/snippets/requirements-test.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/snippets/requirements-test.txt b/samples/snippets/requirements-test.txt index bbc2a702..20d47eed 100644 --- a/samples/snippets/requirements-test.txt +++ b/samples/snippets/requirements-test.txt @@ -1,4 +1,4 @@ google-cloud-bigquery==3.6.0 google-cloud-pubsub==2.15.0 -pytest==7.2.1 +pytest==7.2.2 mock==5.0.1 From e2f04db7553721610903500133553e67fe717642 Mon Sep 17 00:00:00 2001 From: Chalmer Lowe Date: Fri, 10 Mar 2023 10:31:56 -0500 Subject: [PATCH 3/7] fix: replaces deprecated snippet (#448) * fix: replaces deprecated snippet * adds a test * revises test assert statement * fix linting * examining return values * examining more return values * examining return values more betterly * evaluating timestamps in use * evaluating timestamps in use 2 * clean up test * clean up linting --- samples/snippets/manage_transfer_configs.py | 56 +++++++++++++++++++ .../snippets/manage_transfer_configs_test.py | 12 ++++ 2 files changed, 68 insertions(+) diff --git a/samples/snippets/manage_transfer_configs.py b/samples/snippets/manage_transfer_configs.py index 6b4abd78..59b5464f 100644 --- a/samples/snippets/manage_transfer_configs.py +++ b/samples/snippets/manage_transfer_configs.py @@ -147,6 +147,62 @@ def schedule_backfill(override_values={}): return response.runs +def schedule_backfill_manual_transfer(override_values={}): + # [START bigquerydatatransfer_start_manual_transfer] + import datetime + + from google.cloud.bigquery_datatransfer_v1 import ( + DataTransferServiceClient, + StartManualTransferRunsRequest, + ) + + # Create a client object + client = DataTransferServiceClient() + + # Replace with your transfer configuration name + transfer_config_name = "projects/1234/locations/us/transferConfigs/abcd" + # [END bigquerydatatransfer_start_manual_transfer] + # To facilitate testing, we replace values with alternatives + # provided by the testing harness. + transfer_config_name = override_values.get( + "transfer_config_name", transfer_config_name + ) + # [START bigquerydatatransfer_start_manual_transfer] + now = datetime.datetime.now(datetime.timezone.utc) + start_time = now - datetime.timedelta(days=5) + end_time = now - datetime.timedelta(days=2) + + # Some data sources, such as scheduled_query only support daily run. + # Truncate start_time and end_time to midnight time (00:00AM UTC). + start_time = datetime.datetime( + start_time.year, start_time.month, start_time.day, tzinfo=datetime.timezone.utc + ) + end_time = datetime.datetime( + end_time.year, end_time.month, end_time.day, tzinfo=datetime.timezone.utc + ) + + requested_time_range = StartManualTransferRunsRequest.TimeRange( + start_time=start_time, + end_time=end_time, + ) + + # Initialize request argument(s) + request = StartManualTransferRunsRequest( + parent=transfer_config_name, + requested_time_range=requested_time_range, + ) + + # Make the request + response = client.start_manual_transfer_runs(request=request) + + # Handle the response + print("Started manual transfer runs:") + for run in response.runs: + print(f"backfill: {run.run_time} run: {run.name}") + # [END bigquerydatatransfer_start_manual_transfer] + return response.runs + + def delete_config(override_values={}): # [START bigquerydatatransfer_delete_transfer] import google.api_core.exceptions diff --git a/samples/snippets/manage_transfer_configs_test.py b/samples/snippets/manage_transfer_configs_test.py index 52d16dc2..3ffc91cf 100644 --- a/samples/snippets/manage_transfer_configs_test.py +++ b/samples/snippets/manage_transfer_configs_test.py @@ -62,6 +62,18 @@ def test_schedule_backfill(capsys, transfer_config_name): assert len(runs) == 4 +def test_schedule_backfill_manual_transfer(capsys, transfer_config_name): + runs = manage_transfer_configs.schedule_backfill_manual_transfer( + {"transfer_config_name": transfer_config_name} + ) + out, _ = capsys.readouterr() + assert "Started manual transfer runs:" in out + # Run IDs should include the transfer name in their path. + assert transfer_config_name in out + # Check that there are three runs for between 2 and 5 days ago. + assert len(runs) == 3 + + def test_delete_config(capsys, transfer_config_name): # transfer_config_name fixture in conftest.py calls the delete config # sample. To conserve limited BQ-DTS quota we only make basic checks. From ce8756fafc0143c771ab6e1fc16e8bc0dafce0dd Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 16 Mar 2023 11:36:25 +0000 Subject: [PATCH 4/7] chore(deps): Update nox in .kokoro/requirements.in [autoapprove] (#453) Source-Link: https://togithub.com/googleapis/synthtool/commit/92006bb3cdc84677aa93c7f5235424ec2b157146 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:2e247c7bf5154df7f98cce087a20ca7605e236340c7d6d1a14447e5c06791bd6 --- .github/.OwlBot.lock.yaml | 2 +- .kokoro/requirements.in | 2 +- .kokoro/requirements.txt | 14 +++++--------- 3 files changed, 7 insertions(+), 11 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 5fc5daa3..b8edda51 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,4 +13,4 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest - digest: sha256:8555f0e37e6261408f792bfd6635102d2da5ad73f8f09bcb24f25e6afb5fac97 + digest: sha256:2e247c7bf5154df7f98cce087a20ca7605e236340c7d6d1a14447e5c06791bd6 diff --git a/.kokoro/requirements.in b/.kokoro/requirements.in index 882178ce..ec867d9f 100644 --- a/.kokoro/requirements.in +++ b/.kokoro/requirements.in @@ -5,6 +5,6 @@ typing-extensions twine wheel setuptools -nox +nox>=2022.11.21 # required to remove dependency on py charset-normalizer<3 click<8.1.0 diff --git a/.kokoro/requirements.txt b/.kokoro/requirements.txt index fa99c129..66a2172a 100644 --- a/.kokoro/requirements.txt +++ b/.kokoro/requirements.txt @@ -1,6 +1,6 @@ # -# This file is autogenerated by pip-compile with python 3.10 -# To update, run: +# This file is autogenerated by pip-compile with Python 3.9 +# by the following command: # # pip-compile --allow-unsafe --generate-hashes requirements.in # @@ -335,9 +335,9 @@ more-itertools==9.0.0 \ --hash=sha256:250e83d7e81d0c87ca6bd942e6aeab8cc9daa6096d12c5308f3f92fa5e5c1f41 \ --hash=sha256:5a6257e40878ef0520b1803990e3e22303a41b5714006c32a3fd8304b26ea1ab # via jaraco-classes -nox==2022.8.7 \ - --hash=sha256:1b894940551dc5c389f9271d197ca5d655d40bdc6ccf93ed6880e4042760a34b \ - --hash=sha256:96cca88779e08282a699d672258ec01eb7c792d35bbbf538c723172bce23212c +nox==2022.11.21 \ + --hash=sha256:0e41a990e290e274cb205a976c4c97ee3c5234441a8132c8c3fd9ea3c22149eb \ + --hash=sha256:e21c31de0711d1274ca585a2c5fde36b1aa962005ba8e9322bf5eeed16dcd684 # via -r requirements.in packaging==21.3 \ --hash=sha256:dd47c42927d89ab911e606518907cc2d3a1f38bbd026385970643f9c5b8ecfeb \ @@ -380,10 +380,6 @@ protobuf==3.20.3 \ # gcp-docuploader # gcp-releasetool # google-api-core -py==1.11.0 \ - --hash=sha256:51c75c4126074b472f746a24399ad32f6053d1b34b68d2fa41e558e6f4a98719 \ - --hash=sha256:607c53218732647dff4acdfcd50cb62615cedf612e72d1724fb1a0cc6405b378 - # via nox pyasn1==0.4.8 \ --hash=sha256:39c7e2ec30515947ff4e87fb6f456dfc6e84857d34be479c9d4a4ba4bf46aa5d \ --hash=sha256:aef77c9fb94a3ac588e87841208bdec464471d9871bd5050a287cc9a475cd0ba From 250acb4ec89a33c54174659d33fd7088f22f93db Mon Sep 17 00:00:00 2001 From: Chalmer Lowe Date: Wed, 22 Mar 2023 09:36:27 -0400 Subject: [PATCH 5/7] docs: removes deprecated sample (#451) * docs: removes deprecated sample * modifies tags to matched deprecated function call --- samples/snippets/manage_transfer_configs.py | 50 ++----------------- .../snippets/manage_transfer_configs_test.py | 12 ----- 2 files changed, 4 insertions(+), 58 deletions(-) diff --git a/samples/snippets/manage_transfer_configs.py b/samples/snippets/manage_transfer_configs.py index 59b5464f..cd865455 100644 --- a/samples/snippets/manage_transfer_configs.py +++ b/samples/snippets/manage_transfer_configs.py @@ -105,50 +105,8 @@ def update_credentials_with_service_account(override_values={}): return transfer_config -def schedule_backfill(override_values={}): - # [START bigquerydatatransfer_schedule_backfill] - import datetime - - from google.cloud import bigquery_datatransfer - - transfer_client = bigquery_datatransfer.DataTransferServiceClient() - - transfer_config_name = "projects/1234/locations/us/transferConfigs/abcd" - # [END bigquerydatatransfer_schedule_backfill] - # To facilitate testing, we replace values with alternatives - # provided by the testing harness. - transfer_config_name = override_values.get( - "transfer_config_name", transfer_config_name - ) - # [START bigquerydatatransfer_schedule_backfill] - now = datetime.datetime.now(datetime.timezone.utc) - start_time = now - datetime.timedelta(days=5) - end_time = now - datetime.timedelta(days=2) - - # Some data sources, such as scheduled_query only support daily run. - # Truncate start_time and end_time to midnight time (00:00AM UTC). - start_time = datetime.datetime( - start_time.year, start_time.month, start_time.day, tzinfo=datetime.timezone.utc - ) - end_time = datetime.datetime( - end_time.year, end_time.month, end_time.day, tzinfo=datetime.timezone.utc - ) - - response = transfer_client.schedule_transfer_runs( - parent=transfer_config_name, - start_time=start_time, - end_time=end_time, - ) - - print("Started transfer runs:") - for run in response.runs: - print(f"backfill: {run.run_time} run: {run.name}") - # [END bigquerydatatransfer_schedule_backfill] - return response.runs - - def schedule_backfill_manual_transfer(override_values={}): - # [START bigquerydatatransfer_start_manual_transfer] + # [START bigquerydatatransfer_schedule_backfill] import datetime from google.cloud.bigquery_datatransfer_v1 import ( @@ -161,13 +119,13 @@ def schedule_backfill_manual_transfer(override_values={}): # Replace with your transfer configuration name transfer_config_name = "projects/1234/locations/us/transferConfigs/abcd" - # [END bigquerydatatransfer_start_manual_transfer] + # [END bigquerydatatransfer_schedule_backfill] # To facilitate testing, we replace values with alternatives # provided by the testing harness. transfer_config_name = override_values.get( "transfer_config_name", transfer_config_name ) - # [START bigquerydatatransfer_start_manual_transfer] + # [START bigquerydatatransfer_schedule_backfill] now = datetime.datetime.now(datetime.timezone.utc) start_time = now - datetime.timedelta(days=5) end_time = now - datetime.timedelta(days=2) @@ -199,7 +157,7 @@ def schedule_backfill_manual_transfer(override_values={}): print("Started manual transfer runs:") for run in response.runs: print(f"backfill: {run.run_time} run: {run.name}") - # [END bigquerydatatransfer_start_manual_transfer] + # [END bigquerydatatransfer_schedule_backfill] return response.runs diff --git a/samples/snippets/manage_transfer_configs_test.py b/samples/snippets/manage_transfer_configs_test.py index 3ffc91cf..5504f19c 100644 --- a/samples/snippets/manage_transfer_configs_test.py +++ b/samples/snippets/manage_transfer_configs_test.py @@ -50,18 +50,6 @@ def test_update_credentials_with_service_account( assert transfer_config_name in out -def test_schedule_backfill(capsys, transfer_config_name): - runs = manage_transfer_configs.schedule_backfill( - {"transfer_config_name": transfer_config_name} - ) - out, _ = capsys.readouterr() - assert "Started transfer runs:" in out - # Run IDs should include the transfer name in their path. - assert transfer_config_name in out - # Check that there are runs for 5, 4, 3, and 2 days ago. - assert len(runs) == 4 - - def test_schedule_backfill_manual_transfer(capsys, transfer_config_name): runs = manage_transfer_configs.schedule_backfill_manual_transfer( {"transfer_config_name": transfer_config_name} From 40a85d6eb5e40ff77c054c76bbdfe8a5b821e1ef Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 23 Mar 2023 09:43:57 -0400 Subject: [PATCH 6/7] docs: Fix formatting of request arg in docstring (#455) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * docs: Fix formatting of request arg in docstring chore: Update gapic-generator-python to v1.9.1 PiperOrigin-RevId: 518604533 Source-Link: https://github.com/googleapis/googleapis/commit/8a085aeddfa010af5bcef090827aac5255383d7e Source-Link: https://github.com/googleapis/googleapis-gen/commit/b2ab4b0a0ae2907e812c209198a74e0898afcb04 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYjJhYjRiMGEwYWUyOTA3ZTgxMmMyMDkxOThhNzRlMDg5OGFmY2IwNCJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- .../data_transfer_service/async_client.py | 62 +++++++++++-------- .../services/data_transfer_service/client.py | 62 +++++++++++-------- .../data_transfer_service/transports/rest.py | 13 ---- ...google.cloud.bigquery.datatransfer.v1.json | 2 +- 4 files changed, 71 insertions(+), 68 deletions(-) diff --git a/google/cloud/bigquery_datatransfer_v1/services/data_transfer_service/async_client.py b/google/cloud/bigquery_datatransfer_v1/services/data_transfer_service/async_client.py index b5ebe937..151ca29e 100644 --- a/google/cloud/bigquery_datatransfer_v1/services/data_transfer_service/async_client.py +++ b/google/cloud/bigquery_datatransfer_v1/services/data_transfer_service/async_client.py @@ -390,7 +390,8 @@ async def sample_list_data_sources(): Args: request (Optional[Union[google.cloud.bigquery_datatransfer_v1.types.ListDataSourcesRequest, dict]]): The request object. Request to list supported data - sources and their data transfer settings. + sources and their data transfer + settings. parent (:class:`str`): Required. The BigQuery project id for which data sources should be returned. Must be in the form: @@ -521,13 +522,16 @@ async def sample_create_transfer_config(): Args: request (Optional[Union[google.cloud.bigquery_datatransfer_v1.types.CreateTransferConfigRequest, dict]]): The request object. A request to create a data transfer - configuration. If new credentials are needed for this - transfer configuration, authorization info must be - provided. If authorization info is provided, the - transfer configuration will be associated with the user - id corresponding to the authorization info. Otherwise, - the transfer configuration will be associated with the - calling user. + configuration. If new credentials are + needed for this transfer configuration, + authorization info must be provided. If + authorization info is provided, the + transfer configuration will be + associated with the user id + corresponding to the authorization info. + Otherwise, the transfer configuration + will be associated with the calling + user. parent (:class:`str`): Required. The BigQuery project id where the transfer configuration should be created. Must be in the format @@ -653,8 +657,9 @@ async def sample_update_transfer_config(): Args: request (Optional[Union[google.cloud.bigquery_datatransfer_v1.types.UpdateTransferConfigRequest, dict]]): The request object. A request to update a transfer - configuration. To update the user id of the transfer - configuration, authorization info needs to be provided. + configuration. To update the user id of + the transfer configuration, + authorization info needs to be provided. transfer_config (:class:`google.cloud.bigquery_datatransfer_v1.types.TransferConfig`): Required. Data transfer configuration to create. @@ -771,8 +776,9 @@ async def sample_delete_transfer_config(): Args: request (Optional[Union[google.cloud.bigquery_datatransfer_v1.types.DeleteTransferConfigRequest, dict]]): The request object. A request to delete data transfer - information. All associated transfer runs and log - messages will be deleted as well. + information. All associated transfer + runs and log messages will be deleted as + well. name (:class:`str`): Required. The field will contain name of the resource requested, for example: @@ -1450,8 +1456,8 @@ async def sample_delete_transfer_run(): Args: request (Optional[Union[google.cloud.bigquery_datatransfer_v1.types.DeleteTransferRunRequest, dict]]): - The request object. A request to delete data transfer - run information. + The request object. A request to delete data transfer run + information. name (:class:`str`): Required. The field will contain name of the resource requested, for example: @@ -1558,8 +1564,7 @@ async def sample_list_transfer_runs(): Args: request (Optional[Union[google.cloud.bigquery_datatransfer_v1.types.ListTransferRunsRequest, dict]]): - The request object. A request to list data transfer - runs. + The request object. A request to list data transfer runs. parent (:class:`str`): Required. Name of transfer configuration for which transfer runs should be retrieved. Format of transfer @@ -1687,7 +1692,8 @@ async def sample_list_transfer_logs(): Args: request (Optional[Union[google.cloud.bigquery_datatransfer_v1.types.ListTransferLogsRequest, dict]]): The request object. A request to get user facing log - messages associated with data transfer run. + messages associated with data transfer + run. parent (:class:`str`): Required. Transfer run name in the form: ``projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}`` @@ -1814,13 +1820,16 @@ async def sample_check_valid_creds(): Args: request (Optional[Union[google.cloud.bigquery_datatransfer_v1.types.CheckValidCredsRequest, dict]]): The request object. A request to determine whether the - user has valid credentials. This method is used to limit - the number of OAuth popups in the user interface. The - user id is inferred from the API call context. - If the data source has the Google+ authorization type, - this method returns false, as it cannot be determined - whether the credentials are already valid merely based - on the user id. + user has valid credentials. This method + is used to limit the number of OAuth + popups in the user interface. The user + id is inferred from the API call + context. If the data source has the + Google+ authorization type, this method + returns false, as it cannot be + determined whether the credentials are + already valid merely based on the user + id. name (:class:`str`): Required. The data source in the form: ``projects/{project_id}/dataSources/{data_source_id}`` @@ -1936,9 +1945,8 @@ async def sample_enroll_data_sources(): Args: request (Optional[Union[google.cloud.bigquery_datatransfer_v1.types.EnrollDataSourcesRequest, dict]]): - The request object. A request to enroll a set of data - sources so they are visible in the BigQuery UI's - `Transfer` tab. + The request object. A request to enroll a set of data sources so they are + visible in the BigQuery UI's ``Transfer`` tab. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. diff --git a/google/cloud/bigquery_datatransfer_v1/services/data_transfer_service/client.py b/google/cloud/bigquery_datatransfer_v1/services/data_transfer_service/client.py index 0495d040..6a866419 100644 --- a/google/cloud/bigquery_datatransfer_v1/services/data_transfer_service/client.py +++ b/google/cloud/bigquery_datatransfer_v1/services/data_transfer_service/client.py @@ -639,7 +639,8 @@ def sample_list_data_sources(): Args: request (Union[google.cloud.bigquery_datatransfer_v1.types.ListDataSourcesRequest, dict]): The request object. Request to list supported data - sources and their data transfer settings. + sources and their data transfer + settings. parent (str): Required. The BigQuery project id for which data sources should be returned. Must be in the form: @@ -760,13 +761,16 @@ def sample_create_transfer_config(): Args: request (Union[google.cloud.bigquery_datatransfer_v1.types.CreateTransferConfigRequest, dict]): The request object. A request to create a data transfer - configuration. If new credentials are needed for this - transfer configuration, authorization info must be - provided. If authorization info is provided, the - transfer configuration will be associated with the user - id corresponding to the authorization info. Otherwise, - the transfer configuration will be associated with the - calling user. + configuration. If new credentials are + needed for this transfer configuration, + authorization info must be provided. If + authorization info is provided, the + transfer configuration will be + associated with the user id + corresponding to the authorization info. + Otherwise, the transfer configuration + will be associated with the calling + user. parent (str): Required. The BigQuery project id where the transfer configuration should be created. Must be in the format @@ -892,8 +896,9 @@ def sample_update_transfer_config(): Args: request (Union[google.cloud.bigquery_datatransfer_v1.types.UpdateTransferConfigRequest, dict]): The request object. A request to update a transfer - configuration. To update the user id of the transfer - configuration, authorization info needs to be provided. + configuration. To update the user id of + the transfer configuration, + authorization info needs to be provided. transfer_config (google.cloud.bigquery_datatransfer_v1.types.TransferConfig): Required. Data transfer configuration to create. @@ -1010,8 +1015,9 @@ def sample_delete_transfer_config(): Args: request (Union[google.cloud.bigquery_datatransfer_v1.types.DeleteTransferConfigRequest, dict]): The request object. A request to delete data transfer - information. All associated transfer runs and log - messages will be deleted as well. + information. All associated transfer + runs and log messages will be deleted as + well. name (str): Required. The field will contain name of the resource requested, for example: @@ -1652,8 +1658,8 @@ def sample_delete_transfer_run(): Args: request (Union[google.cloud.bigquery_datatransfer_v1.types.DeleteTransferRunRequest, dict]): - The request object. A request to delete data transfer - run information. + The request object. A request to delete data transfer run + information. name (str): Required. The field will contain name of the resource requested, for example: @@ -1750,8 +1756,7 @@ def sample_list_transfer_runs(): Args: request (Union[google.cloud.bigquery_datatransfer_v1.types.ListTransferRunsRequest, dict]): - The request object. A request to list data transfer - runs. + The request object. A request to list data transfer runs. parent (str): Required. Name of transfer configuration for which transfer runs should be retrieved. Format of transfer @@ -1869,7 +1874,8 @@ def sample_list_transfer_logs(): Args: request (Union[google.cloud.bigquery_datatransfer_v1.types.ListTransferLogsRequest, dict]): The request object. A request to get user facing log - messages associated with data transfer run. + messages associated with data transfer + run. parent (str): Required. Transfer run name in the form: ``projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}`` @@ -1986,13 +1992,16 @@ def sample_check_valid_creds(): Args: request (Union[google.cloud.bigquery_datatransfer_v1.types.CheckValidCredsRequest, dict]): The request object. A request to determine whether the - user has valid credentials. This method is used to limit - the number of OAuth popups in the user interface. The - user id is inferred from the API call context. - If the data source has the Google+ authorization type, - this method returns false, as it cannot be determined - whether the credentials are already valid merely based - on the user id. + user has valid credentials. This method + is used to limit the number of OAuth + popups in the user interface. The user + id is inferred from the API call + context. If the data source has the + Google+ authorization type, this method + returns false, as it cannot be + determined whether the credentials are + already valid merely based on the user + id. name (str): Required. The data source in the form: ``projects/{project_id}/dataSources/{data_source_id}`` @@ -2098,9 +2107,8 @@ def sample_enroll_data_sources(): Args: request (Union[google.cloud.bigquery_datatransfer_v1.types.EnrollDataSourcesRequest, dict]): - The request object. A request to enroll a set of data - sources so they are visible in the BigQuery UI's - `Transfer` tab. + The request object. A request to enroll a set of data sources so they are + visible in the BigQuery UI's ``Transfer`` tab. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. diff --git a/google/cloud/bigquery_datatransfer_v1/services/data_transfer_service/transports/rest.py b/google/cloud/bigquery_datatransfer_v1/services/data_transfer_service/transports/rest.py index 4ab502f8..87a34fa1 100644 --- a/google/cloud/bigquery_datatransfer_v1/services/data_transfer_service/transports/rest.py +++ b/google/cloud/bigquery_datatransfer_v1/services/data_transfer_service/transports/rest.py @@ -673,7 +673,6 @@ def __call__( determined whether the credentials are already valid merely based on the user id. - retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -788,7 +787,6 @@ def __call__( Otherwise, the transfer configuration will be associated with the calling user. - retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -901,7 +899,6 @@ def __call__( information. All associated transfer runs and log messages will be deleted as well. - retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -983,7 +980,6 @@ def __call__( request (~.datatransfer.DeleteTransferRunRequest): The request object. A request to delete data transfer run information. - retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -1055,7 +1051,6 @@ def __call__( request (~.datatransfer.EnrollDataSourcesRequest): The request object. A request to enroll a set of data sources so they are visible in the BigQuery UI's ``Transfer`` tab. - retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -1238,7 +1233,6 @@ def __call__( request (~.datatransfer.GetTransferConfigRequest): The request object. A request to get data transfer information. - retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -1339,7 +1333,6 @@ def __call__( request (~.datatransfer.GetTransferRunRequest): The request object. A request to get data transfer run information. - retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -1434,7 +1427,6 @@ def __call__( The request object. Request to list supported data sources and their data transfer settings. - retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -1530,7 +1522,6 @@ def __call__( request (~.datatransfer.ListTransferConfigsRequest): The request object. A request to list data transfers configured for a BigQuery project. - retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -1627,7 +1618,6 @@ def __call__( The request object. A request to get user facing log messages associated with data transfer run. - retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -1817,7 +1807,6 @@ def __call__( request (~.datatransfer.ScheduleTransferRunsRequest): The request object. A request to schedule transfer runs for a time range. - retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -1914,7 +1903,6 @@ def __call__( request (~.datatransfer.StartManualTransferRunsRequest): The request object. A request to start manual transfer runs. - retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -2023,7 +2011,6 @@ def __call__( configuration. To update the user id of the transfer configuration, authorization info needs to be provided. - retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. diff --git a/samples/generated_samples/snippet_metadata_google.cloud.bigquery.datatransfer.v1.json b/samples/generated_samples/snippet_metadata_google.cloud.bigquery.datatransfer.v1.json index ff4d7442..a381c552 100644 --- a/samples/generated_samples/snippet_metadata_google.cloud.bigquery.datatransfer.v1.json +++ b/samples/generated_samples/snippet_metadata_google.cloud.bigquery.datatransfer.v1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-bigquery-datatransfer", - "version": "3.11.0" + "version": "0.1.0" }, "snippets": [ { From 9b7d730fa7c1bf3b5e71556faab2ef1ff8e551af Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 28 Mar 2023 18:43:35 -0400 Subject: [PATCH 7/7] chore(main): release 3.11.1 (#449) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- .release-please-manifest.json | 2 +- CHANGELOG.md | 9 +++++++++ google/cloud/bigquery_datatransfer/gapic_version.py | 2 +- google/cloud/bigquery_datatransfer_v1/gapic_version.py | 2 +- ...t_metadata_google.cloud.bigquery.datatransfer.v1.json | 2 +- 5 files changed, 13 insertions(+), 4 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index b5505621..a97b117e 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "3.11.0" + ".": "3.11.1" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 40ccb6b7..7a7d3611 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,15 @@ [1]: https://pypi.org/project/google-cloud-bigquery-datatransfer/#history +## [3.11.1](https://github.com/googleapis/python-bigquery-datatransfer/compare/v3.11.0...v3.11.1) (2023-03-27) + + +### Documentation + +* Fix formatting of request arg in docstring ([#455](https://github.com/googleapis/python-bigquery-datatransfer/issues/455)) ([40a85d6](https://github.com/googleapis/python-bigquery-datatransfer/commit/40a85d6eb5e40ff77c054c76bbdfe8a5b821e1ef)) +* Removes deprecated sample ([#451](https://github.com/googleapis/python-bigquery-datatransfer/issues/451)) ([250acb4](https://github.com/googleapis/python-bigquery-datatransfer/commit/250acb4ec89a33c54174659d33fd7088f22f93db)) +* Replace deprecated snippet ([e2f04db](https://github.com/googleapis/python-bigquery-datatransfer/commit/e2f04db7553721610903500133553e67fe717642)) + ## [3.11.0](https://github.com/googleapis/python-bigquery-datatransfer/compare/v3.10.1...v3.11.0) (2023-02-28) diff --git a/google/cloud/bigquery_datatransfer/gapic_version.py b/google/cloud/bigquery_datatransfer/gapic_version.py index 6c2e88f2..f897ec81 100644 --- a/google/cloud/bigquery_datatransfer/gapic_version.py +++ b/google/cloud/bigquery_datatransfer/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "3.11.0" # {x-release-please-version} +__version__ = "3.11.1" # {x-release-please-version} diff --git a/google/cloud/bigquery_datatransfer_v1/gapic_version.py b/google/cloud/bigquery_datatransfer_v1/gapic_version.py index 6c2e88f2..f897ec81 100644 --- a/google/cloud/bigquery_datatransfer_v1/gapic_version.py +++ b/google/cloud/bigquery_datatransfer_v1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "3.11.0" # {x-release-please-version} +__version__ = "3.11.1" # {x-release-please-version} diff --git a/samples/generated_samples/snippet_metadata_google.cloud.bigquery.datatransfer.v1.json b/samples/generated_samples/snippet_metadata_google.cloud.bigquery.datatransfer.v1.json index a381c552..1c451996 100644 --- a/samples/generated_samples/snippet_metadata_google.cloud.bigquery.datatransfer.v1.json +++ b/samples/generated_samples/snippet_metadata_google.cloud.bigquery.datatransfer.v1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-bigquery-datatransfer", - "version": "0.1.0" + "version": "3.11.1" }, "snippets": [ {