snowshu.core.graph¶
-
class
snowshu.core.graph.
SnowShuGraph
¶ Bases:
object
Wrapper class for the networkx.Graph that represents the configuration relation dependencies
-
dag
¶ - Type
Optional[tuple]
-
graph
¶ - Type
Optional[networkx.Graph]
-
build_graph
(configs: snowshu.core.configuration_parser.Configuration) → None¶ Builds a directed graph per replica config.
- Parameters
configs –
Configuration
object.
-
static
build_sum_patterns_from_configs
(config: snowshu.core.configuration_parser.Configuration) → List[dict]¶ creates pattern dictionaries to filter with to build the total filtered catalog.
- Parameters
config –
Configuration
object.
-
static
catalog_difference
(source_graph: Union[SnowShuGraph, networkx.classes.graph.Graph], target_catalog: Union[tuple, list, set]) → networkx.classes.graph.Graph¶ Finds a difference between source_graph nodes and target_catalog nodes and deletes other nodes (common, not present in difference) from source_graph.
- Args:
- source_graph (Union[SnowShuGraph, networkx.Graph]): source Graph or SnowShuGraph object
which is built in current run from replica.yml file.
- target_catalog (Union[tuple, list, set]): object which is generated by getting target
catalog from existing replica image.
- Returns:
- The
Graph
which is source graph with removed nodes which are common with target catalog nodes.
- The
-
get_connected_subgraphs
() → tuple¶ Generates the set of (weakly) connected components of the object’s graph
- Returns
tuple of connected subgraphs of the original processing graph
-