-
Notifications
You must be signed in to change notification settings - Fork 11
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
601 convert smargon to ophyd async #656
Conversation
cc16c11
to
097b332
Compare
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.
Looks good, few nits, take em or leave em as you please
min_value: float | ||
max_value: float | ||
|
||
def contains(self, pos: float): |
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.
Was it a deliberate choice not to use __contains__
here?
@@ -1,10 +1,13 @@ | |||
from functools import partial | |||
from typing import Callable | |||
|
|||
from bluesky.protocols import Movable |
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.
Nit: I would like it better if we did something like
from ophyd_async.core import device as OphydAsyncDevice
from ophyd import device as OphydDevice
or alternatively to use module.object
syntax for both ophyd
and ophyd_async
items
] | ||
) | ||
@AsyncStatus.wrap | ||
async def set(self, value: int): |
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.
🎉
|
||
|
||
@pytest.fixture | ||
def smargon(): |
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.
Could: There is a better sim motor now in ophyd_async.sim.demo.sim_motor
which we could replace the Motor
s with instead
set_mock_value(device.disp, 1) | ||
proc_mock = get_mock_put(device.proc) | ||
proc_mock.return_value = NullStatus() | ||
status: AsyncStatus = cast(AsyncStatus, device.set(1)) |
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.
this cast
is not necessary
* Remove I23 gonio * Remove unused XYZLimitBundle and related classes * Remove validate_against_hardware as the original is_valid() method it is based on was never used
097b332
to
07ea06c
Compare
Fixes #601
See also DiamondLightSource/hyperion#1469
Note that the I23
gonio
,XYZLimitBundle
andGridScanParams.is_valid()
logic were all removed as unused.Instructions to reviewer on how to test:
Checks for reviewer
dodal connect ${BEAMLINE}