Skip to main content

Module progress

Module progress 

Source
Expand description

Progress displays.

Port of rich/progress.py’s display and task model: a grid of tasks, one row each, whose cells come from a list of ProgressColumns. Upstream builds a Table.grid (padding=(0, 1)); we render the equivalent inline — fixed columns take their widest cell, the bar column flexes to fill (capped at 40), and columns are separated by a single unstyled space.

Time is read from an injectable clock (Progress::clock, upstream’s get_time), so elapsed time, speed, ETA and spinner frames are deterministic under test. The default clock is monotonic.

Not ported yet (see docs/DIVERGENCES.md §16): the auto-refreshing Live integration and track(), the pulsing bar for unstarted or indeterminate tasks, RenderableColumn, per-task custom fields and table-column options.

Structs§

Progress
A progress display over one or more Tasks. Mirrors rich.progress.Progress.
SpinnerColumn
An animated spinner. Port of SpinnerColumn: one spinner shared by every row, whose animation starts at its first render.
Task
A single tracked task. Mirrors rich.progress.Task; read-only outside Progress.
TaskId
Identifies a task within one Progress. Upstream’s TaskID.
TaskUpdate
Changes for Progress::update; unset fields are left alone. Upstream’s keyword arguments to Progress.update.
TimeRemainingColumn
Estimated time remaining. Port of TimeRemainingColumn, including its half-second render cache (max_refresh = 0.5).

Enums§

ProgressColumn
A column in a Progress display. Mirrors upstream’s ProgressColumns.

Type Aliases§

GetTime
A source of the current time in seconds. Upstream’s GetTimeCallable.