Skip to content

Commit 97a5b43

Browse files
committed
wip - chore: removing scan motors
1 parent 1ad993a commit 97a5b43

4 files changed

Lines changed: 0 additions & 17 deletions

File tree

bec_ipython_client/tests/client_tests/test_ipython_live_updates.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ def queue_elements(bec_client_mock):
3030
request_block = messages.RequestBlock(
3131
msg=request_msg,
3232
RID="req_id",
33-
scan_motors=["samx"],
3433
report_instructions=[],
3534
readout_priority={"monitored": ["samx"]},
3635
is_scan=True,
@@ -63,7 +62,6 @@ def sample_request_block(sample_request_msg):
6362
return messages.RequestBlock(
6463
msg=sample_request_msg,
6564
RID="req_id",
66-
scan_motors=["samx"],
6765
report_instructions=[],
6866
readout_priority={"monitored": ["samx"]},
6967
is_scan=True,
@@ -240,7 +238,6 @@ def test_available_req_blocks_multiple_blocks(bec_client_mock):
240238
request_block1 = messages.RequestBlock(
241239
msg=request_msg,
242240
RID="test_rid",
243-
scan_motors=["samx"],
244241
report_instructions=[],
245242
readout_priority={"monitored": ["samx"]},
246243
is_scan=True,
@@ -251,7 +248,6 @@ def test_available_req_blocks_multiple_blocks(bec_client_mock):
251248
request_block2 = messages.RequestBlock(
252249
msg=request_msg,
253250
RID="test_rid",
254-
scan_motors=["samy"],
255251
report_instructions=[],
256252
readout_priority={"monitored": ["samy"]},
257253
is_scan=True,
@@ -262,7 +258,6 @@ def test_available_req_blocks_multiple_blocks(bec_client_mock):
262258
request_block3 = messages.RequestBlock(
263259
msg=request_msg,
264260
RID="different_rid",
265-
scan_motors=["samz"],
266261
report_instructions=[],
267262
readout_priority={"monitored": ["samz"]},
268263
is_scan=True,

bec_lib/bec_lib/messages.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,6 @@ class RequestBlock(BaseModel):
334334
Args:
335335
msg (ScanQueueMessage): The original scan queue message containing the request details
336336
RID (str): Request ID associated with the request
337-
scan_motors (list[str]): List of motors involved in the scan
338337
readout_priority (dict[Literal["monitored", "baseline", "async", "continuous", "on_request"], list[str]]): Readout priority for the request
339338
is_scan (bool): True if the request is a scan, False if it is an rpc call
340339
scan_number (int | None): Scan number if applicable
@@ -345,7 +344,6 @@ class RequestBlock(BaseModel):
345344

346345
msg: ScanQueueMessage
347346
RID: str
348-
scan_motors: list[str]
349347
readout_priority: dict[
350348
Literal["monitored", "baseline", "async", "continuous", "on_request"], list[str]
351349
]

bec_server/bec_server/scan_server/scan_queue.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -913,7 +913,6 @@ def __init__(
913913
self, msg: messages.ScanQueueMessage, assembler: ScanAssembler, parent: RequestBlockQueue
914914
) -> None:
915915
self.instructions = None
916-
self.scan_motors = []
917916
self.readout_priority: ReadoutPriorities = {}
918917
self.msg = msg
919918
self.RID = msg.metadata["RID"]
@@ -931,8 +930,6 @@ def _assemble(self):
931930
self.scan_id = str(uuid.uuid4())
932931
self.scan = self.scan_assembler.assemble_device_instructions(self.msg, self.scan_id)
933932
self.instructions = self.scan.run()
934-
if self.scan.caller_args:
935-
self.scan_motors = self.scan.scan_motors
936933
self.readout_priority = self.scan.readout_priority
937934

938935
@property
@@ -997,7 +994,6 @@ def describe(self) -> messages.RequestBlock:
997994
return messages.RequestBlock(
998995
msg=self.msg,
999996
RID=self.RID,
1000-
scan_motors=self.scan_motors,
1001997
readout_priority=self.readout_priority,
1002998
is_scan=self.is_scan,
1003999
scan_number=self.scan_number,

bec_server/bec_server/scan_server/scan_worker.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ def __init__(self, *, parent: ScanServer, queue_name: str = "primary"):
3838
self.status = InstructionQueueStatus.IDLE
3939
self.signal_event = threading.Event()
4040
self.scan_id = None
41-
self.scan_motors = []
4241
self.readout_priority = {}
4342
self.scan_type = None
4443
self.current_scan_id: str = ""
@@ -60,10 +59,6 @@ def open_scan(self, instr: messages.DeviceInstructionMessage) -> None:
6059
if not self.scan_id:
6160
self.scan_id = instr.metadata.get("scan_id")
6261
if instr.content["parameter"].get("scan_motors") is not None:
63-
self.scan_motors = [
64-
self.device_manager.devices[dev]
65-
for dev in instr.content["parameter"].get("scan_motors")
66-
]
6762
self.readout_priority = instr.content["parameter"].get("readout_priority", {})
6863
self.scan_type = instr.content["parameter"].get("scan_type")
6964

@@ -536,7 +531,6 @@ def reset(self):
536531
self.scan_id = None
537532
self.interception_msg = None
538533
self.current_instruction_queue_item = None
539-
self.scan_motors = []
540534

541535
def cleanup(self):
542536
"""perform cleanup instructions"""

0 commit comments

Comments
 (0)