diff --git a/demo-project/src/demo_project/pipeline_registry.py b/demo-project/src/demo_project/pipeline_registry.py index 78cbc5f217..1c2dd58df3 100644 --- a/demo-project/src/demo_project/pipeline_registry.py +++ b/demo-project/src/demo_project/pipeline_registry.py @@ -8,36 +8,6 @@ from demo_project.pipelines import modelling as mod from demo_project.pipelines import reporting as rep -def create_pipeline(**kwargs) -> Pipeline: - data_processing_pipeline = pipeline( - [ - node( - lambda x: x, - inputs=["raw_data"], - outputs="model_inputs", - name="process_data", - tags=["split"], - ) - ], - namespace="uk.something1.data_processing", - outputs="model_inputs", - ) - data_science_pipeline = pipeline( - [ - node( - lambda x: x, - inputs=["model_inputs"], - outputs="model", - name="train_model", - tags=["train"], - ) - ], - namespace="uk.something2.data_science", - inputs="model_inputs", - ) - return data_processing_pipeline + data_science_pipeline - - def register_pipelines() -> Dict[str, Pipeline]: """Register the project's pipelines. @@ -58,16 +28,15 @@ def register_pipelines() -> Dict[str, Pipeline]: return { - "__default__": create_pipeline(), - # "__default__": ( - # ingestion_pipeline - # + feature_pipeline - # + modelling_pipeline - # + reporting_pipeline - # ), - # "Data ingestion": ingestion_pipeline, - # "Modelling stage": modelling_pipeline, - # "Feature engineering": feature_pipeline, - # "Reporting stage": reporting_pipeline, - # "Pre-modelling": ingestion_pipeline + feature_pipeline, + "__default__": ( + ingestion_pipeline + + feature_pipeline + + modelling_pipeline + + reporting_pipeline + ), + "Data ingestion": ingestion_pipeline, + "Modelling stage": modelling_pipeline, + "Feature engineering": feature_pipeline, + "Reporting stage": reporting_pipeline, + "Pre-modelling": ingestion_pipeline + feature_pipeline, } diff --git a/package/kedro_viz/data_access/repositories/modular_pipelines.py b/package/kedro_viz/data_access/repositories/modular_pipelines.py index a1bb7361a7..a3cb43b0df 100644 --- a/package/kedro_viz/data_access/repositories/modular_pipelines.py +++ b/package/kedro_viz/data_access/repositories/modular_pipelines.py @@ -168,12 +168,12 @@ def add_children(self, modular_pipeline_id: str, task_nodes: List[GraphNode]): modular_pipeline.outputs ) + # The line `parent_modular_pipeline_id = ('.'.join(modular_pipeline_id.split('.')[:-1]) if '.' in + # modular_pipeline_id else None)` is extracting the parent modular pipeline ID from the given + # modular pipeline ID. parent_modular_pipeline_id = ( '.'.join(modular_pipeline_id.split('.')[:-1]) if '.' in modular_pipeline_id else None ) - - print("Modular Pipeline ID", modular_pipeline_id) - print("Parent Modular Pipeline ID", parent_modular_pipeline_id) if parent_modular_pipeline_id: parent_modular_pipeline = self.get_or_create_modular_pipeline( parent_modular_pipeline_id