bec-widgets 0.93.2__py3-none-any.whl → 0.93.4__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.
- CHANGELOG.md +32 -34
- PKG-INFO +1 -1
- bec_widgets/cli/client.py +9 -16
- bec_widgets/qt_utils/settings_dialog.py +11 -0
- bec_widgets/widgets/color_button/color_button.py +7 -0
- bec_widgets/widgets/dock/dock.py +4 -1
- bec_widgets/widgets/dock/dock_area.py +19 -5
- bec_widgets/widgets/figure/figure.py +21 -16
- bec_widgets/widgets/figure/plots/image/image.py +14 -0
- bec_widgets/widgets/figure/plots/plot_base.py +8 -0
- bec_widgets/widgets/image/image_widget.py +2 -0
- bec_widgets/widgets/motor_map/motor_map_dialog/motor_map_settings.py +9 -0
- bec_widgets/widgets/{device_box/device_box.py → positioner_box/positioner_box.py} +88 -11
- bec_widgets/widgets/positioner_box/positioner_box.pyproject +1 -0
- bec_widgets/widgets/{device_box/device_box.ui → positioner_box/positioner_box.ui} +20 -3
- bec_widgets/widgets/{device_box/device_box_plugin.py → positioner_box/positioner_box_plugin.py} +9 -14
- bec_widgets/widgets/{device_box/register_device_box.py → positioner_box/register_positioner_box.py} +2 -2
- bec_widgets/widgets/website/website.py +6 -0
- {bec_widgets-0.93.2.dist-info → bec_widgets-0.93.4.dist-info}/METADATA +1 -1
- {bec_widgets-0.93.2.dist-info → bec_widgets-0.93.4.dist-info}/RECORD +50 -50
- pyproject.toml +1 -1
- tests/end-2-end/test_scan_control_e2e.py +0 -1
- tests/unit_tests/conftest.py +33 -2
- tests/unit_tests/test_bec_dock.py +6 -5
- tests/unit_tests/test_bec_figure.py +31 -24
- tests/unit_tests/test_bec_image.py +7 -3
- tests/unit_tests/test_bec_image_widget.py +0 -1
- tests/unit_tests/test_bec_motor_map.py +28 -14
- tests/unit_tests/test_bec_queue.py +0 -1
- tests/unit_tests/test_bec_status_box.py +0 -1
- tests/unit_tests/test_color_map_selector.py +0 -1
- tests/unit_tests/test_device_input_base.py +0 -1
- tests/unit_tests/test_device_input_widgets.py +0 -6
- tests/unit_tests/test_motor_map_widget.py +0 -2
- tests/unit_tests/test_plot_base.py +9 -4
- tests/unit_tests/test_positioner_box.py +104 -0
- tests/unit_tests/test_ring_progress_bar.py +0 -1
- tests/unit_tests/test_scan_control.py +0 -1
- tests/unit_tests/test_setting_dialog.py +1 -2
- tests/unit_tests/test_stop_button.py +0 -1
- tests/unit_tests/test_text_box_widget.py +0 -1
- tests/unit_tests/test_toggle.py +0 -1
- tests/unit_tests/test_vscode_widget.py +2 -2
- tests/unit_tests/test_waveform1d.py +46 -23
- tests/unit_tests/test_waveform_widget.py +0 -1
- tests/unit_tests/test_website_widget.py +0 -2
- bec_widgets/widgets/device_box/device_box.pyproject +0 -1
- tests/unit_tests/test_device_box.py +0 -98
- /bec_widgets/widgets/{device_box → positioner_box}/__init__.py +0 -0
- {bec_widgets-0.93.2.dist-info → bec_widgets-0.93.4.dist-info}/WHEEL +0 -0
- {bec_widgets-0.93.2.dist-info → bec_widgets-0.93.4.dist-info}/entry_points.txt +0 -0
- {bec_widgets-0.93.2.dist-info → bec_widgets-0.93.4.dist-info}/licenses/LICENSE +0 -0
bec_widgets/widgets/{device_box/device_box_plugin.py → positioner_box/positioner_box_plugin.py}
RENAMED
@@ -1,44 +1,39 @@
|
|
1
1
|
# Copyright (C) 2022 The Qt Company Ltd.
|
2
2
|
# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
|
3
|
-
import os
|
4
3
|
|
5
4
|
from qtpy.QtDesigner import QDesignerCustomWidgetInterface
|
6
5
|
from qtpy.QtGui import QIcon
|
7
6
|
|
8
|
-
import
|
9
|
-
from bec_widgets.widgets.device_box.device_box import DeviceBox
|
7
|
+
from bec_widgets.widgets.positioner_box.positioner_box import PositionerBox
|
10
8
|
|
11
9
|
DOM_XML = """
|
12
10
|
<ui language='c++'>
|
13
|
-
<widget class='
|
11
|
+
<widget class='PositionerBox' name='positioner_box'>
|
14
12
|
</widget>
|
15
13
|
</ui>
|
16
14
|
"""
|
17
15
|
|
18
|
-
MODULE_PATH = os.path.dirname(bec_widgets.__file__)
|
19
16
|
|
20
|
-
|
21
|
-
class DeviceBoxPlugin(QDesignerCustomWidgetInterface): # pragma: no cover
|
17
|
+
class PositionerBoxPlugin(QDesignerCustomWidgetInterface): # pragma: no cover
|
22
18
|
def __init__(self):
|
23
19
|
super().__init__()
|
24
20
|
self._form_editor = None
|
25
21
|
|
26
22
|
def createWidget(self, parent):
|
27
|
-
t =
|
23
|
+
t = PositionerBox(parent)
|
28
24
|
return t
|
29
25
|
|
30
26
|
def domXml(self):
|
31
27
|
return DOM_XML
|
32
28
|
|
33
29
|
def group(self):
|
34
|
-
return "
|
30
|
+
return ""
|
35
31
|
|
36
32
|
def icon(self):
|
37
|
-
|
38
|
-
return QIcon(icon_path)
|
33
|
+
return QIcon()
|
39
34
|
|
40
35
|
def includeFile(self):
|
41
|
-
return "
|
36
|
+
return "positioner_box"
|
42
37
|
|
43
38
|
def initialize(self, form_editor):
|
44
39
|
self._form_editor = form_editor
|
@@ -50,10 +45,10 @@ class DeviceBoxPlugin(QDesignerCustomWidgetInterface): # pragma: no cover
|
|
50
45
|
return self._form_editor is not None
|
51
46
|
|
52
47
|
def name(self):
|
53
|
-
return "
|
48
|
+
return "PositionerBox"
|
54
49
|
|
55
50
|
def toolTip(self):
|
56
|
-
return "
|
51
|
+
return "Simple Widget to control a positioner in box form"
|
57
52
|
|
58
53
|
def whatsThis(self):
|
59
54
|
return self.toolTip()
|
bec_widgets/widgets/{device_box/register_device_box.py → positioner_box/register_positioner_box.py}
RENAMED
@@ -6,9 +6,9 @@ def main(): # pragma: no cover
|
|
6
6
|
return
|
7
7
|
from PySide6.QtDesigner import QPyDesignerCustomWidgetCollection
|
8
8
|
|
9
|
-
from bec_widgets.widgets.
|
9
|
+
from bec_widgets.widgets.positioner_box.positioner_box_plugin import PositionerBoxPlugin
|
10
10
|
|
11
|
-
QPyDesignerCustomWidgetCollection.addCustomWidget(
|
11
|
+
QPyDesignerCustomWidgetCollection.addCustomWidget(PositionerBoxPlugin())
|
12
12
|
|
13
13
|
|
14
14
|
if __name__ == "__main__": # pragma: no cover
|
@@ -2,11 +2,11 @@
|
|
2
2
|
.gitlab-ci.yml,sha256=BtKhZI3dhK09En1BfpglYi-ZJwG6ZdC-iJr7kXFVfCg,8346
|
3
3
|
.pylintrc,sha256=eeY8YwSI74oFfq6IYIbCqnx3Vk8ZncKaatv96n_Y8Rs,18544
|
4
4
|
.readthedocs.yaml,sha256=aSOc277LqXcsTI6lgvm_JY80lMlr69GbPKgivua2cS0,603
|
5
|
-
CHANGELOG.md,sha256=
|
5
|
+
CHANGELOG.md,sha256=9EMQ1Af_QTOMF06XtrQGfth_oD5stOlkjsSdeKkgV14,6659
|
6
6
|
LICENSE,sha256=YRKe85CBRyP7UpEAWwU8_qSIyuy5-l_9C-HKg5Qm8MQ,1511
|
7
|
-
PKG-INFO,sha256=
|
7
|
+
PKG-INFO,sha256=xpE3WACvw9YH_nuy0jPV4Z6i7pmskaF_vKGawCZmRj4,1307
|
8
8
|
README.md,sha256=Od69x-RS85Hph0-WwWACwal4yUd67XkEn4APEfHhHFw,2649
|
9
|
-
pyproject.toml,sha256=
|
9
|
+
pyproject.toml,sha256=82c_u5P42OZ7b5q0YCuRpdwyNig4v_cDMaRISa5CNX4,2356
|
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
|
@@ -81,7 +81,7 @@ bec_widgets/assets/toolbar_icons/transform.svg,sha256=Fgug9wCi1FONy08nssEvnoDDDB
|
|
81
81
|
bec_widgets/assets/toolbar_icons/waveform.svg,sha256=darXWaIww4HEu9skFUd8Vs1NSAgUo1d37xBNr6DX-bM,231
|
82
82
|
bec_widgets/cli/__init__.py,sha256=d0Q6Fn44e7wFfLabDOBxpcJ1DPKWlFunGYDUBmO-4hA,22
|
83
83
|
bec_widgets/cli/auto_updates.py,sha256=DyBV3HnjMSH-cvVkYNcDiYKVf0Xut4Qy2qGQqkW47Bw,4833
|
84
|
-
bec_widgets/cli/client.py,sha256=
|
84
|
+
bec_widgets/cli/client.py,sha256=3zXER7rSN5DfFO_-rkSrkHdERnPD5bnrk3WjxJE9EiI,75957
|
85
85
|
bec_widgets/cli/client_utils.py,sha256=cDhabblwaP88a0jlVpbn_RWWKVbsyjhmmGtMh9gesEw,12388
|
86
86
|
bec_widgets/cli/generate_cli.py,sha256=Ea5px9KblUlcGg-1JbJBTIU7laGg2n8PM7Efw9WVVzM,5889
|
87
87
|
bec_widgets/cli/rpc_register.py,sha256=QxXUZu5XNg00Yf5O3UHWOXg3-f_pzKjjoZYMOa-MOJc,2216
|
@@ -103,7 +103,7 @@ bec_widgets/examples/plugin_example_pyside/tictactoeplugin.py,sha256=Hj-04Y3u_0H
|
|
103
103
|
bec_widgets/examples/plugin_example_pyside/tictactoetaskmenu.py,sha256=V6OVnBTS-60zjQ2FAs88Ldjm1MfoMROfiQZZu6Guav8,2379
|
104
104
|
bec_widgets/qt_utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
105
105
|
bec_widgets/qt_utils/error_popups.py,sha256=y9gKKWaafp468ioHr96nBhf02ZpEgjDc-BAVOTWh-e8,7680
|
106
|
-
bec_widgets/qt_utils/settings_dialog.py,sha256=
|
106
|
+
bec_widgets/qt_utils/settings_dialog.py,sha256=NhtzTer_xzlB2lLLrGklkI1QYLJEWQpJoZbCz4o5daI,3645
|
107
107
|
bec_widgets/qt_utils/toolbar.py,sha256=89WddOXPePby2CICUumdN_K_3DBgZPCR8HWUJAwrhDU,6503
|
108
108
|
bec_widgets/utils/__init__.py,sha256=1930ji1Jj6dVuY81Wd2kYBhHYNV-2R0bN_L4o9zBj1U,533
|
109
109
|
bec_widgets/utils/bec_connector.py,sha256=SivHKXVyNVqeu3kCXYEPpbleTVw8g1cW0FKq1QrQgco,9987
|
@@ -142,7 +142,7 @@ bec_widgets/widgets/bec_status_box/bec_status_box_plugin.py,sha256=1yyH1vrhVoCVJ
|
|
142
142
|
bec_widgets/widgets/bec_status_box/register_bec_status_box.py,sha256=EiQITnkNw7IU7hE776wAeXro97eZd9XlsB9essgCebE,481
|
143
143
|
bec_widgets/widgets/bec_status_box/status_item.py,sha256=3aNaa-e64PmkBoAWfItYAmhB1EFhWRiFLzXWWz0dS_8,5317
|
144
144
|
bec_widgets/widgets/color_button/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
145
|
-
bec_widgets/widgets/color_button/color_button.py,sha256=
|
145
|
+
bec_widgets/widgets/color_button/color_button.py,sha256=Jx4UAn7ZomLei0OCg7RmTnq395scXW4jmqslQRbEVMI,1203
|
146
146
|
bec_widgets/widgets/color_button/color_button.pyproject,sha256=LUYF4VkDOB4ttVe7YfvLh64K-XZg0-xaVT06BqCT3UA,30
|
147
147
|
bec_widgets/widgets/color_button/color_button_plugin.py,sha256=Cmz6EqdykdZDQmpjgGBspf4MvHi7iAV1q9E-_cqRvW4,1295
|
148
148
|
bec_widgets/widgets/color_button/register_color_button.py,sha256=ZAx3t7G2VI2S-1qcEof31Xi9O0X8deLeZNgS651L1JI,475
|
@@ -152,12 +152,6 @@ bec_widgets/widgets/colormap_selector/colormap_selector.pyproject,sha256=lHl9qml
|
|
152
152
|
bec_widgets/widgets/colormap_selector/colormap_selector_plugin.py,sha256=NWTldO9XMyyOVL0No-Bmr-tvWrinmU7LkDxB5LkIQtA,1416
|
153
153
|
bec_widgets/widgets/colormap_selector/register_colormap_selector.py,sha256=bfw7RWmTmMLTLxGT-izSwcGtxGLKvL3jdivJw2z8oN4,512
|
154
154
|
bec_widgets/widgets/console/console.py,sha256=NG0cBuqqPX4hC-sHhk_UEkT-nHhhN9Y7karJITPLzyo,17864
|
155
|
-
bec_widgets/widgets/device_box/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
156
|
-
bec_widgets/widgets/device_box/device_box.py,sha256=2hWCbDaBvYnWK4-HDqeYetzb5KR4DBk7UPQJMLhT4w0,6929
|
157
|
-
bec_widgets/widgets/device_box/device_box.pyproject,sha256=jtwvhaySJRdnuV99mEZT3htmWKVLphFeetEW4al7s-o,28
|
158
|
-
bec_widgets/widgets/device_box/device_box.ui,sha256=z7j60J4ZKYjH9eyHl6FnZ_Z8lkdq1LQftxveSZQ6g_w,4865
|
159
|
-
bec_widgets/widgets/device_box/device_box_plugin.py,sha256=ASTAEgBDKFERLT4IamuFHffe0pET6CgyjjPOD814q1A,1395
|
160
|
-
bec_widgets/widgets/device_box/register_device_box.py,sha256=K7Hx4FIQDXasejaw6njwkFkkkwk63Smm6pHoOEdLWPw,467
|
161
155
|
bec_widgets/widgets/device_combobox/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
162
156
|
bec_widgets/widgets/device_combobox/device_combo_box.pyproject,sha256=wI2eXR5ky_IM9-BCHJnH_9CEqYcZwIuLcgitSEr8OJU,40
|
163
157
|
bec_widgets/widgets/device_combobox/device_combo_box_plugin.py,sha256=py1VYOpy0gTpdQ9eCut1dxMSfF0ckAwO5qT8ZDNkSts,1439
|
@@ -169,19 +163,19 @@ bec_widgets/widgets/device_line_edit/device_line_edit.pyproject,sha256=tqAYXRbxs
|
|
169
163
|
bec_widgets/widgets/device_line_edit/device_line_edit_plugin.py,sha256=RPtGVPLadUVyfEvj1EAJ9ftXe3Htp40JdHGj9zBLukc,1462
|
170
164
|
bec_widgets/widgets/device_line_edit/register_device_line_edit.py,sha256=8gEPnC8djYCw-idoZAENNB3bPOxM6pbzEp9A366EAGg,489
|
171
165
|
bec_widgets/widgets/dock/__init__.py,sha256=B7foHt02gnhM7mFksa7GJVwT7n0j_JvYDCt6wc6XR5g,61
|
172
|
-
bec_widgets/widgets/dock/dock.py,sha256=
|
173
|
-
bec_widgets/widgets/dock/dock_area.py,sha256=
|
166
|
+
bec_widgets/widgets/dock/dock.py,sha256=hQw5tpGrRbybjfF-aVEAeGdLTudtH4kFa70flu6_ZA8,10349
|
167
|
+
bec_widgets/widgets/dock/dock_area.py,sha256=VfKyMxKo-r1Ugu2xjSsfGMYZUg3i3xxaokaZCFcCoxA,13579
|
174
168
|
bec_widgets/widgets/dock/dock_area.pyproject,sha256=URW0UrDXCnkzk80rbQmUMgF6Uqay2TjHsq8Dq0g1j-c,37
|
175
169
|
bec_widgets/widgets/dock/dock_area_plugin.py,sha256=oG2zDxUA1YLvSBoFVeFVkz4HIWLruAwOsCZ00H2Z70A,1345
|
176
170
|
bec_widgets/widgets/dock/register_dock_area.py,sha256=Yqd1mq6CcHwlxHZxX5EHKONy4P44nMm8pso-4X0tvJI,464
|
177
171
|
bec_widgets/widgets/figure/__init__.py,sha256=3hGx_KOV7QHCYAV06aNuUgKq4QIYCjUTad-DrwkUaBM,44
|
178
|
-
bec_widgets/widgets/figure/figure.py,sha256=
|
172
|
+
bec_widgets/widgets/figure/figure.py,sha256=yujtlDj5NutRJ0gfHMkCVXvBNj5r2z3pb3gwWlUQ92Q,28822
|
179
173
|
bec_widgets/widgets/figure/plots/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
180
174
|
bec_widgets/widgets/figure/plots/axis_settings.py,sha256=QxRpQwgfBr1H0HTjfOpiXi_-n8I0BaZhS8LRXNeVfFg,3544
|
181
175
|
bec_widgets/widgets/figure/plots/axis_settings.ui,sha256=a2qIuK9lyi9HCyrSvPr6wxzmm1FymaWcpmyOhMIiFt8,11013
|
182
|
-
bec_widgets/widgets/figure/plots/plot_base.py,sha256=
|
176
|
+
bec_widgets/widgets/figure/plots/plot_base.py,sha256=TG9FZZJi9ixTeZ1yDOO4sl7fJ524wxbNcr-2_Qd2mcQ,11154
|
183
177
|
bec_widgets/widgets/figure/plots/image/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
184
|
-
bec_widgets/widgets/figure/plots/image/image.py,sha256=
|
178
|
+
bec_widgets/widgets/figure/plots/image/image.py,sha256=NIgGilRuRyCYKFEsMT3N_Cp1oGsNLra1Pk5ZtgYjcQM,24916
|
185
179
|
bec_widgets/widgets/figure/plots/image/image_item.py,sha256=RljjbkqJEr2cKDlqj1j5GQ1h89jpqOV-OpFz1TbED8I,10937
|
186
180
|
bec_widgets/widgets/figure/plots/image/image_processor.py,sha256=GeTtWjbldy6VejMwPGQgM-o3d6bmLglCjdoktu19xfA,5262
|
187
181
|
bec_widgets/widgets/figure/plots/motor_map/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -192,7 +186,7 @@ bec_widgets/widgets/figure/plots/waveform/waveform_curve.py,sha256=ZwRxSfPHbMWEv
|
|
192
186
|
bec_widgets/widgets/image/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
193
187
|
bec_widgets/widgets/image/bec_image_widget.pyproject,sha256=PHisdBo5_5UCApd27GkizzqgfdjsDx2bFZa_p9LiSW8,30
|
194
188
|
bec_widgets/widgets/image/bec_image_widget_plugin.py,sha256=B7whBMsoQ85MyCR_C6YHBl2s1T7odOJJYeiHaLXzmcM,1387
|
195
|
-
bec_widgets/widgets/image/image_widget.py,sha256=
|
189
|
+
bec_widgets/widgets/image/image_widget.py,sha256=csPtl48uZgSlyomxG68bFJX929Y2WOvgv5risWQuXFI,16319
|
196
190
|
bec_widgets/widgets/image/register_bec_image_widget.py,sha256=01YLZQTMSSIXvH1TSL-1AYsRs1a4EbSwKLVAwh9AjeA,478
|
197
191
|
bec_widgets/widgets/jupyter_console/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
198
192
|
bec_widgets/widgets/jupyter_console/jupyter_console.py,sha256=mBKM89H6SuHuFy1lQg1n8s1gQiN5QEkZf0xua8aPDns,2402
|
@@ -202,13 +196,19 @@ bec_widgets/widgets/motor_map/bec_motor_map_widget_plugin.py,sha256=V6iN82E8Za8B
|
|
202
196
|
bec_widgets/widgets/motor_map/motor_map_widget.py,sha256=URcysThbJKGsCZUqQm2lCtVn5FG8t4kT7DaN5EJUexg,7555
|
203
197
|
bec_widgets/widgets/motor_map/register_bec_motor_map_widget.py,sha256=qRG8PtWGjso0pWbvj_DXKnbUfmQzfGqPSrnAozXfM7o,492
|
204
198
|
bec_widgets/widgets/motor_map/motor_map_dialog/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
205
|
-
bec_widgets/widgets/motor_map/motor_map_dialog/motor_map_settings.py,sha256=
|
199
|
+
bec_widgets/widgets/motor_map/motor_map_dialog/motor_map_settings.py,sha256=U-r3YHsxf2XvZn0kVbrYIT2aXKSaG5wM1JEnGzwGMVU,2258
|
206
200
|
bec_widgets/widgets/motor_map/motor_map_dialog/motor_map_settings.ui,sha256=nv5vPftt6vcIl60OOZLRvwD29rdHVWOoGmz168BnwKw,2685
|
207
201
|
bec_widgets/widgets/position_indicator/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
208
202
|
bec_widgets/widgets/position_indicator/position_indicator.py,sha256=QVlWvs_RvEJe5IMxGYCpi-CXYF7vFeMqEMFCs6u5NGc,2020
|
209
203
|
bec_widgets/widgets/position_indicator/position_indicator.pyproject,sha256=s0JEf5YkpMag19ddFSYeRZ8erBau7erO3bqw05YrTyg,36
|
210
204
|
bec_widgets/widgets/position_indicator/position_indicator_plugin.py,sha256=xD8YyATYfpoHxGVcsecDKx9CLASAP6lKyypCEjRhNd0,1441
|
211
205
|
bec_widgets/widgets/position_indicator/register_position_indicator.py,sha256=OZNiMgM_80TPSAXK_0hXAkne4vUh8DGvh_OdpOiMpwI,516
|
206
|
+
bec_widgets/widgets/positioner_box/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
207
|
+
bec_widgets/widgets/positioner_box/positioner_box.py,sha256=nD_Nlk6-Q6rUWlhoGZ_IpF7PJwdZqumTnoBSKFYM-XI,9437
|
208
|
+
bec_widgets/widgets/positioner_box/positioner_box.pyproject,sha256=7966pHdDseaHciaPNEKgdQgbUThSZf5wEDCeAEJh9po,32
|
209
|
+
bec_widgets/widgets/positioner_box/positioner_box.ui,sha256=Odvy2uFKt2guLmBQo8ZVX_32fkkHCAbBvGRlYr_dsu4,5318
|
210
|
+
bec_widgets/widgets/positioner_box/positioner_box_plugin.py,sha256=-zv5LuUEp2lNwQ8G-vaBoxJHOKGn7WZpTQn5LD_M5Lk,1237
|
211
|
+
bec_widgets/widgets/positioner_box/register_positioner_box.py,sha256=UPOUjXXq6-IgSj0kdV_nJe1rYPMF8aIZxF4eSmWgQAg,483
|
212
212
|
bec_widgets/widgets/ring_progress_bar/__init__.py,sha256=_uoJKnDM2YAeUBfwc5WLbIHSJj7zm_FAurSKP3WRaCw,47
|
213
213
|
bec_widgets/widgets/ring_progress_bar/register_ring_progress_bar.py,sha256=uJrMhkuQi2PdWa0BwFJqjVXSkO-TXoyai4EQYOOe9t4,493
|
214
214
|
bec_widgets/widgets/ring_progress_bar/ring.py,sha256=2pdEzETaJpvx4Dzyosq2YhnvDOEUvFnj_f9GfFKpG5Q,11159
|
@@ -260,7 +260,7 @@ bec_widgets/widgets/waveform/waveform_popups/dap_summary_dialog/dap_summary.ui,s
|
|
260
260
|
bec_widgets/widgets/waveform/waveform_popups/dap_summary_dialog/dap_summary_dialog.py,sha256=UptWjHRVp7gTAMkWikfia3U6k8EV_pAvk-fI_vhWd2w,2437
|
261
261
|
bec_widgets/widgets/website/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
262
262
|
bec_widgets/widgets/website/register_website_widget.py,sha256=LIQJpV9uqcBiPR9cEAiDjaUS_l7JroYVdsotnLpD9H0,476
|
263
|
-
bec_widgets/widgets/website/website.py,sha256=
|
263
|
+
bec_widgets/widgets/website/website.py,sha256=vyRJr4jsti1h6cPHzTTtS_0IELJ3kYdS2_HdZCzavl4,1840
|
264
264
|
bec_widgets/widgets/website/website_widget.pyproject,sha256=scOiV3cV1_BjbzpPzy2N8rIJL5P2qIZz8ObTJ-Uvdtg,25
|
265
265
|
bec_widgets/widgets/website/website_widget_plugin.py,sha256=hcASV-UW2TsIwspApzMbKoTVL9rqImU8ukMRn1EfXTw,1358
|
266
266
|
docs/Makefile,sha256=i2WHuFlgfyAPEW4ssEP8NY4cOibDJrVjvzSEU8_Ggwc,634
|
@@ -318,51 +318,51 @@ tests/end-2-end/conftest.py,sha256=-BLnFE-NeCerf6xahGCkbZ4Ktactowi6RkBnboIzRvg,1
|
|
318
318
|
tests/end-2-end/test_bec_dock_rpc_e2e.py,sha256=hj06aUBGofq7yeFVoT3LB4NrCjc5FbOo5CGTvz7afpI,9118
|
319
319
|
tests/end-2-end/test_bec_figure_rpc_e2e.py,sha256=73vuBbPJvkMR3w2jnQ7lk0z4-wN3HAmkLFDdv4BRPrM,6604
|
320
320
|
tests/end-2-end/test_rpc_register_e2e.py,sha256=blhMiW7HVHX1kGm5dg8Sv0PeCuJ0gnBz3evznQFz_B8,1619
|
321
|
-
tests/end-2-end/test_scan_control_e2e.py,sha256=
|
321
|
+
tests/end-2-end/test_scan_control_e2e.py,sha256=u7oLgFyltkMW2apSZKDukMIXvYrbhHrU32p4mBdn8VE,2276
|
322
322
|
tests/references/SpinnerWidget/SpinnerWidget_darwin.png,sha256=-Tf5x0xY0pb-8sXH6Pk8cZL5PAxZ4vMR5RgyGCxisM4,9490
|
323
323
|
tests/references/SpinnerWidget/SpinnerWidget_linux.png,sha256=-Tf5x0xY0pb-8sXH6Pk8cZL5PAxZ4vMR5RgyGCxisM4,9490
|
324
324
|
tests/references/SpinnerWidget/SpinnerWidget_started_darwin.png,sha256=wPc65MrSSKJib2aBlPI20mBE-zfamOh-SORGRD27dhQ,14773
|
325
325
|
tests/references/SpinnerWidget/SpinnerWidget_started_linux.png,sha256=gE1L3nVuypmsW8vcnV9kX4mDgQGGXYjiEIYiRifr5DM,15265
|
326
326
|
tests/unit_tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
327
327
|
tests/unit_tests/client_mocks.py,sha256=4pS4KvvFGY9hjphds9i-GoIjVWVkax4XpDnVp6Mctfw,5275
|
328
|
-
tests/unit_tests/conftest.py,sha256=
|
328
|
+
tests/unit_tests/conftest.py,sha256=EE5RX_xR50ELJPgT2kny9rM1NCmCRO22sd_L9fvVSEk,1917
|
329
329
|
tests/unit_tests/test_bec_connector.py,sha256=5uqBfjgMeOlGvqJlFbytxEpZ1El7_Y2q8fZHh4GvtD8,2478
|
330
330
|
tests/unit_tests/test_bec_dispatcher.py,sha256=rYPiRizHaswhGZw55IBMneDFxmPiCCLAZQBqjEkpdyY,3992
|
331
|
-
tests/unit_tests/test_bec_dock.py,sha256=
|
332
|
-
tests/unit_tests/test_bec_figure.py,sha256=
|
333
|
-
tests/unit_tests/test_bec_image.py,sha256=
|
334
|
-
tests/unit_tests/test_bec_image_widget.py,sha256=
|
335
|
-
tests/unit_tests/test_bec_motor_map.py,sha256=
|
336
|
-
tests/unit_tests/test_bec_queue.py,sha256=
|
337
|
-
tests/unit_tests/test_bec_status_box.py,sha256=
|
331
|
+
tests/unit_tests/test_bec_dock.py,sha256=iZcyF6tjNHstFx0rtbI8zhvFvgQiOpb_CuOF-L6Dipc,5610
|
332
|
+
tests/unit_tests/test_bec_figure.py,sha256=oTlwHgDSrE4QRN3i9ZRM3QT2Xt8jfOyUTNxIZqZ4WKQ,9780
|
333
|
+
tests/unit_tests/test_bec_image.py,sha256=Bc9eaLDk_9MfVFC6BZ-dymf-bQZg_CHL810nssXsj_k,2814
|
334
|
+
tests/unit_tests/test_bec_image_widget.py,sha256=eU7uhKTQSf1Q5uV6EjsuUpf_oiMLNrZ1m10DjeQae0Y,7459
|
335
|
+
tests/unit_tests/test_bec_motor_map.py,sha256=H5O2pce9XkEV_t2uO20ib2Dh5_xVn3QA1_bVWcKgq1I,10117
|
336
|
+
tests/unit_tests/test_bec_queue.py,sha256=pHBZBTgxidAtp6Kcwi-qldUDxnoPGI0RweyLRj-4hHo,4646
|
337
|
+
tests/unit_tests/test_bec_status_box.py,sha256=gZdjyy9DNuUP9UwleTLj2Dp5HUImiqnkHjXWiqL0Q-o,4868
|
338
338
|
tests/unit_tests/test_client_utils.py,sha256=CBdWIVJ_UiyFzTJnX3XJm4PGw2uXhFvRCP_Y9ifckbw,2630
|
339
|
-
tests/unit_tests/test_color_map_selector.py,sha256=
|
339
|
+
tests/unit_tests/test_color_map_selector.py,sha256=dTsizpT7TUpX2AEWIc0v09KPOryhWepFXFI9duQ3NF8,1497
|
340
340
|
tests/unit_tests/test_color_validation.py,sha256=xbFbtFDia36XLgaNrX2IwvAX3IDC_Odpj5BGoJSgiIE,2389
|
341
341
|
tests/unit_tests/test_crosshair.py,sha256=3OMAJ2ZaISYXMOtkXf1rPdy94vCr8njeLi6uHblBL9Q,5045
|
342
|
-
tests/unit_tests/
|
343
|
-
tests/unit_tests/
|
344
|
-
tests/unit_tests/test_device_input_widgets.py,sha256=GeM9Ed5jmPvSQTHUl3nAZuQRfSD-ryA_w9kocjPXiwk,5935
|
342
|
+
tests/unit_tests/test_device_input_base.py,sha256=LY-3adMb2xM9pBiP6V2bAJF_65csCe2Xfaq5ArVEE1E,2859
|
343
|
+
tests/unit_tests/test_device_input_widgets.py,sha256=Y3mc_EaeQAPxpj6DijvxLLyMPSxnaNN86KhIL4ASO3E,5821
|
345
344
|
tests/unit_tests/test_error_utils.py,sha256=LQOxz29WCGOe0qwFkaPDixjUmdnF3qeAGxD4A3t9IKg,2108
|
346
345
|
tests/unit_tests/test_generate_cli_client.py,sha256=ng-eV5iF7Dhm-6YpxYo99CMY0KgqoaZBQNkMeKULDBU,3355
|
347
346
|
tests/unit_tests/test_generate_plugin.py,sha256=9603ucZChM-pYpHadzsR94U1Zec1KZT34WedX9qzgMo,4464
|
348
|
-
tests/unit_tests/test_motor_map_widget.py,sha256=
|
349
|
-
tests/unit_tests/test_plot_base.py,sha256=
|
347
|
+
tests/unit_tests/test_motor_map_widget.py,sha256=j3Vv_jNTsJTg6UgtwoxFp-Qwi_1blT9HK-USALPgxSI,7469
|
348
|
+
tests/unit_tests/test_plot_base.py,sha256=evejmkYBBAu9f5XoA4dpYGPRGR5lIc3JqN4UQdGRY3Q,4134
|
350
349
|
tests/unit_tests/test_plugin_utils.py,sha256=ayksWdrFY7kOiA0wVEjKFmFCF3UhH3lG8tzPVOpwysk,528
|
351
|
-
tests/unit_tests/
|
350
|
+
tests/unit_tests/test_positioner_box.py,sha256=Uc8d3rfgo74b-S53xglQr1HIXNBIKJIE5y5lkSSVZeg,3919
|
351
|
+
tests/unit_tests/test_ring_progress_bar.py,sha256=Q-hbRPj44Oa3RLJayQGNUKTnsDllk6j4sJwyJdDudT4,12233
|
352
352
|
tests/unit_tests/test_rpc_register.py,sha256=hECjZEimd440mwRrO0rg7L3PKN7__3DgjmESN6wx3bo,1179
|
353
353
|
tests/unit_tests/test_rpc_server.py,sha256=MvstcvqUsnGAzUxw8Et1xXXikk_VIxFPwDZD0v1QGkg,1500
|
354
354
|
tests/unit_tests/test_rpc_widget_handler.py,sha256=ceQ3BPnBIFY2Hy-sDPw0wxxREVTTphILts0gvX9qoUw,234
|
355
|
-
tests/unit_tests/test_scan_control.py,sha256=
|
355
|
+
tests/unit_tests/test_scan_control.py,sha256=Wr6KcE8av4sEIOx5VgYbzVCem3Jgb4Kzx_oOuvwlmkE,13459
|
356
356
|
tests/unit_tests/test_scan_control_group_box.py,sha256=HNqjP10B_NonikspNwKz9upJU-t7xf6hwBerNhbC-uo,5563
|
357
|
-
tests/unit_tests/test_setting_dialog.py,sha256=
|
357
|
+
tests/unit_tests/test_setting_dialog.py,sha256=vgHz5eDSYidpa4lRS4UxaW4GsEKc8ZkrxcdjxVPCvEE,3130
|
358
358
|
tests/unit_tests/test_spinner.py,sha256=Moq84xC4ZLRQCcFLuTCrWIYdP4Y8E49s_IlZ3tKx9Jc,814
|
359
|
-
tests/unit_tests/test_stop_button.py,sha256=
|
360
|
-
tests/unit_tests/test_text_box_widget.py,sha256=
|
361
|
-
tests/unit_tests/test_toggle.py,sha256=
|
362
|
-
tests/unit_tests/test_vscode_widget.py,sha256=
|
363
|
-
tests/unit_tests/test_waveform1d.py,sha256=
|
364
|
-
tests/unit_tests/test_waveform_widget.py,sha256=
|
365
|
-
tests/unit_tests/test_website_widget.py,sha256=
|
359
|
+
tests/unit_tests/test_stop_button.py,sha256=Hc87-G6QzLnpeeIdf82GdLI1_GA1NeMuGP7JBTExxQQ,770
|
360
|
+
tests/unit_tests/test_text_box_widget.py,sha256=OhHy5gu_XgWU2WvcO5ZcGbZcc-tiE-lZyOLPOsyCgmY,1843
|
361
|
+
tests/unit_tests/test_toggle.py,sha256=Amzgres7te0tTQIDR2WMKSx9Kce44TxMpIPR6HZygXQ,832
|
362
|
+
tests/unit_tests/test_vscode_widget.py,sha256=BOepZuDzbATK7_yy4wJEkVbz5VWSwVBj9__uxJ5vpM0,2748
|
363
|
+
tests/unit_tests/test_waveform1d.py,sha256=AOfpHvebsEVb-MNf8Shh2bAML5bandtvoXkYqKWe8qc,24470
|
364
|
+
tests/unit_tests/test_waveform_widget.py,sha256=1FJMo6dDptVk-_Sq4dAhBza4HYe5w6fLQfsOvzWkueg,8573
|
365
|
+
tests/unit_tests/test_website_widget.py,sha256=POcHK4INck3quasMD14DBlBBJWD0uKJbkOMt_JsPhXA,708
|
366
366
|
tests/unit_tests/test_widget_io.py,sha256=FeL3ZYSBQnRt6jxj8VGYw1cmcicRQyHKleahw7XIyR0,3475
|
367
367
|
tests/unit_tests/test_yaml_dialog.py,sha256=SEvUgC_poWC6fAoHVWolaORpgMFc7c0Xqqk9cFvHSvo,5826
|
368
368
|
tests/unit_tests/test_configs/config_device.yaml,sha256=h3zNb5ZaT_sA59Sf-24qsXs54MgUsspo-GOJmKWHx3o,695
|
@@ -370,8 +370,8 @@ tests/unit_tests/test_configs/config_device_no_entry.yaml,sha256=hdvue9KLc_kfNzG
|
|
370
370
|
tests/unit_tests/test_configs/config_scan.yaml,sha256=vo484BbWOjA_e-h6bTjSV9k7QaQHrlAvx-z8wtY-P4E,1915
|
371
371
|
tests/unit_tests/test_msgs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
372
372
|
tests/unit_tests/test_msgs/available_scans_message.py,sha256=m_z97hIrjHXXMa2Ex-UvsPmTxOYXfjxyJaGkIY6StTY,46532
|
373
|
-
bec_widgets-0.93.
|
374
|
-
bec_widgets-0.93.
|
375
|
-
bec_widgets-0.93.
|
376
|
-
bec_widgets-0.93.
|
377
|
-
bec_widgets-0.93.
|
373
|
+
bec_widgets-0.93.4.dist-info/METADATA,sha256=xpE3WACvw9YH_nuy0jPV4Z6i7pmskaF_vKGawCZmRj4,1307
|
374
|
+
bec_widgets-0.93.4.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
|
375
|
+
bec_widgets-0.93.4.dist-info/entry_points.txt,sha256=3otEkCdDB9LZJuBLzG4pFLK5Di0CVybN_12IsZrQ-58,166
|
376
|
+
bec_widgets-0.93.4.dist-info/licenses/LICENSE,sha256=YRKe85CBRyP7UpEAWwU8_qSIyuy5-l_9C-HKg5Qm8MQ,1511
|
377
|
+
bec_widgets-0.93.4.dist-info/RECORD,,
|
pyproject.toml
CHANGED
tests/unit_tests/conftest.py
CHANGED
@@ -1,4 +1,6 @@
|
|
1
1
|
import pytest
|
2
|
+
from pytestqt.exceptions import TimeoutError as QtBotTimeoutError
|
3
|
+
from qtpy.QtWidgets import QApplication
|
2
4
|
|
3
5
|
from bec_widgets.cli.rpc_register import RPCRegister
|
4
6
|
from bec_widgets.qt_utils import error_popups
|
@@ -6,9 +8,16 @@ from bec_widgets.utils import bec_dispatcher as bec_dispatcher_module
|
|
6
8
|
|
7
9
|
|
8
10
|
@pytest.fixture(autouse=True)
|
9
|
-
def qapplication(
|
11
|
+
def qapplication(qtbot): # pylint: disable=unused-argument
|
10
12
|
yield
|
11
|
-
|
13
|
+
|
14
|
+
qapp = QApplication.instance()
|
15
|
+
# qapp.quit()
|
16
|
+
qapp.processEvents()
|
17
|
+
try:
|
18
|
+
qtbot.waitUntil(lambda: qapp.topLevelWidgets() == [])
|
19
|
+
except QtBotTimeoutError as exc:
|
20
|
+
raise TimeoutError(f"Failed to close all widgets: {qapp.topLevelWidgets()}") from exc
|
12
21
|
|
13
22
|
|
14
23
|
@pytest.fixture(autouse=True)
|
@@ -31,3 +40,25 @@ def bec_dispatcher(threads_check): # pylint: disable=unused-argument
|
|
31
40
|
@pytest.fixture(autouse=True)
|
32
41
|
def clean_singleton():
|
33
42
|
error_popups._popup_utility_instance = None
|
43
|
+
|
44
|
+
|
45
|
+
def create_widget(qtbot, widget, *args, **kwargs):
|
46
|
+
"""
|
47
|
+
Create a widget and add it to the qtbot for testing. This is a helper function that
|
48
|
+
should be used in all tests that require a widget to be created.
|
49
|
+
DO NOT CREATE WIDGETS DIRECTLY IN A FIXTURE!
|
50
|
+
|
51
|
+
Args:
|
52
|
+
qtbot (fixture): pytest-qt fixture
|
53
|
+
widget (QWidget): widget class to be created
|
54
|
+
*args: positional arguments for the widget
|
55
|
+
**kwargs: keyword arguments for the widget
|
56
|
+
|
57
|
+
Returns:
|
58
|
+
QWidget: the created widget
|
59
|
+
|
60
|
+
"""
|
61
|
+
widget = widget(*args, **kwargs)
|
62
|
+
qtbot.addWidget(widget)
|
63
|
+
qtbot.waitExposed(widget)
|
64
|
+
return widget
|
@@ -14,7 +14,6 @@ def bec_dock_area(qtbot, mocked_client):
|
|
14
14
|
qtbot.addWidget(widget)
|
15
15
|
qtbot.waitExposed(widget)
|
16
16
|
yield widget
|
17
|
-
widget.close()
|
18
17
|
|
19
18
|
|
20
19
|
def test_bec_dock_area_init(bec_dock_area):
|
@@ -128,10 +127,12 @@ def test_toolbar_add_plot_motor_map(bec_dock_area):
|
|
128
127
|
assert bec_dock_area.panels["motor_map_1"].widgets[0].config.widget_class == "BECMotorMapWidget"
|
129
128
|
|
130
129
|
|
131
|
-
def
|
132
|
-
bec_dock_area.toolbar.widgets["menu_devices"].widgets["
|
133
|
-
assert "
|
134
|
-
assert
|
130
|
+
def test_toolbar_add_device_positioner_box(bec_dock_area):
|
131
|
+
bec_dock_area.toolbar.widgets["menu_devices"].widgets["positioner_box"].trigger()
|
132
|
+
assert "positioner_box_1" in bec_dock_area.panels
|
133
|
+
assert (
|
134
|
+
bec_dock_area.panels["positioner_box_1"].widgets[0].config.widget_class == "PositionerBox"
|
135
|
+
)
|
135
136
|
|
136
137
|
|
137
138
|
def test_toolbar_add_utils_queue(bec_dock_area):
|
@@ -9,18 +9,11 @@ from bec_widgets.widgets.figure.plots.motor_map.motor_map import BECMotorMap
|
|
9
9
|
from bec_widgets.widgets.figure.plots.waveform.waveform import BECWaveform
|
10
10
|
|
11
11
|
from .client_mocks import mocked_client
|
12
|
+
from .conftest import create_widget
|
12
13
|
|
13
14
|
|
14
|
-
|
15
|
-
|
16
|
-
widget = BECFigure(client=mocked_client)
|
17
|
-
qtbot.addWidget(widget)
|
18
|
-
qtbot.waitExposed(widget)
|
19
|
-
yield widget
|
20
|
-
widget.close()
|
21
|
-
|
22
|
-
|
23
|
-
def test_bec_figure_init(bec_figure):
|
15
|
+
def test_bec_figure_init(qtbot, mocked_client):
|
16
|
+
bec_figure = create_widget(qtbot, BECFigure, client=mocked_client)
|
24
17
|
assert bec_figure is not None
|
25
18
|
assert bec_figure.client is not None
|
26
19
|
assert isinstance(bec_figure, BECFigure)
|
@@ -34,7 +27,8 @@ def test_bec_figure_init_with_config(mocked_client):
|
|
34
27
|
assert widget.config.theme == "dark"
|
35
28
|
|
36
29
|
|
37
|
-
def test_bec_figure_add_remove_plot(
|
30
|
+
def test_bec_figure_add_remove_plot(qtbot, mocked_client):
|
31
|
+
bec_figure = create_widget(qtbot, BECFigure, client=mocked_client)
|
38
32
|
initial_count = len(bec_figure._widgets)
|
39
33
|
|
40
34
|
# Adding 3 widgets - 2 WaveformBase and 1 PlotBase
|
@@ -64,7 +58,8 @@ def test_bec_figure_add_remove_plot(bec_figure):
|
|
64
58
|
assert bec_figure._widgets[w1.gui_id].config.widget_class == "BECWaveform"
|
65
59
|
|
66
60
|
|
67
|
-
def test_add_different_types_of_widgets(
|
61
|
+
def test_add_different_types_of_widgets(qtbot, mocked_client):
|
62
|
+
bec_figure = create_widget(qtbot, BECFigure, client=mocked_client)
|
68
63
|
plt = bec_figure.plot(x_name="samx", y_name="bpm4i")
|
69
64
|
im = bec_figure.image("eiger")
|
70
65
|
motor_map = bec_figure.motor_map("samx", "samy")
|
@@ -74,7 +69,8 @@ def test_add_different_types_of_widgets(bec_figure):
|
|
74
69
|
assert motor_map.__class__ == BECMotorMap
|
75
70
|
|
76
71
|
|
77
|
-
def test_access_widgets_access_errors(
|
72
|
+
def test_access_widgets_access_errors(qtbot, mocked_client):
|
73
|
+
bec_figure = create_widget(qtbot, BECFigure, client=mocked_client)
|
78
74
|
bec_figure.plot(row=0, col=0)
|
79
75
|
|
80
76
|
# access widget by non-existent coordinates
|
@@ -96,7 +92,8 @@ def test_access_widgets_access_errors(bec_figure):
|
|
96
92
|
)
|
97
93
|
|
98
94
|
|
99
|
-
def test_add_plot_to_occupied_position(
|
95
|
+
def test_add_plot_to_occupied_position(qtbot, mocked_client):
|
96
|
+
bec_figure = create_widget(qtbot, BECFigure, client=mocked_client)
|
100
97
|
bec_figure.plot(row=0, col=0)
|
101
98
|
|
102
99
|
with pytest.raises(ValueError) as excinfo:
|
@@ -104,7 +101,8 @@ def test_add_plot_to_occupied_position(bec_figure):
|
|
104
101
|
assert "Position at row 0 and column 0 is already occupied." in str(excinfo.value)
|
105
102
|
|
106
103
|
|
107
|
-
def test_remove_plots(
|
104
|
+
def test_remove_plots(qtbot, mocked_client):
|
105
|
+
bec_figure = create_widget(qtbot, BECFigure, client=mocked_client)
|
108
106
|
w1 = bec_figure.plot(row=0, col=0)
|
109
107
|
w2 = bec_figure.plot(row=0, col=1)
|
110
108
|
w3 = bec_figure.plot(row=1, col=0)
|
@@ -134,7 +132,8 @@ def test_remove_plots(bec_figure):
|
|
134
132
|
assert len(bec_figure._widgets) == 1
|
135
133
|
|
136
134
|
|
137
|
-
def test_remove_plots_by_coordinates_ints(
|
135
|
+
def test_remove_plots_by_coordinates_ints(qtbot, mocked_client):
|
136
|
+
bec_figure = create_widget(qtbot, BECFigure, client=mocked_client)
|
138
137
|
w1 = bec_figure.plot(row=0, col=0)
|
139
138
|
w2 = bec_figure.plot(row=0, col=1)
|
140
139
|
|
@@ -145,7 +144,8 @@ def test_remove_plots_by_coordinates_ints(bec_figure):
|
|
145
144
|
assert len(bec_figure._widgets) == 1
|
146
145
|
|
147
146
|
|
148
|
-
def test_remove_plots_by_coordinates_tuple(
|
147
|
+
def test_remove_plots_by_coordinates_tuple(qtbot, mocked_client):
|
148
|
+
bec_figure = create_widget(qtbot, BECFigure, client=mocked_client)
|
149
149
|
w1 = bec_figure.plot(row=0, col=0)
|
150
150
|
w2 = bec_figure.plot(row=0, col=1)
|
151
151
|
|
@@ -156,7 +156,8 @@ def test_remove_plots_by_coordinates_tuple(bec_figure):
|
|
156
156
|
assert len(bec_figure._widgets) == 1
|
157
157
|
|
158
158
|
|
159
|
-
def test_remove_plot_by_id_error(
|
159
|
+
def test_remove_plot_by_id_error(qtbot, mocked_client):
|
160
|
+
bec_figure = create_widget(qtbot, BECFigure, client=mocked_client)
|
160
161
|
bec_figure.plot()
|
161
162
|
|
162
163
|
with pytest.raises(ValueError) as excinfo:
|
@@ -164,7 +165,8 @@ def test_remove_plot_by_id_error(bec_figure):
|
|
164
165
|
assert "Widget with ID 'non_existent_widget' does not exist." in str(excinfo.value)
|
165
166
|
|
166
167
|
|
167
|
-
def test_remove_plot_by_coordinates_error(
|
168
|
+
def test_remove_plot_by_coordinates_error(qtbot, mocked_client):
|
169
|
+
bec_figure = create_widget(qtbot, BECFigure, client=mocked_client)
|
168
170
|
bec_figure.plot(row=0, col=0)
|
169
171
|
|
170
172
|
with pytest.raises(ValueError) as excinfo:
|
@@ -172,7 +174,8 @@ def test_remove_plot_by_coordinates_error(bec_figure):
|
|
172
174
|
assert "No widget at coordinates (0, 1)" in str(excinfo.value)
|
173
175
|
|
174
176
|
|
175
|
-
def test_remove_plot_by_providing_nothing(
|
177
|
+
def test_remove_plot_by_providing_nothing(qtbot, mocked_client):
|
178
|
+
bec_figure = create_widget(qtbot, BECFigure, client=mocked_client)
|
176
179
|
bec_figure.plot(row=0, col=0)
|
177
180
|
|
178
181
|
with pytest.raises(ValueError) as excinfo:
|
@@ -192,7 +195,8 @@ def test_remove_plot_by_providing_nothing(bec_figure):
|
|
192
195
|
# assert bec_figure.backgroundBrush().color().name() == "#000000"
|
193
196
|
|
194
197
|
|
195
|
-
def test_change_layout(
|
198
|
+
def test_change_layout(qtbot, mocked_client):
|
199
|
+
bec_figure = create_widget(qtbot, BECFigure, client=mocked_client)
|
196
200
|
w1 = bec_figure.plot(row=0, col=0)
|
197
201
|
w2 = bec_figure.plot(row=0, col=1)
|
198
202
|
w3 = bec_figure.plot(row=1, col=0)
|
@@ -215,7 +219,8 @@ def test_change_layout(bec_figure):
|
|
215
219
|
assert bec_figure[0, 3] == w4
|
216
220
|
|
217
221
|
|
218
|
-
def test_clear_all(
|
222
|
+
def test_clear_all(qtbot, mocked_client):
|
223
|
+
bec_figure = create_widget(qtbot, BECFigure, client=mocked_client)
|
219
224
|
bec_figure.plot(row=0, col=0)
|
220
225
|
bec_figure.plot(row=0, col=1)
|
221
226
|
bec_figure.plot(row=1, col=0)
|
@@ -227,7 +232,8 @@ def test_clear_all(bec_figure):
|
|
227
232
|
assert np.shape(bec_figure.grid) == (0,)
|
228
233
|
|
229
234
|
|
230
|
-
def test_shortcuts(
|
235
|
+
def test_shortcuts(qtbot, mocked_client):
|
236
|
+
bec_figure = create_widget(qtbot, BECFigure, client=mocked_client)
|
231
237
|
plt = bec_figure.plot(x_name="samx", y_name="bpm4i")
|
232
238
|
im = bec_figure.image("eiger")
|
233
239
|
motor_map = bec_figure.motor_map("samx", "samy")
|
@@ -240,7 +246,8 @@ def test_shortcuts(bec_figure):
|
|
240
246
|
assert motor_map.__class__ == BECMotorMap
|
241
247
|
|
242
248
|
|
243
|
-
def test_plot_access_factory(
|
249
|
+
def test_plot_access_factory(qtbot, mocked_client):
|
250
|
+
bec_figure = create_widget(qtbot, BECFigure, client=mocked_client)
|
244
251
|
plt_00 = bec_figure.plot(x_name="samx", y_name="bpm4i")
|
245
252
|
plt_01 = bec_figure.plot(x_name="samx", y_name="bpm4i", row=0, col=1)
|
246
253
|
plt_10 = bec_figure.plot(new=True)
|
@@ -6,8 +6,10 @@ import pytest
|
|
6
6
|
from bec_lib import messages
|
7
7
|
from qtpy.QtGui import QFontInfo
|
8
8
|
|
9
|
+
from bec_widgets.widgets.figure import BECFigure
|
10
|
+
|
9
11
|
from .client_mocks import mocked_client
|
10
|
-
from .
|
12
|
+
from .conftest import create_widget
|
11
13
|
|
12
14
|
|
13
15
|
@pytest.fixture
|
@@ -15,7 +17,8 @@ def bec_image_show(bec_figure):
|
|
15
17
|
yield bec_figure.image("eiger")
|
16
18
|
|
17
19
|
|
18
|
-
def test_on_image_update(
|
20
|
+
def test_on_image_update(qtbot, mocked_client):
|
21
|
+
bec_image_show = create_widget(qtbot, BECFigure, client=mocked_client).image("eiger")
|
19
22
|
data = np.random.rand(100, 100)
|
20
23
|
msg = messages.DeviceMonitor2DMessage(device="eiger", data=data, metadata={"scan_id": "12345"})
|
21
24
|
bec_image_show.on_image_update(msg.content, msg.metadata)
|
@@ -23,7 +26,8 @@ def test_on_image_update(bec_image_show):
|
|
23
26
|
assert np.array_equal(img.get_data(), data)
|
24
27
|
|
25
28
|
|
26
|
-
def test_autorange_on_image_update(
|
29
|
+
def test_autorange_on_image_update(qtbot, mocked_client):
|
30
|
+
bec_image_show = create_widget(qtbot, BECFigure, client=mocked_client).image("eiger")
|
27
31
|
# Check if autorange mode "mean" works, should be default
|
28
32
|
data = np.random.rand(100, 100)
|
29
33
|
msg = messages.DeviceMonitor2DMessage(device="eiger", data=data, metadata={"scan_id": "12345"})
|