DependentValue

class ase2sprkkr.common.dependencies.DependentValue(value, transform=None)[source]

Resolve and evaluate a value derived from other configuration items.

A plain string denotes one exact definition path and can have an optional transform. For a callable, its parameter names denote exact local paths.

Class hierarchy

Inheritance diagram of ase2sprkkr.common.dependencies.DependentValue


Constructor

__init__(value, transform=None)[source]
_MISSING = <object object>
classmethod create(value)[source]

Return an independent dependency description for value.

copy()[source]

Copy the description without copying installed grammar hooks.

mapped(transform)[source]

Return a dependency applying transform to this result.

static _parsed_value(tokens)[source]

Extract the value from a configuration-definition parse result.

unbind()[source]

Remove grammar hooks previously installed by bind().

bind(container, callback)[source]

Call callback with the derived value while parsing sources.

runtime_value(item)[source]

Evaluate the dependency for a runtime option or container.