ConfigurableAction#
- class lsst.pex.config.configurableActions.ConfigurableAction(*args, **kw)#
Bases:
ConfigA
ConfigurableActionis an interface that extends alsst.pex.config.Configclass to include a__call__method.This interface is designed to create an action that can be used at runtime with a state that is determined during the configuration stage. A single action thus may be assigned multiple times, each with different configurations.
This allows state to be set and recorded at configuration time, making future reproduction of results easy.
This class is intended to be an interface only, but because of various inheritance conflicts this class can not be implemented as an Abstract Base Class. Instead, the
__call__method is purely virtual, meaning that it will raise aNotImplementedErrorwhen called. Subclasses that represent concrete actions must provide an override.Attributes Summary
If a configurable action is assigned to a
ConfigurableActionField, or aConfigurableActionStructFieldthe name of the field will be bound to this variable when it is retrieved.Methods Summary
Attributes Documentation
- identity: str | None = None#
If a configurable action is assigned to a
ConfigurableActionField, or aConfigurableActionStructFieldthe name of the field will be bound to this variable when it is retrieved.
Methods Documentation
- __call__(*args: Any, **kwargs: Any) Any#
Call self as a function.
- copy() ConfigurableAction#
Return a deep copy of this config.
Notes#
The returned config object is not frozen, even if the original was. If a nested config object is copied, it retains the name from its original hierarchy.
Nested objects are only shared between the new and old configs if they are not possible to modify via the config’s interfaces (e.g. entries in the the history list are not copied, but the lists themselves are, so modifications to one copy do not modify the other).