Skip to content

Commit fa0d70d

Browse files
renovate[bot]noemifrisinartuck99DominicOram
authored
Lock file maintenance (#1899)
* Lock file maintenance * Remove wait from mapt_config * Remove wait from backlight * Fix linting * Pin mysql-connector dependency * Update uv.lock * Remove all wait=True from set, no additional change needed as True is the default value * Start fixing tests * Fix a few more tests * Fix the obvious ones * Missed change * Remove wait=False from tetramm unstage * Fix for focusing mirror * Fix for apple2 undulator * Fix bimporph tests * Fix tetramm tests * Fix motor_util_plans tests * Fixup incorrect use of group parameter in configure_arm_trigger_and_disarm_detector * Fix robot unit tests * Revert waits on plan stub calls in test_pmac * Change to not wait on apple2 * Move gap and phase sets into own async function * Ensure task is reachable to prevent it being GC'd * Update wait signals and pin ophyd-async * Update lock file * Remove unused param from robot test * Fix more tests --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Noemi Frisina <noemi.frisina@diamond.ac.uk> Co-authored-by: Robert Tuck <robert.tuck@diamond.ac.uk> Co-authored-by: Dominic Oram <dominic.oram@diamond.ac.uk>
1 parent 052b80a commit fa0d70d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+978
-967
lines changed

pyproject.toml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,23 +14,24 @@ description = "Ophyd devices and other utils that could be used across DLS beaml
1414
dependencies = [
1515
"click",
1616
"ophyd",
17-
"ophyd-async[ca,pva]>=v0.14.0",
17+
"ophyd-async[ca,pva]>=v0.15.0",
1818
"bluesky>=1.14.5",
1919
"pyepics",
2020
"pillow",
2121
"zocalo>=1.0.0",
2222
"requests",
2323
"graypy",
2424
"pydantic>=2.0",
25-
"opencv-python-headless", # For pin-tip detection.
25+
"opencv-python-headless", # For pin-tip detection.
2626
"numpy",
2727
"aiofiles",
2828
"aiohttp",
2929
"redis",
3030
"scanspec>=0.7.3",
3131
"pyzmq==27.1.0",
3232
"deepdiff",
33-
"daq-config-server>=v1.1.2", # For getting Configuration settings.
33+
"daq-config-server>=v1.1.2", # For getting Configuration settings.
34+
"mysql-connector-python == 9.5.0", # Can unpin once https://github.com/DiamondLightSource/ispyb-api/pull/244 is merged and released
3435
]
3536

3637
dynamic = ["version"]
@@ -60,7 +61,7 @@ dev = [
6061
"pytest-timeout",
6162
"pytest-random-order",
6263
"ruff",
63-
"sphinx<7.4.6", # pinned due to https://github.com/sphinx-doc/sphinx/issues/12660
64+
"sphinx<7.4.6", # pinned due to https://github.com/sphinx-doc/sphinx/issues/12660
6465
"sphinx-autobuild",
6566
"sphinx-copybutton",
6667
"sphinxcontrib-mermaid",

src/dodal/devices/areadetector/plugins/mjpg.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ async def _save_image(self, image: Image.Image):
6868

6969
await asyncio_save_image(image, path)
7070

71-
await self.last_saved_path.set(path, wait=True)
71+
await self.last_saved_path.set(path)
7272

7373
@AsyncStatus.wrap
7474
async def trigger(self):

src/dodal/devices/beamlines/b07_1/ccmc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,4 +71,4 @@ def _convert_pos_to_ev(self, pos_signal: ChannelCutMonochromatorPositions) -> fl
7171

7272
@AsyncStatus.wrap
7373
async def set(self, value: ChannelCutMonochromatorPositions) -> None:
74-
await self.crystal.set(value, wait=True)
74+
await self.crystal.set(value)

src/dodal/devices/beamlines/i11/nx100robot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ async def set(self, sample_location: int) -> None:
123123
LOGGER.info(f"Robot already at position {sample_location}")
124124
else:
125125
await self.clear_sample(table_in=False)
126-
await self.next_sample_position.set(sample_location, wait=True)
126+
await self.next_sample_position.set(sample_location)
127127
await self.load_sample(sample_location)
128128
await self.current_sample_position.set(sample_location)
129129

src/dodal/devices/beamlines/i19/access_controlled/blueapi_device.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import asyncio
22
import json
3-
from enum import Enum
3+
from enum import StrEnum
44
from typing import TypeVar
55

66
from aiohttp import ClientSession
@@ -15,7 +15,7 @@
1515
D = TypeVar("D")
1616

1717

18-
class HutchState(str, Enum):
18+
class HutchState(StrEnum):
1919
EH1 = "EH1"
2020
EH2 = "EH2"
2121

src/dodal/devices/beamlines/i19/backlight.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ def __init__(self, prefix: str, name: str = "") -> None:
1616

1717
@AsyncStatus.wrap
1818
async def set(self, value: InOutUpper):
19-
await self.position.set(value, wait=True)
19+
await self.position.set(value)

src/dodal/devices/beamlines/i19/pin_col_stages.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ async def _safe_move_in(self, value: _PinColPosition):
137137
LOGGER.info(
138138
f"Moving pinhole and collimator stages to in position: {value.value}"
139139
)
140-
await self.mapt.configuration.select_config.set(value, wait=True)
140+
await self.mapt.configuration.select_config.set(value)
141141
# NOTE. The apply PV will not be used here unless fixed in controls first.
142142
# This is to avoid collisions. A safe move in will move first the pinhole stage
143143
# and then the collimator stage, but apply will try to move all the motors

src/dodal/devices/beamlines/i24/dual_backlight.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def __init__(self, prefix: str, name: str = "") -> None:
2323

2424
@AsyncStatus.wrap
2525
async def set(self, value: BacklightPositions):
26-
await self.pos_level.set(value, wait=True)
26+
await self.pos_level.set(value)
2727

2828

2929
class DualBacklight(StandardReadable):
@@ -54,6 +54,6 @@ def __init__(self, prefix: str, name: str = "") -> None:
5454
async def set(self, value: BacklightPositions):
5555
await self.backlight_position.set(value)
5656
if value == BacklightPositions.OUT:
57-
await self.backlight_state.set(OnOffUpper.OFF, wait=True)
57+
await self.backlight_state.set(OnOffUpper.OFF)
5858
else:
59-
await self.backlight_state.set(OnOffUpper.ON, wait=True)
59+
await self.backlight_state.set(OnOffUpper.ON)

src/dodal/devices/beamlines/i24/pmac.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from asyncio import sleep
2-
from enum import Enum, IntEnum
2+
from enum import IntEnum, StrEnum
33

44
from bluesky.protocols import Flyable, Movable, Triggerable
55
from ophyd_async.core import (
@@ -27,7 +27,7 @@ class ScanState(IntEnum):
2727
DONE = 0
2828

2929

30-
class LaserSettings(str, Enum):
30+
class LaserSettings(StrEnum):
3131
"""PMAC strings to switch laser on and off.
3232
Note. On the PMAC, M-variables usually have to do with position compare
3333
set up.
@@ -42,7 +42,7 @@ class LaserSettings(str, Enum):
4242
LASER_2_OFF = " M812=0 M811=1"
4343

4444

45-
class EncReset(str, Enum):
45+
class EncReset(StrEnum):
4646
"""PMAC strings for position compare on encoder channels in the controller.
4747
4848
For example, for ENC5::
@@ -72,7 +72,7 @@ def __init__(
7272

7373
@AsyncStatus.wrap
7474
async def trigger(self):
75-
await self.signal_ref().set(self.cmd_string, wait=True)
75+
await self.signal_ref().set(self.cmd_string)
7676

7777

7878
class PMACStringLaser(Device, Movable[LaserSettings]):
@@ -147,7 +147,7 @@ async def kickoff(self):
147147
wait for the scan status PV to go to 1.
148148
"""
149149
prog_num_str = await self._get_prog_number_string()
150-
await self._signal_ref().set(prog_num_str, wait=True)
150+
await self._signal_ref().set(prog_num_str)
151151
await wait_for_value(
152152
self._status_ref(),
153153
ScanState.RUNNING,
@@ -185,9 +185,9 @@ def __init__(
185185

186186
@AsyncStatus.wrap
187187
async def trigger(self):
188-
await self._signal_ref().set("A", wait=True)
188+
await self._signal_ref().set("A")
189189
await sleep(1.0) # TODO Check with scientist what this sleep is really for.
190-
await self._signal_ref().set("P2401=0", wait=True)
190+
await self._signal_ref().set("P2401=0")
191191
await wait_for_value(
192192
self._status_ref(),
193193
ScanState.DONE,

src/dodal/devices/eurotherm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ def __init__(
9191
@AsyncStatus.wrap
9292
async def set(self, value: float):
9393
"""Set the blower to a specific temperature."""
94-
await self.setpoint.set(value, wait=True)
94+
await self.setpoint.set(value)
9595

9696
async def locate(self) -> Location[float]:
9797
setpoint = await self.setpoint.get_value()

0 commit comments

Comments
 (0)