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.HasStrictTraitsThe basic unit of a Workflow: wraps an operation and a list of views. This class is serialized and synchronized between the
LocalWorkflowand 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 asstatusare 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
WorkflowItemwraps
- current_view¶
The currently selected view
- result¶
The
Experimentthat is the result of applyingoperationto theprevious_wi’sresult
- default_view¶
The default view for this workflow item (if any)
- previous_wi¶
The previous
WorkflowItemin the workflow
- next_wi¶
The next
WorkflowItemin the workflow
- workflow¶
The
LocalWorkfloworRemoteWorkflowthat thisWorkflowItemis a part of
- status¶
This
WorkflowItem’s status
- op_error¶
Errors from
operation’sIOperation.applymethod
- op_warning¶
Warnings from
operation’sIOperation.applymethod
- op_warning_trait¶
The trait that caused the warning in
op_warning
- estimate_error¶
Errors from
operation’sIOperation.estimatemethod
- estimate_warning¶
Warnings from
operation’sIOperation.estimatemethod
- view_error¶
Errors from the most recently plotted view’s
IView.plotmethod
- view_error_trait¶
The trait that caused the error in
view_error
- view_warning¶
Warnings from the most recently plotted view’s
IView.plotmethod
- 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.plotmethod. Retrieved from that view’s enum_plots() method and updated automatically whenresultorcurrent_viewchanges.
- plot_names_label¶
The GUI label for the element that allows users to select a plot name from
plot_names. Updated automatically whenresultorcurrent_viewchanges.
- matplotlib_events¶
threading.Eventto synchronize matplotlib plotting across process boundaries
- plot_lock¶
threading.Lockto synchronize matplotlib plotting across process boundaries
- lock¶
threading.Lockfor 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_traitsto 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_viewassociated 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.plotonresult, or onprevious_wi’sresultif there’s no currentresult.