-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support composite devices in plans #506
Comments
I guess we have 2 options:
How would you feel about option 2? I'm not hugely against option 1 but it would be nice to keep blueapi's definition of a device somewhat idomatic for future-proofing purposes. |
I can't see any issues with doing 2. I think @DominicOram also mentioned this as a possibility |
If it's a |
Hmm, I don't think so, if the devices already exist and you pass them in via the constructor, they may get |
The other issue is naming. If you name the parent it will attempt to name the child. The other option is to do the connect explicitly in a plan as proposed in DiamondLightSource/dodal#415 (comment) |
From a discussion on Slack we think the idiomatic way to do this in blueapi is: class MyComposite(BlueapiBaseModel):
x: Motor = inject("x")
y: Motor = inject("y")
det: Eiger = inject("det1")
def my_plan(composite: MyComposite) -> MsgGenerator:
... Unsure if it will do this out of box, if it doesn't, this ticket will become a bug report. |
@olliesilvester have you tried the implementation suggested above? |
No, I haven't tried this yet |
I think #647 is a prerequisite to seeing if this would work |
I see, ok |
As a user of
Blueapi
, I would like to run plans which contain composite devices.In Hyperion, our plans use a lot of devices so we have something like
BlueAPI doesn't seem to be happy with this kind of thing right now. When doing a
blueapi controller plans
, the server outputs:ValueError: Value not declarable with JSON Schema, field: name='aperture_scatterguard' type=ApertureScatterguard required=True
The text was updated successfully, but these errors were encountered: