pipeline.src.shared_tasks.control_flow

Functions

str_to_path(→ pathlib.Path)

Returns Path object corresponding to input str

filter_results(→ List)

Filters invalid results from an input mapped results list.

flatten(→ list)

Module Contents

pipeline.src.shared_tasks.control_flow.str_to_path(path: str) pathlib.Path[source]

Returns Path object corresponding to input str

Parameters:

path (str) – ‘stairway/to/heaven’

Returns:

Path(‘stairway/to/heaven’)

Return type:

Path

pipeline.src.shared_tasks.control_flow.filter_results(task_results) List[source]

Filters invalid results from an input mapped results list.

Parameters:

task_results – List of (mapped) task results.

Raises:

AssertionError – If input is not a list.

Returns:

Filtered list with SKIPs, Nones and Errors removed

Return type:

List

pipeline.src.shared_tasks.control_flow.flatten(task_results: List[list]) list[source]