diff --git a/package/kedro_viz/data_access/managers.py b/package/kedro_viz/data_access/managers.py index 4e4e772e5a..f01a86469a 100644 --- a/package/kedro_viz/data_access/managers.py +++ b/package/kedro_viz/data_access/managers.py @@ -199,6 +199,9 @@ def add_pipeline(self, registered_pipeline_id: str, pipeline: KedroPipeline): modular_pipelines.add_output( current_modular_pipeline_id, output_node ) + + #add tags + modular_pipelines.add_tags(current_modular_pipeline_id, task_node.tags) def add_node(self, registered_pipeline_id: str, node: KedroNode) -> TaskNode: """Add a Kedro node as a TaskNode to the NodesRepository diff --git a/package/kedro_viz/data_access/repositories/modular_pipelines.py b/package/kedro_viz/data_access/repositories/modular_pipelines.py index b887d020b8..d8bdff675a 100644 --- a/package/kedro_viz/data_access/repositories/modular_pipelines.py +++ b/package/kedro_viz/data_access/repositories/modular_pipelines.py @@ -161,6 +161,11 @@ def add_output(self, modular_pipeline_id: str, output_node: GraphNode): else: self.tree[modular_pipeline_id].external_outputs.add(output_node.id) + def add_tags(self, modular_pipeline_id: str, node_tags: set): + if modular_pipeline_id in self.tree: + self.tree[modular_pipeline_id].tags |= node_tags + + def add_child(self, modular_pipeline_id: str, child: ModularPipelineChild): """Add a child to a modular pipeline. Args: