BaseConfigurationContainer
- class ase2sprkkr.common.configuration_containers.BaseConfigurationContainer(definition, container=None)[source]
Configuration container, that holds members, either in classical way (see :class:ConfigurationContainer) or treat them in a special way
Class hierarchy
Constructor
- __init__(definition, container=None)
Create the object. Just sets the two properties from the parameters.
- Parameters:
definition (ase2sprkkr.common.configuration_definitions.BaseDefinition) – Definition of this configuration object.
container (ase2sprkkr.common.configuration_containers.ConfigurationContainer) – The container, that owns this configuration object.
- copy(copy_values=False)[source]
Create a copy of the container
- Parameters:
copy_values (bool) – If true, the copy of values is done, so their modifications do not affects the container. (e.g. for numpy arrays)
- has_any_value()[source]
Return True if any member of the section has value.
- Returns:
has_any_value – True, if no value in the container is set, False otherwise
- Return type:
bool
- get_members(name=None, unknown='find', is_option=None, lower_case=True, *, accept=None)[source]
Return members selected by a path.
Noneand leading parent operators are common to all containers; each concrete container implements lookup of its own members in_get_members().- Parameters:
name (Any)
unknown (Literal['find', 'add', 'ignore', 'fail'] | None)
is_option (bool | None)
lower_case (bool)
accept (Callable[[ase2sprkkr.common.configuration.Configuration], bool] | None)
- Return type:
- abstractmethod _get_members(name, unknown, is_option, lower_case, *, accept)[source]
Return members owned directly or indirectly by this container.
- Parameters:
name (Any)
unknown (Literal['find', 'add', 'ignore', 'fail'] | None)
is_option (bool | None)
lower_case (bool)
accept (Callable[[ase2sprkkr.common.configuration.Configuration], bool] | None)
- Return type:
- get_member(name, *, unknown='find', is_option=None, lower_case=True, accept=None)[source]
Return the first matching member, raising
KeyErrorif absent.unknown,is_option,lower_caseandaccepthave the same meaning as inget_members().- Parameters:
name (Any)
unknown (Literal['find', 'add', 'ignore', 'fail'] | None)
is_option (bool | None)
lower_case (bool)
accept (Callable[[ase2sprkkr.common.configuration.Configuration], bool] | None)
- Return type:
- property definition
The definition of the section.
- Returns:
ase2sprkkr.common.configuration_definitions.ContainerDefinition
The definition of the section. I.e. the object that defines, which configuration values
are in the section, their default values etc.
- _abc_impl = <_abc._abc_data object>