lsst.pex.config

The lsst.pex.config module provides a configuration system for the LSST Science Pipelines. The lsst.pex.config.Config class is an integral part of the task framework (see lsst.pipe.base), though lsst.pex.config is also useful on its own. Configuration parameters can be validated, documented, and even record the history of their values for provenance.

Contributing

lsst.pex.config is developed at https://github.com/lsst/pex_config. You can find Jira issues for this module under the pex_config component.

Python API reference

lsst.pex.config Package

Functions

compareConfigs(name, c1, c2[, shortcut, …]) Compare two lsst.pex.config.Config instances for equality.
compareScalars(name, v1, v2, output[, rtol, …]) Compare two scalar values for equality.
getComparisonName(name1, name2) Create a comparison name that is used for printed output of comparisons.
makeConfigClass(ctrl[, name, base, doc, …]) Create a Config class that matches a C++ control object class.
makePolicy(config) Convert a configuration into a lsst.pex.policy.Policy.
makePropertySet(config) Convert a configuration into a lsst.daf.base.PropertySet.
makeRegistry(doc[, configBaseType]) Create a Registry.
registerConfig(name, registry, target) Decorator that adds a class as a ConfigClass in a Registry and associates it with the given configurable.
registerConfigurable(name, registry[, …]) A decorator that adds a class as a configurable in a Registry instance.
wrap(ctrl) Decorator that adds fields from a C++ control class to a lsst.pex.config.Config class.

Classes

ChoiceField(doc, dtype, allowed[, default, …]) A configuration field (Field subclass) that allows a user to select from a predefined set of values.
Config Base class for configuration (config) objects.
ConfigChoiceField(doc, typemap[, default, …]) A configuration field (Field subclass) that allows a user to choose from a set of Config types.
ConfigDictField(doc, keytype, itemtype[, …]) A configuration field (Field subclass) that is a mapping of keys to Config instances.
ConfigField(doc, dtype[, default, check]) A configuration field (Field subclass) that takes a Config-type as a value.
ConfigurableField(doc, target[, …]) A configuration field (Field subclass) that can be can be retargeted towards a different configurable (often a lsst.pipe.base.Task subclass).
ConfigurableInstance(config, field[, at, label]) A retargetable configuration in a ConfigurableField that proxies a Config.
DictField(doc, keytype, itemtype[, default, …]) A configuration field (Field subclass) that maps keys and values.
Field(doc, dtype[, default, check, optional]) A field in a Config that supports int, float, complex, bool, and str data types.
FieldValidationError(field, config, msg) An exception that holds additional information, as attributes, for debugging lsst.pex.config.Config errors.
ListField(doc, dtype[, default, optional, …]) A configuration field (Field subclass) that contains a list of values of a specific type.
RangeField(doc, dtype[, default, optional, …]) A configuration field (lsst.pex.config.Field subclass) that requires the value to be in a specific numeric range.
Registry([configBaseType]) A base class for global registries, which map names to configurables.
RegistryField(doc, registry[, default, …]) A configuration field whose options are defined in a Registry.

lsst.pex.config.callStack Module

Functions

getCallerFrame([relative]) Get the frame for the user’s caller.
getStackFrame([relative]) Get the StackFrame for the user’s caller.
getCallStack([skip]) Retrieve the call stack for the caller.

Classes

StackFrame(filename, lineno, function[, content]) A single element of the stack trace.

lsst.pex.config.history Module

Functions

format(config[, name, writeSourceLine, …]) Format the history record for a configuration, or a specific configuration field.

Classes

Color(text, category) A controller that determines whether strings should be colored.