|
def | __init__ (self, doc, keytype, itemtype, default=None, optional=False, dictCheck=None, itemCheck=None, deprecated=None) |
|
def | rename (self, instance) |
|
def | validate (self, instance) |
|
def | toDict (self, instance) |
|
def | save (self, outfile, instance) |
|
def | freeze (self, instance) |
|
def | __init__ (self, doc, keytype, itemtype, default=None, optional=False, dictCheck=None, itemCheck=None, deprecated=None) |
|
def | validate (self, instance) |
|
def | __set__ (self, instance, value, at=None, label="assignment") |
|
def | toDict (self, instance) |
|
def | __init__ (self, doc, dtype, default=None, check=None, optional=False, deprecated=None) |
|
def | rename (self, instance) |
|
def | validate (self, instance) |
|
def | freeze (self, instance) |
|
def | save (self, outfile, instance) |
|
def | toDict (self, instance) |
|
def | __get__ (self, instance, owner=None, at=None, label="default") |
|
def | __set__ (self, instance, value, at=None, label='assignment') |
|
def | __delete__ (self, instance, at=None, label='deletion') |
|
A configuration field (`~lsst.pex.config.Field` subclass) that is a
mapping of keys to `~lsst.pex.config.Config` instances.
``ConfigDictField`` behaves like `DictField` except that the
``itemtype`` must be a `~lsst.pex.config.Config` subclass.
Parameters
----------
doc : `str`
A description of the configuration field.
keytype : {`int`, `float`, `complex`, `bool`, `str`}
The type of the mapping keys. All keys must have this type.
itemtype : `lsst.pex.config.Config`-type
The type of the values in the mapping. This must be
`~lsst.pex.config.Config` or a subclass.
default : optional
Unknown.
default : ``itemtype``-dtype, optional
Default value of this field.
optional : `bool`, optional
If `True`, this configuration `~lsst.pex.config.Field` is *optional*.
Default is `True`.
deprecated : None or `str`, optional
A description of why this Field is deprecated, including removal date.
If not None, the string is appended to the docstring for this Field.
Raises
------
ValueError
Raised if the inputs are invalid:
- ``keytype`` or ``itemtype`` arguments are not supported types
(members of `ConfigDictField.supportedTypes`.
- ``dictCheck`` or ``itemCheck`` is not a callable function.
See also
--------
ChoiceField
ConfigChoiceField
ConfigField
ConfigurableField
DictField
Field
ListField
RangeField
RegistryField
Notes
-----
You can use ``ConfigDictField`` to create name-to-config mappings. One use
case is for configuring mappings for dataset types in a Butler. In this
case, the dataset type names are arbitrary and user-selected while the
mapping configurations are known and fixed.