rail¶
The pipeline rail: what each lane shows, as plain data.
The page draws one station per pipeline lane. Which state a station is in, how long the stage
took and which tool is running follow a few rules (a new turn resets the rail, a finished lane
shows its duration, and so on). Rail holds those rules with no UI framework, so they
are tested without a browser; the page only renders the LaneView it returns.
Classes¶
Module Contents¶
- class rail.LaneView¶
What one station shows.
- Variables:
state – Idle, active or done.
duration – Text such as
"250 ms"once a started lane is done; empty otherwise.detail – Extra text under the lane, the running tool’s name.
- state: voicemate.events.LaneState¶
- duration: str = ''¶
- detail: str = ''¶
- class rail.Rail(lanes: collections.abc.Iterable[voicemate.events.Lane])¶
Lane events in, per-lane views out.
- Parameters:
lanes – The lanes the page draws; events for other lanes are ignored.
- view(lane: voicemate.events.Lane) LaneView¶
What
laneshows now.
- apply(event: voicemate.events.StatusEvent) dict[voicemate.events.Lane, LaneView]¶
Apply one event.
- Returns:
the event’s lane, or every lane when a new turn starts listening (the rail resets first).
- Return type:
The views that changed