ReduConfig¶
- class tolteca.reduce.ReduConfig(jobkey: str, inputs: list = <factory>, steps: list = <factory>)[source]¶
Bases:
object
The config for
tolteca.reduce
.Attributes Summary
Methods Summary
default_factory
(default_value)Return a callable suitable to be used as default_factory.
from_config_dict
(config[, runtime_info])Return the instance of
dataclass_cls
created fromdata
after validation.from_dict
(data)Return the instance of
dataclass_cls
created fromdata
after validation.Return loaded data objects from reduction config.
to_dict
(*[, dict_factory])Attributes Documentation
- config_key = 'reduce'¶
- config_schema = ConfigSchema({'reduce': DataclassSchema({Literal("jobkey", description="The unique identifier the job."): <class 'str'>, DataclassSchemaOptional('inputs'): [DataclassSchema({Optional('type'): 'localfile', Optional('path'): RelPathSchema(<class 'str'>), Optional('select'): <class 'str'>}), DataclassSchema({Optional('type'): 'database', Optional('uri'): RelPathSchema(<class 'str'>)})], DataclassSchemaOptional('steps'): [DataclassSchema({Literal("name", description="The reduction step name."): 'citlali', Optional('path'): RelPathSchema(<class 'str'>), Optional('version'): <class 'str'>, Optional('log_level'): Or('TRACE', 'DEBUG', 'INFO'), Optional('config'): DataclassSchema({DataclassSchemaOptional('low_level'): Or(RelPathSchema(<class 'str'>), <class 'dict'>), DataclassSchemaOptional('image_frame_params'): DataclassSchema({DataclassSchemaOptional('pixel_size'): PhysicalTypeSchema(Or(<class 'int'>, <class 'float'>, <class 'str'>))})})})]})})¶
- optional = functools.partial(<class 'tollan.utils.dataclass_schema.DataclassSchemaOptional'>, dataclass_cls=<class 'tolteca.reduce.ReduConfig'>)¶
- schema = DataclassSchema({Literal("jobkey", description="The unique identifier the job."): <class 'str'>, DataclassSchemaOptional('inputs'): [DataclassSchema({Optional('type'): 'localfile', Optional('path'): RelPathSchema(<class 'str'>), Optional('select'): <class 'str'>}), DataclassSchema({Optional('type'): 'database', Optional('uri'): RelPathSchema(<class 'str'>)})], DataclassSchemaOptional('steps'): [DataclassSchema({Literal("name", description="The reduction step name."): 'citlali', Optional('path'): RelPathSchema(<class 'str'>), Optional('version'): <class 'str'>, Optional('log_level'): Or('TRACE', 'DEBUG', 'INFO'), Optional('config'): DataclassSchema({DataclassSchemaOptional('low_level'): Or(RelPathSchema(<class 'str'>), <class 'dict'>), DataclassSchemaOptional('image_frame_params'): DataclassSchema({DataclassSchemaOptional('pixel_size'): PhysicalTypeSchema(Or(<class 'int'>, <class 'float'>, <class 'str'>))})})})]})¶
Methods Documentation
- default_factory(default_value)¶
Return a callable suitable to be used as default_factory.
By default this is to create instance, so that when used as field default factory, no argument is required.
- from_config_dict(config, runtime_info=None, **kwargs)¶
Return the instance of
dataclass_cls
created fromdata
after validation.
- from_dict(data)¶
Return the instance of
dataclass_cls
created fromdata
after validation.
- to_config_dict()¶
- to_dict(*, dict_factory=<class 'dict'>)¶