configuration_yaml

Full name: ase2sprkkr.configuration_yaml

Description

YAML persistence helpers for the ASE2SPRKKR configuration.

The YAML document is kept separate from the typed configuration. Loading first tries the whole document atomically; if a user-data error is found, valid fragments are recovered while invalid/unknown raw nodes remain available for round-trip persistence.

Functions

_apply_with_recovery(config, data, *[, ...])

_classify_document(config, document)

Return the subset of document which the current schema accepts.

_discard_invalid_default_profile(config, ...)

_format_issues(file, issues)

_recover_configuration(config, data)

Recover valid logical units after an atomic load has failed.

_recover_profiles(config, value, accepted, ...)

_recover_section(member, path, value, ...)

Recover a normal section, then fall back to individual options.

_set_persisted_configuration(config, data)

Apply persisted data atomically through the privileged profile path.

_shell_string(value)

Serialize an argv-like value as one shell-escaped command string.

_stage_persisted_configuration(config, ...)

Stage persisted data, including the private legacy profile.

_storage_configuration(values)

Convert command argv values to the canonical YAML representation.

_typed_configuration(data)

Convert shell-string YAML values to the typed configuration shape.

_update_mapping(target, values, accepted)

Synchronize known values while leaving unaccepted raw nodes untouched.

_valid_default_profile(config)

Return an error if the configured implicit profile cannot be resolved.

_validate_yaml_shape(data)

_yaml()

apply_yaml_document(config, data)

Apply a complete YAML mapping atomically to a configuration object.

dump_yaml_document(file, data)

Atomically replace a YAML document, retaining existing symlinks and mode.

explicit_configuration(config)

Return explicitly stored values in their canonical YAML representation.

load_configuration_yaml(config, file)

Load YAML strictly first, then recover independent valid fragments.

load_yaml_document(file)

Load a YAML mapping while retaining comments and formatting metadata.

save_configuration_yaml(config, file[, document])

Persist explicit values without destroying unknown or invalid YAML.

Exceptions

InvalidYamlDocumentError

The YAML document has no usable top-level mapping.

YamlConfigurationWarning

Problems found while reading an invalid user YAML config.