bec-ipython-client 3.64.5__py3-none-any.whl → 3.89.3__py3-none-any.whl
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.
Potentially problematic release.
This version of bec-ipython-client might be problematic. Click here for more details.
- .gitignore +3 -0
- PKG-INFO +2 -2
- bec_ipython_client/callbacks/device_progress.py +11 -6
- bec_ipython_client/callbacks/ipython_live_updates.py +49 -19
- bec_ipython_client/callbacks/live_table.py +36 -9
- bec_ipython_client/callbacks/move_device.py +121 -59
- bec_ipython_client/callbacks/utils.py +5 -23
- bec_ipython_client/main.py +83 -14
- bec_ipython_client/signals.py +9 -3
- {bec_ipython_client-3.64.5.dist-info → bec_ipython_client-3.89.3.dist-info}/METADATA +2 -2
- bec_ipython_client-3.89.3.dist-info/RECORD +44 -0
- {bec_ipython_client-3.64.5.dist-info → bec_ipython_client-3.89.3.dist-info}/WHEEL +1 -1
- demo.py +2 -1
- pyproject.toml +2 -2
- tests/client_tests/conftest.py +19 -0
- tests/client_tests/test_bec_client.py +32 -1
- tests/client_tests/test_ipython_live_updates.py +259 -68
- tests/client_tests/test_live_table.py +33 -12
- tests/client_tests/test_move_callback.py +112 -70
- tests/end-2-end/_ensure_requirements_container.py +5 -5
- tests/end-2-end/test_procedures_e2e.py +36 -26
- tests/end-2-end/test_scans_e2e.py +62 -13
- tests/end-2-end/test_scans_lib_e2e.py +23 -19
- bec_ipython_client-3.64.5.dist-info/RECORD +0 -43
- {bec_ipython_client-3.64.5.dist-info → bec_ipython_client-3.89.3.dist-info}/entry_points.txt +0 -0
|
@@ -108,12 +108,10 @@ def test_config_updates(bec_client_lib):
|
|
|
108
108
|
assert dev.rt_controller.limits == [-50, 50]
|
|
109
109
|
|
|
110
110
|
dev.rt_controller.velocity.set(10).wait()
|
|
111
|
+
assert dev.rt_controller.velocity.read(cached=True)["rt_controller_velocity"]["value"] == 10
|
|
111
112
|
assert dev.rt_controller.velocity.read()["rt_controller_velocity"]["value"] == 10
|
|
112
|
-
assert dev.rt_controller.velocity.read(cached=False)["rt_controller_velocity"]["value"] == 10
|
|
113
113
|
assert dev.rt_controller.read_configuration()["rt_controller_velocity"]["value"] == 10
|
|
114
|
-
assert (
|
|
115
|
-
dev.rt_controller.read_configuration(cached=False)["rt_controller_velocity"]["value"] == 10
|
|
116
|
-
)
|
|
114
|
+
assert dev.rt_controller.read_configuration()["rt_controller_velocity"]["value"] == 10
|
|
117
115
|
|
|
118
116
|
dev.rt_controller.velocity.put(5)
|
|
119
117
|
assert dev.rt_controller.velocity.get() == 5
|
|
@@ -324,7 +322,9 @@ def test_config_reload(
|
|
|
324
322
|
num_devices = len(bec.device_manager.devices)
|
|
325
323
|
if raises_error:
|
|
326
324
|
with pytest.raises(DeviceConfigError):
|
|
327
|
-
bec.config.update_session_with_file(
|
|
325
|
+
bec.config.update_session_with_file(
|
|
326
|
+
runtime_config_file_path, force=True, validate=False
|
|
327
|
+
)
|
|
328
328
|
if deletes_config:
|
|
329
329
|
assert len(bec.device_manager.devices) == 0
|
|
330
330
|
elif disabled_device:
|
|
@@ -332,7 +332,7 @@ def test_config_reload(
|
|
|
332
332
|
else:
|
|
333
333
|
assert len(bec.device_manager.devices) == num_devices
|
|
334
334
|
else:
|
|
335
|
-
bec.config.update_session_with_file(runtime_config_file_path)
|
|
335
|
+
bec.config.update_session_with_file(runtime_config_file_path, force=True, validate=False)
|
|
336
336
|
assert len(bec.device_manager.devices) == 2
|
|
337
337
|
for dev in disabled_device:
|
|
338
338
|
assert bec.device_manager.devices[dev].enabled is False
|
|
@@ -377,7 +377,7 @@ def test_config_reload_with_describe_failure(bec_test_config_file_path, bec_clie
|
|
|
377
377
|
f.write(yaml.dump(config))
|
|
378
378
|
|
|
379
379
|
with pytest.raises(DeviceConfigError):
|
|
380
|
-
bec.config.update_session_with_file(runtime_config_file_path)
|
|
380
|
+
bec.config.update_session_with_file(runtime_config_file_path, force=True, validate=False)
|
|
381
381
|
|
|
382
382
|
assert len(bec.device_manager.devices) == 2
|
|
383
383
|
assert bec.device_manager.devices["eyefoc"].enabled is True
|
|
@@ -388,7 +388,7 @@ def test_config_reload_with_describe_failure(bec_test_config_file_path, bec_clie
|
|
|
388
388
|
f"e2e_test_hexapod_fail", messages.DeviceStatusMessage(device="hexapod", status=0)
|
|
389
389
|
)
|
|
390
390
|
|
|
391
|
-
bec.config.update_session_with_file(runtime_config_file_path)
|
|
391
|
+
bec.config.update_session_with_file(runtime_config_file_path, force=True)
|
|
392
392
|
assert len(bec.device_manager.devices) == 2
|
|
393
393
|
assert bec.device_manager.devices["eyefoc"].enabled is True
|
|
394
394
|
assert bec.device_manager.devices["hexapod"].enabled is True
|
|
@@ -414,13 +414,13 @@ def test_config_add_remove_device(bec_client_lib):
|
|
|
414
414
|
"readOnly": False,
|
|
415
415
|
}
|
|
416
416
|
}
|
|
417
|
-
bec.
|
|
417
|
+
bec.device_manager.config_helper.send_config_request(action="add", config=config)
|
|
418
418
|
with pytest.raises(DeviceConfigError) as config_error:
|
|
419
|
-
bec.
|
|
419
|
+
bec.device_manager.config_helper.send_config_request(action="add", config=config)
|
|
420
420
|
assert config_error.match("Device new_device already exists")
|
|
421
421
|
assert "new_device" in dev
|
|
422
422
|
|
|
423
|
-
bec.
|
|
423
|
+
bec.device_manager.config_helper.send_config_request(action="remove", config={"new_device": {}})
|
|
424
424
|
assert "new_device" not in dev
|
|
425
425
|
|
|
426
426
|
device_config_msg = bec.connector.get(MessageEndpoints.device_config())
|
|
@@ -431,7 +431,7 @@ def test_config_add_remove_device(bec_client_lib):
|
|
|
431
431
|
|
|
432
432
|
config["new_device"]["deviceClass"] = "ophyd_devices.doesnt_exist"
|
|
433
433
|
with pytest.raises(DeviceConfigError) as config_error:
|
|
434
|
-
bec.
|
|
434
|
+
bec.device_manager.config_helper.send_config_request(action="add", config=config)
|
|
435
435
|
assert config_error.match("module 'ophyd_devices' has no attribute 'doesnt_exist'")
|
|
436
436
|
assert "new_device" not in dev
|
|
437
437
|
assert "samx" in dev
|
|
@@ -454,7 +454,7 @@ def test_computed_signal(bec_client_lib):
|
|
|
454
454
|
dev.pseudo_signal1.set_compute_method(compute_signal1)
|
|
455
455
|
dev.pseudo_signal1.set_input_signals()
|
|
456
456
|
|
|
457
|
-
assert dev.pseudo_signal1.read(
|
|
457
|
+
assert dev.pseudo_signal1.read()["pseudo_signal1"]["value"] == 5
|
|
458
458
|
|
|
459
459
|
|
|
460
460
|
def test_cached_device_readout(bec_client_lib):
|
|
@@ -463,26 +463,30 @@ def test_cached_device_readout(bec_client_lib):
|
|
|
463
463
|
dev = bec.device_manager.devices
|
|
464
464
|
|
|
465
465
|
dev.samx.setpoint.put(5)
|
|
466
|
-
data = dev.samx.setpoint.get()
|
|
466
|
+
data = dev.samx.setpoint.get(cached=True)
|
|
467
467
|
assert data == 5
|
|
468
468
|
|
|
469
|
-
orig_velocity = dev.samx.velocity.get()
|
|
469
|
+
orig_velocity = dev.samx.velocity.get(cached=True)
|
|
470
470
|
dev.samx.velocity.put(10)
|
|
471
|
-
data = dev.samx.velocity.get()
|
|
471
|
+
data = dev.samx.velocity.get(cached=True)
|
|
472
472
|
assert data == 10
|
|
473
473
|
|
|
474
|
-
config = dev.samx.read_configuration()
|
|
474
|
+
config = dev.samx.read_configuration(cached=True)
|
|
475
475
|
assert config["samx_velocity"]["value"] == 10
|
|
476
476
|
|
|
477
|
+
dev.samx.velocity.set(20).wait()
|
|
478
|
+
data = dev.samx.velocity.get(cached=True)
|
|
479
|
+
assert data == 20
|
|
480
|
+
|
|
477
481
|
dev.samx.velocity.put(orig_velocity)
|
|
478
482
|
|
|
479
|
-
data = dev.hexapod.x.readback.read(
|
|
483
|
+
data = dev.hexapod.x.readback.read()
|
|
480
484
|
timestamp = data["hexapod_x"]["timestamp"]
|
|
481
485
|
data = dev.hexapod.x.readback.read(cached=True)
|
|
482
486
|
assert data["hexapod_x"]["timestamp"] == timestamp
|
|
483
487
|
|
|
484
488
|
# check that .get also updates the cache
|
|
485
|
-
dev.hexapod.x.readback.get(
|
|
489
|
+
dev.hexapod.x.readback.get()
|
|
486
490
|
timestamp_2 = dev.hexapod.x.readback.read(cached=True)["hexapod_x"]["timestamp"]
|
|
487
491
|
assert timestamp_2 != timestamp
|
|
488
492
|
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
.gitignore,sha256=UmJ0gTRAPp4EI1A6tb9Pi-k5uxDIb_NWJU9ye6AW-8Y,3306
|
|
2
|
-
PKG-INFO,sha256=qo7r0HIpMzJq-U5WmKnd8rO1XA4dUKt3MBlDckt3TXE,1052
|
|
3
|
-
demo.py,sha256=TE-niyXPUEAP-GaL-QRBPgnaxfXqBmTsBiKUxl3F_VQ,7053
|
|
4
|
-
pyproject.toml,sha256=7g-FvI5o2d2B6seUrSny-xZRM1amSbTBXleb1aQiCHo,1229
|
|
5
|
-
bec_ipython_client/__init__.py,sha256=ihd_V8I7Qo0MWKMo7bcvPf-ZyUQqkcNf8IAWLJKiFJE,79
|
|
6
|
-
bec_ipython_client/beamline_mixin.py,sha256=scMWIFbHJajyECzbwEVKyQUGjpqA9C_KiU2M6FuRH_Q,1067
|
|
7
|
-
bec_ipython_client/bec_magics.py,sha256=Rz2aXkUCeAV_VxdXqLUNHh8T44kSH9ha83OiEtdptzI,2792
|
|
8
|
-
bec_ipython_client/bec_startup.py,sha256=GGlHyxnSCQfYF5n-pYq2ic0pSyW5zvnT2PAlI5kY77w,1930
|
|
9
|
-
bec_ipython_client/main.py,sha256=gD6RwT8y6bWxCV5RS1SlixfU7c477VxAEvrgLa0FWhE,11047
|
|
10
|
-
bec_ipython_client/prettytable.py,sha256=TnhGPGuU0XEvnIYJ1UfTEwadcowFW4rqJW8z_Sm0EDw,2534
|
|
11
|
-
bec_ipython_client/progressbar.py,sha256=aDKYjzXmGSwa82ewm59V8WSuqVQz9GiZPx5G65fEwpk,11090
|
|
12
|
-
bec_ipython_client/signals.py,sha256=mbThPo6h3mQ6RFRm9viETDMC_unFa7QxiymCdM_ZK7U,4194
|
|
13
|
-
bec_ipython_client/callbacks/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
14
|
-
bec_ipython_client/callbacks/device_progress.py,sha256=y3GFSlCD-etOIrLJkX2ozxEyCNRMaRAaTdZmN8xOcjk,2385
|
|
15
|
-
bec_ipython_client/callbacks/ipython_live_updates.py,sha256=2giQImMMaqRKnD7PW1xrDPmrxi-qy8MHdY_daWtJe-g,10290
|
|
16
|
-
bec_ipython_client/callbacks/live_table.py,sha256=DifTdAsPUqiursmcHd49-UhBxqGhPpjbXCUP3LeIXKY,13209
|
|
17
|
-
bec_ipython_client/callbacks/move_device.py,sha256=FXCztPGqKNmaSKs9Q13y7syZJs57IZo4mJH6GTOIbOU,5863
|
|
18
|
-
bec_ipython_client/callbacks/utils.py,sha256=AEEzsfD9S2ZMuJA4yAxy9gMa1iPMCxQ3zr7ZDO01bHE,5702
|
|
19
|
-
bec_ipython_client/high_level_interfaces/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
20
|
-
bec_ipython_client/high_level_interfaces/bec_hli.py,sha256=G1eF-lbLEDuN2mr_AYSxhhGb4LT6P72g0a4sU9M9zgk,1221
|
|
21
|
-
bec_ipython_client/high_level_interfaces/spec_hli.py,sha256=z7WtjiC4LtMfKJn12SbguHPCLqbAsZNfUDyiUW0LOiU,5818
|
|
22
|
-
bec_ipython_client/plugins/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
23
|
-
bec_ipython_client/plugins/SLS/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
24
|
-
bec_ipython_client/plugins/SLS/sls_info.py,sha256=93GU_XNRDsCO0ZvUrCf_SWnUMJ1FlRTJSuXXh_bYJ30,4934
|
|
25
|
-
bec_ipython_client/plugins/XTreme/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
26
|
-
bec_ipython_client/plugins/XTreme/x-treme.py,sha256=ZKI_EEPYyWW-sdrK9DIllb81aeObc1O3fU1eWqipjTQ,3631
|
|
27
|
-
bec_ipython_client/plugins/flomni/flomni_config.yaml,sha256=bCN1VKCzF6tw24HYeUE2b81kXMXzhEd69Ea8_q8Ywfk,6184
|
|
28
|
-
tests/conftest.py,sha256=4yzGYqs8EVOxxY9Bu-yGbzmOpzG9dxs3cwSCzjmRziQ,233
|
|
29
|
-
tests/client_tests/test_beamline_mixins.py,sha256=8Ws0bmzl2gSW0VuOVu80_JbYNb5Y-htchmrrptwjwDo,4611
|
|
30
|
-
tests/client_tests/test_bec_client.py,sha256=JF7k0UiLRaBLW_vk_dGBLVQDyngIWxY79hbRK0t21Dw,7717
|
|
31
|
-
tests/client_tests/test_device_progress.py,sha256=GEw2g8MQZnv5mxABEZlxBmaMpxVS33wogaYohFolDEs,2353
|
|
32
|
-
tests/client_tests/test_ipython_live_updates.py,sha256=HpA16Mx0WdseqlfP0FojlAd6VfvjnwAUReDkItZVYWs,6081
|
|
33
|
-
tests/client_tests/test_live_table.py,sha256=Ll7h0eKSRmMxV-hvrUC9qDA49sDE9zi_w7AleOE4TmU,17576
|
|
34
|
-
tests/client_tests/test_move_callback.py,sha256=e5c14pa9tUsMPgNhI9m7vrml5TKEAmMAQKLuiZPftDw,7026
|
|
35
|
-
tests/client_tests/test_pretty_table.py,sha256=uQ-KPb3RXoCFE_t1IrpkT6kZAoqW7pFXxbFc445sX0Y,469
|
|
36
|
-
tests/end-2-end/_ensure_requirements_container.py,sha256=iAcTHqudgJMh7yS9kmfN1bqfqUgvj6ZG-LyuJVIfgFE,722
|
|
37
|
-
tests/end-2-end/test_procedures_e2e.py,sha256=3CPzjW3VpsSU8GKVP814SSvLZ0c7bBtPB_VtX725TCY,4737
|
|
38
|
-
tests/end-2-end/test_scans_e2e.py,sha256=CxlXjQrzDJebaoZObt_oYx41wbnHLuJLSjKlno4u2B4,30981
|
|
39
|
-
tests/end-2-end/test_scans_lib_e2e.py,sha256=9_ofsT1soChV9DZ72hoUb9hAIHqZouvjPg11sh5a6lo,19128
|
|
40
|
-
bec_ipython_client-3.64.5.dist-info/METADATA,sha256=qo7r0HIpMzJq-U5WmKnd8rO1XA4dUKt3MBlDckt3TXE,1052
|
|
41
|
-
bec_ipython_client-3.64.5.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
42
|
-
bec_ipython_client-3.64.5.dist-info/entry_points.txt,sha256=oQUXYY0jjD9ZvKPHwaGn2wkUIWpDZM8L4ixDA3RlBWE,53
|
|
43
|
-
bec_ipython_client-3.64.5.dist-info/RECORD,,
|
{bec_ipython_client-3.64.5.dist-info → bec_ipython_client-3.89.3.dist-info}/entry_points.txt
RENAMED
|
File without changes
|