Pipe
Pipe(
tasks: collections.abc.Mapping[str, Task] ,
dependencies: collections.abc.Mapping[str, tuple[str, …]] =
inputs: tuple[str, …] = (),
outputs: tuple[str, …] ,
)-> None
A directed acyclic graph of tasks.
Each node is a task under a name of its own, and each edge says which node’s output becomes one of another node’s inputs. Inputs are given to a task in the order they are listed, so a task taking two of them – concatenating two patches, say – gets them the way it was wired.
Build one with | rather than by hand: first | second chains two tasks, pipe | third extends a chain, (left, right) | merge feeds two branches into one task, and split | (left, right) fans one out into two results.
Methods
| Name | Description |
|---|---|
| check | Check that the pipe describes a graph which can be run. |
| get | Return the task a node holds. |
| get_provenance | Return a record of this pipe and the machine it ran on. |
| load |
Return the pipe a file holds; see save.
|
| new | Return a pipe with some of its fields replaced. |
| relabel | Return a new pipe with some of its nodes named differently. |
| run | Run every task in order and return what the pipe’s outputs gave back. |
| save | Write this pipe to a file. |
| sorted_nodes | Return the nodes in an order which runs each after its inputs. |
| sources | Return the nodes which take their input from the caller, in order. |
| structure | Return the digest this pipe’s shape makes of the tasks it is given. |
| to_dict | Return a document which describes this pipe. |
| to_mermaid | Return the pipe as the text of a mermaid flowchart. |
| update | Return a new pipe with one node’s parameters changed. |
| from_dict | Return the pipe a document describes. |