lsst.pex.config gaa9e307f6b+c543fd6e5e
|
Public Member Functions | |
def | __init__ (self, config, field) |
def | types (self) |
def | __contains__ (self, k) |
def | __len__ (self) |
def | __iter__ (self) |
def | __getitem__ (self, k, at=None, label="default") |
def | __setitem__ (self, k, value, at=None, label="assignment") |
def | __setattr__ (self, attr, value, at=None, label="assignment") |
def | freeze (self) |
def | __reduce__ (self) |
![]() | |
def | __iter__ (self) |
def | keys (self) |
def | values (self) |
def | items (self) |
def | __contains__ (self, name) |
def | __new__ (cls, *args, **kw) |
def | __reduce__ (self) |
def | setDefaults (self) |
def | update (self, **kw) |
def | load (self, filename, root="config") |
def | loadFromStream (self, stream, root="config", filename=None) |
def | loadFromString (self, code, root="config", filename=None) |
def | save (self, filename, root="config") |
def | saveToString (self, skipImports=False) |
def | saveToStream (self, outfile, root="config", skipImports=False) |
def | freeze (self) |
def | toDict (self) |
def | names (self) |
def | validate (self) |
def | formatHistory (self, name, **kwargs) |
def | __setattr__ (self, attr, value, at=None, label="assignment") |
def | __delattr__ (self, attr, at=None, label="deletion") |
def | __eq__ (self, other) |
def | __ne__ (self, other) |
def | __str__ (self) |
def | __repr__ (self) |
def | compare (self, other, shortcut=True, rtol=1e-8, atol=1e-8, output=None) |
def | __init_subclass__ (cls, **kwargs) |
def | __init__ (cls, name, bases, dict_) |
def | __setattr__ (cls, name, value) |
Properties | |
names = property(_getNames, _setNames, _delNames) | |
name = property(_getName, _setName, _delName) | |
active = property(_getActive) | |
![]() | |
history = property(lambda x: x._history) | |
Dictionary of instantiated configs, used to populate a `~lsst.pex.config.ConfigChoiceField`. Parameters ---------- config : `lsst.pex.config.Config` A configuration instance. field : `lsst.pex.config.Field`-type A configuration field. Note that the `lsst.pex.config.Field.fieldmap` attribute must provide key-based access to configuration classes, (that is, ``typemap[name]``).
def lsst.pex.config.configChoiceField.ConfigInstanceDict.__init__ | ( | self, | |
config, | |||
field | |||
) |
Reimplemented from lsst.pex.config.config.ConfigMeta.
def lsst.pex.config.configChoiceField.ConfigInstanceDict.__contains__ | ( | self, | |
name | |||
) |
Return `True` if the specified field exists in this config. Parameters ---------- name : `str` Field name to test for. Returns ------- in : `bool` `True` if the specified field exists in the config.
Reimplemented from lsst.pex.config.config.Config.
def lsst.pex.config.configChoiceField.ConfigInstanceDict.__iter__ | ( | self | ) |
Iterate over fields.
Reimplemented from lsst.pex.config.config.Config.
def lsst.pex.config.configChoiceField.ConfigInstanceDict.__reduce__ | ( | self | ) |
Reduction for pickling (function with arguments to reproduce). We need to condense and reconstitute the `~lsst.pex.config.Config`, since it may contain lambdas (as the ``check`` elements) that cannot be pickled.
Reimplemented from lsst.pex.config.config.Config.
def lsst.pex.config.configChoiceField.ConfigInstanceDict.__setattr__ | ( | self, | |
attr, | |||
value, | |||
at = None , |
|||
label = "assignment" |
|||
) |
Set an attribute (such as a field's value). Notes ----- Unlike normal Python objects, `~lsst.pex.config.Config` objects are locked such that no additional attributes nor properties may be added to them dynamically. Although this is not the standard Python behavior, it helps to protect users from accidentally mispelling a field name, or trying to set a non-existent field.
Reimplemented from lsst.pex.config.config.Config.
Reimplemented in lsst.pex.config.registry.RegistryInstanceDict.
def lsst.pex.config.configChoiceField.ConfigInstanceDict.freeze | ( | self | ) |
Freeze the config. Invoking this freeze method will create a local copy of the field attribute's typemap. This decouples this instance dict from the underlying objects type map ensuring that and subsequent changes to the typemap will not be reflected in this instance (i.e imports adding additional registry entries).
Reimplemented from lsst.pex.config.config.Config.
Reimplemented in lsst.pex.config.configChoiceField.ConfigChoiceField.