bec-widgets 0.76.1__py3-none-any.whl → 0.77.0__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.
Files changed (38) hide show
  1. CHANGELOG.md +36 -38
  2. PKG-INFO +2 -1
  3. bec_widgets/cli/client.py +73 -196
  4. bec_widgets/examples/jupyter_console/jupyter_console_window.py +25 -4
  5. bec_widgets/utils/bec_connector.py +66 -8
  6. bec_widgets/utils/colors.py +38 -0
  7. bec_widgets/utils/yaml_dialog.py +27 -3
  8. bec_widgets/widgets/console/console.py +496 -0
  9. bec_widgets/widgets/dock/dock.py +2 -2
  10. bec_widgets/widgets/dock/dock_area.py +2 -2
  11. bec_widgets/widgets/figure/figure.py +149 -195
  12. bec_widgets/widgets/figure/plots/image/image.py +62 -49
  13. bec_widgets/widgets/figure/plots/image/image_item.py +4 -3
  14. bec_widgets/widgets/figure/plots/motor_map/motor_map.py +98 -29
  15. bec_widgets/widgets/figure/plots/plot_base.py +1 -1
  16. bec_widgets/widgets/figure/plots/waveform/waveform.py +7 -8
  17. bec_widgets/widgets/figure/plots/waveform/waveform_curve.py +2 -2
  18. bec_widgets/widgets/ring_progress_bar/ring.py +3 -3
  19. bec_widgets/widgets/ring_progress_bar/ring_progress_bar.py +3 -3
  20. {bec_widgets-0.76.1.dist-info → bec_widgets-0.77.0.dist-info}/METADATA +2 -1
  21. {bec_widgets-0.76.1.dist-info → bec_widgets-0.77.0.dist-info}/RECORD +38 -37
  22. pyproject.toml +2 -1
  23. tests/end-2-end/test_bec_dock_rpc_e2e.py +16 -16
  24. tests/end-2-end/test_bec_figure_rpc_e2e.py +7 -7
  25. tests/end-2-end/test_rpc_register_e2e.py +8 -8
  26. tests/unit_tests/client_mocks.py +1 -0
  27. tests/unit_tests/test_bec_figure.py +49 -26
  28. tests/unit_tests/test_bec_motor_map.py +179 -41
  29. tests/unit_tests/test_color_validation.py +15 -0
  30. tests/unit_tests/test_device_input_base.py +1 -1
  31. tests/unit_tests/test_device_input_widgets.py +2 -0
  32. tests/unit_tests/test_motor_control.py +5 -4
  33. tests/unit_tests/test_plot_base.py +3 -3
  34. tests/unit_tests/test_waveform1d.py +18 -17
  35. tests/unit_tests/test_yaml_dialog.py +7 -7
  36. {bec_widgets-0.76.1.dist-info → bec_widgets-0.77.0.dist-info}/WHEEL +0 -0
  37. {bec_widgets-0.76.1.dist-info → bec_widgets-0.77.0.dist-info}/entry_points.txt +0 -0
  38. {bec_widgets-0.76.1.dist-info → bec_widgets-0.77.0.dist-info}/licenses/LICENSE +0 -0
@@ -2,11 +2,11 @@
2
2
  .gitlab-ci.yml,sha256=RnYDz4zKXjlqltTryprlB1s5vLXxI2-seW-Vb70NNF0,8162
3
3
  .pylintrc,sha256=OstrgmEyP0smNFBKoIN5_26-UmNZgMHnbjvAWX0UrLs,18535
4
4
  .readthedocs.yaml,sha256=aSOc277LqXcsTI6lgvm_JY80lMlr69GbPKgivua2cS0,603
5
- CHANGELOG.md,sha256=ekeMC81fhBxY6irOaVb51CGYg1cb_im8AiO4lyZHckc,6690
5
+ CHANGELOG.md,sha256=5NFzG6tfisXzHM6jj-he3x3_HPgPdKKyt1oWkUH-bMw,7010
6
6
  LICENSE,sha256=YRKe85CBRyP7UpEAWwU8_qSIyuy5-l_9C-HKg5Qm8MQ,1511
7
- PKG-INFO,sha256=-U5bxfflX9Bl1WUPGgROel3NEW1D9GQROCFx6yvARMo,1407
7
+ PKG-INFO,sha256=61Ifh7zaMqLXKnkSGQ_8azx2be2G1eA947Z7kKfuzjQ,1427
8
8
  README.md,sha256=y4jB6wvArS7N8_iTbKWnSM_oRAqLA2GqgzUR-FMh5sU,2645
9
- pyproject.toml,sha256=zhu2wjrXmnpH5r_LXscKMezya9iLtxDqoAWpmqWS8-M,2344
9
+ pyproject.toml,sha256=SlNgLZnAPXNh5bnWqZGqsG3ymviFuwjWuW2v0MgQnb4,2403
10
10
  .git_hooks/pre-commit,sha256=n3RofIZHJl8zfJJIUomcMyYGFi_rwq4CC19z0snz3FI,286
11
11
  .gitlab/issue_templates/bug_report_template.md,sha256=gAuyEwl7XlnebBrkiJ9AqffSNOywmr8vygUFWKTuQeI,386
12
12
  .gitlab/issue_templates/documentation_update_template.md,sha256=FHLdb3TS_D9aL4CYZCjyXSulbaW5mrN2CmwTaeLPbNw,860
@@ -17,7 +17,7 @@ bec_widgets/assets/bec_widgets_icon.png,sha256=K8dgGwIjalDh9PRHUsSQBqgdX7a00nM3i
17
17
  bec_widgets/assets/terminal_icon.png,sha256=bJl7Tft4Fi2uxvuXI8o14uMHnI9eAWKSU2uftXCH9ws,3889
18
18
  bec_widgets/cli/__init__.py,sha256=d0Q6Fn44e7wFfLabDOBxpcJ1DPKWlFunGYDUBmO-4hA,22
19
19
  bec_widgets/cli/auto_updates.py,sha256=DyBV3HnjMSH-cvVkYNcDiYKVf0Xut4Qy2qGQqkW47Bw,4833
20
- bec_widgets/cli/client.py,sha256=754vTVMVLkdpGa5wsH2wGP0fJW59wRubt6HOB8AG7_w,61582
20
+ bec_widgets/cli/client.py,sha256=d8G_kamgseVaro56dQKV-wEFyTzcFfzI2cMmCREJ4JA,57763
21
21
  bec_widgets/cli/client_utils.py,sha256=zq1gPW7t4n9Nsn4MLkdUeKwwl-9nUcf5UjuN8lZr9iY,12281
22
22
  bec_widgets/cli/generate_cli.py,sha256=FUMSm84ztE6UIIHs8U0Irof1i5LRu6CXW1sl-RF_UKA,5877
