matflow.ElementIteration#
- class matflow.ElementIteration(id_, is_pending, index, element, data_idx, EARs_initialised, EAR_IDs, EARs, schema_parameters, loop_idx)#
Bases:
ElementIteration
Methods
Get element data from the persistent store.
Get EARs that this element iteration depends on (excluding EARs of this element iteration).
- param action_idx:
The index of the action within the schema.
Get EARs of downstream iterations and tasks that depend on this element iteration.
Get elements iterations of downstream iterations and tasks that depend on this element iteration.
Get elements of downstream tasks that depend on this element iteration.
Get downstream tasks that depend on this element iteration.
Get elements that this element iteration depends on.
Get element iterations that this element iteration depends on.
Get locally defined inputs/sequences/defaults from other tasks that this element iteration depends on.
Get parameter types associated with a given prefix.
- param use_task_index:
If True, use the task index within the workflow, rather than the task insert
Resolve specific resources for the specified action of this iteration, considering all applicable scopes.
Get tasks (insert ID or WorkflowTask objects) that this element iteration depends on.
Get template-level resources.
Attributes
Whether or not the EARs have been initialised.
Get a list of element action runs, where only the final run is taken for each element action.
The overall element iteration data index, before resolution of EARs.
- Parameters:
- property EAR_IDs_flat#
- property EARs_initialised#
Whether or not the EARs have been initialised.
- property action_runs: List[ElementActionRun]#
Get a list of element action runs, where only the final run is taken for each element action.
- property actions: Dict[app.ElementAction]#
- app = App(name='MatFlow', version='0.3.0a129')#
- property data_idx#
The overall element iteration data index, before resolution of EARs.
- property element#
- get(path=None, action_idx=None, run_idx=-1, default=None, raise_on_missing=False, raise_on_unset=False)#
Get element data from the persistent store.
- get_EAR_dependencies(as_objects=False)#
Get EARs that this element iteration depends on (excluding EARs of this element iteration).
- Parameters:
as_objects (bool | None) –
- Return type:
- get_data_idx(path=None, action_idx=None, run_idx=-1)#
- get_dependent_EARs(as_objects=False)#
Get EARs of downstream iterations and tasks that depend on this element iteration.
- Parameters:
as_objects (bool) –
- Return type:
- get_dependent_element_iterations(as_objects=False)#
Get elements iterations of downstream iterations and tasks that depend on this element iteration.
- Parameters:
as_objects (bool) –
- Return type:
- get_dependent_elements(as_objects=False)#
Get elements of downstream tasks that depend on this element iteration.
- get_dependent_tasks(as_objects=False)#
Get downstream tasks that depend on this element iteration.
- Parameters:
as_objects (bool) –
- Return type:
List[int | WorkflowTask]
- get_element_dependencies(as_objects=False)#
Get elements that this element iteration depends on.
- get_element_iteration_dependencies(as_objects=False)#
Get element iterations that this element iteration depends on.
- Parameters:
as_objects (bool) –
- Return type:
- get_input_dependencies()#
Get locally defined inputs/sequences/defaults from other tasks that this element iteration depends on.
- get_parameter_names(prefix)#
Get parameter types associated with a given prefix.
For example, with the prefix “inputs”, this would return [‘p1’, ‘p2’] for a task schema that has input types p1 and p2. For inputs, labels are ignored. For example, for a task schema that accepts two inputs of the same type p1, with labels one and two, this method would return (for the “inputs” prefix): [‘p1[one]’, ‘p1[two]’].
This method is distinct from Action.get_parameter_names in that it returns schema-level inputs/outputs, whereas Action.get_parameter_names returns action-level input/output/file types/labels.
- get_parameter_sources(path=None, action_idx=None, run_idx=-1, typ=None, as_strings=False, use_task_index=False)#
- get_resources(action, set_defaults=False)#
Resolve specific resources for the specified action of this iteration, considering all applicable scopes.
- get_resources_obj(action, set_defaults=False)#
- Parameters:
- Return type:
- get_task_dependencies(as_objects=False)#
Get tasks (insert ID or WorkflowTask objects) that this element iteration depends on.
Dependencies may come from either elements from upstream tasks, or from locally defined inputs/sequences/defaults from upstream tasks.
- Parameters:
as_objects (bool) –
- Return type:
List[int | WorkflowTask]
- property index#
- property input_files: ElementInputFiles#
- property inputs: ElementInputs#
- property output_files: ElementOutputFiles#
- property outputs: ElementOutputs#
- property task#
- property workflow#