There is a bug in the ConfigModel for the controlsystem. It says debug_level: str = None which needs to be debug_level: str | None = None or Pydantic will give a validation error when None is given.
I can fix it myself, but the docstring says it should be an int. So is the docstring also wrong or the model should actually have int and not str? @gupichon which is correct?
class ConfigModel(BaseModel):
"""
Configuration model for a Tango Control System.
Attributes
----------
name : str
Name of the control system.
tango_host : str
Tango host URL. Default is the TANGO_HOST variable.
debug_level : int
Debug verbosity level.
scalar_aggregator : str
Aggregator module for scalar values. If none specified, writings and readings of sclar value are serialized.
vector_aggregator : str
Aggregator module for vecrors. If none specified, writings and readings of vector are serialized.
timeout_ms : int
Device timeout in milli seconds.
"""
name: str
tango_host: str | None = None
debug_level: str = None
lazy_devices: bool = True
scalar_aggregator: str | None = "tango.pyaml.multi_attribute"
vector_aggregator: str | None = None
timeout_ms: int = 3000
There is a bug in the
ConfigModelfor the controlsystem. It saysdebug_level: str = Nonewhich needs to bedebug_level: str | None = Noneor Pydantic will give a validation error whenNoneis given.I can fix it myself, but the docstring says it should be an int. So is the docstring also wrong or the model should actually have int and not str? @gupichon which is correct?