matflow.Element#
- class matflow.Element(id_, is_pending, task, index, es_idx, seq_idx, src_idx, iteration_IDs, iterations)#
Bases:
Element
Methods
Get element data of the most recent iteration from the persistent store.
Get EARs that the most recent iteration of this element depends on.
Get the data index of the most recent element iteration.
Get EARs that depend on the most recent iteration of this element.
Get element iterations that depend on the most recent iteration of this element.
Get elements that depend on the most recent iteration of this element.
Get downstream elements that depend on this element, including recursive dependencies.
Get tasks that depend on the most recent iteration of this element.
Get elements that the most recent iteration of this element depends on.
Get element iterations that the most recent iteration of this element depends on.
Get locally defined inputs/sequences/defaults from other tasks that this the most recent iteration of this element depends on.
"Get the parameter sources of the most recent element iteration.
Get tasks (insert ID or WorkflowTask objects) that the most recent iteration of this element depends on.
Generate lists of workflow-bound InputValues and ResourceList.
Attributes
Get a list of element action runs from the latest iteration, where only the final run is taken for each element action.
Get the index of the element within the task.
- Parameters:
- property action_runs: List[ElementActionRun]#
Get a list of element action runs from the latest iteration, 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 dir_name#
- property element_set#
- get(path=None, action_idx=None, run_idx=-1, default=None, raise_on_missing=False, raise_on_unset=False)#
Get element data of the most recent iteration from the persistent store.
- get_EAR_dependencies(as_objects=False)#
Get EARs that the most recent iteration of this element depends on.
- Parameters:
as_objects (bool) –
- Return type:
- get_data_idx(path=None, action_idx=None, run_idx=-1)#
Get the data index of the most recent element iteration.
- get_dependent_EARs(as_objects=False)#
Get EARs that depend on the most recent iteration of this element.
- Parameters:
as_objects (bool) –
- Return type:
- get_dependent_element_iterations(as_objects=False)#
Get element iterations that depend on the most recent iteration of this element.
- Parameters:
as_objects (bool) –
- Return type:
- get_dependent_elements(as_objects=False)#
Get elements that depend on the most recent iteration of this element.
- get_dependent_elements_recursively(task_insert_ID=None)#
Get downstream elements that depend on this element, including recursive dependencies.
Dependencies are resolved using the initial iteration only. This method is used to identify from which element in the previous iteration a new iteration should be parametrised.
- Parameters:
task_insert_ID – If specified, only return elements from this task.
- get_dependent_tasks(as_objects=False)#
Get tasks that depend on the most recent iteration of this element.
- Parameters:
as_objects (bool) –
- Return type:
List[int | WorkflowTask]
- get_element_dependencies(as_objects=False)#
Get elements that the most recent iteration of this element depends on.
- get_element_iteration_dependencies(as_objects=False)#
Get element iterations that the most recent iteration of this element depends on.
- Parameters:
as_objects (bool) –
- Return type:
- get_input_dependencies()#
Get locally defined inputs/sequences/defaults from other tasks that this the most recent iteration of this element depends on.
- get_parameter_sources(path=None, action_idx=None, run_idx=-1, typ=None, as_strings=False, use_task_index=False)#
“Get the parameter sources of the most recent element iteration.
- get_task_dependencies(as_objects=False)#
Get tasks (insert ID or WorkflowTask objects) that the most recent iteration of this element 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: int#
Get the index of the element within the task.
Note: the global_idx attribute returns the index of the element within the workflow, across all tasks.
- property input_files: ElementInputFiles#
- property input_sources: Dict[str, InputSource]#
- property inputs: ElementInputs#
- property iterations: Dict[app.ElementAction]#
- property latest_iteration#
- property output_files: ElementOutputFiles#
- property outputs: ElementOutputs#
- property task: WorkflowTask#
- to_element_set_data()#
Generate lists of workflow-bound InputValues and ResourceList.