HPS-MC
hpsmc.config_writer Namespace Reference

Utilities for writing config files for jobs from environment variables. More...

Functions

def write_config (filename, component_names, include_defaults, fail_on_missing)
 Write a config file from environment variables. More...
 
def write_config_for_job (job_script, filename, include_defaults, fail_on_missing)
 Write a config file for a specific job script. More...
 
def _get_job_defaults ()
 Get default job class settings. More...
 

Variables

 parser = argparse.ArgumentParser("config_writer.py")
 
 action
 
 help
 
 nargs
 
 cl = parser.parse_args()
 
 config = cl.config
 

Detailed Description

Utilities for writing config files for jobs from environment variables.

Function Documentation

◆ _get_job_defaults()

def hpsmc.config_writer._get_job_defaults ( )
private

Get default job class settings.

Definition at line 63 of file config_writer.py.

◆ write_config()

def hpsmc.config_writer.write_config (   filename,
  component_names,
  include_defaults,
  fail_on_missing 
)

Write a config file from environment variables.

Parameters
filenamename of config file
component_nameslist of components in job
include_defaultsset true if defaults should be included
fail_on_missingif true: method fails if environment variable is missing if false: throws warning if environment variable is missing

Definition at line 12 of file config_writer.py.

◆ write_config_for_job()

def hpsmc.config_writer.write_config_for_job (   job_script,
  filename,
  include_defaults,
  fail_on_missing 
)

Write a config file for a specific job script.

Parameters
job_scriptjob script
filenamecurrently unused
include_defaultsset true if defaults should be included
fail_on_missingif true: method fails if environment variable is missing if false: throws warning if environment variable is missing

Definition at line 48 of file config_writer.py.

Variable Documentation

◆ action

action

Definition at line 79 of file config_writer.py.

◆ cl

cl = parser.parse_args()

Definition at line 84 of file config_writer.py.

◆ config

string config = cl.config

Definition at line 90 of file config_writer.py.

◆ help

help

Definition at line 79 of file config_writer.py.

◆ nargs

nargs

Definition at line 81 of file config_writer.py.

◆ parser

parser = argparse.ArgumentParser("config_writer.py")

Definition at line 78 of file config_writer.py.