python 3, pip
pipenv easy the process of managing python dependencies
PIP
$ pip install pyenv
Alternatively, macOS brew
$ brew install pipenv
Inside the project folder (after clone)
$ pyenv install 3.8.0
$ pip install pipenv
$ pipenv install
$ pipenv shell
(hmrssim env) % pipenv install --dev
โ You need to include the
simulator/
folder in your PYTHONPATH.
Simulations are defined in by config objects. You can pass the config to the Simulator class either by a dict object, or by passing the path to a json file.
simulator = Simulator(config)
The file that build a simulation and runs it is run.py
To execute the simulation, run
$ python run.py [path/to/config.json]
To add new dependencies use the following command.
$ pipenv install [name]
This command will add the dependency to the Pipfile and Pipfile.lock assuring that the execution can be reproduced in another environment (after dependencies are updated with pipenv install
command )
Same as previous dependencies, but for development libraries such as the ones used for test.
$ pipenv install [name] --dev
Note that other systems after pulling updates will need a reexecution of pipenv install --dev