cytoflowgui.workflow.operations.operation_base¶
- class cytoflowgui.workflow.operations.operation_base.IWorkflowOperation(adaptee, default=<class 'traits.adaptation.adaptation_error.AdaptationError'>)[source]¶
Bases:
cytoflow.operations.i_operation.IOperationAn interface that extends a
cytoflowoperation with functions required for GUI support.In addition to implementing the interface below, another common thing to do in the derived class is to override traits of the underlying class in order to add metadata that controls their handling by the workflow. Currently, relevant metadata include:
apply - This trait is used by the operations
applymethod.estimate - This trait is used by the operation’s
estimatemethod.estimate_result - This trait is set as a result of calling
estimate.status - Holds status variables like the number of events from the
ImportOp.transient - A temporary variable (not copied between processes or serialized).
- changed¶
Used to transmit status information back from the operation to the workflow. Set its value to the name of the trait that was changed
- Type
Event
- should_apply(changed, payload)[source]¶
Should the owning WorkflowItem apply this operation when certain things change?
changedcan be:Changed.APPLY – the parameters required to run apply() changed
Changed.PREV_RESULT – the previous WorkflowItem’s result changed
Changed.ESTIMATE_RESULT – the results of calling “estimate” changed
If
should_applyis called from a notification handler, thenpayloadis theeventobject from the notification handler.
- should_clear_estimate(changed, payload)[source]¶
Should the owning WorkflowItem clear the estimated model by calling op.clear_estimate()?
changedcan be:Changed.ESTIMATE – the parameters required to call
estimate(ie traits withestimate = Truemetadata) have changedChanged.PREV_RESULT – the previous
WorkflowItem’s result changed
If
should_clear_estimateis called from a notificaion handler, thenpayloadis theeventobject.
- get_notebook_code(idx)[source]¶
Return Python code suitable for a Jupyter notebook cell that runs this operation.
- Parameters
idx (integer) – The index of the
WorkflowItemthat holds this operation.- Returns
The Python code that calls this module.
- Return type
string
- class cytoflowgui.workflow.operations.operation_base.WorkflowOperation[source]¶
Bases:
traits.has_traits.HasStrictTraitsA default implementation of
IWorkflowOperation