bec-ipython-client 3.168.0__tar.gz → 3.169.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.168.0 → bec_ipython_client-3.169.0}/PKG-INFO +1 -1
  2. {bec_ipython_client-3.168.0 → bec_ipython_client-3.169.0}/pyproject.toml +1 -1
  3. {bec_ipython_client-3.168.0 → bec_ipython_client-3.169.0}/tests/end-2-end/test_scans_e2e.py +20 -20
  4. {bec_ipython_client-3.168.0 → bec_ipython_client-3.169.0}/tests/end-2-end/test_scans_lib_e2e.py +16 -10
  5. {bec_ipython_client-3.168.0 → bec_ipython_client-3.169.0}/.gitignore +0 -0
  6. {bec_ipython_client-3.168.0 → bec_ipython_client-3.169.0}/bec_ipython_client/__init__.py +0 -0
  7. {bec_ipython_client-3.168.0 → bec_ipython_client-3.169.0}/bec_ipython_client/beamline_mixin.py +0 -0
  8. {bec_ipython_client-3.168.0 → bec_ipython_client-3.169.0}/bec_ipython_client/bec_magics.py +0 -0
  9. {bec_ipython_client-3.168.0 → bec_ipython_client-3.169.0}/bec_ipython_client/bec_startup.py +0 -0
  10. {bec_ipython_client-3.168.0 → bec_ipython_client-3.169.0}/bec_ipython_client/callbacks/__init__.py +0 -0
  11. {bec_ipython_client-3.168.0 → bec_ipython_client-3.169.0}/bec_ipython_client/callbacks/device_progress.py +0 -0
  12. {bec_ipython_client-3.168.0 → bec_ipython_client-3.169.0}/bec_ipython_client/callbacks/ipython_live_updates.py +0 -0
  13. {bec_ipython_client-3.168.0 → bec_ipython_client-3.169.0}/bec_ipython_client/callbacks/live_table.py +0 -0
  14. {bec_ipython_client-3.168.0 → bec_ipython_client-3.169.0}/bec_ipython_client/callbacks/move_device.py +0 -0
  15. {bec_ipython_client-3.168.0 → bec_ipython_client-3.169.0}/bec_ipython_client/callbacks/utils.py +0 -0
  16. {bec_ipython_client-3.168.0 → bec_ipython_client-3.169.0}/bec_ipython_client/high_level_interfaces/__init__.py +0 -0
  17. {bec_ipython_client-3.168.0 → bec_ipython_client-3.169.0}/bec_ipython_client/high_level_interfaces/bec_hli.py +0 -0
  18. {bec_ipython_client-3.168.0 → bec_ipython_client-3.169.0}/bec_ipython_client/high_level_interfaces/spec_hli.py +0 -0
  19. {bec_ipython_client-3.168.0 → bec_ipython_client-3.169.0}/bec_ipython_client/main.py +0 -0
  20. {bec_ipython_client-3.168.0 → bec_ipython_client-3.169.0}/bec_ipython_client/plugins/SLS/__init__.py +0 -0
  21. {bec_ipython_client-3.168.0 → bec_ipython_client-3.169.0}/bec_ipython_client/plugins/SLS/sls_info.py +0 -0
  22. {bec_ipython_client-3.168.0 → bec_ipython_client-3.169.0}/bec_ipython_client/plugins/XTreme/__init__.py +0 -0
  23. {bec_ipython_client-3.168.0 → bec_ipython_client-3.169.0}/bec_ipython_client/plugins/XTreme/x-treme.py +0 -0
  24. {bec_ipython_client-3.168.0 → bec_ipython_client-3.169.0}/bec_ipython_client/plugins/__init__.py +0 -0
  25. {bec_ipython_client-3.168.0 → bec_ipython_client-3.169.0}/bec_ipython_client/plugins/flomni/flomni_config.yaml +0 -0
  26. {bec_ipython_client-3.168.0 → bec_ipython_client-3.169.0}/bec_ipython_client/prettytable.py +0 -0
  27. {bec_ipython_client-3.168.0 → bec_ipython_client-3.169.0}/bec_ipython_client/progressbar.py +0 -0
  28. {bec_ipython_client-3.168.0 → bec_ipython_client-3.169.0}/bec_ipython_client/signals.py +0 -0
  29. {bec_ipython_client-3.168.0 → bec_ipython_client-3.169.0}/demo.py +0 -0
  30. {bec_ipython_client-3.168.0 → bec_ipython_client-3.169.0}/tests/client_tests/conftest.py +0 -0
  31. {bec_ipython_client-3.168.0 → bec_ipython_client-3.169.0}/tests/client_tests/test_beamline_mixins.py +0 -0
  32. {bec_ipython_client-3.168.0 → bec_ipython_client-3.169.0}/tests/client_tests/test_bec_client.py +0 -0
  33. {bec_ipython_client-3.168.0 → bec_ipython_client-3.169.0}/tests/client_tests/test_device_progress.py +0 -0
  34. {bec_ipython_client-3.168.0 → bec_ipython_client-3.169.0}/tests/client_tests/test_ipython_live_updates.py +0 -0
  35. {bec_ipython_client-3.168.0 → bec_ipython_client-3.169.0}/tests/client_tests/test_live_table.py +0 -0
  36. {bec_ipython_client-3.168.0 → bec_ipython_client-3.169.0}/tests/client_tests/test_move_callback.py +0 -0
  37. {bec_ipython_client-3.168.0 → bec_ipython_client-3.169.0}/tests/client_tests/test_pretty_table.py +0 -0
  38. {bec_ipython_client-3.168.0 → bec_ipython_client-3.169.0}/tests/client_tests/test_signals.py +0 -0
  39. {bec_ipython_client-3.168.0 → bec_ipython_client-3.169.0}/tests/conftest.py +0 -0
  40. {bec_ipython_client-3.168.0 → bec_ipython_client-3.169.0}/tests/end-2-end/_ensure_requirements_container.py +0 -0
  41. {bec_ipython_client-3.168.0 → bec_ipython_client-3.169.0}/tests/end-2-end/test_acl_e2e.py +0 -0
  42. {bec_ipython_client-3.168.0 → bec_ipython_client-3.169.0}/tests/end-2-end/test_actors_e2e.py +0 -0
  43. {bec_ipython_client-3.168.0 → bec_ipython_client-3.169.0}/tests/end-2-end/test_procedures_e2e.py +0 -0
  44. {bec_ipython_client-3.168.0 → bec_ipython_client-3.169.0}/tests/end-2-end/test_scans_v4_lib_e2e.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: bec_ipython_client
