hpcflow.app.WorkflowLoop#
- class hpcflow.app.WorkflowLoop(index, workflow, template, num_added_iterations, iterable_parameters, parents)#
Bases:
WorkflowLoop
Class to represent a
Loop
that is bound to aWorkflow
.- Parameters:
index (int) – The index of this loop in the workflow.
workflow (Workflow) – The workflow containing this loop.
template (Loop) – The loop that this was generated from.
num_added_iterations (dict[tuple[int, ...], int]) – Description of what iterations have been added.
iterable_parameters (dict[str, IterableParam]) – Description of what parameters are being iterated over.
parents (list[str]) – The paths to the parent entities of this loop.
Methods
Add an iteration to this loop.
Get loops whose task subset is a subset of this loop's task subset.
Get loops whose task subset is a superset of this loop's task subset.
Make a new empty loop.
Check if a loop should terminate, given the specified completed element iteration.
Attributes
Tasks that are not part of the loop, and downstream from this loop.
The index of this loop within its workflow.
The parameters that are being iterated over.
The name of this loop, if one is defined.
The number of added iterations.
The number of iterations.
The parents of this loop.
The list of task indices that define the extent of the loop.
The insertion IDs of the tasks inside this loop.
The tasks in this loop.
The loop template for this loop.
Tasks that are not part of the loop, and upstream from this loop.
The workflow containing this loop.
- add_iteration(parent_loop_indices=None, cache=None)#
Add an iteration to this loop.
- property downstream_tasks: Iterator[WorkflowTask]#
Tasks that are not part of the loop, and downstream from this loop.
- get_child_loops()#
Get loops whose task subset is a subset of this loop’s task subset. If two loops have identical task subsets, the first loop in the workflow loop list is considered the child.
- Return type:
- get_parent_loops()#
Get loops whose task subset is a superset of this loop’s task subset. If two loops have identical task subsets, the first loop in the workflow loop list is considered the child.
- Return type:
- property iterable_parameters: Mapping[str, IterableParam]#
The parameters that are being iterated over.
- classmethod new_empty_loop(index, workflow, template, iter_loop_idx)#
Make a new empty loop.
- property task_indices: tuple[int, ...]#
The list of task indices that define the extent of the loop.
- property task_objects: tuple[WorkflowTask, ...]#
The tasks in this loop.
- test_termination(element_iter)#
Check if a loop should terminate, given the specified completed element iteration.
- Return type:
- property upstream_tasks: Iterator[WorkflowTask]#
Tasks that are not part of the loop, and upstream from this loop.