Run Dismod Commands¶
To run dismod commands on a database (all possible options are
here),
you can use the following helper functions. They will figure out
where your dmdismod
executable is, whether it be installed on your
computer or pulling from docker, based on the installation of cascade_at_scripts
.
-
cascade_at.dismod.api.run_dismod.
run_dismod
(dm_file, command)[source]¶ Executes a command on a dismod file.
- Parameters
dm_file (
str
) – the dismod db filepathcommand (
str
) – a command to run
-
cascade_at.dismod.api.run_dismod.
run_dismod_commands
(dm_file, commands, sys_exit=True)[source]¶ Runs multiple commands on a dismod file and returns the exit statuses. Will raise an exception if it runs into an error.
- Parameters
dm_file (
str
) – the dismod db filepathcommands (
List
[str
]) – a list of stringssys_exit – whether to exit the code altogether if there is an error. If False, then it will pass the error string back to the original python process.