Pipes#
- class ipyelk.pipes.Pipe(**kwargs: Any)#
A step in the processing pipeline for diagrams.
Attributes#
- inlet:
MarkElementWidget
input elements to manipulate.
- outlet:
MarkElementWidget
output elements that potentially have been manipulated.
- observed: tuple of
str
which potential changes that would require this pipe to be rerun.
- reports: tuple of
str
types of changes that get added to the output based of rerunning this pipe.
- on_progress:
callable
Callable function that is executed when the pipe is running.
- status:
PipeStatus
Captures the disposition of the pipe during the change lifecycle.
- status_view:
PipeStatusView
Widget to show pipe status as it updates.
- enabled: bool
whether the processing step can be run
- check_dirty()#
Method to test is this pipe should be run given the set of changes.
- Returns:
dirty flag
- Return type:
bool
- error()#
Method to raise any potential errors captured during the running of the pipe.
- Raises:
self.status.exception – captured exception during the processing.
- async run()#
Run method that takes the input performs checks/changes, and sets the output value.
Subclasses of the pipe will implement their own custom processing logic.
- schedule_run(change=None)#
Schedule rerunning the pipe on the event loop.
- Return type:
Task
- inlet:
- class ipyelk.pipes.Pipeline(**kwargs: Any)#
- check()#
Checks inlets and outlets of the pipeline and raises error is not connected
- Raises:
BrokenPipe – Disconnected pipes
- Return type:
bool
- Returns:
True if no errors in pipeline
- check_dirty()#
Method to test is this pipe should be run given the set of changes.
- Returns:
dirty flag
- Return type:
bool
- async run()#
Run method that takes the input performs checks/changes, and sets the output value.
Subclasses of the pipe will implement their own custom processing logic.
- class ipyelk.pipes.base.PipeStatus(**kwargs: Any)#
- class ipyelk.pipes.base.PipeStatusView(**kwargs: Any)#
Widget to display the pipe status.
Attributes#
- include_exception: bool
exception captured
- html: string
built status html to display
- update(pipe)#
Method to update the status given changes in the pipe.
- class ipyelk.pipes.MarkElementWidget(**kwargs: Any)#