load_valid_flows

timelines.load_valid_flows(csv_path)

Load all valid flows from a .flow.csv file, grouped by flow_mode.

Parameters

Name Type Description Default
csv_path 'Path | str' Path to the .flow.csv file. required

Returns

Name Type Description
dict[FlowMode, 'Flow'] Dict mapping FlowMode to Flow for each unique flow_mode in the CSV.
dict[FlowMode, 'Flow'] Skips unknown flow_modes and ERROR entries.

Examples

>>> flows = load_valid_flows(Path("tests/data/target_flows/specimen.flow.csv"))
>>> default_flow = flows[FlowMode.default]
>>> for mode, flow in flows.items():
...     print(f"{mode.value}: {len(flow.sections)} sections")