Releases: bluesky/ophyd-async
v0.15
Notable changes
Remove the wait argument to Signal.set, it is now set when constructing the EPICS Signal.
It can be one of:
True: Return when server-side operation has completedFalse: Return when server-side operation has startedcallable: Call with the value being put to decide whether to wait
For procedural style devices:
# old
signal = epics_signal_rw(int, "PV")
signal.set(5, wait=False)
# new
signal = epics_signal_rw(int, "PV", wait=False)
signal.set(5)For declarative style devices:
# old
from ophyd_async.epics.core import PvSuffix
class MyDevice(EpicsDevice):
signal: A[SignalRW[int], PvSuffix("SUFF")]
my_device.signal.set(5, wait=False)
# new
from ophyd_async.epics.core import PvSuffix, EpicsOptions
class MyDevice(EpicsDevice):
signal: A[SignalRW[int], PvSuffix("SUFF"), EpicsOptions(wait=False)]
my_device.signal.set(5)If you need a different value for wait depending on the value you are setting, like for the busy record:
# old
busy_record_signal = epics_signal_rw(bool, "Acquire")
status = busy_record_signal.set(True, wait=True)
busy_record_signal.set(False, wait=False)
await status
# new
from ophyd_async.core import non_zero
busy_record_signal = epics_signal_rw(bool, "Acquire", wait=non_zero)
status = busy_record_signal.set(True)
busy_record_signal.set(False)
await statusAny usage of wait=True (the default) can be removed without any other changes
# old
await signal.set(value, wait=True) # wait=True is the default
# new
await signal.set(value)AsyncStatus can be used as a context manager
This avoids issues with dangling tasks at shutdown, and allows more complex logic to be cancelled by a signal set completion.
# old
status = signal1.set(new_value)
async for value in observe_value(signal2, done_status=status):
if value > threshold:
break
# warning here if we exit before signal1.set completes
# new
async with signal1.set(new_value):
async for value in observe_value(signal2):
if value > threshold:
breakWhat's Changed
- Improve container socket error message by @hyperrealist in #1174
- Expose AsyncMovable, AsyncLocatable, AsyncPausable publicly by @Tom-Willemsen in #1172
- Support both awaitable keys and values in gather_dict by @coretl in #1175
- Run empty scan when pmac unstage by @shihab-dls in #1169
- chore(deps): update dependency https://github.com/diamondlightsource/python-copier-template to v5.0.2 by @renovate[bot] in #1187
- Add links to interfaces for IO classes by @shihab-dls in #1184
- Remove wait from Signal.set and replace with epics specific argument by @gkalua in #1134
- Optimise mock creation and cache type hinting to speedup tests by @coretl in #1188
- Allow use of
AsyncStatusas a context manager instead of usingobserve_value(done_status=))by @rtuck99 in #1012
Full Changelog: v0.14.2...v0.15
v0.14.2
What's Changed
- 1163 support signal[t] | none syntax in devicefiller by @LuisFSegalla in #1165
- Make test_observe more verbose by @coretl in #1167
- Improve error when raw2derived argument has no type by @Villtord in #1135
Full Changelog: v0.14.1...v0.14.2
v0.14.1
What's Changed
- Fixing precision not being able to handle non-floats by @burkeds in #1141
- Improve tango test stability by @hyperrealist in #1146
- Update dependency https://github.com/DiamondLightSource/python-copier-template to v5.0.0 by @renovate[bot] in #1155
- Update dependency https://github.com/DiamondLightSource/python-copier-template to v5.0.1 by @renovate[bot] in #1156
- Add auto max incrementing path provider by @olliesilvester in #1147
- Make nexpi PV optional so that it can be used on eiger's without extg by @RJCD-Diamond in #1152
- makes_wait_for_idle_await_arm_status by @gkalua in #1157
- Add claude PR review by @coretl in #1160
- Change the trigger for claude by @coretl in #1161
- Tweak claude by @coretl in #1162
- Calculate longest motor move time and set timeout by @shihab-dls in #1164
Full Changelog: v0.14.0...v0.14.1
v0.14.0
Notable Changes
Helper functions for downstream testing have moved
The following functions:
callback_on_mock_putget_mockget_mock_putmock_puts_blockedset_mock_put_proceedsset_mock_valueset_mock_values
Have been moved from ophyd_async.testing to ophyd_async.core. They can currently be imported from either but will cause a DeprecationWarning if imported from ophyd_async.testing. The move will be finalised in version 1.0.
What's Changed
- Implement DeviceMock with automatic logic injection for mock devices by @vredchenko in #1129
- Make vscde discover all tests by @hyperrealist in #1142
- Update dependency https://github.com/DiamondLightSource/python-copier-template to v5.0.0a5 by @renovate[bot] in #1143
New Contributors
- @vredchenko made their first contribution in #1129
Full Changelog: v0.13.7...v0.14.0
v0.13.7
What's Changed
- PMAC: Get cs info from cs motors by @gkalua in #1120
- Use dial limit for motor limit check by @teoching0705 in #1124
- Removing unnecessary TangoReadable class by @burkeds in #1130
- Made
set_and_wait_for_other_valuestill still raise a TimeoutError if there is no__name__on the matcher by @DominicOram in #1123 - Unify fixture invocation by @hyperrealist in #1080
Full Changelog: v0.13.6...v0.13.7
v0.13.6
What's Changed
- Allow mock signals to have different readback to setpoint values by @DominicOram in #1096
- Lock file maintenance by @renovate[bot] in #1109
- Quantize calculated turnaround points in pmac by @shihab-dls in #1105
- Add enable signal to panda PulseBlock by @shihab-dls in #1115
- Update dependency https://github.com/DiamondLightSource/python-copier-template to v5.0.0a4 by @renovate[bot] in #1112
Full Changelog: v0.13.5...v0.13.6
v0.13.5
What's Changed
- Restructure tests by @hyperrealist in #1055
- improves error message from datakey shape function by @gkalua in #1073
- Copier update to uv by @coretl in #1058
- Configure Renovate by @renovate[bot] in #1076
- Update hoverkraft-tech/compose-action action to v2.4.0 by @renovate[bot] in #1078
- Disable pyenv notifications for python version by @coretl in #1085
- Making tango event subscription asynchronous by @burkeds in #1001
- update to use new Subscribable protocol by @jsouter in #950
- Tango improved descriptor by @burkeds in #865
- Lock file maintenance by @renovate[bot] in #1082
- Add note on using Annotated with ruff by @DominicOram in #1090
- Improve renovate config by @coretl in #1088
- Enable automerge for lockFileMaintenance by @coretl in #1094
- Add Yes No strict enum by @olliesilvester in #1067
- Modify tango dependency version constraint by @coretl in #1093
- Update github/codeql-action action to v4 by @renovate[bot] in #1092
- Update hoverkraft-tech/compose-action action to v2.4.1 by @renovate[bot] in #1091
- Use the same name for all caught exceptions by @IgpayAtenlay in #1098
- Lock file maintenance by @renovate[bot] in #1097
- Update assert_emitted to use Mapping by @oliwenmandiamond in #1101
New Contributors
- @renovate[bot] made their first contribution in #1076
- @IgpayAtenlay made their first contribution in #1098
Full Changelog: v0.13.4...v0.13.5
v0.13.4
What's Changed
- Fix pedestal mode in Jungfrau by @olliesilvester in #1050
- Add image_mode config to ADBaseController by @oliwenmandiamond in #1066
- Extend PMAC Trajectory to append by @shihab-dls in #1049
- creates a PandA Flyer for time based triggers by @gkalua in #1027
- Add deadtime to create jungfrau external trigger info util function by @olliesilvester in #1038
- Disarm Jungfrau reverts pedestal mode by @olliesilvester in #1068
Full Changelog: v0.13.3...v0.13.4
v0.13.3
What's Changed
- FIX: wrong number of points set in the trajectory by @coretl in #1036
- Add motor name to check_motor_limit error message to make debugging easier by @oliwenmandiamond in #1043
- Pin scanpsec as a dev dependency by @callumforrester in #1047
- Ignore motor soft limits when they are both zero by @DominicOram in #1052
Full Changelog: v0.13.2...v0.13.3
v0.13.2
What's Changed
- Only allow subscribe within event loop by @coretl in #970
- Adsim system tests by @callumforrester in #1000
- Create PmacTrajectoryTriggerLogic by @LuisFSegalla in #1004
- Add docs on when to use Movable by @olliesilvester in #1026
- Document PvSuffix by @EmsArnold in #1025
- Add fastcs jungfrau by @olliesilvester in #999
- Add limit checking to motor.set by @teoching0705 in #1032
- Add pmac trajectory gap support by @shihab-dls in #1023
- Make merge_gathered_dicts public by @oliwenmandiamond in #1041
- Enhance SimMotor initialization with initial_value and units parameters by @fajinyuan in #1040
New Contributors
- @LuisFSegalla made their first contribution in #1004
- @EmsArnold made their first contribution in #1025
- @teoching0705 made their first contribution in #1032
- @fajinyuan made their first contribution in #1040
Full Changelog: v0.13.1...v0.13.2