spinn_utilities.configs package

Submodules

spinn_utilities.configs.config_checker module

class spinn_utilities.configs.config_checker.ConfigChecker(directories: Collection[str])[source]

Bases: object

Checks the py and cfg files after the defaults have been set,

Parameters:

directories – Path to find the cfg and py files to check

check(local_defaults: bool = True) None[source]

Runs the checks of py and cfg files

Parameters:

local_defaults

spinn_utilities.configs.config_documentor module

class spinn_utilities.configs.config_documentor.ConfigDocumentor[source]

Bases: object

This class will document all the default configs.

This can be called at any level but will only work with the default cfg files set. (Typically up to that level)

check() None[source]

Runs the checks that the cfg will work as markdown.

Expects all sections and not grouped (including by path name) options to have docs (@)

Expects all sections and not grouped options to generate unique links.

md_configs(filepath: str) None[source]

Converts the cfg files into markdown at the path specified.

md_notes(f: TextIO) None[source]

Copied the notes file into this markdown file

md_reports(f: TextIO) None[source]

Writes in markdown format a list of links from paths to cfg options.

print_configs() None[source]

Prints all configs.

This is mainly for debugging so can change without notice.

print_section(section: str) None[source]

Prints this section.

This is mainly for debugging so can change without notice.

spinn_utilities.configs.two_user_configs_exception module

exception spinn_utilities.configs.two_user_configs_exception.TwoUserConfigsException[source]

Bases: Exception

Thrown when no configuration value is found.

Module contents

class spinn_utilities.configs.CamelCaseConfigParser[source]

Bases: TypedConfigParser

Extends the Parser to allow for differences in case and underscores

optionxform(optionstr: str) str[source]

Transforms the name of an option to lower case and strips underscores, so matching is more user-friendly.

Parameters:

optionstr – What option label to transform.

Returns:

optionstr in all lower case with underscores removed

exception spinn_utilities.configs.ConfigTemplateException[source]

Bases: Exception

Throws when a problem is found with a configuration template.

exception spinn_utilities.configs.NoConfigFoundException[source]

Bases: Exception

Thrown when no configuration value is found.

exception spinn_utilities.configs.UnexpectedConfigException[source]

Bases: Exception

Thrown when an existing Section has an extra configuration value.