run_shell_command#

pydrad.configure.util.run_shell_command(path, shell=True, **kwargs)[source]#

Wrapper function for running shell commands.

This is essentially a light wrapper around subprocess.run and includes some error handling and logging specific to running the shell commands needed to run and compile HYDRAD.

Parameters:
  • cmd (list) – Command to run

  • cwd (str or path-like) – Directory to run the command in

  • shell (bool, optional) – See run

Raises:

HYDRADError – This error is raised if HYDRAD or initial conditions code fails to compile or if there is a runtime error in the initial conditions code.