Skip to content

Commit f34f89b

Browse files
authored
fix(retail): updates tutorial for new location (#8983)
Clean up for the monorepo migration effort: this PR is similar to [this nodejs-docs-samples PR](https://github.com/GoogleCloudPlatform/nodejs-docs-samples/pull/2985).
1 parent 4939eec commit f34f89b

File tree

5 files changed

+11
-11
lines changed

5 files changed

+11
-11
lines changed

retail/interactive-tutorials/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ You can find the information about the Retail services in the [documentation](ht
3636
If you would like to have a closer look at the Retail API features and try them yourself,
3737
the best option is to use the [Interactive Tutorials](https://cloud.google.com/retail/docs/overview). The tutorials will be launched in the CloudShell environment, and you will be able to request the Retail services and check the response with minimum time and effort.
3838

39-
The code samples in the directory **python-retail/samples/interactive-tutorials** are explicitly created for use with the Retail Interactive Tutorials.
39+
The code samples in the directory **python-docs-samples/retail/interactive-tutorials** are explicitly created for use with the Retail Interactive Tutorials.
4040

4141
If, for some reason, you have decided to proceed with these code samples without the tutorial, please go through the following steps and set up the required preconditions.
4242

@@ -133,9 +133,9 @@ To run Python code samples for the Retail API tutorial, you need to set up your
133133

134134
## Import catalog data
135135

136-
There is a python-retail/samples/interactive-tutorials/resources/products.json file with valid products prepared in the `resources` directory.
136+
There is a python-docs-samples/retail/interactive-tutorials/resources/products.json file with valid products prepared in the `resources` directory.
137137

138-
The other file, python-retail/samples/interactive-tutorials/resources/products_some_invalid.json, contains both valid and invalid products. You will use it to check the error handling.
138+
The other file, python-docs-samples/retail/interactive-tutorials/resources/products_some_invalid.json, contains both valid and invalid products. You will use it to check the error handling.
139139

140140
### Upload catalog data to Cloud Storage
141141

@@ -147,10 +147,10 @@ The bucket name must be unique. For convenience, you can name it `<YOUR_PROJECT_
147147
Go to the code samples directory, your starting point to run more commands.
148148

149149
```bash
150-
cd python-retail/samples/interactive-tutorials
150+
cd python-docs-samples/retail/interactive-tutorials
151151
```
152152

153-
1. To create the bucket and upload the JSON file, open python-retail/samples/interactive-tutorials/product/setup_product/products_create_gcs_bucket.py file
153+
1. To create the bucket and upload the JSON file, open python-docs-samples/retail/interactive-tutorials/product/setup_product/products_create_gcs_bucket.py file
154154

155155
1. Go to the **product** directory and run the following command in the Terminal:
156156

@@ -174,7 +174,7 @@ The bucket name must be unique. For convenience, you can name it `<YOUR_PROJECT_
174174

175175
### Import products to the Retail Catalog
176176

177-
To import the prepared products to a catalog, open python-retail/samples/interactive-tutorials/product/import_products_gcs.py file and run the following command in the Terminal:
177+
To import the prepared products to a catalog, open python-docs-samples/retail/interactive-tutorials/product/import_products_gcs.py file and run the following command in the Terminal:
178178

179179
```bash
180180
python product/import_products_gcs.py

retail/interactive-tutorials/events/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
import test_utils.prefixer
1717

1818
prefixer = test_utils.prefixer.Prefixer(
19-
"python-retail", "samples/interactive-tutorials/product"
19+
"python-docs-samples", "retail/interactive-tutorials/product"
2020
)
2121

2222

retail/interactive-tutorials/product/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
import test_utils.prefixer
1717

1818
prefixer = test_utils.prefixer.Prefixer(
19-
"python-retail", "samples/interactive-tutorials/product"
19+
"python-docs-samples", "retail/interactive-tutorials/product"
2020
)
2121

2222

retail/interactive-tutorials/product/setup_product/products_create_gcs_bucket.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def create_gcs_bucket(bucket_name=BUCKET_NAME):
2828
create_bucket(bucket_name)
2929

3030
path_to_resources_dir = PurePath(
31-
Path.home(), "cloudshell_open/python-retail/samples/interactive-tutorials/resources"
31+
Path.home(), "cloudshell_open/python-docs-samples/retail/interactive-tutorials/resources"
3232
)
3333
upload_blob(bucket_name, str(path_to_resources_dir / "products.json"))
3434
upload_blob(bucket_name, str(path_to_resources_dir / "products_some_invalid.json"))

retail/interactive-tutorials/user_import_data_to_catalog.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@
1616

1717
{
1818
# Create a GCS bucket and upload the product data to the bucket
19-
output=$(python ~/cloudshell_open/python-retail/samples/interactive-tutorials/product/setup_product/products_create_gcs_bucket.py)
19+
output=$(python ~/cloudshell_open/python-docs-samples/retail/interactive-tutorials/product/setup_product/products_create_gcs_bucket.py)
2020

2121
# Get the bucket name and store it in the env variable BUCKET_NAME
2222
temp="${output#*The gcs bucket }"
2323
bucket_name="${temp% was created*}"
2424
export BUCKET_NAME=$bucket_name
2525

2626
# Import products to the Retail catalog
27-
python ~/cloudshell_open/python-retail/samples/interactive-tutorials/product/import_products_gcs.py
27+
python ~/cloudshell_open/python-docs-samples/retail/interactive-tutorials/product/import_products_gcs.py
2828
} && {
2929
# Print success message
3030
echo "====================================="

0 commit comments

Comments
 (0)