v0.2.0

API reference

Handles the processing of nengo-bones configuration settings.

nengo_bones.config.check_list(cfg, key)[source]

Verify that config value is a list.

This is designed to catch the common error of specifying

option:
    value

instead of

option:
    - value
Parameters
cfgdict

Configuration options being checked.

key: str

Name of configuration value to be checked.

Raises
TypeError

If key is in cfg and its value is not a list.

nengo_bones.config.find_config()[source]

Finds the default nengo-bones config file.

Returns
conf_filestr

Path to the default config file.

nengo_bones.config.fill_defaults(config)[source]

Fills in default values in a loaded config (in-place).

Parameters
configdict

Dictionary containing configuration values.

nengo_bones.config.validate_config(config)[source]

Validates a populated config dict.

Parameters
configdict

Dictionary containing configuration values.

nengo_bones.config.validate_ci_config(ci_config)[source]

Validates an entry in the ci_scripts list of a config dict.

Parameters
ci_configdict

Dictionary containing ci_scripts configuration values.

nengo_bones.config.load_config(conf_file=None)[source]

Loads config values from a file and applies defaults/validation.

Parameters
conf_filestr

Filepath for config file (if None, will load the default returned by find_config).

Returns
configdict

Dictionary containing configuration values.