bec-widgets 0.82.1__py3-none-any.whl → 0.83.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.
- .gitlab-ci.yml +3 -0
- CHANGELOG.md +32 -34
- PKG-INFO +1 -1
- bec_widgets/cli/client_utils.py +5 -2
- bec_widgets/cli/server.py +24 -10
- bec_widgets/utils/bec_connector.py +2 -0
- bec_widgets/utils/bec_widget.py +6 -0
- bec_widgets/utils/generate_designer_plugin.py +6 -5
- bec_widgets/utils/reference_utils.py +92 -0
- bec_widgets/widgets/console/console.py +1 -1
- bec_widgets/widgets/device_box/__init__.py +0 -0
- bec_widgets/widgets/device_box/device_box.py +197 -0
- bec_widgets/widgets/device_box/device_box.pyproject +1 -0
- bec_widgets/widgets/device_box/device_box.ui +179 -0
- bec_widgets/widgets/device_box/device_box_plugin.py +54 -0
- bec_widgets/widgets/device_box/register_device_box.py +15 -0
- bec_widgets/widgets/figure/figure.py +3 -3
- bec_widgets/widgets/position_indicator/position_indicator.py +71 -0
- bec_widgets/widgets/position_indicator/position_indicator.pyproject +1 -0
- bec_widgets/widgets/position_indicator/position_indicator_plugin.py +54 -0
- bec_widgets/widgets/position_indicator/register_position_indicator.py +17 -0
- bec_widgets/widgets/spinner/__init__.py +0 -0
- bec_widgets/widgets/spinner/register_spinner_widget.py +15 -0
- bec_widgets/widgets/spinner/spinner.py +85 -0
- bec_widgets/widgets/spinner/spinner_widget.pyproject +1 -0
- bec_widgets/widgets/spinner/spinner_widget_plugin.py +54 -0
- bec_widgets/widgets/vscode/vscode.py +0 -14
- bec_widgets/widgets/website/website.py +1 -1
- {bec_widgets-0.82.1.dist-info → bec_widgets-0.83.0.dist-info}/METADATA +1 -1
- {bec_widgets-0.82.1.dist-info → bec_widgets-0.83.0.dist-info}/RECORD +44 -21
- pyproject.toml +1 -1
- tests/references/SpinnerWidget/SpinnerWidget_darwin.png +0 -0
- tests/references/SpinnerWidget/SpinnerWidget_linux.png +0 -0
- tests/references/SpinnerWidget/SpinnerWidget_started_darwin.png +0 -0
- tests/references/SpinnerWidget/SpinnerWidget_started_linux.png +0 -0
- tests/unit_tests/client_mocks.py +9 -1
- tests/unit_tests/test_client_utils.py +47 -0
- tests/unit_tests/test_device_box.py +98 -0
- tests/unit_tests/test_rpc_server.py +42 -0
- tests/unit_tests/test_spinner.py +30 -0
- tests/unit_tests/test_vscode_widget.py +27 -32
- {bec_widgets-0.82.1.dist-info → bec_widgets-0.83.0.dist-info}/WHEEL +0 -0
- {bec_widgets-0.82.1.dist-info → bec_widgets-0.83.0.dist-info}/entry_points.txt +0 -0
- {bec_widgets-0.82.1.dist-info → bec_widgets-0.83.0.dist-info}/licenses/LICENSE +0 -0
@@ -1,12 +1,12 @@
|
|
1
1
|
.gitignore,sha256=cMQ1MLmnoR88aMCCJwUyfoTnufzl4-ckmHtlFUqHcT4,3253
|
2
|
-
.gitlab-ci.yml,sha256=
|
2
|
+
.gitlab-ci.yml,sha256=zvb4A6QI5lQTsdfI5nPPL-tUNfcrz__SQjxW03QZ5Ek,8204
|
3
3
|
.pylintrc,sha256=eeY8YwSI74oFfq6IYIbCqnx3Vk8ZncKaatv96n_Y8Rs,18544
|
4
4
|
.readthedocs.yaml,sha256=aSOc277LqXcsTI6lgvm_JY80lMlr69GbPKgivua2cS0,603
|
5
|
-
CHANGELOG.md,sha256=
|
5
|
+
CHANGELOG.md,sha256=yrNwpjAjIHr7MeZHZe2O0EkihwIB__p1ZrFzl16iUqI,6680
|
6
6
|
LICENSE,sha256=YRKe85CBRyP7UpEAWwU8_qSIyuy5-l_9C-HKg5Qm8MQ,1511
|
7
|
-
PKG-INFO,sha256=
|
7
|
+
PKG-INFO,sha256=xSeHtjGGoakyD7GAov5Syu1U4lMGeuIPyORPJeEfz9o,1309
|
8
8
|
README.md,sha256=Od69x-RS85Hph0-WwWACwal4yUd67XkEn4APEfHhHFw,2649
|
9
|
-
pyproject.toml,sha256=
|
9
|
+
pyproject.toml,sha256=t0CTeL_fv-YSLp6OaG1DgQdwsSFZrYKnIzs9jFl-mNk,2358
|
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
|
@@ -18,11 +18,11 @@ bec_widgets/assets/terminal_icon.png,sha256=bJl7Tft4Fi2uxvuXI8o14uMHnI9eAWKSU2uf
|
|
18
18
|
bec_widgets/cli/__init__.py,sha256=d0Q6Fn44e7wFfLabDOBxpcJ1DPKWlFunGYDUBmO-4hA,22
|
19
19
|
bec_widgets/cli/auto_updates.py,sha256=DyBV3HnjMSH-cvVkYNcDiYKVf0Xut4Qy2qGQqkW47Bw,4833
|
20
20
|
bec_widgets/cli/client.py,sha256=MMDy1edr1j9klgVGZZmD1dzLxi74gp75Jf4FNed9al8,60084
|
21
|
-
bec_widgets/cli/client_utils.py,sha256=
|
21
|
+
bec_widgets/cli/client_utils.py,sha256=cDhabblwaP88a0jlVpbn_RWWKVbsyjhmmGtMh9gesEw,12388
|
22
22
|
bec_widgets/cli/generate_cli.py,sha256=Ea5px9KblUlcGg-1JbJBTIU7laGg2n8PM7Efw9WVVzM,5889
|
23
23
|
bec_widgets/cli/rpc_register.py,sha256=QxXUZu5XNg00Yf5O3UHWOXg3-f_pzKjjoZYMOa-MOJc,2216
|
24
24
|
bec_widgets/cli/rpc_wigdet_handler.py,sha256=6kQng2DyS6rhLJqSJ7xa0kdgSxp-35A2upcf833dJRE,1483
|
25
|
-
bec_widgets/cli/server.py,sha256=
|
25
|
+
bec_widgets/cli/server.py,sha256=FZkqsjUHIkCUFMKUFm7ls_eslXvhIFzLpINEYxeWP5s,7722
|
26
26
|
bec_widgets/examples/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
27
27
|
bec_widgets/examples/jupyter_console/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
28
28
|
bec_widgets/examples/jupyter_console/jupyter_console_window.py,sha256=oOVCTY68bAn9HDFd5W_xNqQhI7Nsm7TaqYYLqLWXo2w,5520
|
@@ -38,18 +38,19 @@ bec_widgets/qt_utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hS
|
|
38
38
|
bec_widgets/qt_utils/settings_dialog.py,sha256=rR_Zk4RGTnI4dz5OEzCc13lVpxlOKuwOf4_7wqXSbRw,3373
|
39
39
|
bec_widgets/qt_utils/toolbar.py,sha256=r6H4A8_3s2AItmdV8JS9UMSM4hV8Fx_162grYL2Pwzw,2111
|
40
40
|
bec_widgets/utils/__init__.py,sha256=1930ji1Jj6dVuY81Wd2kYBhHYNV-2R0bN_L4o9zBj1U,533
|
41
|
-
bec_widgets/utils/bec_connector.py,sha256=
|
41
|
+
bec_widgets/utils/bec_connector.py,sha256=NypWbIrqb2ls3SIpflM6KihidV9fkroiJu2tQk6KwOA,9604
|
42
42
|
bec_widgets/utils/bec_designer.py,sha256=ak3G8FdojUPjVBBwdPXw7tN5P2Uxr-SSoQt394jXeAA,4308
|
43
43
|
bec_widgets/utils/bec_dispatcher.py,sha256=dghOw63Ql6rQ-zH1ZaYU6kT9Dg5kNDcZwEdu2YPBJeU,6150
|
44
44
|
bec_widgets/utils/bec_table.py,sha256=nA2b8ukSeUfquFMAxGrUVOqdrzMoDYD6O_4EYbOG2zk,717
|
45
|
-
bec_widgets/utils/bec_widget.py,sha256=
|
45
|
+
bec_widgets/utils/bec_widget.py,sha256=eC7jhCqyABDf_wGbM6cCdtSF4__rpnVs2Ir1XzGHrCs,238
|
46
46
|
bec_widgets/utils/colors.py,sha256=CP_lwj757CpwdVhWSfdNEXKFCEVVVF48DizD2WJKSwI,9759
|
47
47
|
bec_widgets/utils/container_utils.py,sha256=m3VUyAYmSWkEwApP9tBvKxPYVtc2kHw4toxIpMryJy4,1495
|
48
48
|
bec_widgets/utils/crosshair.py,sha256=SubY4FQCI6vUKsmMYGKHR7uYdGQJ6vhoYLuC1XlKS9I,9626
|
49
49
|
bec_widgets/utils/entry_validator.py,sha256=3skJIsUwTYicT76AMHm_M78RiWtUgyD2zb-Rxo2HdHQ,1313
|
50
|
-
bec_widgets/utils/generate_designer_plugin.py,sha256=
|
50
|
+
bec_widgets/utils/generate_designer_plugin.py,sha256=JlkJo0Iu5dA_7HQ0silT8kLnYHhKZ8fKUFeysm1k0l0,5878
|
51
51
|
bec_widgets/utils/layout_manager.py,sha256=H0nKsIMaPxRkof1MEXlSmW6w1dFxA6astaGzf4stI84,4727
|
52
52
|
bec_widgets/utils/plugin_utils.py,sha256=njvVdvF-AR47Yn80ntpvFldEvLuFx9GV-qEX4p_n4AI,5263
|
53
|
+
bec_widgets/utils/reference_utils.py,sha256=8pq06TOvZBZdim0G6hvPJXzVDib7ve4o-Ptvfp563nk,2859
|
53
54
|
bec_widgets/utils/rpc_decorator.py,sha256=pIvtqySQLnuS7l2Ti_UAe4WX7CRivZnsE5ZdKAihxh0,479
|
54
55
|
bec_widgets/utils/thread_checker.py,sha256=rDNuA3X6KQyA7JPb67mccTg0z8YkInynLAENQDQpbuE,1607
|
55
56
|
bec_widgets/utils/ui_loader.py,sha256=9C4DkMIM8PEGXs2LmbZMyLVt38EIO9-T9C2UnK2SAvE,4882
|
@@ -78,7 +79,13 @@ bec_widgets/widgets/color_button/color_button.pyproject,sha256=LUYF4VkDOB4ttVe7Y
|
|
78
79
|
bec_widgets/widgets/color_button/color_button_plugin.py,sha256=CvO3L6r8pBd-0DNuqjQ7uKF9u1mU6xFs23sS_dsj4tw,1256
|
79
80
|
bec_widgets/widgets/color_button/register_color_button.py,sha256=ZAx3t7G2VI2S-1qcEof31Xi9O0X8deLeZNgS651L1JI,475
|
80
81
|
bec_widgets/widgets/color_button/assets/color_button.png,sha256=dkjgGHSdxu98nM68O16fGpxBjxkkeLN8iu9M_8i5-NY,5618
|
81
|
-
bec_widgets/widgets/console/console.py,sha256=
|
82
|
+
bec_widgets/widgets/console/console.py,sha256=IW1OerycmS-cm8CKGFig44Qye8mxsmVcKvLHAc3lXco,17845
|
83
|
+
bec_widgets/widgets/device_box/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
84
|
+
bec_widgets/widgets/device_box/device_box.py,sha256=c-g31zzO4XuQgcR2qnZiRRYllYIMWtx1lGZXYRSxGiI,6922
|
85
|
+
bec_widgets/widgets/device_box/device_box.pyproject,sha256=jtwvhaySJRdnuV99mEZT3htmWKVLphFeetEW4al7s-o,28
|
86
|
+
bec_widgets/widgets/device_box/device_box.ui,sha256=z7j60J4ZKYjH9eyHl6FnZ_Z8lkdq1LQftxveSZQ6g_w,4865
|
87
|
+
bec_widgets/widgets/device_box/device_box_plugin.py,sha256=n7l3OIKqtQGsL86ygDekb0wb4bBySJXMUo58eTtKIdQ,1212
|
88
|
+
bec_widgets/widgets/device_box/register_device_box.py,sha256=K7Hx4FIQDXasejaw6njwkFkkkwk63Smm6pHoOEdLWPw,467
|
82
89
|
bec_widgets/widgets/device_combobox/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
83
90
|
bec_widgets/widgets/device_combobox/device_combobox.py,sha256=L6hPOk3LkTy9U_HRdU7bvqCH1L1Y_BuPYTTfl1eqShg,2824
|
84
91
|
bec_widgets/widgets/device_combobox/device_combobox.pyproject,sha256=wI2eXR5ky_IM9-BCHJnH_9CEqYcZwIuLcgitSEr8OJU,40
|
@@ -95,7 +102,7 @@ bec_widgets/widgets/dock/__init__.py,sha256=B7foHt02gnhM7mFksa7GJVwT7n0j_JvYDCt6
|
|
95
102
|
bec_widgets/widgets/dock/dock.py,sha256=joymi8NRoIuzuugUj9ccF9e1m57HwLQhhMmjaWiwTnM,7597
|
96
103
|
bec_widgets/widgets/dock/dock_area.py,sha256=WKIt61v7w2YXahfIL4nddWHPfpTpw52uphX4QCbS3q0,7913
|
97
104
|
bec_widgets/widgets/figure/__init__.py,sha256=3hGx_KOV7QHCYAV06aNuUgKq4QIYCjUTad-DrwkUaBM,44
|
98
|
-
bec_widgets/widgets/figure/figure.py,sha256=
|
105
|
+
bec_widgets/widgets/figure/figure.py,sha256=lkU5mGtgi2_kF1FGrz_CYH7aifXxtan5xWNAdl3raXw,32054
|
99
106
|
bec_widgets/widgets/figure/plots/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
100
107
|
bec_widgets/widgets/figure/plots/axis_settings.py,sha256=RMvbPgu8r1bk8zZz49hkUSHmcqRdw19zrsfLHcgDUIc,2261
|
101
108
|
bec_widgets/widgets/figure/plots/axis_settings.ui,sha256=zMKZK6lH_3KJGO4RA_paXAH7UzZJ4Snlil3MK4pK3L8,11589
|
@@ -124,12 +131,21 @@ bec_widgets/widgets/motor_map/motor_map_dialog/__init__.py,sha256=47DEQpj8HBSa-_
|
|
124
131
|
bec_widgets/widgets/motor_map/motor_map_dialog/motor_map_settings.py,sha256=terJ5NHRzAsiUwdqg-hTbkQ5gadnRT0Ol0_Fm66kPF4,2011
|
125
132
|
bec_widgets/widgets/motor_map/motor_map_dialog/motor_map_settings.ui,sha256=nv5vPftt6vcIl60OOZLRvwD29rdHVWOoGmz168BnwKw,2685
|
126
133
|
bec_widgets/widgets/motor_map/motor_map_dialog/motor_map_toolbar.py,sha256=R6pmxhB_1ouc6f6cNQQvbxTHb3Ko3K_gTGs5WIYgnRI,2194
|
134
|
+
bec_widgets/widgets/position_indicator/position_indicator.py,sha256=QVlWvs_RvEJe5IMxGYCpi-CXYF7vFeMqEMFCs6u5NGc,2020
|
135
|
+
bec_widgets/widgets/position_indicator/position_indicator.pyproject,sha256=s0JEf5YkpMag19ddFSYeRZ8erBau7erO3bqw05YrTyg,36
|
136
|
+
bec_widgets/widgets/position_indicator/position_indicator_plugin.py,sha256=h9EQU4t6KdKVAZh5ILalpl1K8b7JMHf-2AFYREej2-w,1241
|
137
|
+
bec_widgets/widgets/position_indicator/register_position_indicator.py,sha256=OZNiMgM_80TPSAXK_0hXAkne4vUh8DGvh_OdpOiMpwI,516
|
127
138
|
bec_widgets/widgets/ring_progress_bar/__init__.py,sha256=_uoJKnDM2YAeUBfwc5WLbIHSJj7zm_FAurSKP3WRaCw,47
|
128
139
|
bec_widgets/widgets/ring_progress_bar/ring.py,sha256=19zFj-6ZrIPLXYqvs5EPcrmDWnfnSLlEOmzJffL4d3A,11241
|
129
140
|
bec_widgets/widgets/ring_progress_bar/ring_progress_bar.py,sha256=sU4Dur2XzBVfDYAYazI6pjOZOhzggoQIuc9VD3PWgac,24073
|
130
141
|
bec_widgets/widgets/scan_control/__init__.py,sha256=IOfHl15vxb_uC6KN62-PeUzbBha_vQyqkkXbJ2HU674,38
|
131
142
|
bec_widgets/widgets/scan_control/scan_control.py,sha256=EHibpeK8vpG6rlg8zhvDDz8GDUzDmvhYH0aX7-Xo4m8,7689
|
132
143
|
bec_widgets/widgets/scan_control/scan_group_box.py,sha256=wrrJLfI0apfll0NKpqM8ymlbl5NaqA9cKNgyfVdYR00,7420
|
144
|
+
bec_widgets/widgets/spinner/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
145
|
+
bec_widgets/widgets/spinner/register_spinner_widget.py,sha256=_zCPjLh4M7NTSHP1Atdn6yu33zJ3LJkcBy3KOJ5eSVY,476
|
146
|
+
bec_widgets/widgets/spinner/spinner.py,sha256=aWr0NnJVISwlBXGMnModJDwVNF4Xr01mDegGev29xPo,2465
|
147
|
+
bec_widgets/widgets/spinner/spinner_widget.pyproject,sha256=zzLajGB3DTgVnrSqMey2jRpBlxTq9cBXZL9tWJCKe-I,25
|
148
|
+
bec_widgets/widgets/spinner/spinner_widget_plugin.py,sha256=ZcG1QIwpbriapM5ZrR4gQ-WA2a7ARhsstk8EIY-OGTU,1187
|
133
149
|
bec_widgets/widgets/stop_button/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
134
150
|
bec_widgets/widgets/stop_button/register_stop_button.py,sha256=U7r3fEOH-uPhAQI-nTituHXDDXDWR4JQZ7_vD6b_dfM,471
|
135
151
|
bec_widgets/widgets/stop_button/stop_button.py,sha256=icJQT1k5G_nvdHWZZkGEZVQupt-mWd2viK8zYg5B5dI,793
|
@@ -144,9 +160,9 @@ bec_widgets/widgets/toggle/toggle.py,sha256=JzCGYoyHBrlBWCoyL94QX4zSLyEwWbCNHMeg
|
|
144
160
|
bec_widgets/widgets/toggle/toggle_switch.pyproject,sha256=Msa-AS5H5XlqW65r8GlX2AxD8FnFnDyDgGnbKcXqKOw,24
|
145
161
|
bec_widgets/widgets/toggle/toggle_switch_plugin.py,sha256=8e8JjUx6T5CIx7ixWLwVdT9JOJTbQ8aWwd3_9VAc_Mw,1177
|
146
162
|
bec_widgets/widgets/vscode/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
147
|
-
bec_widgets/widgets/vscode/vscode.py,sha256=
|
163
|
+
bec_widgets/widgets/vscode/vscode.py,sha256=yV1D9PK2IYomq9yYfwqUOrZGIeBwMnNuBfXxBc2M8Qc,2231
|
148
164
|
bec_widgets/widgets/website/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
149
|
-
bec_widgets/widgets/website/website.py,sha256
|
165
|
+
bec_widgets/widgets/website/website.py,sha256=-5JG2dh7Ftw9xv8I4p08TxjaRzaql9XZDiv1iQOIFsU,1726
|
150
166
|
docs/Makefile,sha256=i2WHuFlgfyAPEW4ssEP8NY4cOibDJrVjvzSEU8_Ggwc,634
|
151
167
|
docs/conf.py,sha256=HxLxupNGu0Smhwn57g1kFdjZzFuaWVREgRJKhT1zi2k,2464
|
152
168
|
docs/index.md,sha256=8ZCgaLIbJsYvt-jwi--QxsNwnK4-k3rejIeOOLclG40,1101
|
@@ -202,8 +218,12 @@ tests/end-2-end/test_bec_dock_rpc_e2e.py,sha256=uDhauuLEWg9Baf3N1KSeq6HPUWtuU6a9
|
|
202
218
|
tests/end-2-end/test_bec_figure_rpc_e2e.py,sha256=mjg29huqTivLnukG_XyoMtjOy2P_7JACIhMEzahLXb8,6601
|
203
219
|
tests/end-2-end/test_rpc_register_e2e.py,sha256=blhMiW7HVHX1kGm5dg8Sv0PeCuJ0gnBz3evznQFz_B8,1619
|
204
220
|
tests/end-2-end/test_scan_control_e2e.py,sha256=u7oLgFyltkMW2apSZKDukMIXvYrbhHrU32p4mBdn8VE,2276
|
221
|
+
tests/references/SpinnerWidget/SpinnerWidget_darwin.png,sha256=-Tf5x0xY0pb-8sXH6Pk8cZL5PAxZ4vMR5RgyGCxisM4,9490
|
222
|
+
tests/references/SpinnerWidget/SpinnerWidget_linux.png,sha256=-Tf5x0xY0pb-8sXH6Pk8cZL5PAxZ4vMR5RgyGCxisM4,9490
|
223
|
+
tests/references/SpinnerWidget/SpinnerWidget_started_darwin.png,sha256=wPc65MrSSKJib2aBlPI20mBE-zfamOh-SORGRD27dhQ,14773
|
224
|
+
tests/references/SpinnerWidget/SpinnerWidget_started_linux.png,sha256=gE1L3nVuypmsW8vcnV9kX4mDgQGGXYjiEIYiRifr5DM,15265
|
205
225
|
tests/unit_tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
206
|
-
tests/unit_tests/client_mocks.py,sha256=
|
226
|
+
tests/unit_tests/client_mocks.py,sha256=_gtf12kTxmwaXKwSOG5Cc0dqVEY1PHi-hmqdTdLhLTk,4752
|
207
227
|
tests/unit_tests/conftest.py,sha256=KrnktXPWmZhnKNue-xGWOLD1XGEvdz9Vf7V2eO3XQ3A,596
|
208
228
|
tests/unit_tests/test_bec_connector.py,sha256=zGDfNHwLFZTbpyX6-yc7Pwzr2jWO_HGZ8T4NFCNo4IE,2444
|
209
229
|
tests/unit_tests/test_bec_dispatcher.py,sha256=rYPiRizHaswhGZw55IBMneDFxmPiCCLAZQBqjEkpdyY,3992
|
@@ -213,9 +233,10 @@ tests/unit_tests/test_bec_image.py,sha256=mjvcrHgOF_FCj6WbUyxvZH9HL63QGA5C0PNZ5d
|
|
213
233
|
tests/unit_tests/test_bec_motor_map.py,sha256=dSYopbZS8lGD9cB26Kwmqw5zBoKCZs8t7DEEr50ug-g,8532
|
214
234
|
tests/unit_tests/test_bec_queue.py,sha256=u-uc-iZeGAS8P90o6Cxy5oz_60zHpirGAu04OgQPDXw,4598
|
215
235
|
tests/unit_tests/test_bec_status_box.py,sha256=gZdjyy9DNuUP9UwleTLj2Dp5HUImiqnkHjXWiqL0Q-o,4868
|
216
|
-
tests/unit_tests/test_client_utils.py,sha256=
|
236
|
+
tests/unit_tests/test_client_utils.py,sha256=CBdWIVJ_UiyFzTJnX3XJm4PGw2uXhFvRCP_Y9ifckbw,2630
|
217
237
|
tests/unit_tests/test_color_validation.py,sha256=xbFbtFDia36XLgaNrX2IwvAX3IDC_Odpj5BGoJSgiIE,2389
|
218
238
|
tests/unit_tests/test_crosshair.py,sha256=3OMAJ2ZaISYXMOtkXf1rPdy94vCr8njeLi6uHblBL9Q,5045
|
239
|
+
tests/unit_tests/test_device_box.py,sha256=q9IVFpt1NF3TBF0Jhk-I-LRiuvvHG3FGUalw4jEYwVo,3431
|
219
240
|
tests/unit_tests/test_device_input_base.py,sha256=r1tI7BFAhpv7V7gf_n5gjusyrBFOfuCqIkdVg7YA7vY,2444
|
220
241
|
tests/unit_tests/test_device_input_widgets.py,sha256=Q40xNKGvJT2dvNttRH68WZi0au8PwpUgBi2EB4LXfC8,5841
|
221
242
|
tests/unit_tests/test_generate_cli_client.py,sha256=ng-eV5iF7Dhm-6YpxYo99CMY0KgqoaZBQNkMeKULDBU,3355
|
@@ -225,14 +246,16 @@ tests/unit_tests/test_plot_base.py,sha256=vWbt-QO5blSoE5C1392MIFha9A9JnUsx_D_9yT
|
|
225
246
|
tests/unit_tests/test_plugin_utils.py,sha256=ayksWdrFY7kOiA0wVEjKFmFCF3UhH3lG8tzPVOpwysk,528
|
226
247
|
tests/unit_tests/test_ring_progress_bar.py,sha256=hDlqkQho7FR7HAfM4Zrr4q1m773a3_rQ8CbM1GqDDSE,12252
|
227
248
|
tests/unit_tests/test_rpc_register.py,sha256=hECjZEimd440mwRrO0rg7L3PKN7__3DgjmESN6wx3bo,1179
|
249
|
+
tests/unit_tests/test_rpc_server.py,sha256=MvstcvqUsnGAzUxw8Et1xXXikk_VIxFPwDZD0v1QGkg,1500
|
228
250
|
tests/unit_tests/test_rpc_widget_handler.py,sha256=ceQ3BPnBIFY2Hy-sDPw0wxxREVTTphILts0gvX9qoUw,234
|
229
251
|
tests/unit_tests/test_scan_control.py,sha256=Wr6KcE8av4sEIOx5VgYbzVCem3Jgb4Kzx_oOuvwlmkE,13459
|
230
252
|
tests/unit_tests/test_scan_control_group_box.py,sha256=HNqjP10B_NonikspNwKz9upJU-t7xf6hwBerNhbC-uo,5563
|
231
253
|
tests/unit_tests/test_setting_dialog.py,sha256=QbHWwLa1VGFwYie-SN3rjS3ICo7A44S4AKN2qeNvIKY,3137
|
254
|
+
tests/unit_tests/test_spinner.py,sha256=4_wQs56vQb6Sr1aTXMdW6LKpce2uM0tWMO3LPtAhSwU,774
|
232
255
|
tests/unit_tests/test_stop_button.py,sha256=tpQanzBUyl7qLXjbMUQqm3U3vShbKKARcnLpgsu3P0E,789
|
233
256
|
tests/unit_tests/test_text_box_widget.py,sha256=cT0uEHt_6d-FwST0A_wE9sFW9E3F_nJbKhuBAeU4yHg,1862
|
234
257
|
tests/unit_tests/test_toggle.py,sha256=Amzgres7te0tTQIDR2WMKSx9Kce44TxMpIPR6HZygXQ,832
|
235
|
-
tests/unit_tests/test_vscode_widget.py,sha256=
|
258
|
+
tests/unit_tests/test_vscode_widget.py,sha256=G1G7nCQGXFUn0BnMECE7mHmAm0C6pYx1JpEi_XEhodY,2682
|
236
259
|
tests/unit_tests/test_waveform1d.py,sha256=inc-CyRA_3-PE99WnR6vDdfRE1vgp-ZoLVJ-Qbq0qFY,15967
|
237
260
|
tests/unit_tests/test_website_widget.py,sha256=fBADIJJBAHU4Ro7u95kdemFVNv196UOcuO9oLHuHt8A,761
|
238
261
|
tests/unit_tests/test_widget_io.py,sha256=FeL3ZYSBQnRt6jxj8VGYw1cmcicRQyHKleahw7XIyR0,3475
|
@@ -242,8 +265,8 @@ tests/unit_tests/test_configs/config_device_no_entry.yaml,sha256=hdvue9KLc_kfNzG
|
|
242
265
|
tests/unit_tests/test_configs/config_scan.yaml,sha256=vo484BbWOjA_e-h6bTjSV9k7QaQHrlAvx-z8wtY-P4E,1915
|
243
266
|
tests/unit_tests/test_msgs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
244
267
|
tests/unit_tests/test_msgs/available_scans_message.py,sha256=m_z97hIrjHXXMa2Ex-UvsPmTxOYXfjxyJaGkIY6StTY,46532
|
245
|
-
bec_widgets-0.
|
246
|
-
bec_widgets-0.
|
247
|
-
bec_widgets-0.
|
248
|
-
bec_widgets-0.
|
249
|
-
bec_widgets-0.
|
268
|
+
bec_widgets-0.83.0.dist-info/METADATA,sha256=xSeHtjGGoakyD7GAov5Syu1U4lMGeuIPyORPJeEfz9o,1309
|
269
|
+
bec_widgets-0.83.0.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
|
270
|
+
bec_widgets-0.83.0.dist-info/entry_points.txt,sha256=3otEkCdDB9LZJuBLzG4pFLK5Di0CVybN_12IsZrQ-58,166
|
271
|
+
bec_widgets-0.83.0.dist-info/licenses/LICENSE,sha256=YRKe85CBRyP7UpEAWwU8_qSIyuy5-l_9C-HKg5Qm8MQ,1511
|
272
|
+
bec_widgets-0.83.0.dist-info/RECORD,,
|
pyproject.toml
CHANGED
Binary file
|
Binary file
|
Binary file
|
Binary file
|
tests/unit_tests/client_mocks.py
CHANGED
@@ -49,11 +49,19 @@ class FakePositioner(FakeDevice):
|
|
49
49
|
self.read_value = read_value
|
50
50
|
self.name = name
|
51
51
|
|
52
|
+
@property
|
53
|
+
def precision(self):
|
54
|
+
return 3
|
55
|
+
|
52
56
|
def set_read_value(self, value):
|
53
57
|
self.read_value = value
|
54
58
|
|
55
59
|
def read(self):
|
56
|
-
return {
|
60
|
+
return {
|
61
|
+
self.name: {"value": self.read_value},
|
62
|
+
f"{self.name}_setpoint": {"value": self.read_value},
|
63
|
+
f"{self.name}_motor_is_moving": {"value": 0},
|
64
|
+
}
|
57
65
|
|
58
66
|
def set_limits(self, limits):
|
59
67
|
self.limits = limits
|
@@ -3,6 +3,7 @@ from unittest import mock
|
|
3
3
|
import pytest
|
4
4
|
|
5
5
|
from bec_widgets.cli.client import BECFigure
|
6
|
+
from bec_widgets.cli.client_utils import BECGuiClientMixin, _start_plot_process
|
6
7
|
|
7
8
|
from .client_mocks import FakeDevice
|
8
9
|
|
@@ -27,3 +28,49 @@ def test_rpc_call_accepts_device_as_input(cli_figure):
|
|
27
28
|
fig, mock_rpc_call = cli_figure
|
28
29
|
fig.plot(x_name=dev1, y_name=dev2)
|
29
30
|
mock_rpc_call.assert_called_with("plot", x_name="samx", y_name="bpm4i")
|
31
|
+
|
32
|
+
|
33
|
+
@pytest.mark.parametrize(
|
34
|
+
"config, call_config",
|
35
|
+
[
|
36
|
+
(None, None),
|
37
|
+
("/path/to/config.yml", "/path/to/config.yml"),
|
38
|
+
({"key": "value"}, '{"key": "value"}'),
|
39
|
+
],
|
40
|
+
)
|
41
|
+
def test_client_utils_start_plot_process(config, call_config):
|
42
|
+
with mock.patch("bec_widgets.cli.client_utils.subprocess.Popen") as mock_popen:
|
43
|
+
_start_plot_process("gui_id", BECFigure, config)
|
44
|
+
command = ["bec-gui-server", "--id", "gui_id", "--gui_class", "BECFigure"]
|
45
|
+
if call_config:
|
46
|
+
command.extend(["--config", call_config])
|
47
|
+
mock_popen.assert_called_once_with(
|
48
|
+
command,
|
49
|
+
text=True,
|
50
|
+
start_new_session=True,
|
51
|
+
stdout=mock.ANY,
|
52
|
+
stderr=mock.ANY,
|
53
|
+
env=mock.ANY,
|
54
|
+
)
|
55
|
+
|
56
|
+
|
57
|
+
def test_client_utils_passes_client_config_to_server(bec_dispatcher):
|
58
|
+
"""
|
59
|
+
Test that the client config is passed to the server. This ensures that
|
60
|
+
changes to the client config (either through config files or plugins) are
|
61
|
+
reflected in the server.
|
62
|
+
"""
|
63
|
+
mixin = BECGuiClientMixin()
|
64
|
+
mixin._client = bec_dispatcher.client
|
65
|
+
mixin._gui_id = "gui_id"
|
66
|
+
mixin.gui_is_alive = mock.MagicMock()
|
67
|
+
mixin.gui_is_alive.side_effect = [True]
|
68
|
+
|
69
|
+
with mock.patch("bec_widgets.cli.client_utils._start_plot_process") as mock_start_plot:
|
70
|
+
with mock.patch.object(mixin, "_start_update_script") as mock_start_update:
|
71
|
+
mock_start_plot.return_value = [mock.MagicMock(), mock.MagicMock()]
|
72
|
+
mixin.show()
|
73
|
+
mock_start_plot.assert_called_once_with(
|
74
|
+
"gui_id", BECGuiClientMixin, mixin._client._service_config.config
|
75
|
+
)
|
76
|
+
mock_start_update.assert_called_once()
|
@@ -0,0 +1,98 @@
|
|
1
|
+
from unittest import mock
|
2
|
+
|
3
|
+
import pytest
|
4
|
+
from bec_lib.endpoints import MessageEndpoints
|
5
|
+
from bec_lib.messages import ScanQueueMessage
|
6
|
+
from qtpy.QtGui import QValidator
|
7
|
+
|
8
|
+
from bec_widgets.widgets.device_box.device_box import DeviceBox
|
9
|
+
|
10
|
+
from .client_mocks import mocked_client
|
11
|
+
|
12
|
+
|
13
|
+
@pytest.fixture
|
14
|
+
def device_box(qtbot, mocked_client):
|
15
|
+
with mock.patch("bec_widgets.widgets.device_box.device_box.uuid.uuid4") as mock_uuid:
|
16
|
+
mock_uuid.return_value = "fake_uuid"
|
17
|
+
db = DeviceBox(device="samx", client=mocked_client)
|
18
|
+
qtbot.addWidget(db)
|
19
|
+
yield db
|
20
|
+
|
21
|
+
|
22
|
+
def test_device_box(device_box):
|
23
|
+
assert device_box.device == "samx"
|
24
|
+
data = device_box.dev["samx"].read()
|
25
|
+
|
26
|
+
setpoint_text = device_box.ui.setpoint.text()
|
27
|
+
# check that the setpoint is taken correctly after init
|
28
|
+
assert float(setpoint_text) == data["samx_setpoint"]["value"]
|
29
|
+
|
30
|
+
# check that the precision is taken correctly after init
|
31
|
+
precision = device_box.dev["samx"].precision
|
32
|
+
assert setpoint_text == f"{data['samx_setpoint']['value']:.{precision}f}"
|
33
|
+
|
34
|
+
# check that the step size is set according to the device precision
|
35
|
+
assert device_box.ui.step_size.value() == 10**-precision * 10
|
36
|
+
|
37
|
+
|
38
|
+
def test_device_box_update_limits(device_box):
|
39
|
+
device_box._limits = None
|
40
|
+
device_box.update_limits([0, 10])
|
41
|
+
assert device_box._limits == [0, 10]
|
42
|
+
assert device_box.setpoint_validator.bottom() == 0
|
43
|
+
assert device_box.setpoint_validator.top() == 10
|
44
|
+
assert device_box.setpoint_validator.validate("100", 0) == (
|
45
|
+
QValidator.State.Intermediate,
|
46
|
+
"100",
|
47
|
+
0,
|
48
|
+
)
|
49
|
+
|
50
|
+
device_box.update_limits(None)
|
51
|
+
assert device_box._limits is None
|
52
|
+
assert device_box.setpoint_validator.validate("100", 0) == (
|
53
|
+
QValidator.State.Acceptable,
|
54
|
+
"100",
|
55
|
+
0,
|
56
|
+
)
|
57
|
+
|
58
|
+
|
59
|
+
def test_device_box_on_stop(device_box):
|
60
|
+
with mock.patch.object(device_box.client.connector, "send") as mock_send:
|
61
|
+
device_box.on_stop()
|
62
|
+
params = {"device": "samx", "rpc_id": "fake_uuid", "func": "stop", "args": [], "kwargs": {}}
|
63
|
+
msg = ScanQueueMessage(
|
64
|
+
scan_type="device_rpc",
|
65
|
+
parameter=params,
|
66
|
+
queue="emergency",
|
67
|
+
metadata={"RID": "fake_uuid", "response": False},
|
68
|
+
)
|
69
|
+
mock_send.assert_called_once_with(MessageEndpoints.scan_queue_request(), msg)
|
70
|
+
|
71
|
+
|
72
|
+
def test_device_box_setpoint_change(device_box):
|
73
|
+
with mock.patch.object(device_box.dev["samx"], "move") as mock_move:
|
74
|
+
device_box.ui.setpoint.setText("100")
|
75
|
+
device_box.on_setpoint_change()
|
76
|
+
mock_move.assert_called_once_with(100, relative=False)
|
77
|
+
|
78
|
+
|
79
|
+
def test_device_box_on_tweak_right(device_box):
|
80
|
+
with mock.patch.object(device_box.dev["samx"], "move") as mock_move:
|
81
|
+
device_box.ui.step_size.setValue(0.1)
|
82
|
+
device_box.on_tweak_right()
|
83
|
+
mock_move.assert_called_once_with(0.1, relative=True)
|
84
|
+
|
85
|
+
|
86
|
+
def test_device_box_on_tweak_left(device_box):
|
87
|
+
with mock.patch.object(device_box.dev["samx"], "move") as mock_move:
|
88
|
+
device_box.ui.step_size.setValue(0.1)
|
89
|
+
device_box.on_tweak_left()
|
90
|
+
mock_move.assert_called_once_with(-0.1, relative=True)
|
91
|
+
|
92
|
+
|
93
|
+
def test_device_box_setpoint_out_of_range(device_box):
|
94
|
+
device_box.update_limits([0, 10])
|
95
|
+
device_box.ui.setpoint.setText("100")
|
96
|
+
device_box.on_setpoint_change()
|
97
|
+
assert device_box.ui.setpoint.text() == "100"
|
98
|
+
assert device_box.ui.setpoint.hasAcceptableInput() == False
|
@@ -0,0 +1,42 @@
|
|
1
|
+
from unittest import mock
|
2
|
+
|
3
|
+
import pytest
|
4
|
+
from bec_lib.service_config import ServiceConfig
|
5
|
+
|
6
|
+
from bec_widgets.cli.server import _start_server
|
7
|
+
from bec_widgets.widgets.figure import BECFigure
|
8
|
+
|
9
|
+
|
10
|
+
@pytest.fixture
|
11
|
+
def mocked_cli_server():
|
12
|
+
with mock.patch("bec_widgets.cli.server.BECWidgetsCLIServer") as mock_server:
|
13
|
+
with mock.patch("bec_widgets.cli.server.ServiceConfig") as mock_config:
|
14
|
+
with mock.patch("bec_lib.logger.bec_logger.configure") as mock_logger:
|
15
|
+
yield mock_server, mock_config, mock_logger
|
16
|
+
|
17
|
+
|
18
|
+
def test_rpc_server_start_server_without_service_config(mocked_cli_server):
|
19
|
+
"""
|
20
|
+
Test that the server is started with the correct arguments.
|
21
|
+
"""
|
22
|
+
mock_server, mock_config, _ = mocked_cli_server
|
23
|
+
|
24
|
+
_start_server("gui_id", BECFigure, None)
|
25
|
+
mock_server.assert_called_once_with(gui_id="gui_id", config=mock_config(), gui_class=BECFigure)
|
26
|
+
|
27
|
+
|
28
|
+
@pytest.mark.parametrize(
|
29
|
+
"config, call_config",
|
30
|
+
[
|
31
|
+
("/path/to/config.yml", {"config_path": "/path/to/config.yml"}),
|
32
|
+
({"key": "value"}, {"config": {"key": "value"}}),
|
33
|
+
],
|
34
|
+
)
|
35
|
+
def test_rpc_server_start_server_with_service_config(mocked_cli_server, config, call_config):
|
36
|
+
"""
|
37
|
+
Test that the server is started with the correct arguments.
|
38
|
+
"""
|
39
|
+
mock_server, mock_config, _ = mocked_cli_server
|
40
|
+
config = mock_config(**call_config)
|
41
|
+
_start_server("gui_id", BECFigure, config)
|
42
|
+
mock_server.assert_called_once_with(gui_id="gui_id", config=config, gui_class=BECFigure)
|
@@ -0,0 +1,30 @@
|
|
1
|
+
import pytest
|
2
|
+
import qdarktheme
|
3
|
+
|
4
|
+
from bec_widgets.utils.reference_utils import snap_and_compare
|
5
|
+
from bec_widgets.widgets.spinner.spinner import SpinnerWidget
|
6
|
+
|
7
|
+
|
8
|
+
@pytest.fixture
|
9
|
+
def spinner_widget(qtbot):
|
10
|
+
qdarktheme.setup_theme("light")
|
11
|
+
spinner = SpinnerWidget()
|
12
|
+
qtbot.addWidget(spinner)
|
13
|
+
qtbot.waitExposed(spinner)
|
14
|
+
yield spinner
|
15
|
+
|
16
|
+
|
17
|
+
def test_spinner_widget_paint_event(spinner_widget, qtbot):
|
18
|
+
spinner_widget.paintEvent(None)
|
19
|
+
|
20
|
+
|
21
|
+
def test_spinner_widget_rendered(spinner_widget, qtbot, tmpdir):
|
22
|
+
spinner_widget.update()
|
23
|
+
qtbot.wait(200)
|
24
|
+
snap_and_compare(spinner_widget, str(tmpdir), suffix="")
|
25
|
+
|
26
|
+
spinner_widget._started = True
|
27
|
+
spinner_widget.update()
|
28
|
+
qtbot.wait(200)
|
29
|
+
|
30
|
+
snap_and_compare(spinner_widget, str(tmpdir), suffix="started")
|
@@ -25,54 +25,49 @@ def test_vscode_widget(qtbot, vscode_widget):
|
|
25
25
|
def test_start_server(qtbot, mocked_client):
|
26
26
|
|
27
27
|
with mock.patch("bec_widgets.widgets.vscode.vscode.subprocess.Popen") as mock_popen:
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
f"available at http://{VSCodeEditor.host}:{VSCodeEditor.port}?tkn={VSCodeEditor.token}"
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
28
|
+
with mock.patch("bec_widgets.widgets.vscode.vscode.select.select") as mock_select:
|
29
|
+
mock_process = mock.Mock()
|
30
|
+
mock_process.stdout.fileno.return_value = 1
|
31
|
+
mock_process.poll.return_value = None
|
32
|
+
mock_process.stdout.read.return_value = f"available at http://{VSCodeEditor.host}:{VSCodeEditor.port}?tkn={VSCodeEditor.token}"
|
33
|
+
mock_popen.return_value = mock_process
|
34
|
+
mock_select.return_value = [[mock_process.stdout], [], []]
|
35
|
+
|
36
|
+
widget = VSCodeEditor(client=mocked_client)
|
37
|
+
|
38
|
+
mock_popen.assert_called_once_with(
|
39
|
+
shlex.split(
|
40
|
+
f"code serve-web --port {widget.port} --connection-token={widget.token} --accept-server-license-terms"
|
41
|
+
),
|
42
|
+
text=True,
|
43
|
+
stdout=subprocess.PIPE,
|
44
|
+
stderr=subprocess.DEVNULL,
|
45
|
+
preexec_fn=os.setsid,
|
46
|
+
)
|
47
47
|
|
48
48
|
|
49
49
|
@pytest.fixture
|
50
50
|
def patched_vscode_process(qtbot, vscode_widget):
|
51
51
|
with mock.patch("bec_widgets.widgets.vscode.vscode.os.killpg") as mock_killpg:
|
52
52
|
with mock.patch("bec_widgets.widgets.vscode.vscode.os.getpgid") as mock_getpgid:
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
mock_getpgid.return_value = 123
|
57
|
-
vscode_widget.process = mock.Mock()
|
58
|
-
yield vscode_widget, mock_killpg, mock_close_event
|
53
|
+
mock_getpgid.return_value = 123
|
54
|
+
vscode_widget.process = mock.Mock()
|
55
|
+
yield vscode_widget, mock_killpg
|
59
56
|
|
60
57
|
|
61
|
-
def
|
62
|
-
vscode_patched, mock_killpg
|
58
|
+
def test_vscode_cleanup(qtbot, patched_vscode_process):
|
59
|
+
vscode_patched, mock_killpg = patched_vscode_process
|
63
60
|
vscode_patched.process.pid = 123
|
64
61
|
vscode_patched.process.poll.return_value = None
|
65
|
-
vscode_patched.
|
62
|
+
vscode_patched.cleanup()
|
66
63
|
mock_killpg.assert_called_once_with(123, 15)
|
67
64
|
vscode_patched.process.wait.assert_called_once()
|
68
|
-
mock_close_event.assert_called_once()
|
69
65
|
|
70
66
|
|
71
67
|
def test_close_event_on_terminated_code(qtbot, patched_vscode_process):
|
72
|
-
vscode_patched, mock_killpg
|
68
|
+
vscode_patched, mock_killpg = patched_vscode_process
|
73
69
|
vscode_patched.process.pid = 123
|
74
70
|
vscode_patched.process.poll.return_value = 0
|
75
|
-
vscode_patched.
|
71
|
+
vscode_patched.cleanup()
|
76
72
|
mock_killpg.assert_not_called()
|
77
73
|
vscode_patched.process.wait.assert_not_called()
|
78
|
-
mock_close_event.assert_called_once()
|
File without changes
|
File without changes
|
File without changes
|