From 0b9ce345be85596a7584af7698ae1ff907c30c3d Mon Sep 17 00:00:00 2001 From: Josh Radcliff Date: Fri, 5 Jun 2026 12:24:51 -0400 Subject: [PATCH] fix(notebooks): address linter and metadata issues --- notebooks/audience_e2e_advertiser_flow.ipynb | 21 +++++++++++++------ ...dience_e2e_data_partner_dual_persona.ipynb | 19 ++++++++++++----- ...audience_e2e_data_partner_simplified.ipynb | 11 ++++++++-- 3 files changed, 38 insertions(+), 13 deletions(-) diff --git a/notebooks/audience_e2e_advertiser_flow.ipynb b/notebooks/audience_e2e_advertiser_flow.ipynb index 4516028..b097d30 100644 --- a/notebooks/audience_e2e_advertiser_flow.ipynb +++ b/notebooks/audience_e2e_advertiser_flow.ipynb @@ -126,7 +126,8 @@ " View source on GitHub\n", " \n", " " - ] + ], + "id": "cdd998cb" }, { "cell_type": "markdown", @@ -273,7 +274,7 @@ " desktop_app_json_file = \"/tmp/oauth_client.json\"\n", "\n", " if len(uploaded) != 1:\n", - " raise ValueError(\"Please upload exactly one file.\")\n", + " raise ValueError(\"Upload exactly one file.\")\n", "\n", " filename = list(uploaded.keys())[0]\n", " content = uploaded[filename]\n", @@ -290,7 +291,7 @@ "\n", " if authentication_method == \"OAuth Client Credentials\":\n", " if use_existing_credentials:\n", - " print(\"Please enter your OAuth credentials:\")\n", + " print(\"Enter your OAuth credentials:\")\n", " client_id = input(\"Client ID: \").strip()\n", " client_secret = getpass.getpass(\"Client Secret (input will be hidden): \").strip()\n", " refresh_token = getpass.getpass(\"Refresh Token (input will be hidden): \").strip()\n", @@ -304,7 +305,7 @@ " scopes=[data_manager_scope]\n", " )\n", " else:\n", - " print(\"Authenticating with OAuth via gcloud...\")\n", + " print(\"Authenticating with OAuth Client using gcloud...\")\n", " client_json_file = prompt_for_desktop_client_json()\n", " auth_command = (\n", " f\"gcloud auth application-default login \"\n", @@ -430,7 +431,7 @@ "\n", "if not destination_id:\n", " print(\n", - " \"Error: destination_id is not set. Cannot ingest data. Please ensure the User List was created successfully in the previous step.\"\n", + " \"Error: destination_id is not set. Cannot ingest data. Make sure the User List was created successfully in the previous step.\"\n", " )\n", "else:\n", " print(f\"Ingesting sample data to User List {destination_id}...\")\n", @@ -493,6 +494,14 @@ " print(\"----------------------------\\n\")" ] }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [], + "id": "c93a9f18" + }, { "cell_type": "markdown", "id": "68eab82f", @@ -561,5 +570,5 @@ } }, "nbformat": 4, - "nbformat_minor": 0 + "nbformat_minor": 5 } diff --git a/notebooks/audience_e2e_data_partner_dual_persona.ipynb b/notebooks/audience_e2e_data_partner_dual_persona.ipynb index 25fefc4..a9beb28 100644 --- a/notebooks/audience_e2e_data_partner_dual_persona.ipynb +++ b/notebooks/audience_e2e_data_partner_dual_persona.ipynb @@ -126,7 +126,8 @@ " View source on GitHub\n", " \n", " " - ] + ], + "id": "e31a76c3" }, { "cell_type": "markdown", @@ -302,7 +303,7 @@ " uploaded = files.upload()\n", "\n", " if len(uploaded) != 1:\n", - " raise ValueError(\"Please upload exactly one file\")\n", + " raise ValueError(\"Upload exactly one file\")\n", "\n", " filename = list(uploaded.keys())[0]\n", " content = uploaded[filename]\n", @@ -350,7 +351,7 @@ " print(\"Using existing Advertiser OAuth credentials\")\n", " print()\n", " # Prompts the user for the client ID, client secret, and refresh token.\n", - " print(\"Please enter your preexisting Advertiser OAuth credentials:\")\n", + " print(\"Enter your preexisting Advertiser OAuth credentials:\")\n", " advertiser_oauth_client_id = input(\"Client ID: \").strip()\n", " advertiser_oauth_client_secret = getpass.getpass(\n", " \"Client Secret (input will be hidden): \"\n", @@ -600,7 +601,7 @@ "\n", "if not destination_id:\n", " print(\n", - " \"Error: destination_id is not set. Cannot ingest data. Please ensure the User List was created successfully in the previous step.\"\n", + " \"Error: destination_id is not set. Cannot ingest data. Make sure the User List was created successfully in the previous step.\"\n", " )\n", "else:\n", " print(f\"Ingesting sample data to User List {destination_id}...\")\n", @@ -664,6 +665,14 @@ " print(\"----------------------------\\n\")" ] }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [], + "id": "1cc3db4d" + }, { "cell_type": "markdown", "id": "c4eab526", @@ -732,5 +741,5 @@ } }, "nbformat": 4, - "nbformat_minor": 0 + "nbformat_minor": 5 } diff --git a/notebooks/audience_e2e_data_partner_simplified.ipynb b/notebooks/audience_e2e_data_partner_simplified.ipynb index 3adf7ce..dcf9e80 100644 --- a/notebooks/audience_e2e_data_partner_simplified.ipynb +++ b/notebooks/audience_e2e_data_partner_simplified.ipynb @@ -112,6 +112,7 @@ }, { "cell_type": "markdown", + "id": "7f243813", "metadata": {}, "source": [ " \n", @@ -391,6 +392,12 @@ " print(f\"Resource Name: {ulist_res.name}\")\n", " print(f\"Display Name: {ulist_res.display_name}\")\n", "\n", + "except exceptions.PermissionDenied as e:\n", + " print(f\"User list creation failed due to permission denied error: {e}\")\n", + " print(\n", + " \"Review the 'Prerequisites' section and verify that the service account has the required \"\n", + " \"access level in the data partner account.\"\n", + " )\n", "except Exception as e:\n", " print(f\"Failed to create User List: {e}\")\n", "\n", @@ -430,7 +437,7 @@ "\n", "if not destination_id:\n", " print(\n", - " \"Error: destination_id is not set. Cannot ingest data. Please ensure the User List was created successfully in the previous step.\"\n", + " \"Error: destination_id is not set. Cannot ingest data. Make sure the User List was created successfully in the previous step.\"\n", " )\n", "else:\n", " print(f\"5. Ingesting sample data to User List {destination_id}...\")\n", @@ -612,5 +619,5 @@ } }, "nbformat": 4, - "nbformat_minor": 0 + "nbformat_minor": 5 }