pipeloom.progress¶
pipeloom.progress ¶
progress.py¶
Factory helpers for Rich progress managers.
We intentionally separate overall progress (sticky, remains visible at 100%) from per-task progress (transient, disappears once all tasks complete). Both share the same Console (see rlog.console).
make_overall_progress ¶
Create the overall persistent progress manager.
This remains visible after completion and is ideal for a single “All tasks: 100%” summary line once per-task bars disappear.
Returns:
| Name | Type | Description |
|---|---|---|
Progress |
Progress
|
The Rich Progress instance managing overall progress. |
Source code in pipeloom/progress.py
make_task_progress ¶
Create the transient per-task progress manager.
This hides when the context exits so your terminal remains tidy.
Returns:
| Name | Type | Description |
|---|---|---|
Progress |
Progress
|
The Rich Progress instance managing task bars. |
Source code in pipeloom/progress.py
preregister_task_bars ¶
Pre-create one Rich bar per task and return a mapping {task_id -> TaskID}.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
task_progress
|
Progress
|
The Rich Progress instance managing task bars. |
required |
num_tasks
|
int
|
The total number of tasks to create bars for. |
required |
Returns:
| Type | Description |
|---|---|
dict[int, TaskID]
|
dict[int, TaskID]: A mapping of task IDs to their Rich TaskIDs. |
Why up-front?¶
If a worker publishes a MsgTaskProgress before the writer has created the bar, updates can be lost. Pre-registering eliminates this race completely.