hpcflow.sdk.config.config_file.ConfigFile#

class hpcflow.sdk.config.config_file.ConfigFile(directory, logger, config_options)#

Bases: object

Configuration file.

Methods

add_default_config

Add a new default config to the config file, and create the file if it doesn't exist.

get_config_file_path

get_config_item

get_invoc_data

get_invocation

is_item_set

rename_config_key

Change the config key of the loaded config.

save

select_invocation

Select a matching configuration for this invocation using run-time info.

update_invocation

Modify the invocation parameters of the loaded config.

add_default_config(config_options, name=None)#

Add a new default config to the config file, and create the file if it doesn’t exist.

Return type:

str

static get_config_file_path(directory)#
get_config_item(config_key, name, raise_on_missing=False, default_value=None)#
get_invoc_data(config_key)#
get_invocation(config_key)#
is_item_set(config_key, name)#
rename_config_key(config_key, new_config_key)#

Change the config key of the loaded config.

Parameters:
  • config_key (str) –

  • new_config_key (str) –

save()#
static select_invocation(configs, run_time_info, path, config_key=None)#

Select a matching configuration for this invocation using run-time info.

Parameters:
  • configs (Dict) –

  • run_time_info (Dict) –

  • path (Path) –

  • config_key (str | None) –

Return type:

str

update_invocation(config_key, environment_setup=None, match=None)#

Modify the invocation parameters of the loaded config.

Parameters:
  • config_key (str) –

  • environment_setup (str | None) –

  • match (Dict | None) –