-
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
spec_scan
lookup not working
#782
Comments
Tagging @huw-dls for awareness |
I think this is down to ❯ uv tool run --with scanspec --with pydantic ptpython 15:58:51
>>> import scanspec
... import pydantic
... from typing import Generic, Any, TypeVar
... T = TypeVar('T')
... @scanspec.core.discriminated_union_of_subclasses
... class Foo(Generic[T]):
... pass
... @pydantic.dataclasses.dataclass
... class Bar(Foo[T]):
... a: T
... print(pydantic.TypeAdapter(Foo[int]).validate_python({'a': '23', 'type': 'Bar'}))
... print(pydantic.TypeAdapter(Bar[int]).validate_python({'a': '23', 'type': 'Bar'}))
Bar(a='23')
Bar(a=23) I'll keep looking but I think this might be better as a bug there instead of here. |
I think I am misunderstanding but I thought bluesky/scanspec#132 was supposed to cover this. Tagging @DiamondJoseph and @ZohebShaikh. |
I have opened a new ticket in scanspec for this but will leave this open until it no longer affects blueapi. |
Potential fix in scanspec: bluesky/scanspec#157 |
When running the
spec_scan
plan, blueapi's device reference deserialization mechanism cannot extract motors from a scanspec. The axes of the scan are still strings by the time the scanspec is passed to the plan, leading to an error message when blueapi tries to lookup the name of the "device":Steps To Reproduce
Run the failing
spec_scan
system test in #783Acceptance Criteria
The text was updated successfully, but these errors were encountered: