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.
- {bec_ipython_client-3.168.0 → bec_ipython_client-3.169.0}/PKG-INFO +1 -1
- {bec_ipython_client-3.168.0 → bec_ipython_client-3.169.0}/pyproject.toml +1 -1
- {bec_ipython_client-3.168.0 → bec_ipython_client-3.169.0}/tests/end-2-end/test_scans_e2e.py +20 -20
- {bec_ipython_client-3.168.0 → bec_ipython_client-3.169.0}/tests/end-2-end/test_scans_lib_e2e.py +16 -10
- {bec_ipython_client-3.168.0 → bec_ipython_client-3.169.0}/.gitignore +0 -0
- {bec_ipython_client-3.168.0 → bec_ipython_client-3.169.0}/bec_ipython_client/__init__.py +0 -0
- {bec_ipython_client-3.168.0 → bec_ipython_client-3.169.0}/bec_ipython_client/beamline_mixin.py +0 -0
- {bec_ipython_client-3.168.0 → bec_ipython_client-3.169.0}/bec_ipython_client/bec_magics.py +0 -0
- {bec_ipython_client-3.168.0 → bec_ipython_client-3.169.0}/bec_ipython_client/bec_startup.py +0 -0
- {bec_ipython_client-3.168.0 → bec_ipython_client-3.169.0}/bec_ipython_client/callbacks/__init__.py +0 -0
- {bec_ipython_client-3.168.0 → bec_ipython_client-3.169.0}/bec_ipython_client/callbacks/device_progress.py +0 -0
- {bec_ipython_client-3.168.0 → bec_ipython_client-3.169.0}/bec_ipython_client/callbacks/ipython_live_updates.py +0 -0
- {bec_ipython_client-3.168.0 → bec_ipython_client-3.169.0}/bec_ipython_client/callbacks/live_table.py +0 -0
- {bec_ipython_client-3.168.0 → bec_ipython_client-3.169.0}/bec_ipython_client/callbacks/move_device.py +0 -0
- {bec_ipython_client-3.168.0 → bec_ipython_client-3.169.0}/bec_ipython_client/callbacks/utils.py +0 -0
- {bec_ipython_client-3.168.0 → bec_ipython_client-3.169.0}/bec_ipython_client/high_level_interfaces/__init__.py +0 -0
- {bec_ipython_client-3.168.0 → bec_ipython_client-3.169.0}/bec_ipython_client/high_level_interfaces/bec_hli.py +0 -0
- {bec_ipython_client-3.168.0 → bec_ipython_client-3.169.0}/bec_ipython_client/high_level_interfaces/spec_hli.py +0 -0
- {bec_ipython_client-3.168.0 → bec_ipython_client-3.169.0}/bec_ipython_client/main.py +0 -0
- {bec_ipython_client-3.168.0 → bec_ipython_client-3.169.0}/bec_ipython_client/plugins/SLS/__init__.py +0 -0
- {bec_ipython_client-3.168.0 → bec_ipython_client-3.169.0}/bec_ipython_client/plugins/SLS/sls_info.py +0 -0
- {bec_ipython_client-3.168.0 → bec_ipython_client-3.169.0}/bec_ipython_client/plugins/XTreme/__init__.py +0 -0
- {bec_ipython_client-3.168.0 → bec_ipython_client-3.169.0}/bec_ipython_client/plugins/XTreme/x-treme.py +0 -0
- {bec_ipython_client-3.168.0 → bec_ipython_client-3.169.0}/bec_ipython_client/plugins/__init__.py +0 -0
- {bec_ipython_client-3.168.0 → bec_ipython_client-3.169.0}/bec_ipython_client/plugins/flomni/flomni_config.yaml +0 -0
- {bec_ipython_client-3.168.0 → bec_ipython_client-3.169.0}/bec_ipython_client/prettytable.py +0 -0
- {bec_ipython_client-3.168.0 → bec_ipython_client-3.169.0}/bec_ipython_client/progressbar.py +0 -0
- {bec_ipython_client-3.168.0 → bec_ipython_client-3.169.0}/bec_ipython_client/signals.py +0 -0
- {bec_ipython_client-3.168.0 → bec_ipython_client-3.169.0}/demo.py +0 -0
- {bec_ipython_client-3.168.0 → bec_ipython_client-3.169.0}/tests/client_tests/conftest.py +0 -0
- {bec_ipython_client-3.168.0 → bec_ipython_client-3.169.0}/tests/client_tests/test_beamline_mixins.py +0 -0
- {bec_ipython_client-3.168.0 → bec_ipython_client-3.169.0}/tests/client_tests/test_bec_client.py +0 -0
- {bec_ipython_client-3.168.0 → bec_ipython_client-3.169.0}/tests/client_tests/test_device_progress.py +0 -0
- {bec_ipython_client-3.168.0 → bec_ipython_client-3.169.0}/tests/client_tests/test_ipython_live_updates.py +0 -0
- {bec_ipython_client-3.168.0 → bec_ipython_client-3.169.0}/tests/client_tests/test_live_table.py +0 -0
- {bec_ipython_client-3.168.0 → bec_ipython_client-3.169.0}/tests/client_tests/test_move_callback.py +0 -0
- {bec_ipython_client-3.168.0 → bec_ipython_client-3.169.0}/tests/client_tests/test_pretty_table.py +0 -0
- {bec_ipython_client-3.168.0 → bec_ipython_client-3.169.0}/tests/client_tests/test_signals.py +0 -0
- {bec_ipython_client-3.168.0 → bec_ipython_client-3.169.0}/tests/conftest.py +0 -0
- {bec_ipython_client-3.168.0 → bec_ipython_client-3.169.0}/tests/end-2-end/_ensure_requirements_container.py +0 -0
- {bec_ipython_client-3.168.0 → bec_ipython_client-3.169.0}/tests/end-2-end/test_acl_e2e.py +0 -0
- {bec_ipython_client-3.168.0 → bec_ipython_client-3.169.0}/tests/end-2-end/test_actors_e2e.py +0 -0
- {bec_ipython_client-3.168.0 → bec_ipython_client-3.169.0}/tests/end-2-end/test_procedures_e2e.py +0 -0
- {bec_ipython_client-3.168.0 → bec_ipython_client-3.169.0}/tests/end-2-end/test_scans_v4_lib_e2e.py +0 -0
|
@@ -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
|
-
|
|
647
|
+
recorder = _ScanDataRecorder()
|
|
638
648
|
|
|
639
|
-
|
|
640
|
-
|
|
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(
|
|
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 ==
|
|
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
|
-
|
|
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=
|
|
667
|
+
s = scans.line_scan(dev.samx, 0, 1, steps=10, relative=False, async_callback=recorder.callback)
|
|
668
668
|
|
|
669
|
-
while len(
|
|
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(
|
|
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 ==
|
|
676
|
+
assert msg.content == recorder.data[ii]
|
|
677
677
|
|
|
678
678
|
|
|
679
679
|
@pytest.mark.timeout(100)
|
{bec_ipython_client-3.168.0 → bec_ipython_client-3.169.0}/tests/end-2-end/test_scans_lib_e2e.py
RENAMED
|
@@ -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
|
-
|
|
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=
|
|
114
|
+
s = scans.line_scan(dev.samx, 0, 1, steps=10, relative=False, async_callback=recorder.callback)
|
|
109
115
|
s.wait()
|
|
110
|
-
while len(
|
|
116
|
+
while len(recorder.data) < 10:
|
|
111
117
|
time.sleep(0.1)
|
|
112
118
|
assert len(s.scan.live_data) == 10
|
|
113
|
-
assert len(
|
|
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 ==
|
|
122
|
+
assert msg.content == recorder.data[ii]
|
|
117
123
|
|
|
118
124
|
|
|
119
125
|
@pytest.mark.timeout(100)
|
|
File without changes
|
|
File without changes
|
{bec_ipython_client-3.168.0 → bec_ipython_client-3.169.0}/bec_ipython_client/beamline_mixin.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{bec_ipython_client-3.168.0 → bec_ipython_client-3.169.0}/bec_ipython_client/callbacks/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{bec_ipython_client-3.168.0 → bec_ipython_client-3.169.0}/bec_ipython_client/callbacks/live_table.py
RENAMED
|
File without changes
|
|
File without changes
|
{bec_ipython_client-3.168.0 → bec_ipython_client-3.169.0}/bec_ipython_client/callbacks/utils.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{bec_ipython_client-3.168.0 → bec_ipython_client-3.169.0}/bec_ipython_client/plugins/SLS/__init__.py
RENAMED
|
File without changes
|
{bec_ipython_client-3.168.0 → bec_ipython_client-3.169.0}/bec_ipython_client/plugins/SLS/sls_info.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{bec_ipython_client-3.168.0 → bec_ipython_client-3.169.0}/bec_ipython_client/plugins/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{bec_ipython_client-3.168.0 → bec_ipython_client-3.169.0}/tests/client_tests/test_beamline_mixins.py
RENAMED
|
File without changes
|
{bec_ipython_client-3.168.0 → bec_ipython_client-3.169.0}/tests/client_tests/test_bec_client.py
RENAMED
|
File without changes
|
{bec_ipython_client-3.168.0 → bec_ipython_client-3.169.0}/tests/client_tests/test_device_progress.py
RENAMED
|
File without changes
|
|
File without changes
|
{bec_ipython_client-3.168.0 → bec_ipython_client-3.169.0}/tests/client_tests/test_live_table.py
RENAMED
|
File without changes
|
{bec_ipython_client-3.168.0 → bec_ipython_client-3.169.0}/tests/client_tests/test_move_callback.py
RENAMED
|
File without changes
|
{bec_ipython_client-3.168.0 → bec_ipython_client-3.169.0}/tests/client_tests/test_pretty_table.py
RENAMED
|
File without changes
|
{bec_ipython_client-3.168.0 → bec_ipython_client-3.169.0}/tests/client_tests/test_signals.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{bec_ipython_client-3.168.0 → bec_ipython_client-3.169.0}/tests/end-2-end/test_actors_e2e.py
RENAMED
|
File without changes
|
{bec_ipython_client-3.168.0 → bec_ipython_client-3.169.0}/tests/end-2-end/test_procedures_e2e.py
RENAMED
|
File without changes
|
{bec_ipython_client-3.168.0 → bec_ipython_client-3.169.0}/tests/end-2-end/test_scans_v4_lib_e2e.py
RENAMED
|
File without changes
|