Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .Jules/palette.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@
## 2026-03-28 - [Guided CLI Onboarding]
**Learning:** For tutorial-style scaffolds, adding "Next Step" guidance directly to the terminal output after a successful run creates a much smoother onboarding experience than relying solely on the README.
**Action:** Always include a clear, visually distinct "Next Step" message at the end of introductory scripts to guide users through the intended learning path.

## 2026-03-30 - [Demo Scale vs. Terminal Readability]
**Learning:** For demo scripts, larger data sets can degrade the UX by flooding the terminal with logs, making it harder for users to see the structure of the output.
**Action:** Limit the default number of items in demo loops (e.g., 5 items) to maintain a high signal-to-noise ratio while still demonstrating the functionality.
7 changes: 5 additions & 2 deletions 01_getting_started.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
@task
def get_customer_ids() -> list[str]:
# Fetch customer IDs from a database or API
return [f"customer{n}" for n in random.choices(range(100), k=50)]
return [f"customer{n}" for n in random.choices(range(100), k=5)]


@task
Expand All @@ -26,13 +26,16 @@ def main():
This flow demonstrates how to map a task over a list of inputs.
It fetches a list of customer IDs and processes each one individually.
"""
customer_ids = get_customer_ids()
with console.status("[bold green]Fetching customer data..."):
customer_ids = get_customer_ids()

# Map the process_customer task across all customer IDs
console.print(f"[bold blue]📦 Fetched {len(customer_ids)} customer IDs[/bold blue]")

with console.status("[bold green]Processing customers..."):
results = process_customer.map(customer_ids)

console.print()
console.print(
Panel.fit(
f"[bold green]✅ Successfully processed {len(results)} customers![/bold green]",
Expand Down
7 changes: 5 additions & 2 deletions 02_logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
@task
def get_customer_ids() -> list[str]:
# Fetch customer IDs from a database or API
return [f"customer{n}" for n in random.choices(range(100), k=50)]
return [f"customer{n}" for n in random.choices(range(100), k=5)]


@task
Expand All @@ -36,13 +36,16 @@ def main():
- Use the Prefect logger for structured logging in tasks.
- Map tasks across a list of inputs.
"""
customer_ids = get_customer_ids()
with console.status("[bold green]Fetching customer data..."):
customer_ids = get_customer_ids()

# Map the process_customer task across all customer IDs
console.print(f"[bold blue]📦 Fetched {len(customer_ids)} customer IDs[/bold blue]")

with console.status("[bold green]Processing customers with logging..."):
results = process_customer.map(customer_ids)

console.print()
console.print(
Panel.fit(
f"[bold green]✅ Successfully processed {len(results)} customers with detailed logging![/bold green]",
Expand Down
Loading