smah.settings

class smah.settings.Settings(config=None)[source]

Bases: object

CONFIG_VSN = '0.0.1'
DEFAULT_CONFIG_FILE = '/home/docs/.smah/config.yaml'
static config_vsn() str[source]
static default_config() str[source]
is_configured()[source]

Checks if the settings are fully configured.

Returns:

True if the settings are configured, False otherwise.

Return type:

bool

load() None[source]

Loads the profile from the profile path and sets the configuration values.

log(level: int = 10, format: bool = True, print: bool = False) None[source]

Log settings and optionally print to stdout.

Parameters:
  • format (bool) – Flag to enable/disable formatting of settings when printing.

  • print (bool) – Flag to enable/disable printing of settings.

save() None[source]

Saves the current settings to the profile path.

to_yaml(options=None) dict[source]

Returns the settings as a YAML dictionary.

Returns:

The settings as a YAML dictionary.

Return type:

dict

static vsn_supported(vsn: str | None) bool[source]

Checks if the provided version is supported.

Parameters:

vsn (Optional[str]) – The version string to check.

Returns:

True if the version is supported, False otherwise.

Return type:

bool

smah.settings.configurator(settings: Settings, gui=False) Settings[source]

Interactive Setup

Modules

configurator(settings[, gui])

Interactive Setup

inference

settings

system

user