23
23
  bec_widgets/cli/rpc_register.py,sha256=QxXUZu5XNg00Yf5O3UHWOXg3-f_pzKjjoZYMOa-MOJc,2216
@@ -25,7 +25,7 @@ bec_widgets/cli/rpc_wigdet_handler.py,sha256=1qQOGrM8rozaWLkoxAW8DTVLv_L_DZdZgUM
25
25
  bec_widgets/cli/server.py,sha256=2EJvkQDzrDTsZjRPs7g2v_iPTspGqxzY34tRAnvjxjY,7281
26
26
  bec_widgets/examples/__init__.py,sha256=WWQ0cu7m8sA4Ehy-DWdTIqSISjaHsbxhsNmNrMnhDZU,202
27
27
  bec_widgets/examples/jupyter_console/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
28
- bec_widgets/examples/jupyter_console/jupyter_console_window.py,sha256=tyvV9ZW5QHgF7Q2AqaUPO0cdz3eldZnIlVCqwd9CkGA,4910
28
+ bec_widgets/examples/jupyter_console/jupyter_console_window.py,sha256=oOVCTY68bAn9HDFd5W_xNqQhI7Nsm7TaqYYLqLWXo2w,5520
29
29
  bec_widgets/examples/jupyter_console/jupyter_console_window.ui,sha256=2A2mNTUMZBYygz8K4qWzrcjnNqZBMVyeHm26iLZVRWI,1473
30
30
  bec_widgets/examples/motor_movement/__init__.py,sha256=LzPJkxLAxOsZCbXR-fRCPmeYobp7Yqds6tDxW4W1gSw,214
31
31
  bec_widgets/examples/motor_movement/motor_control_compilations.py,sha256=8rpA7a2xVZTDMrx7YQIj3IJew78J1gcVMkHvloS0U_Q,9055
@@ -38,11 +38,11 @@ bec_widgets/examples/plugin_example_pyside/tictactoe.py,sha256=s3rCurXloVcmMdzZi
38
38
  bec_widgets/examples/plugin_example_pyside/tictactoeplugin.py,sha256=BBt3MD8oDLUMCCY3mioJa1QRR0WQdW6DuvVmK1Taovk,1734
39
39
  bec_widgets/examples/plugin_example_pyside/tictactoetaskmenu.py,sha256=LNwplI6deUdKY6FOhUuWBanotxk9asF2G-6k7lFfA8Y,2301
40
40
  bec_widgets/utils/__init__.py,sha256=1930ji1Jj6dVuY81Wd2kYBhHYNV-2R0bN_L4o9zBj1U,533
41
- bec_widgets/utils/bec_connector.py,sha256=t59482Tu30eiQ2YNHJZFEE-wQFt4qf85OmBfPkl-3N4,7335
41
+ bec_widgets/utils/bec_connector.py,sha256=ZWaN9C2CKwqj4NIL1irxNDRyMJ1cBSkCAzb6xmxTIKw,9472
42
42
  bec_widgets/utils/bec_designer.py,sha256=Q5qhdB7Jiw768dzlJ9bNxLrCbDKw4qNmhbO-9zLTVpw,4318
43
43
  bec_widgets/utils/bec_dispatcher.py,sha256=QZjRKNrZ181yt_6nLJCfdNk5EyeaGImApNA1FWR4rqo,6186
44
44
  bec_widgets/utils/bec_table.py,sha256=nA2b8ukSeUfquFMAxGrUVOqdrzMoDYD6O_4EYbOG2zk,717
45
- bec_widgets/utils/colors.py,sha256=GYSDe0ZxsJSwxvuy-yG2BH17qlf_Sjq8dhDcyp9IhBI,8532
45
+ bec_widgets/utils/colors.py,sha256=CP_lwj757CpwdVhWSfdNEXKFCEVVVF48DizD2WJKSwI,9759
46
46
  bec_widgets/utils/container_utils.py,sha256=m3VUyAYmSWkEwApP9tBvKxPYVtc2kHw4toxIpMryJy4,1495
47
47
  bec_widgets/utils/crosshair.py,sha256=SubY4FQCI6vUKsmMYGKHR7uYdGQJ6vhoYLuC1XlKS9I,9626
48
48
  bec_widgets/utils/entry_validator.py,sha256=IqmtResXQtnmMvWVSl8IrnggqSzXLp4cSggn6WdSTpE,1298
@@ -54,7 +54,7 @@ bec_widgets/utils/thread_checker.py,sha256=rDNuA3X6KQyA7JPb67mccTg0z8YkInynLAENQ
54
54
  bec_widgets/utils/ui_loader.py,sha256=5NktcP1r1HQub7K82fW_jkj8rT2cqJQdMvDxwToLY4E,1650
55
55
  bec_widgets/utils/validator_delegate.py,sha256=Emj1WF6W8Ke1ruBWUfmHdVJpmOSPezuOt4zvQTay_44,442
56
56
  bec_widgets/utils/widget_io.py,sha256=U_02ESf9Ukz63B01AzYioNepSc6SX11nJhPPSDmL4IA,11318
57
- bec_widgets/utils/yaml_dialog.py,sha256=cMVif-39SB9WjwGH5FWBJcFs4tnfFJFs5cacydRyhy0,1853
57
+ bec_widgets/utils/yaml_dialog.py,sha256=T6UyGNGdmpXW74fa_7Nk6b99T5pp2Wvyw3AOauRc8T8,2407
58
58
  bec_widgets/utils/plugin_templates/plugin.template,sha256=JHkUvYegesW-xEhZuY4FQVGqyEMBRLaPY4JNI8Ni_vE,1182
59
59
  bec_widgets/utils/plugin_templates/register.template,sha256=XyL3OZPT_FTArLAM8tHd5qMqv2ZuAbJAZLsNNnHcagU,417
60
60
  bec_widgets/widgets/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
@@ -69,6 +69,7 @@ bec_widgets/widgets/bec_status_box/status_item.py,sha256=wPkDm0GCGNXXpy3rR_Ljaxy
69
69
  bec_widgets/widgets/buttons/__init__.py,sha256=74ucIRU6-anoqQ-zT7wbrysmxhg_3_04xGhN_kllNUI,48
70
70
  bec_widgets/widgets/buttons/stop_button/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
71
71
  bec_widgets/widgets/buttons/stop_button/stop_button.py,sha256=x4a7RvlMkHzOd05zKOGYkyTmBza7Me7jgOL9WIgA_c4,906
72
+ bec_widgets/widgets/console/console.py,sha256=EgKYlbW3NrRPoQwIr8x739sLd1IRBWkEy286VDQw0gA,17838
72
73
  bec_widgets/widgets/device_inputs/__init__.py,sha256=BcWvcSASPh6YdDu5jfC48xqI2_iBj1epUt4doYJQHEs,122
73
74
  bec_widgets/widgets/device_inputs/device_input_base.py,sha256=AP0Pgto87CKqgTuzrmFL3a7MOW9_qm1rmyiI2ZrvCOM,3839
74
75
  bec_widgets/widgets/device_inputs/device_combobox/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -84,21 +85,21 @@ bec_widgets/widgets/device_inputs/device_line_edit/device_line_edit_plugin.py,sh
84
85
  bec_widgets/widgets/device_inputs/device_line_edit/launch_device_line_edit.py,sha256=3sVZ-5Hoy1smhgBcnzO9SXHk5_oUEaWFnRfslXAW3_4,267
85
86
  bec_widgets/widgets/device_inputs/device_line_edit/register_device_line_edit.py,sha256=GXHPRe1kSkJ2NKDWQJWabI4a6Maw__niA2g5wLiheX8,520
86
87
  bec_widgets/widgets/dock/__init__.py,sha256=B7foHt02gnhM7mFksa7GJVwT7n0j_JvYDCt6wc6XR5g,61
87
- bec_widgets/widgets/dock/dock.py,sha256=lEl6ppy0v-8X5bVX7EQIYka8rAakjkZyh6ufgr7YxKs,7595
88
- bec_widgets/widgets/dock/dock_area.py,sha256=9c_tLzyBRllLfc4H5o9-4bvasWp5hWe1NWg4mupXVtU,7911
88
+ bec_widgets/widgets/dock/dock.py,sha256=joymi8NRoIuzuugUj9ccF9e1m57HwLQhhMmjaWiwTnM,7597
89
+ bec_widgets/widgets/dock/dock_area.py,sha256=WKIt61v7w2YXahfIL4nddWHPfpTpw52uphX4QCbS3q0,7913
89
90
  bec_widgets/widgets/figure/__init__.py,sha256=3hGx_KOV7QHCYAV06aNuUgKq4QIYCjUTad-DrwkUaBM,44
90
- bec_widgets/widgets/figure/figure.py,sha256=3lmx93RLrXfLp07NYcUujD-O79ATmVQUzkEyowJPOzQ,32097
91
+ bec_widgets/widgets/figure/figure.py,sha256=bxaqwrgT4FXeFXA4dACIorWZ2ydJ5ddHux8Xghjw8Jk,32048
91
92
  bec_widgets/widgets/figure/plots/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
92
- bec_widgets/widgets/figure/plots/plot_base.py,sha256=QdDMMuWwTK0f6kNN8aAPBM7jah7TpUbYrMrRTdb2EZY,10419
93
+ bec_widgets/widgets/figure/plots/plot_base.py,sha256=7kPcUfC_Ub795DfUHdnIWccqjkrRSuE0AJ53wodbg-U,10420
93
94
  bec_widgets/widgets/figure/plots/image/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
94
- bec_widgets/widgets/figure/plots/image/image.py,sha256=1tZADgGQXDrFHS9CYsHD2r9KzszjHn9f2kuNqLfuwWI,20797
95
- bec_widgets/widgets/figure/plots/image/image_item.py,sha256=Wnq6N6q4QwGHdZzZ_ibYzqoJk68FKU6WUCcYpINhZMU,10513
95
+ bec_widgets/widgets/figure/plots/image/image.py,sha256=8J-20r12FD9_Wtv-YSzJsWdq3cXipJSOyX4S66_AVSc,21337
96
+ bec_widgets/widgets/figure/plots/image/image_item.py,sha256=TyarahdWEn0jgalj5fqSAmcznXSbENkqHrrlL2GVdU4,10558
96
97
  bec_widgets/widgets/figure/plots/image/image_processor.py,sha256=GeTtWjbldy6VejMwPGQgM-o3d6bmLglCjdoktu19xfA,5262
97
98
  bec_widgets/widgets/figure/plots/motor_map/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
98
- bec_widgets/widgets/figure/plots/motor_map/motor_map.py,sha256=xFjAHXJg5AOm4XTLE0yWhsls1NnWOulIsx4aPip136k,15303
99
+ bec_widgets/widgets/figure/plots/motor_map/motor_map.py,sha256=qElK8OHDOp3Z-GV6j6Tb2BH6LCEDGFsOTq7WLtRfFB8,17697
99
100
  bec_widgets/widgets/figure/plots/waveform/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
100
- bec_widgets/widgets/figure/plots/waveform/waveform.py,sha256=j_Lb3ovxKzNKgssNTR9HJ-L4MP-SmesRcdyxIcbqnO0,29101
101
- bec_widgets/widgets/figure/plots/waveform/waveform_curve.py,sha256=mSBzqQNpLhol1_2_9k7s2b-Y0ICGU242T39md0LxTSA,8291
101
+ bec_widgets/widgets/figure/plots/waveform/waveform.py,sha256=GW8dInC7Wd4sNp6vCGYOHdhvqFrLrKJr3GmtLc-yW8c,29033
102
+ bec_widgets/widgets/figure/plots/waveform/waveform_curve.py,sha256=yQZGPKs--3X_9Qg2pv0GUiL5WLBQVC3z_PJKRnsHqPU,8293
102
103
  bec_widgets/widgets/jupyter_console/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
103
104
  bec_widgets/widgets/jupyter_console/jupyter_console.py,sha256=ioLYJL31RdBoAOGFSS8PVSnUhkWPWmLC3tiKp7CouO8,2251
104
105
  bec_widgets/widgets/motor_control/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -116,8 +117,8 @@ bec_widgets/widgets/motor_control/selection/__init__.py,sha256=47DEQpj8HBSa-_TIm
116
117
  bec_widgets/widgets/motor_control/selection/selection.py,sha256=WNHndvv4JvxeAMnDFBMTvUILcn9u_0mWGRsgNiBZEsM,3988
117
118
  bec_widgets/widgets/motor_control/selection/selection.ui,sha256=vXXpvNWuL6xyHhW7Lx1zmVFX-95Z5AXGlhKQD2HmM1A,1779
118
119
  bec_widgets/widgets/ring_progress_bar/__init__.py,sha256=_uoJKnDM2YAeUBfwc5WLbIHSJj7zm_FAurSKP3WRaCw,47
119
- bec_widgets/widgets/ring_progress_bar/ring.py,sha256=3XwvM5cymCxffOYEjaDTqfqpNLjEunHTyZCBxz0cvmc,11238
120
- bec_widgets/widgets/ring_progress_bar/ring_progress_bar.py,sha256=9TzlR4mGWnV1dPBwdkwL-GVNzG30r3oy0secm7k-gKM,24070
120
+ bec_widgets/widgets/ring_progress_bar/ring.py,sha256=19zFj-6ZrIPLXYqvs5EPcrmDWnfnSLlEOmzJffL4d3A,11241
121
+ bec_widgets/widgets/ring_progress_bar/ring_progress_bar.py,sha256=sU4Dur2XzBVfDYAYazI6pjOZOhzggoQIuc9VD3PWgac,24073
121
122
  bec_widgets/widgets/scan_control/__init__.py,sha256=IOfHl15vxb_uC6KN62-PeUzbBha_vQyqkkXbJ2HU674,38
122
123
  bec_widgets/widgets/scan_control/scan_control.py,sha256=u2fjSUiSRYTkIq9WhdfQuQV6Sv3iWWcSfCraVGro1RQ,7686
123
124
  bec_widgets/widgets/scan_control/scan_group_box.py,sha256=8XGpYcdKTEtiqOFbBxZ6xV07ZJ_tg9R-JDfsdTdqXSI,7400
@@ -180,30 +181,30 @@ docs/user/widgets/widgets.md,sha256=ZeRNmP7GUOu8kEoGu9XHsyF8Hb1foqZKEbwpgFP7ITk,
180
181
  tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
181
182
  tests/end-2-end/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
182
183
  tests/end-2-end/conftest.py,sha256=-BLnFE-NeCerf6xahGCkbZ4Ktactowi6RkBnboIzRvg,1767
183
- tests/end-2-end/test_bec_dock_rpc_e2e.py,sha256=59nrcbEB0NK7ttXdOizN9kjUaqhMImVGaf4aciT4Jcs,9099
184
- tests/end-2-end/test_bec_figure_rpc_e2e.py,sha256=QJl1-b8QRRIjnj6nd2yH0EivK6dt4gqrF0U9E4weHz4,6594
185
- tests/end-2-end/test_rpc_register_e2e.py,sha256=3dfCnSvdcRO92pzHt9WlCTK0vzTKAvPtliEoEKrtuzQ,1604
184
+ tests/end-2-end/test_bec_dock_rpc_e2e.py,sha256=uDhauuLEWg9Baf3N1KSeq6HPUWtuU6a90wnh1fNGVqM,9115
185
+ tests/end-2-end/test_bec_figure_rpc_e2e.py,sha256=mjg29huqTivLnukG_XyoMtjOy2P_7JACIhMEzahLXb8,6601
186
+ tests/end-2-end/test_rpc_register_e2e.py,sha256=blhMiW7HVHX1kGm5dg8Sv0PeCuJ0gnBz3evznQFz_B8,1619
186
187
  tests/end-2-end/test_scan_control_e2e.py,sha256=u7oLgFyltkMW2apSZKDukMIXvYrbhHrU32p4mBdn8VE,2276
187
188
  tests/unit_tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
188
- tests/unit_tests/client_mocks.py,sha256=R71MJSu8IEyxcJjaIWCPACO_wOfx2Uv_qkmFVVmv7EQ,4195
189
+ tests/unit_tests/client_mocks.py,sha256=FEb875yuDu-LGvWsyzqCSruqVV63d4TTjovvJpKcvwA,4255
189
190
  tests/unit_tests/conftest.py,sha256=KrnktXPWmZhnKNue-xGWOLD1XGEvdz9Vf7V2eO3XQ3A,596
190
191
  tests/unit_tests/test_bec_connector.py,sha256=zGDfNHwLFZTbpyX6-yc7Pwzr2jWO_HGZ8T4NFCNo4IE,2444
191
192
  tests/unit_tests/test_bec_dispatcher.py,sha256=rYPiRizHaswhGZw55IBMneDFxmPiCCLAZQBqjEkpdyY,3992
192
193
  tests/unit_tests/test_bec_dock.py,sha256=BXKXpuyIYj-l6KSyhQtM_p3kRFCRECIoXLzvkcJZDlM,3611
193
- tests/unit_tests/test_bec_figure.py,sha256=aEd2R8K6fU2ON8QvPemGWpql_LaaYLipRlvnjBY2qFA,8009
194
+ tests/unit_tests/test_bec_figure.py,sha256=8AojxszCIzMi6EYB5mVFMQjk4pjgBCSp6PH2JZsuDkw,8724
194
195
  tests/unit_tests/test_bec_image.py,sha256=mjvcrHgOF_FCj6WbUyxvZH9HL63QGA5C0PNZ5dXYn50,2541
195
- tests/unit_tests/test_bec_motor_map.py,sha256=AfD_9-x6VV3TPnkQgNfFYRndPHDsGx-a_YknFeDr6hc,4588
196
+ tests/unit_tests/test_bec_motor_map.py,sha256=dSYopbZS8lGD9cB26Kwmqw5zBoKCZs8t7DEEr50ug-g,8532
196
197
  tests/unit_tests/test_bec_queue.py,sha256=u-uc-iZeGAS8P90o6Cxy5oz_60zHpirGAu04OgQPDXw,4598
197
198
  tests/unit_tests/test_bec_status_box.py,sha256=xR8c-hXFI9gKpNGhnnC5l_nzazfvPkWkhcAfJ77hxqY,4731
198
199
  tests/unit_tests/test_client_utils.py,sha256=eViJ1Tz-HX9TkMvQH6W8cO-c3_1I8bUc4_Yen6LOc0E,830
199
- tests/unit_tests/test_color_validation.py,sha256=csdvVKAohENZIRY-JQ97Hv-TShb1erj4oKMX7QRwo78,1883
200
+ tests/unit_tests/test_color_validation.py,sha256=xbFbtFDia36XLgaNrX2IwvAX3IDC_Odpj5BGoJSgiIE,2389
200
201
  tests/unit_tests/test_crosshair.py,sha256=3OMAJ2ZaISYXMOtkXf1rPdy94vCr8njeLi6uHblBL9Q,5045
201
- tests/unit_tests/test_device_input_base.py,sha256=DiwbNzFQ8o90ELhlT103roqLNEzJ09bvlpNrOmT4lfM,2423
202
- tests/unit_tests/test_device_input_widgets.py,sha256=yQ67Xwn-T7NHAIT1XLA4DvcxQEIJYMUr9PfPnT6CAPI,5805
202
+ tests/unit_tests/test_device_input_base.py,sha256=Bf2lk_utvLsDqDX5NWgyArSAo-dWMQ72yiCPGoWVwxM,2431
203
+ tests/unit_tests/test_device_input_widgets.py,sha256=PmUL8aJXg_BYwWDE3Gh1kGm8q6fQZD5sWlVXz3KLwI0,5837
203
204
  tests/unit_tests/test_generate_cli_client.py,sha256=adcMoXjWpFLVjpauCu0r31CMMibUY1LF1MMf8rO-6rw,2815
