Enable plotting functionality

This commit is contained in:
Alberto Soutullo Rendo 2022-11-27 18:58:49 +01:00
parent ca9212a1fd
commit 04c8251d08
2 changed files with 7 additions and 8 deletions

View File

@ -2,6 +2,7 @@
import typer import typer
# Project Imports # Project Imports
from src.plotter.run_plotter import run_plotter
from src.simulation_runner.runner import run_simulation from src.simulation_runner.runner import run_simulation
from src.utilities.files.json.simulation_config_parser import SimulationConfigParser from src.utilities.files.json.simulation_config_parser import SimulationConfigParser
@ -16,11 +17,10 @@ def main(
if run_type == "simulation": if run_type == "simulation":
run_simulation(arguments_config, simulation_config) run_simulation(arguments_config, simulation_config)
elif run_type == "plotter": elif run_type == "plotter":
# run_plotter() run_plotter(arguments_config, plotter_config)
pass
else: else:
run_simulation() run_simulation()
# run_plotter() run_plotter()
if __name__ == '__main__': if __name__ == '__main__':

View File

@ -16,17 +16,16 @@ class SimulationConfigParser:
# Split two parts # Split two parts
arguments_config = json_configuration["arguments"] arguments_config = json_configuration["arguments"]
simulation_config = json_configuration["simulation"] simulation_config = json_configuration["simulation"]
# plotter_config = json_configuration["plotter"] plotter_config = json_configuration["plotter"]
# Retrieve valid schemas # Retrieve valid schemas
arguments_json_schema = read_json(env_variables.ARGUMENTS_SCHEMA_PATH) arguments_json_schema = read_json(env_variables.ARGUMENTS_SCHEMA_PATH)
config_json_schema = read_json(env_variables.CONFIGURATION_SCHEMA_PATH) config_json_schema = read_json(env_variables.CONFIGURATION_SCHEMA_PATH)
# plotter_json_schema = read_json(env_variables.plotter_schema_path) # plotter_json_schema = read_json(env_variables.plotter_schema_path) todo uncomment
# Validate # Validate
validate_json(arguments_config, arguments_json_schema) validate_json(arguments_config, arguments_json_schema)
validate_json(simulation_config, config_json_schema) validate_json(simulation_config, config_json_schema)
# validate_json(plotter_config, plotter_json_schema) # validate_json(plotter_config, plotter_json_schema) todo uncomment
# return simulation_config, plotter_config return arguments_config, simulation_config, plotter_config
return arguments_config, simulation_config, {}