From ca02d5c4598c1c8abf8d90cdadad32371c8b8d40 Mon Sep 17 00:00:00 2001 From: Alberto Soutullo Rendo Date: Sun, 27 Nov 2022 16:43:36 +0100 Subject: [PATCH] Modification of variables due to previous refactor --- src/simulation_runner/runner.py | 10 +++++----- src/utilities/files/json/simulation_config_parser.py | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/simulation_runner/runner.py b/src/simulation_runner/runner.py index bb815d5..4cd6c52 100644 --- a/src/simulation_runner/runner.py +++ b/src/simulation_runner/runner.py @@ -2,17 +2,17 @@ import os # Project Imports -from src.utilities.env_variables import binary_path, configuration_settings, shared_folder +from src.utilities.env_variables import BINARY_PATH, CONFIGURATION_SETTINGS, SHARED_FOLDER from src.utilities.files.json.json_utils import write_json def run_simulation(arguments_config: dict, simulation_config: dict): - write_json(simulation_config, configuration_settings) + write_json(simulation_config, CONFIGURATION_SETTINGS) - os.system(binary_path + os.system(BINARY_PATH + " -f " + arguments_config["output-format"] - + " -i " + configuration_settings + " -o " + + " -i " + CONFIGURATION_SETTINGS + " -o " + arguments_config["output-file"]) - os.system("mv " + arguments_config["output-file"] + "." + arguments_config["output-format"] + " " + shared_folder) + os.system("mv " + arguments_config["output-file"] + "." + arguments_config["output-format"] + " " + SHARED_FOLDER) diff --git a/src/utilities/files/json/simulation_config_parser.py b/src/utilities/files/json/simulation_config_parser.py index 00c3b75..e378ab5 100644 --- a/src/utilities/files/json/simulation_config_parser.py +++ b/src/utilities/files/json/simulation_config_parser.py @@ -11,7 +11,7 @@ class SimulationConfigParser: def read_content(self) -> tuple[dict, dict, dict]: # Retrieve raw info - json_configuration = read_json(self._file_path) + json_configuration = read_json(env_variables.SHARED_FOLDER + self._file_path) # Split two parts arguments_config = json_configuration["arguments"] @@ -19,8 +19,8 @@ class SimulationConfigParser: # plotter_config = json_configuration["plotter"] # Retrieve valid schemas - arguments_json_schema = read_json(env_variables.arguments_schema_path) - config_json_schema = read_json(env_variables.configuration_schema_path) + arguments_json_schema = read_json(env_variables.ARGUMENTS_SCHEMA_PATH) + config_json_schema = read_json(env_variables.CONFIGURATION_SCHEMA_PATH) # plotter_json_schema = read_json(env_variables.plotter_schema_path) # Validate