3
- Version: 3.168.0
3
+ Version: 3.169.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
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "bec_ipython_client"
7
- version = "3.168.0"
7
+ version = "3.169.0"
8
8
  description = "BEC IPython client"
9
9
  requires-python = ">=3.11"
10
10
  classifiers = [
@@ -27,7 +27,17 @@ logger = bec_logger.logger
27
27
  if TYPE_CHECKING: # pragma: no cover
28
28
  from bec_ipython_client.main import BECIPythonClient
29
29
 
30
+
30
31
  # pylint: disable=protected-access
32
+ class _ScanDataRecorder:
33
+ def __init__(self):
34
+ self.data = []
35
+ self.metadata = {}
36
+
37
+ def callback(self, data, metadata):
38
+ logger.info(f"callback metadata: {metadata}")
39
+ self.metadata = metadata
40
+ self.data.append(data)
31
41
 
32
42
 
33
43
  @pytest.mark.timeout(100)
@@ -634,21 +644,16 @@ def test_callback_data_matches_scan_data(bec_ipython_client_fixture):
634
644
  bec.metadata.update({"unit_test": "test_callback_data_matches_scan_data"})
635
645
  dev = bec.device_manager.devices
636
646
  scans = bec.scans
637
- reference_container = {"data": [], "metadata": {}}
647
+ recorder = _ScanDataRecorder()
638
648
 
639
- def dummy_callback(data, metadata):
640
- logger.info(f"callback metadata: {metadata}")
641
- reference_container["metadata"] = metadata
642
- reference_container["data"].append(data)
643
-
644
- s = scans.line_scan(dev.samx, 0, 1, steps=10, relative=False, callback=dummy_callback)
645
- while len(reference_container["data"]) < 10:
649
+ s = scans.line_scan(dev.samx, 0, 1, steps=10, relative=False, callback=recorder.callback)
650
+ while len(recorder.data) < 10:
646
651
  time.sleep(0.1)
647
652
  assert len(s.scan.live_data) == 10
648
- assert len(reference_container["data"]) == 10
653
+ assert len(recorder.data) == 10
649
654
 
650
655
  for ii, msg in enumerate(s.scan.live_data.messages.values()):
651
- assert msg.content == reference_container["data"][ii]
656
+ assert msg.content == recorder.data[ii]
652
657
 
653
658
 
654
659
  @pytest.mark.timeout(100)
@@ -657,23 +662,18 @@ def test_async_callback_data_matches_scan_data(bec_ipython_client_fixture):
657
662
  bec.metadata.update({"unit_test": "test_async_callback_data_matches_scan_data"})
658
663
  dev = bec.device_manager.devices
659
664
  scans = bec.scans
660
- reference_container = {"data": [], "metadata": {}}
661
-
662
- def dummy_callback(data, metadata):
663
- logger.info(f"callback metadata: {metadata}")
664
- reference_container["metadata"] = metadata
665
- reference_container["data"].append(data)
665
+ recorder = _ScanDataRecorder()
666
666
 
667
- s = scans.line_scan(dev.samx, 0, 1, steps=10, relative=False, async_callback=dummy_callback)
667
+ s = scans.line_scan(dev.samx, 0, 1, steps=10, relative=False, async_callback=recorder.callback)
668
668
 
669
- while len(reference_container["data"]) < 10:
669
+ while len(recorder.data) < 10:
670
670
  time.sleep(0.1)
671
671
 
672
672
  assert len(s.scan.live_data) == 10
673
- assert len(reference_container["data"]) == 10
673
+ assert len(recorder.data) == 10
674
674
 
675
675
  for ii, msg in enumerate(s.scan.live_data.messages.values()):
676
- assert msg.content == reference_container["data"][ii]
676
+ assert msg.content == recorder.data[ii]
677
677
 
678
678
 
679
679
  @pytest.mark.timeout(100)
@@ -15,6 +15,17 @@ from bec_lib.logger import bec_logger
15
15
  logger = bec_logger.logger
16
16
 
17
17
 
18
+ class _ScanDataRecorder:
19
+ def __init__(self):
20
+ self.data = []
21
+ self.metadata = {}
22
+
23
+ def callback(self, data, metadata):
24
+ logger.info(f"callback metadata: {metadata}")
25
+ self.metadata = metadata
26
+ self.data.append(data)
27
+
28
+
18
29
  @pytest.mark.timeout(100)
19
30
  def test_grid_scan_lib(bec_client_lib):
20
31
  bec = bec_client_lib
@@ -98,22 +109,17 @@ def test_async_callback_data_matches_scan_data_lib(bec_client_lib):
98
109
  scans = bec.scans # not needed but to silence pylint...
99
110
  bec.metadata.update({"unit_test": "test_async_callback_data_matches_scan_data"})
100
111
  dev = bec.device_manager.devices
101
- reference_container = {"data": [], "metadata": {}}
102
-
103
- def dummy_callback(data, metadata):
104
- logger.info(f"callback metadata: {metadata}")
105
- reference_container["metadata"] = metadata
106
- reference_container["data"].append(data)
112
+ recorder = _ScanDataRecorder()
107
113
 
108
- s = scans.line_scan(dev.samx, 0, 1, steps=10, relative=False, async_callback=dummy_callback)
114
+ s = scans.line_scan(dev.samx, 0, 1, steps=10, relative=False, async_callback=recorder.callback)
109
115
  s.wait()
110
- while len(reference_container["data"]) < 10:
116
+ while len(recorder.data) < 10:
111
117
  time.sleep(0.1)
112
118
  assert len(s.scan.live_data) == 10
113
- assert len(reference_container["data"]) == 10
119
+ assert len(recorder.data) == 10
114
120
 
115
121
  for ii, msg in enumerate(s.scan.live_data.messages.values()):
116
- assert msg.content == reference_container["data"][ii]
122
+ assert msg.content == recorder.data[ii]
117
123
 
118
124
 
119
125
  @pytest.mark.timeout(100)