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
3 changes: 3 additions & 0 deletions .Jules/palette.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,6 @@
## 2026-04-01 - [CLI Onboarding & Information Density]
**Learning:** For terminal-based workflow scaffolds, rendering the flow's docstring as a 'Prefect Workflow Guide' using `rich.Markdown` inside a `rich.Panel` provides immediate, high-quality context to the user. Additionally, adding footers to summary tables (e.g., total items processed) improves information density and allows users to verify outcomes at a glance.
**Action:** Incorporate a Markdown-rendered welcome panel at the start of main entry points and include summary footers in result tables to enhance clarity and professional feel.
## 2026-04-02 - [Execution Feedback & Visual Hierarchy]
**Learning:** For CLI-based onboarding, providing immediate feedback on execution duration via `time.perf_counter()` and using titled `rich.Rule` components significantly improves the professional feel and clarity of the workflow completion state.
**Action:** Incorporate high-resolution execution timing in final result panels and add descriptive titles to terminal rules to better guide users through multi-step onboarding processes.
8 changes: 6 additions & 2 deletions 01_getting_started.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ 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.
"""
start_time = time.perf_counter()
# Display the flow's purpose for a guided onboarding experience
if main.__doc__:
console.print(
Expand All @@ -60,7 +61,10 @@ def main():
# Explicitly wait for results to avoid AttributeErrors on futures
results = [f.result() for f in futures]

duration = time.perf_counter() - start_time

# Display results in a clean table for better readability
console.print()
table = Table(
title="Processing Summary",
show_header=True,
Expand All @@ -81,13 +85,13 @@ def main():

console.print(
Panel.fit(
f"[bold green]✨ Successfully processed {len(results)} customers![/bold green]",
f"[bold green]✨ Successfully processed {len(results)} customers in {duration:.2f}s![/bold green]",
title="Result",
border_style="green",
)
)

console.print(Rule(style="blue"))
console.print(Rule("Next Step", style="blue"))
console.print(
"[bold blue]➑️ Next Step:[/bold blue] Try running [cyan]python 02_logging.py[/cyan] to learn about logging in Prefect!"
)
Expand Down
8 changes: 6 additions & 2 deletions 02_logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ def main():
- Use the Prefect logger for structured logging in tasks.
- Map tasks across a list of inputs.
"""
start_time = time.perf_counter()
# Display the flow's purpose for a guided onboarding experience
if main.__doc__:
console.print(
Expand All @@ -69,7 +70,10 @@ def main():
# Explicitly wait for results to avoid AttributeErrors on futures
results = [f.result() for f in futures]

duration = time.perf_counter() - start_time

# Display results in a clean table for better readability
console.print()
table = Table(
title="Processing Summary",
show_header=True,
Expand All @@ -90,13 +94,13 @@ def main():

console.print(
Panel.fit(
f"[bold green]✨ Successfully processed {len(results)} customers with detailed logging![/bold green]",
f"[bold green]✨ Successfully processed {len(results)} customers with detailed logging in {duration:.2f}s![/bold green]",
title="Result",
border_style="green",
)
)

console.print(Rule(style="blue"))
console.print(Rule("Finishing Up", style="blue"))
console.print(
"[bold blue]πŸŽ‰ You've completed the Quickstart! Check out the [cyan]README.md[/cyan] for more features.[/bold blue]"
)
Expand Down
Loading