Skip to content

Commit b3036eb

Browse files
chore: Update dependencies (#1599)
1 parent a97d21b commit b3036eb

File tree

4 files changed

+25
-24
lines changed

4 files changed

+25
-24
lines changed

pyproject.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ dependencies = [
1515
"click",
1616
"ophyd",
1717
"ophyd-async[ca,pva]>=0.13.2",
18-
"bluesky==1.14.2", # https://github.com/bluesky/bluesky/issues/1938
18+
"bluesky>=1.14.5",
1919
"pyepics",
2020
"dataclasses-json",
2121
"pillow",
@@ -29,7 +29,6 @@ dependencies = [
2929
"aiohttp",
3030
"redis",
3131
"scanspec>=0.7.3",
32-
"event-model>=1.23", # Until bluesky pins it https://github.com/DiamondLightSource/dodal/issues/1278
3332
"pyzmq==26.3.0", # Until we can move to RHEL 8 https://github.com/DiamondLightSource/mx-bluesky/issues/1139
3433
"deepdiff",
3534
"daq-config-server>=v1.0.0-rc.2",# For getting Configuration settings.

tests/plan_stubs/test_wrapped_stubs.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
wait,
1717
)
1818

19+
_EMPTY = ()
20+
1921

2022
@pytest.fixture
2123
def x_axis() -> SimMotor:
@@ -125,23 +127,23 @@ def test_sleep():
125127
def test_wait():
126128
# Waits for all groups
127129
assert list(wait()) == [
128-
Msg("wait", group=None, timeout=None, error_on_timeout=True)
130+
Msg("wait", group=None, timeout=None, error_on_timeout=True, watch=_EMPTY)
129131
]
130132

131133

132134
def test_wait_group():
133135
assert list(wait("foo")) == [
134-
Msg("wait", group="foo", timeout=None, error_on_timeout=True)
136+
Msg("wait", group="foo", timeout=None, error_on_timeout=True, watch=_EMPTY)
135137
]
136138

137139

138140
def test_wait_timeout():
139141
assert list(wait(timeout=5.0)) == [
140-
Msg("wait", group=None, timeout=5.0, error_on_timeout=True)
142+
Msg("wait", group=None, timeout=5.0, error_on_timeout=True, watch=_EMPTY)
141143
]
142144

143145

144146
def test_wait_group_and_timeout():
145147
assert list(wait("foo", 5.0)) == [
146-
Msg("wait", group="foo", timeout=5.0, error_on_timeout=True)
148+
Msg("wait", group="foo", timeout=5.0, error_on_timeout=True, watch=_EMPTY)
147149
]

tests/plans/test_scanspec.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import pytest
66
from bluesky.run_engine import RunEngine
77
from event_model.documents import (
8-
DocumentType,
8+
Document,
99
Event,
1010
EventDescriptor,
1111
RunStart,
@@ -26,7 +26,7 @@ def documents_from_expected_shape(
2626
RE: RunEngine,
2727
x_axis: SimMotor,
2828
y_axis: SimMotor,
29-
) -> dict[str, list[DocumentType]]:
29+
) -> dict[str, list[Document]]:
3030
shape: Sequence[int] = request.param
3131
motors = [x_axis, y_axis]
3232
# Does not support static, https://github.com/bluesky/scanspec/issues/154
@@ -35,7 +35,7 @@ def documents_from_expected_shape(
3535
for i in range(1, len(shape)):
3636
spec = spec * Line(motors[i], 0, 5, shape[i])
3737

38-
docs: dict[str, list[DocumentType]] = {}
38+
docs: dict[str, list[Document]] = {}
3939
RE(
4040
spec_scan({det}, spec), # type: ignore
4141
lambda name, doc: docs.setdefault(name, []).append(doc),
@@ -63,7 +63,7 @@ def length_from_shape(shape: tuple[int, ...]) -> int:
6363
indirect=["documents_from_expected_shape"],
6464
)
6565
def test_plan_produces_expected_start_document(
66-
documents_from_expected_shape: dict[str, list[DocumentType]],
66+
documents_from_expected_shape: dict[str, list[Document]],
6767
shape: tuple[int, ...],
6868
x_axis: SimMotor,
6969
y_axis: SimMotor,
@@ -93,7 +93,7 @@ def test_plan_produces_expected_start_document(
9393
indirect=["documents_from_expected_shape"],
9494
)
9595
def test_plan_produces_expected_stop_document(
96-
documents_from_expected_shape: dict[str, list[DocumentType]], shape: tuple[int, ...]
96+
documents_from_expected_shape: dict[str, list[Document]], shape: tuple[int, ...]
9797
):
9898
docs = documents_from_expected_shape.get("stop")
9999
assert docs and len(docs) == 1
@@ -108,7 +108,7 @@ def test_plan_produces_expected_stop_document(
108108
indirect=["documents_from_expected_shape"],
109109
)
110110
def test_plan_produces_expected_descriptor(
111-
documents_from_expected_shape: dict[str, list[DocumentType]],
111+
documents_from_expected_shape: dict[str, list[Document]],
112112
det: StandardDetector,
113113
shape: tuple[int, ...],
114114
):
@@ -126,7 +126,7 @@ def test_plan_produces_expected_descriptor(
126126
indirect=["documents_from_expected_shape"],
127127
)
128128
def test_plan_produces_expected_events(
129-
documents_from_expected_shape: dict[str, list[DocumentType]],
129+
documents_from_expected_shape: dict[str, list[Document]],
130130
shape: tuple[int, ...],
131131
det: StandardDetector,
132132
x_axis: SimMotor,
@@ -156,7 +156,7 @@ def test_plan_produces_expected_events(
156156
indirect=["documents_from_expected_shape"],
157157
)
158158
def test_plan_produces_expected_resources(
159-
documents_from_expected_shape: dict[str, list[DocumentType]],
159+
documents_from_expected_shape: dict[str, list[Document]],
160160
shape: tuple[int, ...],
161161
det: StandardDetector,
162162
):
@@ -174,7 +174,7 @@ def test_plan_produces_expected_resources(
174174
indirect=["documents_from_expected_shape"],
175175
)
176176
def test_plan_produces_expected_datums(
177-
documents_from_expected_shape: dict[str, list[DocumentType]],
177+
documents_from_expected_shape: dict[str, list[Document]],
178178
shape: tuple[int, ...],
179179
det: StandardDetector,
180180
):

tests/plans/test_wrapped.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from bluesky.protocols import Readable
66
from bluesky.run_engine import RunEngine
77
from event_model.documents import (
8-
DocumentType,
8+
Document,
99
Event,
1010
EventDescriptor,
1111
RunStart,
@@ -23,8 +23,8 @@
2323
@pytest.fixture
2424
def documents_from_num(
2525
request: pytest.FixtureRequest, det: StandardDetector, RE: RunEngine
26-
) -> dict[str, list[DocumentType]]:
27-
docs: dict[str, list[DocumentType]] = {}
26+
) -> dict[str, list[Document]]:
27+
docs: dict[str, list[Document]] = {}
2828
RE(
2929
count({det}, num=request.param),
3030
lambda name, doc: docs.setdefault(name, []).append(doc),
@@ -81,7 +81,7 @@ def test_count_num_validation(det: StandardDetector, RE):
8181
"documents_from_num, shape", ([1, (1,)], [3, (3,)]), indirect=["documents_from_num"]
8282
)
8383
def test_plan_produces_expected_start_document(
84-
documents_from_num: dict[str, list[DocumentType]], shape: tuple[int, ...]
84+
documents_from_num: dict[str, list[Document]], shape: tuple[int, ...]
8585
):
8686
docs = documents_from_num.get("start")
8787
assert docs and len(docs) == 1
@@ -96,7 +96,7 @@ def test_plan_produces_expected_start_document(
9696
"documents_from_num, length", ([1, 1], [3, 3]), indirect=["documents_from_num"]
9797
)
9898
def test_plan_produces_expected_stop_document(
99-
documents_from_num: dict[str, list[DocumentType]], length: int
99+
documents_from_num: dict[str, list[Document]], length: int
100100
):
101101
docs = documents_from_num.get("stop")
102102
assert docs and len(docs) == 1
@@ -107,7 +107,7 @@ def test_plan_produces_expected_stop_document(
107107

108108
@pytest.mark.parametrize("documents_from_num", [1], indirect=True)
109109
def test_plan_produces_expected_descriptor(
110-
documents_from_num: dict[str, list[DocumentType]], det: StandardDetector
110+
documents_from_num: dict[str, list[Document]], det: StandardDetector
111111
):
112112
docs = documents_from_num.get("descriptor")
113113
assert docs and len(docs) == 1
@@ -121,7 +121,7 @@ def test_plan_produces_expected_descriptor(
121121
"documents_from_num, length", ([1, 1], [3, 3]), indirect=["documents_from_num"]
122122
)
123123
def test_plan_produces_expected_events(
124-
documents_from_num: dict[str, list[DocumentType]],
124+
documents_from_num: dict[str, list[Document]],
125125
length: int,
126126
det: StandardDetector,
127127
):
@@ -135,7 +135,7 @@ def test_plan_produces_expected_events(
135135

136136
@pytest.mark.parametrize("documents_from_num", [1, 3], indirect=True)
137137
def test_plan_produces_expected_resources(
138-
documents_from_num: dict[str, list[DocumentType]],
138+
documents_from_num: dict[str, list[Document]],
139139
det: StandardDetector,
140140
):
141141
docs = documents_from_num.get("stream_resource")
@@ -150,7 +150,7 @@ def test_plan_produces_expected_resources(
150150
"documents_from_num, length", ([1, 1], [3, 3]), indirect=["documents_from_num"]
151151
)
152152
def test_plan_produces_expected_datums(
153-
documents_from_num: dict[str, list[DocumentType]],
153+
documents_from_num: dict[str, list[Document]],
154154
length: int,
155155
det: StandardDetector,
156156
):

0 commit comments

Comments
 (0)