bec-ipython-client 3.153.0__tar.gz → 3.154.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. {bec_ipython_client-3.153.0 → bec_ipython_client-3.154.0}/PKG-INFO +1 -1
  2. {bec_ipython_client-3.153.0 → bec_ipython_client-3.154.0}/bec_ipython_client/callbacks/ipython_live_updates.py +4 -12
  3. {bec_ipython_client-3.153.0 → bec_ipython_client-3.154.0}/bec_ipython_client/callbacks/live_table.py +0 -8
  4. {bec_ipython_client-3.153.0 → bec_ipython_client-3.154.0}/demo.py +0 -15
  5. {bec_ipython_client-3.153.0 → bec_ipython_client-3.154.0}/pyproject.toml +1 -1
  6. {bec_ipython_client-3.153.0 → bec_ipython_client-3.154.0}/tests/end-2-end/test_scans_e2e.py +1 -49
  7. {bec_ipython_client-3.153.0 → bec_ipython_client-3.154.0}/.gitignore +0 -0
  8. {bec_ipython_client-3.153.0 → bec_ipython_client-3.154.0}/bec_ipython_client/__init__.py +0 -0
  9. {bec_ipython_client-3.153.0 → bec_ipython_client-3.154.0}/bec_ipython_client/beamline_mixin.py +0 -0
  10. {bec_ipython_client-3.153.0 → bec_ipython_client-3.154.0}/bec_ipython_client/bec_magics.py +0 -0
  11. {bec_ipython_client-3.153.0 → bec_ipython_client-3.154.0}/bec_ipython_client/bec_startup.py +0 -0
  12. {bec_ipython_client-3.153.0 → bec_ipython_client-3.154.0}/bec_ipython_client/callbacks/__init__.py +0 -0
  13. {bec_ipython_client-3.153.0 → bec_ipython_client-3.154.0}/bec_ipython_client/callbacks/device_progress.py +0 -0
  14. {bec_ipython_client-3.153.0 → bec_ipython_client-3.154.0}/bec_ipython_client/callbacks/move_device.py +0 -0
  15. {bec_ipython_client-3.153.0 → bec_ipython_client-3.154.0}/bec_ipython_client/callbacks/utils.py +0 -0
  16. {bec_ipython_client-3.153.0 → bec_ipython_client-3.154.0}/bec_ipython_client/high_level_interfaces/__init__.py +0 -0
  17. {bec_ipython_client-3.153.0 → bec_ipython_client-3.154.0}/bec_ipython_client/high_level_interfaces/bec_hli.py +0 -0
  18. {bec_ipython_client-3.153.0 → bec_ipython_client-3.154.0}/bec_ipython_client/high_level_interfaces/spec_hli.py +0 -0
  19. {bec_ipython_client-3.153.0 → bec_ipython_client-3.154.0}/bec_ipython_client/main.py +0 -0
  20. {bec_ipython_client-3.153.0 → bec_ipython_client-3.154.0}/bec_ipython_client/plugins/SLS/__init__.py +0 -0
  21. {bec_ipython_client-3.153.0 → bec_ipython_client-3.154.0}/bec_ipython_client/plugins/SLS/sls_info.py +0 -0
  22. {bec_ipython_client-3.153.0 → bec_ipython_client-3.154.0}/bec_ipython_client/plugins/XTreme/__init__.py +0 -0
  23. {bec_ipython_client-3.153.0 → bec_ipython_client-3.154.0}/bec_ipython_client/plugins/XTreme/x-treme.py +0 -0
  24. {bec_ipython_client-3.153.0 → bec_ipython_client-3.154.0}/bec_ipython_client/plugins/__init__.py +0 -0
  25. {bec_ipython_client-3.153.0 → bec_ipython_client-3.154.0}/bec_ipython_client/plugins/flomni/flomni_config.yaml +0 -0
  26. {bec_ipython_client-3.153.0 → bec_ipython_client-3.154.0}/bec_ipython_client/prettytable.py +0 -0
  27. {bec_ipython_client-3.153.0 → bec_ipython_client-3.154.0}/bec_ipython_client/progressbar.py +0 -0
  28. {bec_ipython_client-3.153.0 → bec_ipython_client-3.154.0}/bec_ipython_client/signals.py +0 -0
  29. {bec_ipython_client-3.153.0 → bec_ipython_client-3.154.0}/tests/client_tests/conftest.py +0 -0
  30. {bec_ipython_client-3.153.0 → bec_ipython_client-3.154.0}/tests/client_tests/test_beamline_mixins.py +0 -0
  31. {bec_ipython_client-3.153.0 → bec_ipython_client-3.154.0}/tests/client_tests/test_bec_client.py +0 -0
  32. {bec_ipython_client-3.153.0 → bec_ipython_client-3.154.0}/tests/client_tests/test_device_progress.py +0 -0
  33. {bec_ipython_client-3.153.0 → bec_ipython_client-3.154.0}/tests/client_tests/test_ipython_live_updates.py +0 -0
  34. {bec_ipython_client-3.153.0 → bec_ipython_client-3.154.0}/tests/client_tests/test_live_table.py +0 -0
  35. {bec_ipython_client-3.153.0 → bec_ipython_client-3.154.0}/tests/client_tests/test_move_callback.py +0 -0
  36. {bec_ipython_client-3.153.0 → bec_ipython_client-3.154.0}/tests/client_tests/test_pretty_table.py +0 -0
  37. {bec_ipython_client-3.153.0 → bec_ipython_client-3.154.0}/tests/client_tests/test_signals.py +0 -0
  38. {bec_ipython_client-3.153.0 → bec_ipython_client-3.154.0}/tests/conftest.py +0 -0
  39. {bec_ipython_client-3.153.0 → bec_ipython_client-3.154.0}/tests/end-2-end/_ensure_requirements_container.py +0 -0
  40. {bec_ipython_client-3.153.0 → bec_ipython_client-3.154.0}/tests/end-2-end/test_acl_e2e.py +0 -0
  41. {bec_ipython_client-3.153.0 → bec_ipython_client-3.154.0}/tests/end-2-end/test_actors_e2e.py +0 -0
  42. {bec_ipython_client-3.153.0 → bec_ipython_client-3.154.0}/tests/end-2-end/test_procedures_e2e.py +0 -0
  43. {bec_ipython_client-3.153.0 → bec_ipython_client-3.154.0}/tests/end-2-end/test_scans_lib_e2e.py +0 -0
  44. {bec_ipython_client-3.153.0 → bec_ipython_client-3.154.0}/tests/end-2-end/test_scans_v4_lib_e2e.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: bec_ipython_client
