simtools-run-application#

Run several simtools applications using a configuration file.

Allows to run several simtools applications with a single configuration file, which includes both the name of the simtools application and the configuration for the application.

This application is used for model parameter setting workflows. Strong assumptions are applied on the directory structure for input and output files of applications.

Example#

Run the application with the configuration file ‘config_file_name’:

simtools-run-application --configuration_file config_file_name

Run the application with the configuration file ‘config_file_name’, but skipping all steps except step 2 and 3 (useful for debugging):

simtools-run-application --configuration_file config_file_name --steps 2 3
run_application.get_subdirectory_name(path)[source]#

Get the first subdirectory name under ‘input’.

run_application.read_application_configuration(configuration_file, steps, logger)[source]#

Read application configuration from file and modify for setting workflows.

Strong assumptions on the structure of input and output files:

  • configuration file is expected to be in ‘./input/<workflow directory>/<yaml file>’

  • output files will be written out to ‘./output/<workflow directory>/’

Replaces the placeholders in the configuration file with the actual values. Sets ‘USE_PLAIN_OUTPUT_PATH’ to True for all applications.

Parameters:
configuration_filestr

Configuration file name.

stepslist

List of steps to be executed (None: all steps).

loggerLogger

Logger object.

Returns:
dict

Application configuration.

Path

Path to the log file.

run_application.run_application(application, configuration, logger)[source]#

Run a simtools application and return stdout and stderr.