204
205
  tests/unit_tests/test_generate_plugin.py,sha256=9603ucZChM-pYpHadzsR94U1Zec1KZT34WedX9qzgMo,4464
205
- tests/unit_tests/test_motor_control.py,sha256=NBekcGALo5mYkuyBJvBhvJkWiQDV82hI4GmsobRzjTI,20770
206
- tests/unit_tests/test_plot_base.py,sha256=Akr_JgglUCrtERtdtsMqWko_MLUYoAYRGzV2sum-YHo,3836
206
+ tests/unit_tests/test_motor_control.py,sha256=bdCjhthWEy9iNyNZiD1JAeN_PSMaOblS780XGDjVwsw,20851
207
+ tests/unit_tests/test_plot_base.py,sha256=vWbt-QO5blSoE5C1392MIFha9A9JnUsx_D_9yTqhcRo,3845
207
208
  tests/unit_tests/test_plugin_utils.py,sha256=PonKNpu4fZaFmKbI2v0tZJjZrsTvBGSF96bPHvKJvrE,608
208
209
  tests/unit_tests/test_ring_progress_bar.py,sha256=hDlqkQho7FR7HAfM4Zrr4q1m773a3_rQ8CbM1GqDDSE,12252
209
210
  tests/unit_tests/test_rpc_register.py,sha256=hECjZEimd440mwRrO0rg7L3PKN7__3DgjmESN6wx3bo,1179
@@ -213,17 +214,17 @@ tests/unit_tests/test_scan_control_group_box.py,sha256=HNqjP10B_NonikspNwKz9upJU
213
214
  tests/unit_tests/test_stop_button.py,sha256=2OH9dhs_-S5QovPPgU-5hJoViE1YKZa0gxisb4vOY28,712
214
215
  tests/unit_tests/test_text_box_widget.py,sha256=cT0uEHt_6d-FwST0A_wE9sFW9E3F_nJbKhuBAeU4yHg,1862
215
216
  tests/unit_tests/test_vscode_widget.py,sha256=NVB23ppLqIj-Opd8QnapqUJzDMz6mIZfm3wGPnFXyUE,2788
216
- tests/unit_tests/test_waveform1d.py,sha256=bADYGc7COoDnYxaAM0fX6SUASOVirlZEOnXIOlyajNw,15993
217
+ tests/unit_tests/test_waveform1d.py,sha256=inc-CyRA_3-PE99WnR6vDdfRE1vgp-ZoLVJ-Qbq0qFY,15967
217
218
  tests/unit_tests/test_website_widget.py,sha256=fBADIJJBAHU4Ro7u95kdemFVNv196UOcuO9oLHuHt8A,761
218
219
  tests/unit_tests/test_widget_io.py,sha256=FeL3ZYSBQnRt6jxj8VGYw1cmcicRQyHKleahw7XIyR0,3475
219
- tests/unit_tests/test_yaml_dialog.py,sha256=HNrqferkdg02-9ieOhhI2mr2Qvt7GrYgXmQ061YCTbg,5794
220
+ tests/unit_tests/test_yaml_dialog.py,sha256=SEvUgC_poWC6fAoHVWolaORpgMFc7c0Xqqk9cFvHSvo,5826
220
221
  tests/unit_tests/test_configs/config_device.yaml,sha256=h3zNb5ZaT_sA59Sf-24qsXs54MgUsspo-GOJmKWHx3o,695
221
222
  tests/unit_tests/test_configs/config_device_no_entry.yaml,sha256=hdvue9KLc_kfNzGPuJGpDZnRJknoF_yDNX1Fw5VYAQY,520
222
223
  tests/unit_tests/test_configs/config_scan.yaml,sha256=vo484BbWOjA_e-h6bTjSV9k7QaQHrlAvx-z8wtY-P4E,1915
223
224
  tests/unit_tests/test_msgs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
224
225
  tests/unit_tests/test_msgs/available_scans_message.py,sha256=m_z97hIrjHXXMa2Ex-UvsPmTxOYXfjxyJaGkIY6StTY,46532
225
- bec_widgets-0.76.1.dist-info/METADATA,sha256=-U5bxfflX9Bl1WUPGgROel3NEW1D9GQROCFx6yvARMo,1407
226
- bec_widgets-0.76.1.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
227
- bec_widgets-0.76.1.dist-info/entry_points.txt,sha256=3otEkCdDB9LZJuBLzG4pFLK5Di0CVybN_12IsZrQ-58,166
228
- bec_widgets-0.76.1.dist-info/licenses/LICENSE,sha256=YRKe85CBRyP7UpEAWwU8_qSIyuy5-l_9C-HKg5Qm8MQ,1511
229
- bec_widgets-0.76.1.dist-info/RECORD,,
226
+ bec_widgets-0.77.0.dist-info/METADATA,sha256=61Ifh7zaMqLXKnkSGQ_8azx2be2G1eA947Z7kKfuzjQ,1427
227
+ bec_widgets-0.77.0.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
228
+ bec_widgets-0.77.0.dist-info/entry_points.txt,sha256=3otEkCdDB9LZJuBLzG4pFLK5Di0CVybN_12IsZrQ-58,166
229
+ bec_widgets-0.77.0.dist-info/licenses/LICENSE,sha256=YRKe85CBRyP7UpEAWwU8_qSIyuy5-l_9C-HKg5Qm8MQ,1511
230
+ bec_widgets-0.77.0.dist-info/RECORD,,
pyproject.toml CHANGED
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "bec_widgets"
7
- version = "0.76.1"
7
+ version = "0.77.0"
8
8
  description = "BEC Widgets"
9
9
  requires-python = ">=3.10"
