Currently run_simulation in the main run script of Lewis is not very flexible. It relies on parsing a list of arguments as provided by sys.argv or right out parsing the latter. Also, it uses prints. While this is fine for the command line tool, we've recently used the function in a different environment and it would make sense to separate all this "command line stuff" a bit better from the "run a simulation with these parameters" stuff. There is already run_simulation and do_run_simulation, but this is not really doing much and/or helping at the moment.
It should be possible to just call a function (doesn't need to be run_simulation, but it could be) that will return a properly configured Simulation object that can then be started.
Currently
run_simulation
in the main run script of Lewis is not very flexible. It relies on parsing a list of arguments as provided bysys.argv
or right out parsing the latter. Also, it usesprints
. While this is fine for the command line tool, we've recently used the function in a different environment and it would make sense to separate all this "command line stuff" a bit better from the "run a simulation with these parameters" stuff. There is alreadyrun_simulation
anddo_run_simulation
, but this is not really doing much and/or helping at the moment.It should be possible to just call a function (doesn't need to be
run_simulation
, but it could be) that will return a properly configuredSimulation
object that can then be started.