Closed burkeds closed 1 month ago
@coretl Looks like there is a new linting error regarding an incompatible override of the epics motor with prepare. How do you think we should handle this?
@coretl Looks like there is a new linting error regarding an incompatible override of the epics motor with prepare. How do you think we should handle this?
Does making FlyMotorConfig
inherit from PerSignalConfig
fix the issue?
@coretl Looks like there is a new linting error regarding an incompatible override of the epics motor with prepare. How do you think we should handle this?
Does making
FlyMotorConfig
inherit fromPerSignalConfig
fix the issue?
It does not because the attributes of FlyMotorConfig are not SignalW. For this approach to work, any variables required by prepare might need to be soft signals. What do you think?
After the collab call, are we still convinced we need this, or can it be replaced by load/save?
After the collab call, are we still convinced we need this, or can it be replaced by load/save?
I think we can shelve this now. Config via load/save and abs_set seems fine.
This is one way prepare can be used in a standard fashion across StandardReadables while preserving the benefits of type-hinting.
PerSignalConfig is a dict-like dataclass which will take device signals as a key and a value. This dataclass is then passed to prepare and the signals will be set accordingly. Type checkers should recognize if a value not matching the signal type is assigned.
Example usage: