rcmpy.config
index
/home/vkottler/src/vkottler/workspace/rcmpy/rcmpy/config/__init__.py

A module implementing a configuration interface for the package.

 
Package Contents
       
file

 
Classes
       
builtins.object
rcmpy.config.file.ManagedFile
rcmpy.schemas.RcmpyDictCodec(vcorelib.dict.codec.DictCodec)
Config(rcmpy.schemas.RcmpyDictCodec, vcorelib.dict.codec.BasicDictCodec)
vcorelib.dict.codec.BasicDictCodec(vcorelib.dict.codec.DictCodec)
Config(rcmpy.schemas.RcmpyDictCodec, vcorelib.dict.codec.BasicDictCodec)

 
class Config(rcmpy.schemas.RcmpyDictCodec, vcorelib.dict.codec.BasicDictCodec)
    Config(data: Dict[str, Union[str, int, float, bool, NoneType, Dict[str, Union[str, int, float, bool, NoneType]], List[Union[str, int, float, bool, NoneType]]]] = None, schemas: vcorelib.schemas.base.SchemaMap = None, dest_attr: str = 'data', verify: bool = True) -> None
 
The top-level configuration object for the package.
 
 
Method resolution order:
Config
rcmpy.schemas.RcmpyDictCodec
vcorelib.dict.codec.BasicDictCodec
vcorelib.dict.codec.DictCodec
vcorelib.dict.codec.JsonCodec
abc.ABC
vcorelib.schemas.mixins.SchemaMixin
builtins.object

Methods defined here:
init(self, data: Dict[str, Union[str, int, float, bool, NoneType, Dict[str, Union[str, int, float, bool, NoneType]], List[Union[str, int, float, bool, NoneType]]]]) -> None
Initialize this instance.
update_root(self, root: pathlib.Path) -> None
Call 'update_root' for each managed file.

Data and other attributes defined here:
__abstractmethods__ = frozenset()
__annotations__ = {}

Data and other attributes inherited from rcmpy.schemas.RcmpyDictCodec:
default_schemas = {'Config': <vcorelib.schemas.json.JsonSchema obj...chemas.json.JsonSchema object at 0x7ff5122b95e0>}

Methods inherited from vcorelib.dict.codec.BasicDictCodec:
asdict(self) -> Dict[str, Union[str, int, float, bool, NoneType, Dict[str, Union[str, int, float, bool, NoneType]], List[Union[str, int, float, bool, NoneType]]]]
Obtain a dictionary representing this instance.

Methods inherited from vcorelib.dict.codec.DictCodec:
__init__(self, data: Dict[str, Union[str, int, float, bool, NoneType, Dict[str, Union[str, int, float, bool, NoneType]], List[Union[str, int, float, bool, NoneType]]]] = None, schemas: vcorelib.schemas.base.SchemaMap = None, dest_attr: str = 'data', verify: bool = True) -> None
Initialize this instance.

Class methods inherited from vcorelib.dict.codec.DictCodec:
create(data: Dict[str, Union[str, int, float, bool, NoneType, Dict[str, Union[str, int, float, bool, NoneType]], List[Union[str, int, float, bool, NoneType]]]] = None, schemas: vcorelib.schemas.base.SchemaMap = None, dest_attr: str = 'data', verify: bool = True) -> ~V from abc.ABCMeta
A factory method to create an instance.

Methods inherited from vcorelib.dict.codec.JsonCodec:
__copy__(self: ~T) -> ~T
Create another instance based on this instance's data.
__eq__(self, other) -> bool
Determine if this instance is equal to another.
__str__(self) -> str
Use the dictionary representation of this instance for string
representation.
encode(self, pathlike: Union[pathlib.Path, str, NoneType], arbiter: vcorelib.io.arbiter.DataArbiter = <vcorelib.io.arbiter.DataArbiter object at 0x7ff512cf8050>, **kwargs) -> Tuple[bool, int]
Encode this object instance to a file.

