-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Labels
bugSomething isn't workingSomething isn't workingjson formsTickets involved in producing a JSONForms UI from the plan schemasTickets involved in producing a JSONForms UI from the plan schemas
Milestone
Description
Blueapi's API provides JSON schemas for plan parameters. As of #526 it includes enums for devices that relate to the loaded context, for example if I have the following plan:
def take_data(detector: Readable) -> MsgGenerator[None]: ...and 2 devices in my context that are Readable, then the JSON schema will be an enum of those 2:
{ "take_data": {
"additionalProperties": false,
"description": "",
"properties": {
"detector": {
"description": "",
"enum": ["det1", "det2"],
"title": "Detector",
"type": "bluesky.protocols.Readable"
},
}
}However if there are no readables configured on my server then the schema will be:
{ "take_data": {
"additionalProperties": false,
"description": "",
"properties": {
"detector": {
"description": "",
- "enum": ["det1", "det2"],
+ "enum": [],
"title": "Detector",
"type": "bluesky.protocols.Readable"
},
}
}This schema is unsatisfiable, there is no value that will ever satisfy it and so the plan can never run.
Steps To Reproduce
Steps to reproduce the behavior:
- Load the above plan into blueapi and no devices
- Run
blueapi controller plans -o json
Acceptance Criteria
- Unsatisfiable plans are not loaded into context
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingjson formsTickets involved in producing a JSONForms UI from the plan schemasTickets involved in producing a JSONForms UI from the plan schemas