Skip to content

Fix reader-blocking bugs in Signals tutorials - #1883

Closed
jborlase-snowplow wants to merge 1 commit into
mainfrom
claude/determined-sammet-0a4653
Closed

Fix reader-blocking bugs in Signals tutorials#1883
jborlase-snowplow wants to merge 1 commit into
mainfrom
claude/determined-sammet-0a4653

Conversation

@jborlase-snowplow

Copy link
Copy Markdown
Contributor

Summary

Fixes four categories of reader-blocking bugs in the Signals tutorials — broken as-written base URLs, Python code that raises NameError, a nonexistent SDK call, and attribute names that don't match the notebook (so a hand-followed intervention never fires).

Base URL placeholders

Standardized all Signals base URL placeholders to https://YOUR_ID.signals.snowplowanalytics.com, matching the format documented in docs/signals/connection/index.md. Previously these were non-functional as written:

  • tutorials/signals-ai-agent-context/setup.md and tutorials/signals-google-adk-agent/project-setup.md used https://signals.snowplowanalytics.com (no org subdomain)
  • tutorials/signals-agentic-accelerator/configure-signals.md and tutorials/signals-personalize-travel/defining-attributes.md used example.signals.snowplowanalytics.com (no scheme)
  • tutorials/signals-personalize-travel/setting-up.md used signals.snowplow.com
  • tutorials/signals-agentic-accelerator/connect-demo-app.md used the example. subdomain placeholder

ML prospect scoring tutorial

  • Fixed a NameError: the attribute group is defined as user_attributes_group but was referenced as user_attribute_group in the test and publish cells
  • Fixed the import: added Event (used but never imported) and dropped unused EntityProperty
  • Added the missing Signals(...) client constructor to the setup page (mirroring tutorials/signals-interventions/setup.md) — sp_signals was used throughout but never created; moved the %pip install there since the constructor depends on it

Interventions tutorial

  • Replaced the undocumented stream_service.get_attributes(signals=...) call with sp_signals.get_service_attributes(name=, attribute_key=, identifier=) per docs/signals/applications/retrieve-attributes/index.md
  • Removed dead Tabs/TabItem imports (no tabs in the file)
  • Deleted orphaned images/sandbox.png (no references anywhere)

Personalize travel tutorial

  • The attribute list showed Python variable names instead of the actual attribute names published to Signals (per static/notebooks/signals-personalize-travel-demo.ipynb): dest_page_view_countdestination_page_view_count, budget_consciousbudget_conscious_count, luxury_inclinedluxury_inclined_count. The intervention references the real names, so readers who typed the list values got a non-firing intervention. Also fixed the same mismatch in testing-attributes.md and interventions.md prose.
  • Aligned the intervention prose with the code's >= 3 operator: it fires on the third destination page view, not the fourth ("more than three")

Python variable names inside code blocks were left unchanged — they correctly match the notebook.

🤖 Generated with Claude Code

- Standardize Signals base URL placeholders to
  https://YOUR_ID.signals.snowplowanalytics.com (matching the
  connection docs) across six tutorial pages
- ml-prospect-scoring: fix user_attributes_group NameError, fix
  missing Event import (and drop unused EntityProperty), add the
  Signals client constructor to the setup page
- interventions: replace undocumented stream_service.get_attributes()
  with sp_signals.get_service_attributes(), remove dead Tabs imports,
  delete orphaned sandbox.png
- personalize-travel: show real attribute names instead of Python
  variable names (destination_page_view_count, budget_conscious_count,
  luxury_inclined_count) and align intervention prose with the >= 3
  operator (fires on the third page view)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@claude

claude Bot commented Jul 28, 2026

Copy link
Copy Markdown

Style review

This PR is mostly mechanical (placeholder URLs, attribute renames, SDK method fixes) and reads cleanly. A few minor style points, all in tutorials/signals-ml-prospect-scoring/setup.md, plus one consistency note.

1. UI element not bolded — signals-ml-prospect-scoring/setup.md

"If you prefer to run the cells in one go with Run all, update your details in the required places first"

Run all is a Colab menu command. CLAUDE.md: "Use bold only for UI elements (buttons, page titles)"; style guide: "Use bold for UI elements: buttons, page titles, tabs, menus."

Fix: ...in one go with **Run all**, update your details...

(Also on this modified line: the spaced hyphen in first - they're marked with reads as a dash. An em dash or a comma would be cleaner.)

2. Frontmatter no longer matches page content — signals-ml-prospect-scoring/setup.md

The page gains a ## Connect to Signals section covering SDK installation and client creation, but the frontmatter still describes credentials only:

title: Add credentials to the Signals prospect scoring ML notebook
description: "Configure Google Colab notebook with Snowplow Signals credentials for the prospect scoring machine learning tutorial."

CLAUDE.md requires a descriptive title and a description that reflects the page. Suggested description: "Configure a Google Colab notebook with your Snowplow Signals credentials and connect to Signals with the Python SDK for the prospect scoring tutorial." Consider widening the title similarly (e.g. "Configure the notebook and connect to Signals").

3. Placeholder style inconsistency (nit)

https://YOUR_ID.signals.snowplowanalytics.com matches the existing convention in tutorials/python-tracking-and-signals/retrieve-and-act.md, so it's internally consistent — good. Two small things:

  • The reference page connecting to Signals documents the same value as https://{{123abc}}.signals.snowplowanalytics.com. Worth aligning tutorials and reference on one form eventually.
  • In signals-ai-agent-context/setup.md and signals-google-adk-agent/project-setup.md, YOUR_ID sits next to your-signals-api-key-style lowercase placeholders in the same block. Not wrong, just mixed casing.

Verified as correct

  • Removing the Tabs/TabItem imports from signals-interventions/define-attributes-python.md is safe — no <Tabs> usage remains in that file.
  • Deleting signals-interventions/images/sandbox.png leaves no dangling references anywhere in docs/ or tutorials/.
  • The "more than three" → "three or more" / "fourth" → "third" rewording in signals-personalize-travel/interventions.md is consistent across prose, the >= criterion, and the test steps, and correctly spells out the single-digit number in prose.
  • Folding the one-line ## Install Signals Python SDK section into prose in setup.md is an improvement — it removes a section that was too thin to stand alone.
  • No fetchable external URLs were added or modified; every new URL in the diff is a placeholder domain.

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
documentation 8fdb91a Commit Preview URL

Branch Preview URL
Jul 28 2026, 04:41 PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants