ConfigurableActionField#

class lsst.pex.config.configurableActions.ConfigurableActionField(doc, dtype=<class 'lsst.pex.config.configurableActions._configurableAction.ConfigurableAction'>, default=None, check=None, deprecated=None)#

Bases: ConfigField[ActionTypeVar]

ConfigurableActionField is a subclass of Field that allows a single ConfigurableAction (or a subclass) to be assigned to it. The ConfigurableAction is then accessed through this field for further configuration.

Any configuration of this field that is done prior to having a new ConfigurableAction assigned to it is forgotten.

Parameters#

docstr

Documentation string.

dtypeConfigurableAction

Data type to use for this field.

defaultlsst.pex.config.Config, optional

If default is None, the field will default to a default-constructed instance of dtype. Additionally, to allow for fewer deep-copies, assigning an instance of ConfigField to dtype itself is considered equivalent to assigning a default-constructed sub-config. This means that the argument default can be dtype, as well as an instance of dtype.

checkCallable, optional

A callback function that validates the field’s value, returning True if the value is valid, and False otherwise.

deprecatedbool or None, optional

A description of why this Field is deprecated, including removal date. If not None, the string is appended to the docstring for this Field.

Methods Summary

save(outfile, instance)

Save this field to a file (for internal use only).

Methods Documentation

save(outfile, instance)#

Save this field to a file (for internal use only).

Parameters#

outfilefile-like object

A writeable field handle.

instanceConfig

The Config instance that contains this field.

Notes#

This method is invoked by the Config object that contains this field and should not be called directly.

The output consists of the documentation string (lsst.pex.config.Field.doc) formatted as a Python comment. The second line is formatted as an assignment: {fullname}={value}.

This output can be executed with Python.