skbio.workflow.Workflow#
- class skbio.workflow.Workflow(state, short_circuit=True, debug=False, options=None, **kwargs)[source]#
Arbitrary workflow support structure.
Methods that are considered to be directly part of the workflow must be decorated with
method
. The workflow methods offer a mechanism to logically group functionality together, and are free to make subsequent calls to other methods.All methods of a subclass of Workflow (those with and without the
method
decoration) can take advantage of therequires
decorator to specify any option or state requirements for the decorated function.- Parameters:
- stateobject
State can be anything or nothing. This is dependent on the workflow as in some cases, it is useful to preallocate state while in other workflows state may be ignored.
- short_circuitbool
if True, enables ignoring function methods when a given item has failed
- debugbool
Enable debug mode
- optionsdict
runtime options, {‘option’:values}, that the
requires
decorator can interrogate.- kwargsdict
Additional arguments will be added as member variables to self. This is handy if additional contextual information is needed by a workflow method (e.g., a lookup table).
Built-ins
__call__
(iter_[, success_callback, ...])Operate on all the data.
__eq__
(value, /)Return self==value.
__ge__
(value, /)Return self>=value.
__getstate__
(/)Helper for pickle.
__gt__
(value, /)Return self>value.
__hash__
(/)Return hash(self).
__le__
(value, /)Return self<=value.
__lt__
(value, /)Return self<value.
__ne__
(value, /)Return self!=value.
__str__
(/)Return str(self).
Methods
initialize_state
(item)Initialize state.