From 6eab40e4df28be75479b00e7a17b25044bf0cba5 Mon Sep 17 00:00:00 2001 From: kchertenko <108395945+kchertenko@users.noreply.github.com> Date: Mon, 12 Sep 2022 18:05:14 +0300 Subject: [PATCH] chore(samples): remove region tags. (#337) * fix: remove region tags. * fix: remove region tags. * fix: add new lines to the end of files. * revert autogenerated samples. Co-authored-by: Anthonios Partheniou --- .../events/import_user_events_big_query.py | 3 --- .../interactive-tutorials/events/import_user_events_gcs.py | 3 --- .../interactive-tutorials/events/import_user_events_inline.py | 3 --- .../samples/interactive-tutorials/events/purge_user_event.py | 2 -- .../samples/interactive-tutorials/events/rejoin_user_event.py | 3 --- .../samples/interactive-tutorials/events/write_user_event.py | 3 --- .../interactive-tutorials/product/add_fulfillment_places.py | 1 - .../samples/interactive-tutorials/product/create_product.py | 2 -- .../samples/interactive-tutorials/product/crud_product.py | 2 -- .../samples/interactive-tutorials/product/delete_product.py | 3 --- .../samples/interactive-tutorials/product/get_product.py | 3 --- .../product/import_products_big_query_table.py | 3 --- .../interactive-tutorials/product/import_products_gcs.py | 3 --- .../product/import_products_inline_source.py | 3 --- .../interactive-tutorials/product/remove_fulfillment_places.py | 1 - .../samples/interactive-tutorials/product/set_inventory.py | 1 - .../samples/interactive-tutorials/product/update_product.py | 3 --- .../interactive-tutorials/search/search_simple_query.py | 2 -- .../interactive-tutorials/search/search_with_boost_spec.py | 2 -- .../interactive-tutorials/search/search_with_facet_spec.py | 2 -- .../interactive-tutorials/search/search_with_filtering.py | 2 -- .../interactive-tutorials/search/search_with_ordering.py | 2 -- .../interactive-tutorials/search/search_with_pagination.py | 2 -- .../search/search_with_query_expansion_spec.py | 2 -- 24 files changed, 56 deletions(-) diff --git a/packages/google-cloud-retail/samples/interactive-tutorials/events/import_user_events_big_query.py b/packages/google-cloud-retail/samples/interactive-tutorials/events/import_user_events_big_query.py index 42261f623399..ddc41e03d234 100644 --- a/packages/google-cloud-retail/samples/interactive-tutorials/events/import_user_events_big_query.py +++ b/packages/google-cloud-retail/samples/interactive-tutorials/events/import_user_events_big_query.py @@ -20,7 +20,6 @@ def main(project_id, dataset_id, table_id): - # [START retail_import_user_events_from_big_query] # TODO: Set project_id to your Google Cloud Platform project ID. # project_id = "my-project" @@ -98,8 +97,6 @@ def import_user_events_from_big_query(): import_user_events_from_big_query() - # [END retail_import_user_events_from_big_query] - if __name__ == "__main__": parser = argparse.ArgumentParser() diff --git a/packages/google-cloud-retail/samples/interactive-tutorials/events/import_user_events_gcs.py b/packages/google-cloud-retail/samples/interactive-tutorials/events/import_user_events_gcs.py index 637527a72382..b4680a89c674 100644 --- a/packages/google-cloud-retail/samples/interactive-tutorials/events/import_user_events_gcs.py +++ b/packages/google-cloud-retail/samples/interactive-tutorials/events/import_user_events_gcs.py @@ -17,7 +17,6 @@ def main(bucket_name): - # [START retail_import_user_events_from_gcs] # Import user events into a catalog from GCS using Retail API import time @@ -103,8 +102,6 @@ def import_user_events_from_gcs(): import_user_events_from_gcs() -# [END retail_import_user_events_from_gcs] - if __name__ == "__main__": parser = argparse.ArgumentParser() parser.add_argument( diff --git a/packages/google-cloud-retail/samples/interactive-tutorials/events/import_user_events_inline.py b/packages/google-cloud-retail/samples/interactive-tutorials/events/import_user_events_inline.py index 120d679738af..9e247ec33a88 100644 --- a/packages/google-cloud-retail/samples/interactive-tutorials/events/import_user_events_inline.py +++ b/packages/google-cloud-retail/samples/interactive-tutorials/events/import_user_events_inline.py @@ -13,7 +13,6 @@ # limitations under the License. -# [START retail_import_user_events_from_inline_source] # Import user events into a catalog from inline source using Retail API # import datetime @@ -105,5 +104,3 @@ def import_user_events_from_inline_source(): import_user_events_from_inline_source() - -# [END retail_import_user_events_from_inline_source] diff --git a/packages/google-cloud-retail/samples/interactive-tutorials/events/purge_user_event.py b/packages/google-cloud-retail/samples/interactive-tutorials/events/purge_user_event.py index f4c849b3ba85..847229b6decb 100644 --- a/packages/google-cloud-retail/samples/interactive-tutorials/events/purge_user_event.py +++ b/packages/google-cloud-retail/samples/interactive-tutorials/events/purge_user_event.py @@ -13,7 +13,6 @@ # limitations under the License. -# [START retail_purge_user_event] # Deleting user event using Retail API. # import google.auth @@ -52,4 +51,3 @@ def call_purge_user_events(): write_user_event(visitor_id) call_purge_user_events() -# [END retail_purge_user_event] diff --git a/packages/google-cloud-retail/samples/interactive-tutorials/events/rejoin_user_event.py b/packages/google-cloud-retail/samples/interactive-tutorials/events/rejoin_user_event.py index 9269afce2075..0616adf0d087 100644 --- a/packages/google-cloud-retail/samples/interactive-tutorials/events/rejoin_user_event.py +++ b/packages/google-cloud-retail/samples/interactive-tutorials/events/rejoin_user_event.py @@ -13,7 +13,6 @@ # limitations under the License. -# [START retail_rejoin_user_event] # Starts a user event rejoin operation using Retail API. # import google.auth @@ -55,5 +54,3 @@ def call_rejoin_user_events(): write_user_event(visitor_id) call_rejoin_user_events() purge_user_event(visitor_id) - -# [END retail_rejoin_user_event] diff --git a/packages/google-cloud-retail/samples/interactive-tutorials/events/write_user_event.py b/packages/google-cloud-retail/samples/interactive-tutorials/events/write_user_event.py index 25de81686359..8d8da455726e 100644 --- a/packages/google-cloud-retail/samples/interactive-tutorials/events/write_user_event.py +++ b/packages/google-cloud-retail/samples/interactive-tutorials/events/write_user_event.py @@ -13,7 +13,6 @@ # limitations under the License. -# [START retail_write_user_event] # Write user event using Retail API. # import datetime @@ -71,5 +70,3 @@ def write_user_event(): write_user_event() purge_user_event(visitor_id) - -# [END retail_write_user_event] diff --git a/packages/google-cloud-retail/samples/interactive-tutorials/product/add_fulfillment_places.py b/packages/google-cloud-retail/samples/interactive-tutorials/product/add_fulfillment_places.py index fa8d73a364e2..66cd555e3218 100644 --- a/packages/google-cloud-retail/samples/interactive-tutorials/product/add_fulfillment_places.py +++ b/packages/google-cloud-retail/samples/interactive-tutorials/product/add_fulfillment_places.py @@ -12,7 +12,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -# [START retail_add_fulfillment_places] # Adding place IDs using Retail API. # import asyncio diff --git a/packages/google-cloud-retail/samples/interactive-tutorials/product/create_product.py b/packages/google-cloud-retail/samples/interactive-tutorials/product/create_product.py index 43715353ca3b..9d1884f615ad 100644 --- a/packages/google-cloud-retail/samples/interactive-tutorials/product/create_product.py +++ b/packages/google-cloud-retail/samples/interactive-tutorials/product/create_product.py @@ -13,7 +13,6 @@ # limitations under the License. -# [START retail_create_product] # Create product in a catalog using Retail API # import random @@ -82,4 +81,3 @@ def create_product(product_id: str): created_product = create_product(generated_product_id) # delete created product delete_product(created_product.name) -# [END retail_create_product] diff --git a/packages/google-cloud-retail/samples/interactive-tutorials/product/crud_product.py b/packages/google-cloud-retail/samples/interactive-tutorials/product/crud_product.py index 3e95244cc745..6f1df46f4f9b 100644 --- a/packages/google-cloud-retail/samples/interactive-tutorials/product/crud_product.py +++ b/packages/google-cloud-retail/samples/interactive-tutorials/product/crud_product.py @@ -13,7 +13,6 @@ # limitations under the License. -# [START retail_crud_product] # Create, update, get and delete product in a catalog using Retail API. # import random @@ -140,4 +139,3 @@ def delete_product(): get_product() update_product() delete_product() -# [END retail_crud_product] diff --git a/packages/google-cloud-retail/samples/interactive-tutorials/product/delete_product.py b/packages/google-cloud-retail/samples/interactive-tutorials/product/delete_product.py index 5c3e01a22d2b..3b1822467e6f 100644 --- a/packages/google-cloud-retail/samples/interactive-tutorials/product/delete_product.py +++ b/packages/google-cloud-retail/samples/interactive-tutorials/product/delete_product.py @@ -13,7 +13,6 @@ # limitations under the License. -# [START retail_delete_product] # Delete product from a catalog using Retail API. # import random @@ -56,5 +55,3 @@ def delete_product(product_name: str): # delete created product created_product_name = create_product(product_id).name delete_product(created_product_name) - -# [END retail_delete_product] diff --git a/packages/google-cloud-retail/samples/interactive-tutorials/product/get_product.py b/packages/google-cloud-retail/samples/interactive-tutorials/product/get_product.py index f591bf1297da..fc5702bdea10 100644 --- a/packages/google-cloud-retail/samples/interactive-tutorials/product/get_product.py +++ b/packages/google-cloud-retail/samples/interactive-tutorials/product/get_product.py @@ -13,7 +13,6 @@ # limitations under the License. -# [START retail_get_product] # Get product from a catalog using Retail API. # import random @@ -56,5 +55,3 @@ def get_product(product_name: str): product = get_product(created_product.name) # remove created product delete_product(created_product.name) - -# [END retail_get_product] diff --git a/packages/google-cloud-retail/samples/interactive-tutorials/product/import_products_big_query_table.py b/packages/google-cloud-retail/samples/interactive-tutorials/product/import_products_big_query_table.py index 03e2b2e71c14..c55aef32cc23 100644 --- a/packages/google-cloud-retail/samples/interactive-tutorials/product/import_products_big_query_table.py +++ b/packages/google-cloud-retail/samples/interactive-tutorials/product/import_products_big_query_table.py @@ -20,7 +20,6 @@ def main(project_id, dataset_id, table_id): - # [START retail_import_products_from_big_query] # TODO: Set project_id to your Google Cloud Platform project ID. # project_id = "my-project" @@ -104,8 +103,6 @@ def import_products_from_big_query(): import_products_from_big_query() - # [END retail_import_products_from_big_query] - if __name__ == "__main__": parser = argparse.ArgumentParser() diff --git a/packages/google-cloud-retail/samples/interactive-tutorials/product/import_products_gcs.py b/packages/google-cloud-retail/samples/interactive-tutorials/product/import_products_gcs.py index ae49f1d58ceb..cd31754d3d34 100644 --- a/packages/google-cloud-retail/samples/interactive-tutorials/product/import_products_gcs.py +++ b/packages/google-cloud-retail/samples/interactive-tutorials/product/import_products_gcs.py @@ -17,7 +17,6 @@ def main(bucket_name): - # [START retail_import_products_from_gcs] # Import products from using Retail API. # import time @@ -107,8 +106,6 @@ def import_products_from_gcs(): import_products_from_gcs() - # [END retail_import_products_from_gcs] - if __name__ == "__main__": parser = argparse.ArgumentParser() diff --git a/packages/google-cloud-retail/samples/interactive-tutorials/product/import_products_inline_source.py b/packages/google-cloud-retail/samples/interactive-tutorials/product/import_products_inline_source.py index ac6ee4403842..f2ca22aaff6f 100644 --- a/packages/google-cloud-retail/samples/interactive-tutorials/product/import_products_inline_source.py +++ b/packages/google-cloud-retail/samples/interactive-tutorials/product/import_products_inline_source.py @@ -12,7 +12,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -# [START retail_import_products_from_inline_source] # Import products into a catalog from inline source using Retail API # import random @@ -144,5 +143,3 @@ def import_products_from_inline_source(): import_products_from_inline_source() - -# [END retail_import_products_from_inline_source] diff --git a/packages/google-cloud-retail/samples/interactive-tutorials/product/remove_fulfillment_places.py b/packages/google-cloud-retail/samples/interactive-tutorials/product/remove_fulfillment_places.py index bf1c2afbfc1f..daf8ff231af1 100644 --- a/packages/google-cloud-retail/samples/interactive-tutorials/product/remove_fulfillment_places.py +++ b/packages/google-cloud-retail/samples/interactive-tutorials/product/remove_fulfillment_places.py @@ -12,7 +12,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -# [START retail_remove_fulfillment_places] # Remove place IDs using Retail API. # import asyncio diff --git a/packages/google-cloud-retail/samples/interactive-tutorials/product/set_inventory.py b/packages/google-cloud-retail/samples/interactive-tutorials/product/set_inventory.py index c3e46d6493e9..b55bd6411d33 100644 --- a/packages/google-cloud-retail/samples/interactive-tutorials/product/set_inventory.py +++ b/packages/google-cloud-retail/samples/interactive-tutorials/product/set_inventory.py @@ -12,7 +12,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -# [START retail_set_inventory] # Updating inventory information using Retail API. # import asyncio diff --git a/packages/google-cloud-retail/samples/interactive-tutorials/product/update_product.py b/packages/google-cloud-retail/samples/interactive-tutorials/product/update_product.py index e3abef981423..21e828594898 100644 --- a/packages/google-cloud-retail/samples/interactive-tutorials/product/update_product.py +++ b/packages/google-cloud-retail/samples/interactive-tutorials/product/update_product.py @@ -13,7 +13,6 @@ # limitations under the License. -# [START retail_update_product] # Update product in a catalog using Retail API # import random @@ -91,5 +90,3 @@ def update_product(original_product: Product): update_product(created_product) # delete product delete_product(created_product.name) - -# [END retail_update_product] diff --git a/packages/google-cloud-retail/samples/interactive-tutorials/search/search_simple_query.py b/packages/google-cloud-retail/samples/interactive-tutorials/search/search_simple_query.py index d2a66f67d463..8545a4d322a2 100644 --- a/packages/google-cloud-retail/samples/interactive-tutorials/search/search_simple_query.py +++ b/packages/google-cloud-retail/samples/interactive-tutorials/search/search_simple_query.py @@ -12,7 +12,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -# [START retail_search_for_products_with_query_parameter] # Call Retail API to search for a products in a catalog using only search query. # @@ -56,4 +55,3 @@ def search(): search() -# [END retail_search_for_products_with_query_parameter] diff --git a/packages/google-cloud-retail/samples/interactive-tutorials/search/search_with_boost_spec.py b/packages/google-cloud-retail/samples/interactive-tutorials/search/search_with_boost_spec.py index e8fb50ebded1..9839dbb6d0cf 100644 --- a/packages/google-cloud-retail/samples/interactive-tutorials/search/search_with_boost_spec.py +++ b/packages/google-cloud-retail/samples/interactive-tutorials/search/search_with_boost_spec.py @@ -12,7 +12,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -# [START retail_search_product_with_boost_spec] # Call Retail API to search for a products in a catalog, rerank the # results boosting or burying the products that match defined condition. # @@ -65,4 +64,3 @@ def search(): search() -# [END retail_search_product_with_boost_spec] diff --git a/packages/google-cloud-retail/samples/interactive-tutorials/search/search_with_facet_spec.py b/packages/google-cloud-retail/samples/interactive-tutorials/search/search_with_facet_spec.py index f3df9448ad5f..b370ba84ad1b 100644 --- a/packages/google-cloud-retail/samples/interactive-tutorials/search/search_with_facet_spec.py +++ b/packages/google-cloud-retail/samples/interactive-tutorials/search/search_with_facet_spec.py @@ -12,7 +12,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -# [START retail_search_product_with_facet_spec] # Call Retail API to search for a products in a catalog with facets. # import google.auth @@ -63,4 +62,3 @@ def search(): search() -# [END retail_search_product_with_facet_spec] diff --git a/packages/google-cloud-retail/samples/interactive-tutorials/search/search_with_filtering.py b/packages/google-cloud-retail/samples/interactive-tutorials/search/search_with_filtering.py index 14c35cd7f9aa..922caf3c779c 100644 --- a/packages/google-cloud-retail/samples/interactive-tutorials/search/search_with_filtering.py +++ b/packages/google-cloud-retail/samples/interactive-tutorials/search/search_with_filtering.py @@ -12,7 +12,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -# [START retail_search_for_products_with_filter] # Call Retail API to search for a products in a catalog, filter the results by different product fields. # @@ -57,4 +56,3 @@ def search(): search() -# [END retail_search_for_products_with_filter] diff --git a/packages/google-cloud-retail/samples/interactive-tutorials/search/search_with_ordering.py b/packages/google-cloud-retail/samples/interactive-tutorials/search/search_with_ordering.py index 15b6b8b34c75..4c04d2d72628 100644 --- a/packages/google-cloud-retail/samples/interactive-tutorials/search/search_with_ordering.py +++ b/packages/google-cloud-retail/samples/interactive-tutorials/search/search_with_ordering.py @@ -12,7 +12,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -# [START retail_search_for_products_with_ordering] # Call Retail API to search for a products in a catalog, order the results by different product fields. # @@ -57,4 +56,3 @@ def search(): search() -# [END retail_search_for_products_with_ordering] diff --git a/packages/google-cloud-retail/samples/interactive-tutorials/search/search_with_pagination.py b/packages/google-cloud-retail/samples/interactive-tutorials/search/search_with_pagination.py index ae9e8d44ab19..caef9f175aab 100644 --- a/packages/google-cloud-retail/samples/interactive-tutorials/search/search_with_pagination.py +++ b/packages/google-cloud-retail/samples/interactive-tutorials/search/search_with_pagination.py @@ -12,7 +12,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -# [START retail_search_for_products_with_page_size] # Call Retail API to search for a products in a catalog, # limit the number of the products per page and go to the next page using "next_page_token" # or jump to chosen page using "offset". @@ -69,4 +68,3 @@ def search(): search() -# [END retail_search_for_products_with_page_size] diff --git a/packages/google-cloud-retail/samples/interactive-tutorials/search/search_with_query_expansion_spec.py b/packages/google-cloud-retail/samples/interactive-tutorials/search/search_with_query_expansion_spec.py index b20b48d78606..e49d7945db6c 100644 --- a/packages/google-cloud-retail/samples/interactive-tutorials/search/search_with_query_expansion_spec.py +++ b/packages/google-cloud-retail/samples/interactive-tutorials/search/search_with_query_expansion_spec.py @@ -12,7 +12,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -# [START retail_search_for_products_with_query_expansion_specification] # Call Retail API to search for a products in a catalog, # enabling the query expansion feature to let the Google Retail Search build an automatic query expansion. # @@ -63,4 +62,3 @@ def search(): search() -# [END retail_search_for_products_with_query_expansion_specification]