3
- Version: 3.153.0
3
+ Version: 3.154.0
4
4
  Summary: BEC IPython client
5
5
  Project-URL: Bug Tracker, https://github.com/bec-project/bec/issues
6
6
  Project-URL: Homepage, https://github.com/bec-project/bec
@@ -69,9 +69,6 @@ class IPythonLiveUpdates:
69
69
  if not self._active_request:
70
70
  return
71
71
  scan_type = self._active_request.scan_type
72
- if scan_type in ["open_scan_def", "close_scan_def"]:
73
- self._process_instruction({"scan_progress": {"points": 0, "show_table": True}})
74
- return
75
72
  if scan_type == "close_scan_group":
76
73
  return
77
74
 
@@ -325,10 +322,9 @@ class IPythonLiveUpdates:
325
322
  if not available_blocks:
326
323
  return False
327
324
  req_block = available_blocks[self._request_block_index[req_id]]
328
- if req_block.msg.scan_type in [
329
- "open_scan_def",
330
- "mv",
331
- ]: # TODO: make this more general for all scan types that don't have report instructions
325
+ if (
326
+ req_block.msg.scan_type == "mv"
327
+ ): # TODO: make this more general for scans without report instructions
332
328
  return True
333
329
 
334
330
  report_instructions = req_block.report_instructions or []
@@ -410,11 +406,7 @@ class IPythonLiveUpdates:
410
406
  self._current_queue = None
411
407
  self._user_callback = None
412
408
  self._processed_instructions = 0
413
- scan_closed = (
414
- forced
415
- or self._active_request is None
416
- or (self._active_request.scan_type == "close_scan_def")
417
- )
409
+ scan_closed = forced or self._active_request is None
418
410
  self._active_request = None
419
411
 
420
412
  if self.client.scans._scan_def_id and not scan_closed:
@@ -375,11 +375,6 @@ class LiveUpdatesTable(LiveUpdatesBase):
375
375
 
376
376
  def process_request(self):
377
377
  """process the request and start the core loop for live updates"""
378
- if self.request.content["scan_type"] == "close_scan_def":
379
- self.wait_for_scan_item_to_finish()
380
- self.close_table()
381
- return
382
-
383
378
  self.wait_for_request_acceptance()
384
379
  self.update_scan_item(timeout=15)
385
380
  self.wait_for_scan_to_start()
@@ -394,9 +389,6 @@ class LiveUpdatesTable(LiveUpdatesBase):
394
389
 
395
390
  def run(self):
396
391
  """run the live updates"""
397
- if self.request.content["scan_type"] == "open_scan_def":
398
- self.wait_for_request_acceptance()
399
- return
400
392
  self.process_request()
401
393
  self.wait_for_scan_item_to_finish()
402
394
  if self._print_table_data:
@@ -153,13 +153,6 @@ scans.umv(dev.samx, 5, dev.samy, 20, relative=False)
153
153
  # scans.close_interactive_scan(md={"scan_def_id": scan_def_id})
154
154
 
155
155
 
156
- # @scan_def
157
- # def new_scan():
158
- # for ii in range(10):
159
- # scans.umv(dev.samx, ii * 10)
160
- # scans.fermat_scan(dev.samx, -5, 5, dev.samy, -5, 5, step=1, exp_time=0.02, relative=True)
161
-
162
-
163
156
  # for ii in range(10):
