lsst.pex.config ge80df9fc40+4231e0532e
 
Loading...
Searching...
No Matches
lsst.pex.config.registry.RegistryField Class Reference
Inheritance diagram for lsst.pex.config.registry.RegistryField:
lsst.pex.config.configChoiceField.ConfigChoiceField lsst.pex.config.config.Field lsst.pex.config.configChoiceField.ConfigInstanceDict lsst.pex.config.config.Config lsst.pex.config.config.ConfigMeta

Public Member Functions

 __init__ (self, doc, registry, default=None, optional=False, multi=False, on_none=None)
 
 __deepcopy__ (self, memo)
 
- Public Member Functions inherited from lsst.pex.config.configChoiceField.ConfigChoiceField
 __init__ (self, doc, typemap, default=None, optional=False, multi=False, deprecated=None)
 
 __class_getitem__ (cls, tuple[type,...]|type|ForwardRef params)
 
ConfigChoiceField __get__ (self, None instance, Any owner=None, Any at=None, str label="default")
 
ConfigInstanceDict __get__ (self, Config instance, Any owner=None, Any at=None, str label="default")
 
 __get__ (self, instance, owner=None, at=None, label="default")
 
None __set__ (self, Config instance, ConfigInstanceDict|None value, Any at=None, str label="assignment")
 
 rename (self, instance)
 
 validate (self, instance)
 
 toDict (self, instance)
 
 freeze (self, instance)
 
 save (self, outfile, instance)
 
 __deepcopy__ (self, memo)
 
- Public Member Functions inherited from lsst.pex.config.config.Field
 __class_getitem__ (cls, tuple[type,...]|type|ForwardRef params)
 
 __init__ (self, doc, dtype=None, default=None, check=None, optional=False, deprecated=None)
 
Field[FieldTypeVar] __get__ (self, None instance, Any owner=None, Any at=None, str label="default")
 
FieldTypeVar __get__ (self, Config instance, Any owner=None, Any at=None, str label="default")
 
 __get__ (self, instance, owner=None, at=None, label="default")
 
None __set__ (self, Config instance, FieldTypeVar|None value, Any at=None, str label="assignment")
 
 __delete__ (self, instance, at=None, label="deletion")
 
- Public Member Functions inherited from lsst.pex.config.configChoiceField.ConfigInstanceDict
 __init__ (self, Config config, ConfigChoiceField field)
 
 types (self)
 
 __contains__ (self, k)
 
 __len__ (self)
 
 __iter__ (self)
 
 __getitem__ (self, k, at=None, label="default")
 
 __setitem__ (self, k, value, at=None, label="assignment")
 
 __setattr__ (self, attr, value, at=None, label="assignment")
 
 __reduce__ (self)
 
- Public Member Functions inherited from lsst.pex.config.config.Config
 __iter__ (self)
 
 keys (self)
 
 values (self)
 
 items (self)
 
 __contains__ (self, name)
 
 __new__ (cls, *args, **kw)
 
Config copy (self)
 
 __reduce__ (self)
 
 setDefaults (self)
 
 update (self, **kw)
 
 load (self, filename, root="config")
 
 loadFromStream (self, stream, root="config", filename=None, extraLocals=None)
 
 loadFromString (self, code, root="config", filename=None, extraLocals=None)
 
 saveToString (self, skipImports=False)
 
 saveToStream (self, outfile, root="config", skipImports=False)
 
 names (self)
 
 formatHistory (self, name, **kwargs)
 
 __setattr__ (self, attr, value, at=None, label="assignment")
 
 __delattr__ (self, attr, at=None, label="deletion")
 
 __eq__ (self, other)
 
 __ne__ (self, other)
 
 __str__ (self)
 
 __repr__ (self)
 
 compare (self, other, shortcut=True, rtol=1e-8, atol=1e-8, output=None)
 
 __init_subclass__ (cls, **kwargs)
 
- Public Member Functions inherited from lsst.pex.config.config.ConfigMeta
 __init__ (cls, name, bases, dict_)
 
 __setattr__ (cls, name, value)
 

Public Attributes

 registry = registry
 
- Public Attributes inherited from lsst.pex.config.configChoiceField.ConfigChoiceField
 typemap = typemap
 
 multi = multi
 
