|
LSSTApplications
8.0.0.0+107,8.0.0.1+13,9.1+18,9.2,master-g084aeec0a4,master-g0aced2eed8+6,master-g15627eb03c,master-g28afc54ef9,master-g3391ba5ea0,master-g3d0fb8ae5f,master-g4432ae2e89+36,master-g5c3c32f3ec+17,master-g60f1e072bb+1,master-g6a3ac32d1b,master-g76a88a4307+1,master-g7bce1f4e06+57,master-g8ff4092549+31,master-g98e65bf68e,master-ga6b77976b1+53,master-gae20e2b580+3,master-gb584cd3397+53,master-gc5448b162b+1,master-gc54cf9771d,master-gc69578ece6+1,master-gcbf758c456+22,master-gcec1da163f+63,master-gcf15f11bcc,master-gd167108223,master-gf44c96c709
LSSTDataManagementBasePackage
|
Public Member Functions | |
| def | __iter__ |
| def | keys |
| def | values |
| def | items |
| def | iteritems |
| def | itervalues |
| def | iterkeys |
| def | __contains__ |
| def | __new__ |
| def | __reduce__ |
| def | setDefaults |
| def | update |
| def | load |
| def | loadFromStream |
| def | save |
| def | saveToStream |
| def | freeze |
| def | toDict |
| def | validate |
| def | formatHistory |
| def | __setattr__ |
| def | __delattr__ |
| def | __eq__ |
| def | __ne__ |
| def | __str__ |
| def | __repr__ |
| def | compare |
Properties | |
| history = property(lambda x: x._history) | |
Private Member Functions | |
| def | _save |
| def | _rename |
Private Attributes | |
| _frozen | |
| _name | |
Static Private Attributes | |
| __metaclass__ = ConfigMeta | |
Base class for control objects. A Config object will usually have several Field instances as class attributes; these are used to define most of the base class behavior. Simple derived class should be able to be defined simply by setting those attributes.
| def lsst.pex.config.config.Config.__delattr__ | ( | self, | |
| attr, | |||
at = None, |
|||
label = "deletion" |
|||
| ) |
| def lsst.pex.config.config.Config.__iter__ | ( | self | ) |
| def lsst.pex.config.config.Config.__ne__ | ( | self, | |
| other | |||
| ) |
| def lsst.pex.config.config.Config.__new__ | ( | cls, | |
| args, | |||
| kw | |||
| ) |
Allocate a new Config object. In order to ensure that all Config object are always in a proper state when handed to users or to derived Config classes, some attributes are handled at allocation time rather than at initialization This ensures that even if a derived Config class implements __init__, the author does not need to be concerned about when or even if he should call the base Config.__init__
Definition at line 450 of file config.py.
| def lsst.pex.config.config.Config.__reduce__ | ( | self | ) |
| def lsst.pex.config.config.Config.__setattr__ | ( | self, | |
| attr, | |||
| value, | |||
at = None, |
|||
label = "assignment" |
|||
| ) |
Regulate which attributes can be set. Unlike normal python objects, 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.
Definition at line 657 of file config.py.
| def lsst.pex.config.config.Config.__str__ | ( | self | ) |
|
private |
|
private |
| def lsst.pex.config.config.Config.compare | ( | self, | |
| other, | |||
shortcut = True, |
|||
rtol = 1E-8, |
|||
atol = 1E-8, |
|||
output = None |
|||
| ) |
Compare two Configs for equality.
If the Configs contain RegistryFields or ConfigChoiceFields, unselected Configs
will not be compared.
@param[in] other Config object to compare with self.
@param[in] shortcut If True, return as soon as an inequality is found.
@param[in] rtol Relative tolerance for floating point comparisons.
@param[in] atol Absolute tolerance for floating point comparisons.
@param[in] output If not None, a callable that takes a string, used (possibly repeatedly)
to report inequalities.
Floating point comparisons are performed by numpy.allclose; refer to that for details.
Definition at line 717 of file config.py.
| def lsst.pex.config.config.Config.formatHistory | ( | self, | |
| name, | |||
| kwargs | |||
| ) |
Format the config's history to a more human-readable format
Definition at line 645 of file config.py.
| def lsst.pex.config.config.Config.freeze | ( | self | ) |
| def lsst.pex.config.config.Config.items | ( | self | ) |
| def lsst.pex.config.config.Config.iteritems | ( | self | ) |
| def lsst.pex.config.config.Config.iterkeys | ( | self | ) |
| def lsst.pex.config.config.Config.itervalues | ( | self | ) |
| def lsst.pex.config.config.Config.keys | ( | self | ) |
| def lsst.pex.config.config.Config.load | ( | self, | |
| filename, | |||
root = "root" |
|||
| ) |
| def lsst.pex.config.config.Config.loadFromStream | ( | self, | |
| stream, | |||
root = "root" |
|||
| ) |
| def lsst.pex.config.config.Config.save | ( | self, | |
| filename, | |||
root = "root" |
|||
| ) |
| def lsst.pex.config.config.Config.saveToStream | ( | self, | |
| outfile, | |||
root = "root" |
|||
| ) |
Generates a python script to the given open file object, which, when
loaded, reproduces this Config.
@param outfile [inout] open file object to write to
@param root [in] name to use for the root config variable
If not "root", must match what is used in load())
Definition at line 560 of file config.py.
| def lsst.pex.config.config.Config.setDefaults | ( | self | ) |
| def lsst.pex.config.config.Config.toDict | ( | self | ) |
| def lsst.pex.config.config.Config.update | ( | self, | |
| kw | |||
| ) |
Treat the Config as a dict, updating values as provided by the keyword arguments. The '__at' and '__label' keyword arguments are special internal keywords. They are used to strip out any internal steps from the history tracebacks of the config. Modifying these keywords allows users to lie about a Config's history. Please do not do so!
Definition at line 501 of file config.py.
| def lsst.pex.config.config.Config.validate | ( | self | ) |
Validate the Config. The base class implementation performs type checks on all fields by calling Field.validate(). Complex single-field validation can be defined by deriving new Field types. As syntactic sugar, some derived Field types are defined in this module which handle recursing into sub-configs (ConfigField, ConfigChoiceField) Inter-field relationships should only be checked in derived Config classes after calling this method, and base validation is complete
Definition at line 627 of file config.py.
| def lsst.pex.config.config.Config.values | ( | self | ) |
|
staticprivate |
|
static |
1.8.5