-
Notifications
You must be signed in to change notification settings - Fork 24
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
New signal typing #594
base: main
Are you sure you want to change the base?
New signal typing #594
Conversation
Apologies, another unreviewable PR, but if you start from the tests you can see the changes needed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Most of these are discussion points more than "requested changes". I definitely like abstracting out connection logic.
Co-authored-by: Eva Lott <[email protected]>
Co-authored-by: Eva Lott <[email protected]>
Co-authored-by: Eva Lott <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I played around with trying to find the nicest way to default type connector for wayyyy to long 😅
@evalott100 if you get a chance please could you review |
import numpy as np
# old
import numpy.typing as npt
x = epics_signal_rw(npt.NDArray[np.int32], "PV")
# new
from ophyd_async.core import Array1D
x = epics_signal_rw(Array1D[np.int32], "PV") @coretl I suspect this will break type enforcement on the tango backend. PyTango will read in non-scalar values as numpy arrays. This change will necessitate a rewrite of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will examine further tomorrow.
"event_model", | ||
"p4p", | ||
"bluesky @ git+https://github.com/bluesky/bluesky@main", | ||
"event-model @ git+https://github.com/bluesky/event-model@main", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll do a patch release of event model soon which allows |
https://github.com/bluesky/ophyd-async/pull/594/files#r1784069033
Seems like |
Just tried this branch on our devices at ISIS, I'm getting a timeout when doing Problematic line is something like:
where the relevant signal will give an EPICS completion callback eventually, but can be quite slow (~30s). My understanding was that specifying |
Rewrite the type support, and use a plugin
Connector
architecture to support reconnection for PVI and Tango.Fixes #472, fixes #562, fixes #535, fixes #505, fixes #373, fixes #601
Required for #551
Breaking changes
pvi structure changes
Structure now read from
.value
rather than.pvi
. Supported in FastCS. Requires at least PandABlocks-ioc 0.10.0StrictEnum
is now requried for all strictly checkedEnums
SubsetEnum
is now anEnum
subclass:Use python primitives for scalar types instead of numpy types
Use
Array1D
for 1D arrays instead ofnpt.NDArray
Use
Sequence[str]
for arrays of strings instead ofnpt.NDArray[np.str_]
MockSignalBackend
requires a real backendget_mock_put
is no longer passed timeout as it is handled inSignal
super().__init__
required forDevice
subclassesArbitrary
BaseModel
s not supported, pending use cases for themThe
Table
type has been suitable for everything we have seen so far, if you need an arbitraryBaseModel
subclass then please make an issueChild
Device
s set parent on attach, and can't be public children of more than one parent