TaskSubset¶
- class lsst.pipe.base.pipeline_graph.TaskSubset(parent_xgraph: DiGraph, label: str, members: set[str], description: str)¶
Bases:
MutableSet[str]A specialized set that represents a labeles subset of the tasks in a pipeline graph.
Instances of this class should never be constructed directly; they should only be accessed via the
PipelineGraph.task_subsetsattribute and created by thePipelineGraph.add_task_subsetmethod.- Parameters:
- parent_xgraph
networkx.DiGraph Parent networkx graph that this subgraph is part of.
- label
str Label associated with this subset of the pipeline.
- members
set[str] Labels of the tasks that are members of this subset.
- description
str, optional Description string associated with this labeled subset.
- parent_xgraph
Notes
Iteration order is arbitrary, even when the parent pipeline graph is ordered (there is no guarantee that an ordering of the tasks in the graph implies a consistent ordering of subsets).
Attributes Summary
Description string associated with this labeled subset.
Label associated with this subset of the pipeline.
Methods Summary
add(task_label)Add a new task to this subset.
clear()This is slow (creates N new iterators!) but effective.
discard(task_label)Remove a task from the subset if it is present.
isdisjoint(other)Return True if two sets have a null intersection.
pop()Return the popped value.
remove(value)Remove an element.
Attributes Documentation
- description¶
Description string associated with this labeled subset.
- label¶
Label associated with this subset of the pipeline.
Methods Documentation
- add(task_label: str) None¶
Add a new task to this subset.
- Parameters:
- task_label
str Label for the task. Must already be present in the parent pipeline graph.
- task_label
- clear()¶
This is slow (creates N new iterators!) but effective.
- discard(task_label: str) None¶
Remove a task from the subset if it is present.
- Parameters:
- task_label
str Label for the task. Must already be present in the parent pipeline graph.
- task_label
- isdisjoint(other)¶
Return True if two sets have a null intersection.
- pop()¶
Return the popped value. Raise KeyError if empty.
- remove(value)¶
Remove an element. If not a member, raise a KeyError.