diff --git a/config/update-config-script.py b/config/update-config-script.py index c2d1df553..83ebdd712 100644 --- a/config/update-config-script.py +++ b/config/update-config-script.py @@ -60,14 +60,18 @@ def __update_conf(self, config: dict): if "output_dir" in config: output_dir = config["output_dir"] + else: + output_dir = "../output" - if "output_file_stem" in config: + if "output_file_stem" in config: file_stem = config["output_file_stem"] + else: + file_stem = "output_file" - if "LBAF_Viz" in config: - config["visualization"] = config.pop("LBAF_Viz") - config["visualization"]["output_visualization_dir"] = output_dir - config["visualization"]["output_visualization_file_stem"] = file_stem + if "LBAF_Viz" in config: + config["visualization"] = config.pop("LBAF_Viz") + config["visualization"]["output_visualization_dir"] = output_dir + config["visualization"]["output_visualization_file_stem"] = file_stem return config @@ -123,7 +127,7 @@ def run(self, filepath: str): self.__logger.info(f"Updating {filename}") new_config = self.__update_conf(config) - # self.__validate_configuration(new_config) + self.__validate_configuration(new_config) self.__write_config(new_config, output_dir, filename) if __name__ == "__main__": diff --git a/tests/unit/config/conf_correct_from_data_min_config.yml b/tests/unit/config/conf_correct_from_data_min_config.yml index ef2248327..cbd2a1757 100644 --- a/tests/unit/config/conf_correct_from_data_min_config.yml +++ b/tests/unit/config/conf_correct_from_data_min_config.yml @@ -19,7 +19,7 @@ algorithm: # Specify output output_file_stem: output_file -LBAF_Viz: +visualization: x_ranks: 2 y_ranks: 2 z_ranks: 1 @@ -27,3 +27,5 @@ LBAF_Viz: rank_qoi: work object_qoi: work force_continuous_object_qoi: true + output_visualization_dir: ../output + output_visualization_file_stem: output_file diff --git a/tests/unit/config/conf_wrong_algorithm_invalid_001.yml b/tests/unit/config/conf_wrong_algorithm_invalid_001.yml index f4271b59d..ebd13f6b2 100644 --- a/tests/unit/config/conf_wrong_algorithm_invalid_001.yml +++ b/tests/unit/config/conf_wrong_algorithm_invalid_001.yml @@ -21,7 +21,7 @@ algorithm: # Specify output output_file_stem: output_file -LBAF_Viz: +visualization: x_ranks: 2 y_ranks: 2 z_ranks: 1 @@ -29,3 +29,5 @@ LBAF_Viz: rank_qoi: work object_qoi: work force_continuous_object_qoi: true + output_visualization_dir: ../output + output_visualization_file_stem: output_file