Class methods inherited from vcorelib.dict.codec.JsonCodec:
decode(pathlike: Union[pathlib.Path, str, NoneType], arbiter: vcorelib.io.arbiter.DataArbiter = <vcorelib.io.arbiter.DataArbiter object at 0x7ff512cf8050>, schemas: vcorelib.schemas.base.SchemaMap = None, dest_attr: str = 'data', verify: bool = True, require_success: bool = True, default_data: Dict[str, Union[str, int, float, bool, NoneType, Dict[str, Union[str, int, float, bool, NoneType]], List[Union[str, int, float, bool, NoneType]]]] = None, **kwargs) -> ~T from abc.ABCMeta
Decode an object instance from data loaded from a file.
file_cache(pathlike: Union[pathlib.Path, str, NoneType], arbiter: vcorelib.io.arbiter.DataArbiter = <vcorelib.io.arbiter.DataArbiter object at 0x7ff512cf8050>, encode_kwargs: Dict[str, Any] = None, require_success: bool = False, **kwargs) -> Iterator[~T] from abc.ABCMeta
Manage an instance of this class as a disk-backed file.
normalize(data: Union[Dict[str, Union[str, int, float, bool, NoneType, Dict[str, Union[str, int, float, bool, NoneType]], List[Union[str, int, float, bool, NoneType]]]], ~T]) -> ~T from abc.ABCMeta
Ensure that some object is an instance of this class.

Data descriptors inherited from vcorelib.dict.codec.JsonCodec:
__dict__
dictionary for instance variables
__weakref__
list of weak references to the object

Data and other attributes inherited from vcorelib.dict.codec.JsonCodec:
__hash__ = None

Methods inherited from vcorelib.schemas.mixins.SchemaMixin:
validate(self, valid_attr: str = 'data') -> None
Validate an instance attribute based on this instance's schema.

Class methods inherited from vcorelib.schemas.mixins.SchemaMixin:
schema_name() -> str from abc.ABCMeta
A default name for this class's schema.

 
class ManagedFile(builtins.object)
    ManagedFile(template: str, extra_templates: Set[str], directory: pathlib.Path, name: str, link: bool, executable: bool, condition: str, platforms: Set[str]) -&gt; None
 
A data structure for managed files specified in the configuration data.
 
  Methods defined here:
__eq__(self, other)
Return self==value.
__init__(self, template: str, extra_templates: Set[str], directory: pathlib.Path, name: str, link: bool, executable: bool, condition: str, platforms: Set[str]) -> None
Initialize self.  See help(type(self)) for accurate signature.
__repr__(self)
Return repr(self).
evaluate(self, env: Dict[str, Any]) -> bool
Determine if this file should be handled.
update(self, source: pathlib.Path, logger: Union[logging.Logger, logging.LoggerAdapter[Any]]) -> None
Update this managed file based on the provided source file.
update_root(self, root: pathlib.Path) -> None
If the output directory is a relative path, update it to be an
absolute one based on the provided root directory.

Readonly properties defined here:
output
Get the full output path.
platform
Determine if the platform is correct for handling this file.
present
Determine if this file is currently present in the file system.

Data descriptors defined here:
__dict__
dictionary for instance variables
__weakref__
list of weak references to the object

Data and other attributes defined here:
__annotations__ = {'condition': <class 'str'>, 'directory': <class 'pathlib.Path'>, 'executable': <class 'bool'>, 'extra_templates': typing.Set[str], 'link': <class 'bool'>, 'name': <class 'str'>, 'platforms': typing.Set[str], 'template': <class 'str'>}
__dataclass_fields__ = {'condition': Field(name='condition',type=<class 'str'>,defaul...appingproxy({}),kw_only=False,_field_type=_FIELD), 'directory': Field(name='directory',type=<class 'pathlib.Path...appingproxy({}),kw_only=False,_field_type=_FIELD), 'executable': Field(name='executable',type=<class 'bool'>,defa...appingproxy({}),kw_only=False,_field_type=_FIELD), 'extra_templates': Field(name='extra_templates',type=typing.Set[str...appingproxy({}),kw_only=False,_field_type=_FIELD), 'link': Field(name='link',type=<class 'bool'>,default=<d...appingproxy({}),kw_only=False,_field_type=_FIELD), 'name': Field(name='name',type=<class 'str'>,default=<da...appingproxy({}),kw_only=False,_field_type=_FIELD), 'platforms': Field(name='platforms',type=typing.Set[str],defa...appingproxy({}),kw_only=False,_field_type=_FIELD), 'template': Field(name='template',type=<class 'str'>,default...appingproxy({}),kw_only=False,_field_type=_FIELD)}
__dataclass_params__ = _DataclassParams(init=True,repr=True,eq=True,ord...rue,kw_only=False,slots=False,weakref_slot=False)
__hash__ = None
__match_args__ = ('template', 'extra_templates', 'directory', 'name', 'link', 'executable', 'condition', 'platforms')

 
Data
        FilesConfig = typing.List[typing.Dict[str, typing.Any]]
__all__ = ['FilesConfig', 'Config', 'ManagedFile']