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