10
10
  classifiers = [
@@ -22,6 +22,7 @@ dependencies = [
22
22
  "pyqtdarktheme~=2.1",
23
23
  "qtconsole~=5.5, >=5.5.1", # needed for jupyter console
24
24
  "qtpy~=2.4",
25
+ "pyte", # needed for vt100 console
25
26
  ]
26
27
 
27
28
 
@@ -23,14 +23,14 @@ def test_rpc_add_dock_with_figure_e2e(bec_client_lib, rpc_server_dock):
23
23
  d1 = dock.add_dock("dock_1")
24
24
  d2 = dock.add_dock("dock_2")
25
25
 
26
- dock_config = dock.config_dict
26
+ dock_config = dock._config_dict
27
27
  assert len(dock_config["docks"]) == 3
28
28
  # Add 3 figures with some widgets
29
29
  fig0 = d0.add_widget("BECFigure")
30
30
  fig1 = d1.add_widget("BECFigure")
31
31
  fig2 = d2.add_widget("BECFigure")
32
32
 
33
- dock_config = dock.config_dict
33
+ dock_config = dock._config_dict
34
34
  assert len(dock_config["docks"]) == 3
35
35
  assert len(dock_config["docks"]["dock_0"]["widgets"]) == 1
36
36
  assert len(dock_config["docks"]["dock_1"]["widgets"]) == 1
@@ -52,7 +52,7 @@ def test_rpc_add_dock_with_figure_e2e(bec_client_lib, rpc_server_dock):
52
52
  assert im.__class__.__name__ == "BECImageShow"
53
53
  assert im.__class__ == BECImageShow
54
54
 
55
- assert mm.config_dict["signals"] == {
55
+ assert mm._config_dict["signals"] == {
56
56
  "dap": None,
57
57
  "source": "device_readback",
58
58
  "x": {
@@ -71,14 +71,14 @@ def test_rpc_add_dock_with_figure_e2e(bec_client_lib, rpc_server_dock):
71
71
  },
72
72
  "z": None,
73
73
  }
74
- assert plt.config_dict["curves"]["bpm4i-bpm4i"]["signals"] == {
74
+ assert plt._config_dict["curves"]["bpm4i-bpm4i"]["signals"] == {
75
75
  "dap": None,
76
76
  "source": "scan_segment",
77
77
  "x": {"name": "samx", "entry": "samx", "unit": None, "modifier": None, "limits": None},
78
78
  "y": {"name": "bpm4i", "entry": "bpm4i", "unit": None, "modifier": None, "limits": None},
79
79
  "z": None,
80
80
  }
81
- assert im.config_dict["images"]["eiger"]["monitor"] == "eiger"
81
+ assert im._config_dict["images"]["eiger"]["monitor"] == "eiger"
82
82
 
83
83
  # check initial position of motor map
84
84
  initial_pos_x = dev.samx.read()["samx"]["value"]
@@ -126,29 +126,29 @@ def test_dock_manipulations_e2e(rpc_server_dock):
126
126
  d0 = dock.add_dock("dock_0")
127
127
  d1 = dock.add_dock("dock_1")
128
128
  d2 = dock.add_dock("dock_2")
129
- dock_config = dock.config_dict
129
+ dock_config = dock._config_dict
130
130
  assert len(dock_config["docks"]) == 3
131
131
 
132
132
  d0.detach()
133
133
  dock.detach_dock("dock_2")
134
- dock_config = dock.config_dict
134
+ dock_config = dock._config_dict
135
135
  assert len(dock_config["docks"]) == 3
136
136
  assert len(dock.temp_areas) == 2
137
137
 
138
138
  d0.attach()
139
- dock_config = dock.config_dict
139
+ dock_config = dock._config_dict
140
140
  assert len(dock_config["docks"]) == 3
141
141
  assert len(dock.temp_areas) == 1
142
142
 
143
143
  d2.remove()
144
- dock_config = dock.config_dict
144
+ dock_config = dock._config_dict
145
145
  assert len(dock_config["docks"]) == 2
146
146
 
147
147
  assert ["dock_0", "dock_1"] == list(dock_config["docks"])
148
148
 
149
149
  dock.clear_all()
150
150
 
151
- dock_config = dock.config_dict
151
+ dock_config = dock._config_dict
152
152
  assert len(dock_config["docks"]) == 0
153
153
  assert len(dock.temp_areas) == 0
154
154
 
@@ -165,11 +165,11 @@ def test_ring_bar(rpc_server_dock):
165
165
  bar.set_colors_from_map("viridis")
166
166
  bar.set_value([10, 20, 30, 40, 50])
167
167
 
168
- bar_config = bar.config_dict
168
+ bar_config = bar._config_dict
169
169
 
170
170
  expected_colors = [list(color) for color in Colors.golden_angle_color("viridis", 5, "RGB")]
171
- bar_colors = [ring.config_dict["color"] for ring in bar.rings]
172
- bar_values = [ring.config_dict["value"] for ring in bar.rings]
171
+ bar_colors = [ring._config_dict["color"] for ring in bar.rings]
172
+ bar_values = [ring._config_dict["value"] for ring in bar.rings]
173
173
  assert bar_config["num_bars"] == 5
174
174
  assert bar_values == [10, 20, 30, 40, 50]
175
175
  assert bar_colors == expected_colors
@@ -191,7 +191,7 @@ def test_ring_bar_scan_update(bec_client_lib, rpc_server_dock):
191
191
  status = scans.line_scan(dev.samx, -5, 5, steps=10, exp_time=0.05, relative=False)
192
192
  status.wait()
193
193
 
194
- bar_config = bar.config_dict
194
+ bar_config = bar._config_dict
195
195
  assert bar_config["num_bars"] == 1
196
196
  assert bar_config["rings"][0]["value"] == 10
197
197
  assert bar_config["rings"][0]["min_value"] == 0
@@ -200,7 +200,7 @@ def test_ring_bar_scan_update(bec_client_lib, rpc_server_dock):
200
200
  status = scans.grid_scan(dev.samx, -5, 5, 4, dev.samy, -10, 10, 4, relative=True, exp_time=0.1)
201
201
  status.wait()
202
202
 
203
- bar_config = bar.config_dict
203
+ bar_config = bar._config_dict
204
204
  assert bar_config["num_bars"] == 1
205
205
  assert bar_config["rings"][0]["value"] == 16
206
206
  assert bar_config["rings"][0]["min_value"] == 0
@@ -217,7 +217,7 @@ def test_ring_bar_scan_update(bec_client_lib, rpc_server_dock):
217
217
  status = scans.umv(dev.samx, 5, dev.samy, 10, relative=True)
218
218
  status.wait()
219
219
 
220
- bar_config = bar.config_dict
220
+ bar_config = bar._config_dict
221
221
  assert bar_config["num_bars"] == 2
222
222
  assert bar_config["rings"][0]["value"] == final_samx
223
223
  assert bar_config["rings"][1]["value"] == final_samy
@@ -10,14 +10,14 @@ from bec_widgets.cli.client import BECFigure, BECImageShow, BECMotorMap, BECWave
10
10
  def test_rpc_waveform1d_custom_curve(rpc_server_figure):
11
11
  fig = BECFigure(rpc_server_figure)
12
12
 
13
- ax = fig.add_plot()
13
+ ax = fig.plot()
14
14
  curve = ax.plot(x=[1, 2, 3], y=[1, 2, 3])
15
15
  curve.set_color("red")
16
16
  curve = ax.curves[0]
17
17
  curve.set_color("blue")
18
18
 
19
19
  assert len(fig.widgets) == 1
20
- assert len(fig.widgets[ax.rpc_id].curves) == 1
20
+ assert len(fig.widgets[ax._rpc_id].curves) == 1
21
21
 
22
22
 
23
23
  def test_rpc_plotting_shortcuts_init_configs(rpc_server_figure, qtbot):
@@ -26,7 +26,7 @@ def test_rpc_plotting_shortcuts_init_configs(rpc_server_figure, qtbot):
26
26
  plt = fig.plot(x_name="samx", y_name="bpm4i")
27
27
  im = fig.image("eiger")
28
28
  motor_map = fig.motor_map("samx", "samy")
29
- plt_z = fig.add_plot(x_name="samx", y_name="samy", z_name="bpm4i")
29
+ plt_z = fig.plot(x_name="samx", y_name="samy", z_name="bpm4i", new=True)
30
30
 
31
31
  # Checking if classes are correctly initialised
32
32
  assert len(fig.widgets) == 4
@@ -39,7 +39,7 @@ def test_rpc_plotting_shortcuts_init_configs(rpc_server_figure, qtbot):
39
39
 
40
40
  # check if the correct devices are set
41
41
  # plot
42
- assert plt.config_dict["curves"]["bpm4i-bpm4i"]["signals"] == {
42
+ assert plt._config_dict["curves"]["bpm4i-bpm4i"]["signals"] == {
43
43
  "dap": None,
44
44
  "source": "scan_segment",
45
45
  "x": {"name": "samx", "entry": "samx", "unit": None, "modifier": None, "limits": None},
@@ -47,9 +47,9 @@ def test_rpc_plotting_shortcuts_init_configs(rpc_server_figure, qtbot):
47
47
  "z": None,
48
48
  }
49
49
  # image
50
- assert im.config_dict["images"]["eiger"]["monitor"] == "eiger"
50
+ assert im._config_dict["images"]["eiger"]["monitor"] == "eiger"
51
51
  # motor map
52
- assert motor_map.config_dict["signals"] == {
52
+ assert motor_map._config_dict["signals"] == {
53
53
  "dap": None,
54
54
  "source": "device_readback",
55
55
  "x": {
@@ -69,7 +69,7 @@ def test_rpc_plotting_shortcuts_init_configs(rpc_server_figure, qtbot):
69
69
  "z": None,
70
70
  }
71
71
  # plot with z scatter
72
- assert plt_z.config_dict["curves"]["bpm4i-bpm4i"]["signals"] == {
72
+ assert plt_z._config_dict["curves"]["bpm4i-bpm4i"]["signals"] == {
73
73
  "dap": None,
74
74
  "source": "scan_segment",
75
75
  "x": {"name": "samx", "entry": "samx", "unit": None, "modifier": None, "limits": None},
@@ -9,24 +9,24 @@ def test_rpc_register_list_connections(rpc_server_figure):
9
9
  plt = fig.plot(x_name="samx", y_name="bpm4i")
10
10
  im = fig.image("eiger")
11
11
  motor_map = fig.motor_map("samx", "samy")
12
- plt_z = fig.add_plot(x_name="samx", y_name="samy", z_name="bpm4i")
12
+ plt_z = fig.plot(x_name="samx", y_name="samy", z_name="bpm4i", new=True)
13
13
 
14
14
  # keep only class names from objects, since objects on server and client are different
15
15
  # so the best we can do is to compare types (rpc register is unit-tested elsewhere)
16
- all_connections = {obj_id: type(obj).__name__ for obj_id, obj in fig.get_all_rpc().items()}
16
+ all_connections = {obj_id: type(obj).__name__ for obj_id, obj in fig._get_all_rpc().items()}
17
17
 
18
18
  all_subwidgets_expected = {wid: type(widget).__name__ for wid, widget in fig.widgets.items()}
19
- curve_1D = fig.widgets[plt.rpc_id]
20
- curve_2D = fig.widgets[plt_z.rpc_id]
19
+ curve_1D = fig.widgets[plt._rpc_id]
20
+ curve_2D = fig.widgets[plt_z._rpc_id]
21
21
  curves_expected = {
22
- curve_1D.rpc_id: type(curve_1D).__name__,
23
- curve_2D.rpc_id: type(curve_2D).__name__,
22
+ curve_1D._rpc_id: type(curve_1D).__name__,
23
+ curve_2D._rpc_id: type(curve_2D).__name__,
24
24
  }
25
25
  curves_expected.update({curve._gui_id: type(curve).__name__ for curve in curve_1D.curves})
26
26
  curves_expected.update({curve._gui_id: type(curve).__name__ for curve in curve_2D.curves})
27
- fig_expected = {fig.rpc_id: type(fig).__name__}
27
+ fig_expected = {fig._rpc_id: type(fig).__name__}
28
28
  image_item_expected = {
29
- fig.widgets[im.rpc_id].images[0].rpc_id: type(fig.widgets[im.rpc_id].images[0]).__name__
29
+ fig.widgets[im._rpc_id].images[0]._rpc_id: type(fig.widgets[im._rpc_id].images[0]).__name__
30
30
  }
31
31
 
32
32
  all_connections_expected = {
@@ -84,6 +84,7 @@ class DMMock:
84
84
  DEVICES = [
85
85
  FakePositioner("samx", limits=[-10, 10], read_value=2.0),
86
86
  FakePositioner("samy", limits=[-5, 5], read_value=3.0),
87
+ FakePositioner("samz", limits=[-8, 8], read_value=4.0),
87
88
  FakePositioner("aptrx", limits=None, read_value=4.0),
88
89
  FakePositioner("aptry", limits=None, read_value=5.0),
89
90
  FakeDevice("gauss_bpm"),
@@ -38,9 +38,9 @@ def test_bec_figure_add_remove_plot(bec_figure):
38
38
  initial_count = len(bec_figure._widgets)
39
39
 
40
40
  # Adding 3 widgets - 2 WaveformBase and 1 PlotBase
41
- w0 = bec_figure.add_plot()
42
- w1 = bec_figure.add_plot()
43
- w2 = bec_figure.add_widget(widget_type="PlotBase")
41
+ w0 = bec_figure.plot(new=True)
42
+ w1 = bec_figure.plot(new=True)
43
+ w2 = bec_figure.add_widget(widget_type="BECPlotBase")
44
44
 
45
45
  # Check if the widgets were added
46
46
  assert len(bec_figure._widgets) == initial_count + 3
@@ -75,7 +75,7 @@ def test_add_different_types_of_widgets(bec_figure):
75
75
 
76
76
 
77
77
  def test_access_widgets_access_errors(bec_figure):
78
- bec_figure.add_plot(row=0, col=0)
78
+ bec_figure.plot(row=0, col=0)
79
79
 
80
80
  # access widget by non-existent coordinates
81
81
  with pytest.raises(ValueError) as excinfo:
@@ -97,18 +97,18 @@ def test_access_widgets_access_errors(bec_figure):
97
97
 
98
98
 
99
99
  def test_add_plot_to_occupied_position(bec_figure):
100
- bec_figure.add_plot(row=0, col=0)
100
+ bec_figure.plot(row=0, col=0)
101
101
 
102
102
  with pytest.raises(ValueError) as excinfo:
103
- bec_figure.add_plot(row=0, col=0)
103
+ bec_figure.plot(row=0, col=0, new=True)
104
104
  assert "Position at row 0 and column 0 is already occupied." in str(excinfo.value)
105
105
 
106
106
 
107
107
  def test_remove_plots(bec_figure):
108
- w1 = bec_figure.add_plot(row=0, col=0)
109
- w2 = bec_figure.add_plot(row=0, col=1)
110
- w3 = bec_figure.add_plot(row=1, col=0)
111
- w4 = bec_figure.add_plot(row=1, col=1)
108
+ w1 = bec_figure.plot(row=0, col=0)
109
+ w2 = bec_figure.plot(row=0, col=1)
110
+ w3 = bec_figure.plot(row=1, col=0)
111
+ w4 = bec_figure.plot(row=1, col=1)
112
112
 
113
113
  assert bec_figure[0, 0] == w1
114
114
  assert bec_figure[0, 1] == w2
@@ -135,10 +135,10 @@ def test_remove_plots(bec_figure):
135
135
 
136
136
 
137
137
  def test_remove_plots_by_coordinates_ints(bec_figure):
138
- w1 = bec_figure.add_plot(row=0, col=0)
139
- w2 = bec_figure.add_plot(row=0, col=1)
138
+ w1 = bec_figure.plot(row=0, col=0)
139
+ w2 = bec_figure.plot(row=0, col=1)
140
140
 
141
- bec_figure.remove(0, 0)
141
+ bec_figure.remove(row=0, col=0)
142
142
  assert w1.gui_id not in bec_figure._widgets
143
143
  assert w2.gui_id in bec_figure._widgets
144
144
  assert bec_figure[0, 0] == w2
@@ -146,8 +146,8 @@ def test_remove_plots_by_coordinates_ints(bec_figure):
146
146
 
147
147
 
148
148
  def test_remove_plots_by_coordinates_tuple(bec_figure):
149
- w1 = bec_figure.add_plot(row=0, col=0)
150
- w2 = bec_figure.add_plot(row=0, col=1)
149
+ w1 = bec_figure.plot(row=0, col=0)
150
+ w2 = bec_figure.plot(row=0, col=1)
151
151
 
152
152
  bec_figure.remove(coordinates=(0, 0))
153
153
  assert w1.gui_id not in bec_figure._widgets
@@ -157,7 +157,7 @@ def test_remove_plots_by_coordinates_tuple(bec_figure):
157
157
 
158
158
 
159
159
  def test_remove_plot_by_id_error(bec_figure):
160
- bec_figure.add_plot(row=0, col=0)
160
+ bec_figure.plot()
161
161
 
162
162
  with pytest.raises(ValueError) as excinfo:
163
163
  bec_figure.remove(widget_id="non_existent_widget")
@@ -165,7 +165,7 @@ def test_remove_plot_by_id_error(bec_figure):
165
165
 
166
166
 
167
167
  def test_remove_plot_by_coordinates_error(bec_figure):
168
- bec_figure.add_plot(row=0, col=0)
168
+ bec_figure.plot(row=0, col=0)
169
169
 
170
170
  with pytest.raises(ValueError) as excinfo:
171
171
  bec_figure.remove(0, 1)
@@ -173,7 +173,7 @@ def test_remove_plot_by_coordinates_error(bec_figure):
173
173
 
174
174
 
175
175
  def test_remove_plot_by_providing_nothing(bec_figure):
176
- bec_figure.add_plot(row=0, col=0)
176
+ bec_figure.plot(row=0, col=0)
177
177
 
178
178
  with pytest.raises(ValueError) as excinfo:
179
179
  bec_figure.remove()
@@ -193,10 +193,10 @@ def test_remove_plot_by_providing_nothing(bec_figure):
193
193
 
194
194
 
195
195
  def test_change_layout(bec_figure):
196
- w1 = bec_figure.add_plot(row=0, col=0)
197
- w2 = bec_figure.add_plot(row=0, col=1)
198
- w3 = bec_figure.add_plot(row=1, col=0)
199
- w4 = bec_figure.add_plot(row=1, col=1)
196
+ w1 = bec_figure.plot(row=0, col=0)
197
+ w2 = bec_figure.plot(row=0, col=1)
198
+ w3 = bec_figure.plot(row=1, col=0)
199
+ w4 = bec_figure.plot(row=1, col=1)
200
200
 
201
201
  bec_figure.change_layout(max_columns=1)
202
202
 
@@ -216,10 +216,10 @@ def test_change_layout(bec_figure):
216
216
 
217
217
 
218
218
  def test_clear_all(bec_figure):
219
- bec_figure.add_plot(row=0, col=0)
220
- bec_figure.add_plot(row=0, col=1)
221
- bec_figure.add_plot(row=1, col=0)
222
- bec_figure.add_plot(row=1, col=1)
219
+ bec_figure.plot(row=0, col=0)
220
+ bec_figure.plot(row=0, col=1)
221
+ bec_figure.plot(row=1, col=0)
222
+ bec_figure.plot(row=1, col=1)
223
223
 
224
224
  bec_figure.clear_all()
225
225
 
@@ -238,3 +238,26 @@ def test_shortcuts(bec_figure):
238
238
  assert im.__class__ == BECImageShow
239
239
  assert motor_map.config.widget_class == "BECMotorMap"
240
240
  assert motor_map.__class__ == BECMotorMap
241
+
242
+
243
+ def test_plot_access_factory(bec_figure):
244
+ plt_00 = bec_figure.plot(x_name="samx", y_name="bpm4i")
245
+ plt_01 = bec_figure.plot(x_name="samx", y_name="bpm4i", row=0, col=1)
246
+ plt_10 = bec_figure.plot(new=True)
247
+
248
+ assert bec_figure.widget_list[0] == plt_00
249
+ assert bec_figure.widget_list[1] == plt_01
250
+ assert bec_figure.widget_list[2] == plt_10
251
+ assert bec_figure.axes(row=0, col=0) == plt_00
252
+ assert bec_figure.axes(row=0, col=1) == plt_01
253
+ assert bec_figure.axes(row=1, col=0) == plt_10
254
+
255
+ assert len(plt_00.curves) == 1
256
+ assert len(plt_01.curves) == 1
257
+ assert len(plt_10.curves) == 0
258
+
259
+ # update plt_00
260
+ bec_figure.plot(x_name="samx", y_name="bpm3a")
261
+ bec_figure.plot(x=[1, 2, 3], y=[1, 2, 3], row=0, col=0)
262
+
263
+ assert len(plt_00.curves) == 3