From 075a28fcd456219341acca61c20e1667b5b72c14 Mon Sep 17 00:00:00 2001 From: Petr Hajduk Date: Thu, 29 Jun 2023 16:35:54 +0300 Subject: [PATCH] copy matrix folder from test scenario --- Scripts/helmet_validate_inputfiles.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Scripts/helmet_validate_inputfiles.py b/Scripts/helmet_validate_inputfiles.py index a7ac7adb..59648be4 100644 --- a/Scripts/helmet_validate_inputfiles.py +++ b/Scripts/helmet_validate_inputfiles.py @@ -59,10 +59,10 @@ def main(args): mock_result_path = os.path.join( args.results_path, args.scenario_name, "Matrices") if not os.path.exists(mock_result_path): - msg = "Mock Results directory {} does not exist.".format( - mock_result_path) - log.error(msg) - raise NameError(msg) + log.info("Matrices folder does not exist, copying the folder from test scenario") + test_path = os.path.join(args.results_path,"test","Matrices") + import shutil + shutil.copytree(test_path, mock_result_path) assignment_model = MockAssignmentModel(MatrixData(mock_result_path)) zone_numbers = assignment_model.zone_numbers else: