WebConfig

class tolteca.web.WebConfig(apps: list = <factory>)[source]

Bases: object

The config for tolteca.web.

Attributes Summary

config_key

config_schema

optional

schema

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 from data after validation.

from_dict(data)

Return the instance of dataclass_cls created from data after validation.

get_app_config(arg)

to_config_dict()

to_dict(*[, dict_factory])

Attributes Documentation

config_key = 'web'
config_schema = ConfigSchema({'web': DataclassSchema({DataclassSchemaOptional('apps'): [DataclassSchema({Literal("name", description="The app name."): 'obs_planner', Optional('raster_model_length_max'): PhysicalTypeSchema(Or(<class 'int'>, <class 'float'>, <class 'str'>)), Optional('site_name'): Or('lmt'), Optional('instru_name'): Or('toltec'), Optional('pointing_catalog_path'): RelPathSchema(<class 'str'>), Optional('title_text'): <class 'str'>}), DataclassSchema({Literal("name", description="The app name."): 'obs_planner_v0', Literal("toltec_sensitivity_module_path", description="The path to locate toltec sensitivity module."): RelPathSchema(<class 'str'>), DataclassSchemaOptional('sma_pointing_catalog_path'): Or(RelPathSchema(<class 'str'>), None), DataclassSchemaOptional('raster_model_length_max'): PhysicalTypeSchema(Or(<class 'int'>, <class 'float'>, <class 'str'>)), DataclassSchemaOptional('lissajous_model_length_max'): PhysicalTypeSchema(Or(<class 'int'>, <class 'float'>, <class 'str'>)), DataclassSchemaOptional('t_exp_max'): PhysicalTypeSchema(Or(<class 'int'>, <class 'float'>, <class 'str'>)), DataclassSchemaOptional('title_text'): <class 'str'>})]})})
optional = functools.partial(<class 'tollan.utils.dataclass_schema.DataclassSchemaOptional'>, dataclass_cls=<class 'tolteca.web.WebConfig'>)
schema = DataclassSchema({DataclassSchemaOptional('apps'): [DataclassSchema({Literal("name", description="The app name."): 'obs_planner', Optional('raster_model_length_max'): PhysicalTypeSchema(Or(<class 'int'>, <class 'float'>, <class 'str'>)), Optional('site_name'): Or('lmt'), Optional('instru_name'): Or('toltec'), Optional('pointing_catalog_path'): RelPathSchema(<class 'str'>), Optional('title_text'): <class 'str'>}), DataclassSchema({Literal("name", description="The app name."): 'obs_planner_v0', Literal("toltec_sensitivity_module_path", description="The path to locate toltec sensitivity module."): RelPathSchema(<class 'str'>), DataclassSchemaOptional('sma_pointing_catalog_path'): Or(RelPathSchema(<class 'str'>), None), DataclassSchemaOptional('raster_model_length_max'): PhysicalTypeSchema(Or(<class 'int'>, <class 'float'>, <class 'str'>)), DataclassSchemaOptional('lissajous_model_length_max'): PhysicalTypeSchema(Or(<class 'int'>, <class 'float'>, <class 'str'>)), DataclassSchemaOptional('t_exp_max'): PhysicalTypeSchema(Or(<class 'int'>, <class 'float'>, <class 'str'>)), DataclassSchemaOptional('title_text'): <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 from data after validation.

from_dict(data)

Return the instance of dataclass_cls created from data after validation.

get_app_config(arg)[source]
to_config_dict()
to_dict(*, dict_factory=<class 'dict'>)