164
157
  # scans.umv(dev.samx, ii * 10)
165
158
  # # scans.grid_scan(dev.samx, -5, 5, 5, dev.samy, -5, 5, 10, exp_time=0.02, relative=True)
@@ -180,17 +173,9 @@ scans.umv(dev.samx, 5, dev.samy, 20, relative=False)
180
173
  # # scans.line_scan(dev.samx, -8, 8, steps=200, exp_time=0.1, relative=True)
181
174
 
182
175
 
183
- # with scans.scan_def:
184
- # scan_with_decorator()
185
176
  # with scans.dataset_id_on_hold:
186
177
  # scans.line_scan(dev.samx, -5, 5, steps=10, exp_time=0.1, relative=True)
187
178
  # scans.line_scan(dev.samx, -8, 8, steps=10, exp_time=0.1, relative=True)
188
-
189
- # scan_def_id = str(uuid.uuid4())
190
- # scans.open_scan_def(md={"scan_def_id": scan_def_id})
191
- # scans.line_scan(dev.samx, -5, 5, steps=10, exp_time=0.1, md={"scan_def_id": scan_def_id})
192
- # scans.line_scan(dev.samx, -8, 8, steps=10, exp_time=0.1, md={"scan_def_id": scan_def_id})
193
- # scans.close_scan_def(md={"scan_def_id": scan_def_id})
194
179
  # for ii in range(10):
195
180
  # scans.grid_scan(dev.samx, -5, 5, 10, dev.samy, -5, 5, 10, exp_time=0.01)
196
181
 
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "bec_ipython_client"
7
- version = "3.153.0"
7
+ version = "3.154.0"
8
8
  description = "BEC IPython client"
9
9
  requires-python = ">=3.11"
10
10
  classifiers = [
@@ -550,58 +550,10 @@ def test_file_writer(bec_ipython_client_fixture):
550
550
  dev.samy.velocity.set(100).wait()
551
551
 
552
552
 
553
- @pytest.mark.timeout(100)
554
- def test_scan_def_callback(capsys, bec_ipython_client_fixture):
555
- bec = bec_ipython_client_fixture
556
- bec.metadata.update({"unit_test": "test_scan_def_callback"})
557
- scans = bec.scans
558
- dev = bec.device_manager.devices
559
- scan_number = bec.queue.next_scan_number
560
- with scans.scan_def:
561
- scans.line_scan(dev.samx, -5, 5, steps=10, exp_time=0.1, relative=False)
562
- scans.umv(dev.samy, 5, relative=False)
563
- current_pos_samy = dev.samy.read(cached=True)["samy"]["value"]
564
- captured = capsys.readouterr()
565
- assert f"Starting scan {scan_number}" in captured.out
566
- ref_out_samy = f"━━━━━━━━━━━━━━━ {current_pos_samy:10.2f} / 5.00 / 100 %"
567
- assert ref_out_samy in captured.out
568
- scans.line_scan(dev.samx, -5, 5, steps=10, exp_time=0.1, relative=False)
569
- captured = capsys.readouterr()
570
- assert f"Scan {scan_number} finished." in captured.out
571
-
572
-
573
- @pytest.mark.timeout(100)
574
- def test_scan_def(bec_ipython_client_fixture):
575
- bec = bec_ipython_client_fixture
576
- bec.metadata.update({"unit_test": "test_scan_def"})
577
- scans = bec.scans
578
- dev = bec.device_manager.devices
579
- scan_number = bec.queue.next_scan_number
580
- with scans.scan_def:
581
- scans.line_scan(dev.samx, -5, 5, steps=10, exp_time=0.1, relative=False)
582
- scans.umv(dev.samy, 5, relative=False)
583
- scans.line_scan(dev.samx, -5, 5, steps=10, exp_time=0.1, relative=False)
584
- scans.mv(dev.samx, 0, relative=False)
585
-
586
- assert scan_number == bec.queue.next_scan_number - 1
587
-
588
- scan_number = bec.queue.next_scan_number
589
-
590
- @scans.scan_def
591
- def scan_def_with_decorator():
592
- scans.line_scan(dev.samx, -5, 5, steps=10, exp_time=0.1, relative=False)
593
- scans.umv(dev.samy, 5, relative=False)
594
- scans.line_scan(dev.samx, -5, 5, steps=10, exp_time=0.1, relative=False)
595
- scans.mv(dev.samx, 0, relative=False)
596
-
597
- scan_def_with_decorator()
598
- assert scan_number == bec.queue.next_scan_number - 1
599
-
600
-
601
553
  @pytest.mark.timeout(100)
602
554
  def test_group_def(bec_ipython_client_fixture):
603
555
  bec = bec_ipython_client_fixture
604
- bec.metadata.update({"unit_test": "test_scan_def"})
556
+ bec.metadata.update({"unit_test": "test_group_def"})
605
557
  scans = bec.scans
606
558
  dev = bec.device_manager.devices
607
559
  scan_number = bec.queue.next_scan_number