- Public Attributes inherited from lsst.pex.config.config.Field
 dtype = dtype
 
 doc = doc
 
 deprecated = deprecated
 
 default = default
 
 check = check
 
 optional = optional
 
 source = source
 
- Public Attributes inherited from lsst.pex.config.configChoiceField.ConfigInstanceDict
 types
 

Protected Attributes

 _on_none = on_none
 
- Protected Attributes inherited from lsst.pex.config.configChoiceField.ConfigInstanceDict
dict _dict = {}
 
 _selection = None
 
 _config = config
 
 _field = field
 
 _typemap = None
 
- Protected Attributes inherited from lsst.pex.config.config.Config
bool _frozen = True
 
 _name = name
 
- Protected Attributes inherited from lsst.pex.config.config.ConfigMeta
dict _fields = {}
 
 _source = getStackFrame()
 

Additional Inherited Members

- Static Public Attributes inherited from lsst.pex.config.configChoiceField.ConfigChoiceField
 instanceDictClass = ConfigInstanceDict
 
- Static Public Attributes inherited from lsst.pex.config.config.Field
dict supportedTypes = {str, bool, float, int, complex}
 
- Protected Member Functions inherited from lsst.pex.config.configChoiceField.ConfigChoiceField
 _getOrMake (self, instance, label="default")
 
Any _copy_storage (self, Config old, Config new)
 
 _collectImports (self, instance, imports)
 
 _compare (self, instance1, instance2, shortcut, rtol, atol, output)
 
- Protected Member Functions inherited from lsst.pex.config.config.Field
 _setup (self, doc, dtype, default, check, optional, source, deprecated)
 
 _validateValue (self, value)
 
- Protected Member Functions inherited from lsst.pex.config.configChoiceField.ConfigInstanceDict
ConfigInstanceDict _copy (self, Config config)
 
 _setSelection (self, value, at=None, label="assignment")
 
 _getNames (self)
 
 _setNames (self, value)
 
 _delNames (self)
 
 _getName (self)
 
 _setName (self, value)
 
 _delName (self)
 
 _getActive (self)
 
 _rename (self, fullname)
 
- Protected Member Functions inherited from lsst.pex.config.config.Config
tuple[ResourcePath|None, str] _filename_to_resource (self, ResourcePathExpression|None filename=None)
 
 _loadFromString (self, code, root="config", filename=None, extraLocals=None)
 
 _save (self, outfile)
 
 _fromPython (cls, config_py)
 
- Static Protected Member Functions inherited from lsst.pex.config.config.Field
Mapping[str, Any] _parseTypingArgs (tuple[type,...]|tuple[str,...] params, Mapping[str, Any] kwds)
 
- Static Protected Attributes inherited from lsst.pex.config.config.Config
dict _storage [str, Any]
 
dict _history [str, list[Any]]
 
set _imports [Any]
 
- Properties inherited from lsst.pex.config.configChoiceField.ConfigInstanceDict
 names = property(_getNames, _setNames, _delNames)
 
 name = property(_getName, _setName, _delName)
 
 active = property(_getActive)
 
- Properties inherited from lsst.pex.config.config.Config
 history = property(lambda x: x._history)
 

Detailed Description

A configuration field whose options are defined in a `Registry`.

Parameters
----------
doc : `str`
    A description of the field.
registry : `Registry`
    The registry that contains this field.
default : `str`, optional
    The default target key.
optional : `bool`, optional
    When `False`, `lsst.pex.config.Config.validate` fails if the field's
    value is `None`.
multi : `bool`, optional
    If `True`, the field allows multiple selections. The default is
    `False`.
on_none : `Callable`, optional
    A callable that should be invoked when ``apply`` is called but the
    selected name or names is `None`.  Will be passed the field attribute
    proxy (`RegistryInstanceDict`) and then all positional and keyword
    arguments passed to ``apply``.

See Also
--------
ChoiceField
ConfigChoiceField
ConfigDictField
ConfigField
ConfigurableField
DictField
Field
ListField
RangeField

Member Function Documentation

◆ __deepcopy__()

lsst.pex.config.registry.RegistryField.__deepcopy__ ( self,
memo )
Customize deep-copying, want a reference to the original registry.

WARNING: this must be overridden by subclasses if they change the
constructor signature!

The documentation for this class was generated from the following file: