From 8f0c4148ab86a7a2da67da34402b908d24b8c1e0 Mon Sep 17 00:00:00 2001 From: Michael Anstett Date: Fri, 20 Dec 2024 15:11:46 -0500 Subject: [PATCH] create_experiment now uses tier2 overrides if file is present --- .../prepare_config_and_suite/prepare_config_and_suite.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/swell/deployment/prepare_config_and_suite/prepare_config_and_suite.py b/src/swell/deployment/prepare_config_and_suite/prepare_config_and_suite.py index 7ba3c909..423cbbd7 100644 --- a/src/swell/deployment/prepare_config_and_suite/prepare_config_and_suite.py +++ b/src/swell/deployment/prepare_config_and_suite/prepare_config_and_suite.py @@ -18,6 +18,7 @@ from swell.deployment.prepare_config_and_suite.question_and_answer_defaults import GetAnswerDefaults from swell.utilities.logger import Logger from swell.utilities.jinja2 import template_string_jinja2 +from swell.utilities.dictionary import update_dict # -------------------------------------------------------------------------------------------------- @@ -298,6 +299,14 @@ def override_with_external(self) -> None: with open(test_file, 'r') as ymlfile: override_dict = yaml.safe_load(ymlfile) + # Update overrides with tier2 suite test file if available + tier2_test_file = os.path.join(get_swell_path(), 'test', 'suite_tests', + self.suite + '-tier2.yaml') + if os.path.exists(tier2_test_file): + with open(tier2_test_file, 'r') as ymlfile: + tier2_override_dict = yaml.safe_load(ymlfile) + override_dict = update_dict(override_dict, tier2_override_dict) + # Now append with any user provided override if self.override is not None: