Following #526 plan schemas include enums of all possible devices that can be supplied, for example:
{
"bump_motor": {
"additionalProperties": false,
"description": "",
"properties": {
"motor": {
"description": "",
"enum": [
"x",
"y"
],
"title": "Motor",
"type": "bluesky.protocols.Movable"
}
}
}
}
However, if devices are nested they are not picked up by this process, so if I have
class SimStage(StandardReadable):
def __init__(self, name: str = "") -> None:
with self.add_children_as_readables():
self.x = Motor("BAZ:")
self.y = Motor("BLARG:")
super().__init__(name)
It does not appear, I would expect something like
{
"bump_motor": {
"additionalProperties": false,
"description": "",
"properties": {
"motor": {
"description": "",
"enum": [
"sim_stage.x",
"sim_stage.y"
],
"title": "Motor",
"type": "bluesky.protocols.Movable"
}
}
}
}
I have created a failing test in #1127
Acceptance Criteria
- Nested devices are included in enums
- Failing test linked above passes
Following #526 plan schemas include enums of all possible devices that can be supplied, for example:
{ "bump_motor": { "additionalProperties": false, "description": "", "properties": { "motor": { "description": "", "enum": [ "x", "y" ], "title": "Motor", "type": "bluesky.protocols.Movable" } } } }However, if devices are nested they are not picked up by this process, so if I have
It does not appear, I would expect something like
{ "bump_motor": { "additionalProperties": false, "description": "", "properties": { "motor": { "description": "", "enum": [ "sim_stage.x", "sim_stage.y" ], "title": "Motor", "type": "bluesky.protocols.Movable" } } } }I have created a failing test in #1127
Acceptance Criteria