cytoflowgui.workflow.workflow_item¶
Represents one step in an analysis pipeline. Wraps a single
IOperation
and any IView
of its result.
- class cytoflowgui.workflow.workflow_item.WorkflowItem[source]¶
Bases:
traits.has_traits.HasStrictTraits
The basic unit of a Workflow: wraps an operation and a list of views. This class is serialized and synchronized between the
LocalWorkflow
and theRemoteWorkflow
.Notes
Because we serialize instances of this, we have to pay careful attention to which traits are
transient
(and aren’t serialized). Additionally, traits marked asstatus
are only serialized remote –> local. For more details about the synchronization, see the module docstring forcytoflowgui.workflow
- friendly_id¶
The operation’s id
- name¶
The operation’s name
- operation¶
The operation that this
WorkflowItem
wraps
- current_view¶
The currently selected view
- result¶
The
Experiment
that is the result of applyingoperation
to theprevious_wi
’sresult
- default_view¶
The default view for this workflow item (if any)
- previous_wi¶
The previous
WorkflowItem
in the workflow
- next_wi¶
The next
WorkflowItem
in the workflow
- workflow¶
The
LocalWorkflow
orRemoteWorkflow
that thisWorkflowItem
is a part of
- status¶
This
WorkflowItem
’s status
- op_error¶
Errors from
operation
’sIOperation.apply
method
- op_warning¶
Warnings from
operation
’sIOperation.apply
method
- op_warning_trait¶
The trait that caused the warning in
op_warning
- estimate_error¶
Errors from
operation
’sIOperation.estimate
method
- estimate_warning¶
Warnings from
operation
’sIOperation.estimate
method
- view_error¶
Errors from the most recently plotted view’s
IView.plot
method
- view_error_trait¶
The trait that caused the error in
view_error
- view_warning¶
Warnings from the most recently plotted view’s
IView.plot
method
- view_warning_trait¶
The trait that caused the warning in
view_warning
- plot_names¶
The possible values for the plot_name parameter of
current_view
’sIView.plot
method. Retrieved from that view’s enum_plots() method and updated automatically whenresult
orcurrent_view
changes.
- plot_names_label¶
The GUI label for the element that allows users to select a plot name from
plot_names
. Updated automatically whenresult
orcurrent_view
changes.
- matplotlib_events¶
threading.Event
to synchronize matplotlib plotting across process boundaries
- plot_lock¶
threading.Lock
to synchronize matplotlib plotting across process boundaries
- lock¶
threading.Lock
for updating thisWorkflowItem
’s traits
- edit_traits(view=None, parent=None, kind=None, context=None, handler=None, id='', scrollable=None, **args)[source]¶
Override the base
traits.has_traits.HasTraits.edit_traits
to make it go looking for views in the handler.
- trait_view(name=None, view_element=None, handler=None)[source]¶
Gets or sets a ViewElement associated with an object’s class.
If both name and view_element are specified, the view element is associated with name for the current object’s class. (That is, view_element is added to the ViewElements object associated with the current object’s class, indexed by name.)
If only name is specified, the function returns the view element object associated with name, or None if name has no associated view element. View elements retrieved by this function are those that are bound to a class attribute in the class definition, or that are associated with a name by a previous call to this method.
If neither name nor view_element is specified, the method returns a View object, based on the following order of preference:
If there is a View object named
traits_view
associated with the current object, it is returned.If there is exactly one View object associated the current object, it is returned.
Otherwise, it returns a View object containing items for all the non-event trait attributes on the current object.
- Parameters
name (str) – Name of a view element
view_element (ViewElement) – View element to associate
- Returns
- Return type
A view element.
- estimate()[source]¶
Call
operation
’sIOperation.estimate
- apply()[source]¶
Calls
operation
’sIOperation.apply
; applies thisWorkflowItem
’s operation toprevious_wi
’s result
- plot()[source]¶
Call
current_view
’sIView.plot
onresult
, or onprevious_wi
’sresult
if there’s no currentresult
.