bec-widgets 0.93.4__py3-none-any.whl → 0.93.5__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 +16 -16
- PKG-INFO +1 -1
- bec_widgets/assets/toolbar_icons/device_line_edit.svg +3 -0
- bec_widgets/widgets/positioner_box/positioner_box.py +37 -4
- bec_widgets/widgets/positioner_box/positioner_box.ui +10 -0
- bec_widgets/widgets/positioner_box/positioner_box_plugin.py +6 -2
- {bec_widgets-0.93.4.dist-info → bec_widgets-0.93.5.dist-info}/METADATA +1 -1
- {bec_widgets-0.93.4.dist-info → bec_widgets-0.93.5.dist-info}/RECORD +16 -15
- pyproject.toml +1 -1
- tests/end-2-end/test_bec_dock_rpc_e2e.py +13 -2
- tests/end-2-end/test_bec_figure_rpc_e2e.py +9 -7
- /bec_widgets/assets/designer_icons/{device_box.png → positioner_box.png} +0 -0
- /bec_widgets/assets/toolbar_icons/{device_box.svg → positioner_box.svg} +0 -0
- {bec_widgets-0.93.4.dist-info → bec_widgets-0.93.5.dist-info}/WHEEL +0 -0
- {bec_widgets-0.93.4.dist-info → bec_widgets-0.93.5.dist-info}/entry_points.txt +0 -0
- {bec_widgets-0.93.4.dist-info → bec_widgets-0.93.5.dist-info}/licenses/LICENSE +0 -0
CHANGELOG.md
CHANGED
@@ -1,5 +1,21 @@
|
|
1
1
|
# CHANGELOG
|
2
2
|
|
3
|
+
## v0.93.5 (2024-08-08)
|
4
|
+
|
5
|
+
### Fix
|
6
|
+
|
7
|
+
* fix(positioner_box): icons fixed ([`281633d`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/281633deff15b6879dac3a4f0770fa6949aaecdc))
|
8
|
+
|
9
|
+
### Refactor
|
10
|
+
|
11
|
+
* refactor: add button for positioner selection ([`0d190c5`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/0d190c5c5996e59fec4bdd44d2003e10e200b009))
|
12
|
+
|
13
|
+
### Test
|
14
|
+
|
15
|
+
* test(dap): wait for fit ([`6269009`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/6269009e5451f830cdee58a514c7858483488a8d))
|
16
|
+
|
17
|
+
* test(auto-update): wait for rendering ([`6d2442d`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/6d2442d23c683fe92af13df982ce681c07e99cde))
|
18
|
+
|
3
19
|
## v0.93.4 (2024-08-07)
|
4
20
|
|
5
21
|
### Fix
|
@@ -129,19 +145,3 @@ This reverts commit fd6ae91993a23a7b8dbb2cf3c4b7c3eda6d2b0f6 ([`5aad401`](https:
|
|
129
145
|
* fix(dock): custom label can be created closable ([`4457ef2`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/4457ef2147e21b856c9dcaf63c81ba98002dcaf1))
|
130
146
|
|
131
147
|
* fix(device_combobox): set minimum size to 125px ([`1206e15`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/1206e153094cd8505badf69a1461572a76b4c5ad))
|
132
|
-
|
133
|
-
## v0.91.0 (2024-07-23)
|
134
|
-
|
135
|
-
### Feature
|
136
|
-
|
137
|
-
* feat(dock_area): plugin added ([`a16b87a`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/a16b87ac28d164230dd2e8020f50ff3a63cd407e))
|
138
|
-
|
139
|
-
### Fix
|
140
|
-
|
141
|
-
* fix(status_item): icons changed to material design ([`1b9c55a`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/1b9c55a46a0dfd8678c8e95ff64dd6e8cfb9233e))
|
142
|
-
|
143
|
-
* fix(plugins): Qt Designer plugins icons adjusted ([`f4844d2`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/f4844d2e067ce75dc64b89b230d7932b308ddfc2))
|
144
|
-
|
145
|
-
### Test
|
146
|
-
|
147
|
-
* test(dock_area): tests extended ([`06fab0e`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/06fab0eab926cef5677d4988fd1fce09da342dd8))
|
PKG-INFO
CHANGED
@@ -0,0 +1,3 @@
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" height="48px" viewBox="0 -960 960 960" width="48px" fill="#FFFFFF">
|
2
|
+
<path d="M180-404.87v-50.26h289.75v50.26H180Zm0-162.57v-50.25h454.62v50.25H180Zm0-162.3V-780h454.62v50.26H180ZM524.62-180v-105.69l217.15-216.16q7.46-7.07 16.11-10.3 8.65-3.23 17.3-3.23 9.43 0 18.25 3.53 8.82 3.54 16.03 10.62l37 37.38q6.87 7.47 10.21 16.16Q860-439 860-430.31t-3.37 17.69q-3.37 9-10.52 16.46L630.31-180H524.62Zm250.69-211.69 37-38.62-37-37.38-38 38 38 38Z"/>
|
3
|
+
</svg>
|
@@ -7,16 +7,19 @@ from bec_lib.device import Positioner
|
|
7
7
|
from bec_lib.endpoints import MessageEndpoints
|
8
8
|
from bec_lib.logger import bec_logger
|
9
9
|
from bec_lib.messages import ScanQueueMessage
|
10
|
-
from qtpy.QtCore import Property, Signal, Slot
|
11
|
-
from qtpy.QtGui import QDoubleValidator
|
12
|
-
from qtpy.QtWidgets import QDoubleSpinBox, QVBoxLayout, QWidget
|
10
|
+
from qtpy.QtCore import Property, QSize, Signal, Slot
|
11
|
+
from qtpy.QtGui import QDoubleValidator, QIcon
|
12
|
+
from qtpy.QtWidgets import QDialog, QDoubleSpinBox, QPushButton, QVBoxLayout, QWidget
|
13
13
|
|
14
14
|
from bec_widgets.utils import UILoader
|
15
15
|
from bec_widgets.utils.bec_widget import BECWidget
|
16
16
|
from bec_widgets.utils.colors import apply_theme
|
17
|
+
from bec_widgets.widgets.device_line_edit.device_line_edit import DeviceLineEdit
|
17
18
|
|
18
19
|
logger = bec_logger.logger
|
19
20
|
|
21
|
+
MODULE_PATH = os.path.dirname(os.path.dirname(os.path.dirname(__file__)))
|
22
|
+
|
20
23
|
|
21
24
|
class PositionerBox(BECWidget, QWidget):
|
22
25
|
"""Simple Widget to control a positioner in box form"""
|
@@ -71,6 +74,36 @@ class PositionerBox(BECWidget, QWidget):
|
|
71
74
|
self.setpoint_validator = QDoubleValidator()
|
72
75
|
self.ui.setpoint.setValidator(self.setpoint_validator)
|
73
76
|
self.ui.spinner_widget.start()
|
77
|
+
self.ui.tool_button.clicked.connect(self._open_dialog_selection)
|
78
|
+
icon = QIcon()
|
79
|
+
icon.addFile(
|
80
|
+
os.path.join(MODULE_PATH, "assets", "toolbar_icons", "device_line_edit.svg"),
|
81
|
+
size=QSize(16, 16),
|
82
|
+
)
|
83
|
+
self.ui.tool_button.setIcon(icon)
|
84
|
+
|
85
|
+
def _open_dialog_selection(self):
|
86
|
+
"""Open dialog window for positioner selection"""
|
87
|
+
dialog = QDialog(self)
|
88
|
+
dialog.setWindowTitle("Positioner Selection")
|
89
|
+
layout = QVBoxLayout()
|
90
|
+
line_edit = DeviceLineEdit(self, client=self.client, device_filter="Positioner")
|
91
|
+
line_edit.textChanged.connect(self._positioner_changed)
|
92
|
+
layout.addWidget(line_edit)
|
93
|
+
close_button = QPushButton("Close")
|
94
|
+
close_button.clicked.connect(dialog.accept)
|
95
|
+
layout.addWidget(close_button)
|
96
|
+
dialog.setLayout(layout)
|
97
|
+
dialog.exec()
|
98
|
+
|
99
|
+
@Slot(str)
|
100
|
+
def _positioner_changed(self, positioner_name: str):
|
101
|
+
"""Changed input in combobox.
|
102
|
+
|
103
|
+
Args:
|
104
|
+
positioner_name (str): name of the positioner
|
105
|
+
"""
|
106
|
+
self.set_positioner(positioner_name)
|
74
107
|
|
75
108
|
def init_device(self):
|
76
109
|
"""Init the device view and readback"""
|
@@ -267,7 +300,7 @@ if __name__ == "__main__": # pragma: no cover
|
|
267
300
|
from qtpy.QtWidgets import QApplication
|
268
301
|
|
269
302
|
app = QApplication(sys.argv)
|
270
|
-
apply_theme("
|
303
|
+
apply_theme("dark")
|
271
304
|
widget = PositionerBox(device="bpm4i")
|
272
305
|
|
273
306
|
widget.show()
|
@@ -78,6 +78,9 @@
|
|
78
78
|
<property name="enabled">
|
79
79
|
<bool>false</bool>
|
80
80
|
</property>
|
81
|
+
<property name="alignment">
|
82
|
+
<set>Qt::AlignmentFlag::AlignCenter</set>
|
83
|
+
</property>
|
81
84
|
</widget>
|
82
85
|
</item>
|
83
86
|
<item row="3" column="0">
|
@@ -125,6 +128,13 @@
|
|
125
128
|
<layout class="QVBoxLayout" name="verticalLayout_2">
|
126
129
|
<item>
|
127
130
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
131
|
+
<item>
|
132
|
+
<widget class="QToolButton" name="tool_button">
|
133
|
+
<property name="text">
|
134
|
+
<string>...</string>
|
135
|
+
</property>
|
136
|
+
</widget>
|
137
|
+
</item>
|
128
138
|
<item>
|
129
139
|
<spacer name="horizontalSpacer">
|
130
140
|
<property name="orientation">
|
@@ -1,6 +1,8 @@
|
|
1
1
|
# Copyright (C) 2022 The Qt Company Ltd.
|
2
2
|
# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
|
3
3
|
|
4
|
+
import os
|
5
|
+
|
4
6
|
from qtpy.QtDesigner import QDesignerCustomWidgetInterface
|
5
7
|
from qtpy.QtGui import QIcon
|
6
8
|
|
@@ -12,6 +14,7 @@ DOM_XML = """
|
|
12
14
|
</widget>
|
13
15
|
</ui>
|
14
16
|
"""
|
17
|
+
MODULE_PATH = os.path.dirname(os.path.dirname(os.path.dirname(__file__)))
|
15
18
|
|
16
19
|
|
17
20
|
class PositionerBoxPlugin(QDesignerCustomWidgetInterface): # pragma: no cover
|
@@ -27,10 +30,11 @@ class PositionerBoxPlugin(QDesignerCustomWidgetInterface): # pragma: no cover
|
|
27
30
|
return DOM_XML
|
28
31
|
|
29
32
|
def group(self):
|
30
|
-
return ""
|
33
|
+
return "Device Control"
|
31
34
|
|
32
35
|
def icon(self):
|
33
|
-
|
36
|
+
icon_path = os.path.join(MODULE_PATH, "assets", "designer_icons", "positioner_box.png")
|
37
|
+
return QIcon(icon_path)
|
34
38
|
|
35
39
|
def includeFile(self):
|
36
40
|
return "positioner_box"
|
@@ -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=9TA6IrNnjp3uhr3k-Msk1-QcCfc2lNXu_mB-TBx7L44,6639
|
6
6
|
LICENSE,sha256=YRKe85CBRyP7UpEAWwU8_qSIyuy5-l_9C-HKg5Qm8MQ,1511
|
7
|
-
PKG-INFO,sha256=
|
7
|
+
PKG-INFO,sha256=h4oukmTNxTFeOKdXwV_rgzM7vsWlGaVuWvm91kRPwWk,1307
|
8
8
|
README.md,sha256=Od69x-RS85Hph0-WwWACwal4yUd67XkEn4APEfHhHFw,2649
|
9
|
-
pyproject.toml,sha256=
|
9
|
+
pyproject.toml,sha256=t2YPaVUqAHjl16jfLZWIemuL8yDGlw3XXaMRfTXb5Tc,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
|
@@ -19,7 +19,6 @@ bec_widgets/assets/app_icons/terminal_icon.png,sha256=bJl7Tft4Fi2uxvuXI8o14uMHnI
|
|
19
19
|
bec_widgets/assets/designer_icons/code.png,sha256=o_d4UbojdvmdPY6exO3Eu0aQlS3UbvMuwrTlptvRMQE,4420
|
20
20
|
bec_widgets/assets/designer_icons/color_button.png,sha256=1cg0jmTbWQbfmmEb09ABoX03tovIt6loLyO90oOVe8k,4810
|
21
21
|
bec_widgets/assets/designer_icons/colormap_selector.png,sha256=KULLUA5T9SLhcSyrdouG07nXHZtE-LNNOn0ghG7T-OQ,6831
|
22
|
-
bec_widgets/assets/designer_icons/device_box.png,sha256=CtEDj_GTTi_WOmKipuMjbKsejIBVEFiAxy7QsKHke5A,3676
|
23
22
|
bec_widgets/assets/designer_icons/device_combo_box.png,sha256=ubt4ltSC8gIkrTnzaZ58JhiIinFhmKBstYIMrcH5Ua4,3555
|
24
23
|
bec_widgets/assets/designer_icons/device_line_edit.png,sha256=68sb_4_z7SvdTXsw21g6dIuWKX70l08LB8pW79d8cg8,3316
|
25
24
|
bec_widgets/assets/designer_icons/dock_area.png,sha256=I5U1ivkYRtcxSF2wQQa-SMHxHYDm06Nhd0AvGip9gCk,2774
|
@@ -27,6 +26,7 @@ bec_widgets/assets/designer_icons/games.png,sha256=83th_P_GG6d_xd7X55rqy8yf8ygeV
|
|
27
26
|
bec_widgets/assets/designer_icons/image.png,sha256=0Kppbe2BBcsXzSHjqHxjrRgBE6DUT-ZF7xNPMMI2bxA,3984
|
28
27
|
bec_widgets/assets/designer_icons/motor_map.png,sha256=8iqST5mTnZfv9rN9rx3D-XBm232Mwvzz9D0Wx6QaT8I,7293
|
29
28
|
bec_widgets/assets/designer_icons/position_indicator.png,sha256=9moeldNTfRWdf7aFvBS1GCewYtKC5o3hgx8BDgxALb0,2030
|
29
|
+
bec_widgets/assets/designer_icons/positioner_box.png,sha256=CtEDj_GTTi_WOmKipuMjbKsejIBVEFiAxy7QsKHke5A,3676
|
30
30
|
bec_widgets/assets/designer_icons/queue.png,sha256=NdlrmWwon7K2zWbqg32WkHx1RBKznQDN5H-UfRVqDRA,1827
|
31
31
|
bec_widgets/assets/designer_icons/ring_progress.png,sha256=klAmhZJOpFZOkI1fP1nk47Ug6uHXc1s_0y_vwmFMhjU,10358
|
32
32
|
bec_widgets/assets/designer_icons/scan_control.png,sha256=WxdbBMCnGh1e_qsgPxccSDcR0hhUzUBiHtAjortzWh0,4392
|
@@ -47,7 +47,7 @@ bec_widgets/assets/toolbar_icons/attach_all.svg,sha256=AfnrIQ2zBkgpKdiIGY2NqJdhg
|
|
47
47
|
bec_widgets/assets/toolbar_icons/auto_range.svg,sha256=vX_1qIl1dK6QEmEdp9OAw5SRcEugKvV_B5a2z8_jAtA,258
|
48
48
|
bec_widgets/assets/toolbar_icons/compare.svg,sha256=se1AHEq0tpPueVLC05QsYXMiWbzff3sgUs_KUGXkmR0,351
|
49
49
|
bec_widgets/assets/toolbar_icons/connection.svg,sha256=czIb1BnshmxJnER8ssU3WcLENrFSIUfMwberajWOGAk,341
|
50
|
-
bec_widgets/assets/toolbar_icons/
|
50
|
+
bec_widgets/assets/toolbar_icons/device_line_edit.svg,sha256=XjEzYUIRlWc3aDM8FxvXm9RGOxRp2mZZzKnoWVLHctg,492
|
51
51
|
bec_widgets/assets/toolbar_icons/drag_pan_mode.svg,sha256=ruinkJ0dVEPSH7ll4Pufl9c7oTwVXvcN57oTgiVRY5I,470
|
52
52
|
bec_widgets/assets/toolbar_icons/export.svg,sha256=-kDEfxzloR1fOpZ5d4KIkxGH7wS_4Z1uJImtnKA5XxU,371
|
53
53
|
bec_widgets/assets/toolbar_icons/fft.svg,sha256=fX31gulUsQTtpqbGbw4lpB1UwmIXh2LX2y4B2jPzyuo,2704
|
@@ -62,6 +62,7 @@ bec_widgets/assets/toolbar_icons/lock_aspect_ratio.svg,sha256=hq6YMySVWF01SeEXzp
|
|
62
62
|
bec_widgets/assets/toolbar_icons/log_scale.png,sha256=pFYt9wn988rd-RHnyCuMw0WnIQY61UmEDvAHaiTs5dA,6453
|
63
63
|
bec_widgets/assets/toolbar_icons/motor_map.svg,sha256=CRaoiALzdUByu6bTbJOg6czEzoI-1yRwcljlXUl4JNw,693
|
64
64
|
bec_widgets/assets/toolbar_icons/photo_library.svg,sha256=weiDCYiHh9dzcA21D-37zpYts2CyoGAd9x-N_h292Mo,564
|
65
|
+
bec_widgets/assets/toolbar_icons/positioner_box.svg,sha256=cZC0vckMHsvwR1OSWzNqhG8h9CIJg6Q2Qy2wYDpzapY,266
|
65
66
|
bec_widgets/assets/toolbar_icons/progress.svg,sha256=xcfcqNfhxVqmf2LbuVukuYxr1gS8kY57vCG1zDLO-rA,724
|
66
67
|
bec_widgets/assets/toolbar_icons/queue.svg,sha256=yQuUkDo0tYT3tVqntPmiJD7YPK2bE5O8sj6GIKan3kA,248
|
67
68
|
bec_widgets/assets/toolbar_icons/rectangle_mode.svg,sha256=N7AXB3da-RW8OpjLFeOUh1SDKVQ-9SWGPUjkryujyeE,946
|
@@ -204,10 +205,10 @@ bec_widgets/widgets/position_indicator/position_indicator.pyproject,sha256=s0JEf
|
|
204
205
|
bec_widgets/widgets/position_indicator/position_indicator_plugin.py,sha256=xD8YyATYfpoHxGVcsecDKx9CLASAP6lKyypCEjRhNd0,1441
|
205
206
|
bec_widgets/widgets/position_indicator/register_position_indicator.py,sha256=OZNiMgM_80TPSAXK_0hXAkne4vUh8DGvh_OdpOiMpwI,516
|
206
207
|
bec_widgets/widgets/positioner_box/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
207
|
-
bec_widgets/widgets/positioner_box/positioner_box.py,sha256=
|
208
|
+
bec_widgets/widgets/positioner_box/positioner_box.py,sha256=XeZragj6M1EreVQExFeqMkOCtEx2qAwDmSsMSnJS9u8,10753
|
208
209
|
bec_widgets/widgets/positioner_box/positioner_box.pyproject,sha256=7966pHdDseaHciaPNEKgdQgbUThSZf5wEDCeAEJh9po,32
|
209
|
-
bec_widgets/widgets/positioner_box/positioner_box.ui,sha256=
|
210
|
-
bec_widgets/widgets/positioner_box/positioner_box_plugin.py,sha256
|
210
|
+
bec_widgets/widgets/positioner_box/positioner_box.ui,sha256=Y-Xp0z32okT7X4-rL5r7dF_QH_QpXvPes3f778cC7_k,5633
|
211
|
+
bec_widgets/widgets/positioner_box/positioner_box_plugin.py,sha256=Q-FTqaxB78ShlhB56TtDMtllEb-USqWRw_s6gm0WUr0,1441
|
211
212
|
bec_widgets/widgets/positioner_box/register_positioner_box.py,sha256=UPOUjXXq6-IgSj0kdV_nJe1rYPMF8aIZxF4eSmWgQAg,483
|
212
213
|
bec_widgets/widgets/ring_progress_bar/__init__.py,sha256=_uoJKnDM2YAeUBfwc5WLbIHSJj7zm_FAurSKP3WRaCw,47
|
213
214
|
bec_widgets/widgets/ring_progress_bar/register_ring_progress_bar.py,sha256=uJrMhkuQi2PdWa0BwFJqjVXSkO-TXoyai4EQYOOe9t4,493
|
@@ -315,8 +316,8 @@ docs/user/widgets/widgets.md,sha256=ZeRNmP7GUOu8kEoGu9XHsyF8Hb1foqZKEbwpgFP7ITk,
|
|
315
316
|
tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
316
317
|
tests/end-2-end/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
317
318
|
tests/end-2-end/conftest.py,sha256=-BLnFE-NeCerf6xahGCkbZ4Ktactowi6RkBnboIzRvg,1767
|
318
|
-
tests/end-2-end/test_bec_dock_rpc_e2e.py,sha256=
|
319
|
-
tests/end-2-end/test_bec_figure_rpc_e2e.py,sha256=
|
319
|
+
tests/end-2-end/test_bec_dock_rpc_e2e.py,sha256=FwbqHOlEcdimTiJaOJKfqHkOhqJY6R8Z9YNYnU8QCt4,9447
|
320
|
+
tests/end-2-end/test_bec_figure_rpc_e2e.py,sha256=_OTyZfkF0D9cvdwRhHNfNadCpZPWybOCryN6EUs7tXI,6804
|
320
321
|
tests/end-2-end/test_rpc_register_e2e.py,sha256=blhMiW7HVHX1kGm5dg8Sv0PeCuJ0gnBz3evznQFz_B8,1619
|
321
322
|
tests/end-2-end/test_scan_control_e2e.py,sha256=u7oLgFyltkMW2apSZKDukMIXvYrbhHrU32p4mBdn8VE,2276
|
322
323
|
tests/references/SpinnerWidget/SpinnerWidget_darwin.png,sha256=-Tf5x0xY0pb-8sXH6Pk8cZL5PAxZ4vMR5RgyGCxisM4,9490
|
@@ -370,8 +371,8 @@ tests/unit_tests/test_configs/config_device_no_entry.yaml,sha256=hdvue9KLc_kfNzG
|
|
370
371
|
tests/unit_tests/test_configs/config_scan.yaml,sha256=vo484BbWOjA_e-h6bTjSV9k7QaQHrlAvx-z8wtY-P4E,1915
|
371
372
|
tests/unit_tests/test_msgs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
372
373
|
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.
|
374
|
+
bec_widgets-0.93.5.dist-info/METADATA,sha256=h4oukmTNxTFeOKdXwV_rgzM7vsWlGaVuWvm91kRPwWk,1307
|
375
|
+
bec_widgets-0.93.5.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
|
376
|
+
bec_widgets-0.93.5.dist-info/entry_points.txt,sha256=3otEkCdDB9LZJuBLzG4pFLK5Di0CVybN_12IsZrQ-58,166
|
377
|
+
bec_widgets-0.93.5.dist-info/licenses/LICENSE,sha256=YRKe85CBRyP7UpEAWwU8_qSIyuy5-l_9C-HKg5Qm8MQ,1511
|
378
|
+
bec_widgets-0.93.5.dist-info/RECORD,,
|
pyproject.toml
CHANGED
@@ -9,6 +9,10 @@ from bec_widgets.cli.auto_updates import AutoUpdates
|
|
9
9
|
from bec_widgets.cli.client import BECDockArea, BECFigure, BECImageShow, BECMotorMap, BECWaveform
|
10
10
|
from bec_widgets.utils import Colors
|
11
11
|
|
12
|
+
# pylint: disable=unused-argument
|
13
|
+
# pylint: disable=redefined-outer-name
|
14
|
+
# pylint: disable=too-many-locals
|
15
|
+
|
12
16
|
|
13
17
|
def test_rpc_add_dock_with_figure_e2e(bec_client_lib, rpc_server_dock):
|
14
18
|
# BEC client shortcuts
|
@@ -227,13 +231,20 @@ def test_ring_bar_scan_update(bec_client_lib, rpc_server_dock):
|
|
227
231
|
assert bar_config["rings"][1]["max_value"] == final_samy
|
228
232
|
|
229
233
|
|
230
|
-
def test_auto_update(bec_client_lib, rpc_server_dock):
|
234
|
+
def test_auto_update(bec_client_lib, rpc_server_dock, qtbot):
|
231
235
|
dock = BECDockArea(rpc_server_dock)
|
232
236
|
|
233
237
|
AutoUpdates.enabled = True
|
234
238
|
AutoUpdates.create_default_dock = True
|
235
239
|
dock.auto_updates = AutoUpdates(gui=dock)
|
236
240
|
dock.auto_updates.start_default_dock()
|
241
|
+
|
242
|
+
def get_default_figure():
|
243
|
+
return dock.auto_updates.get_default_figure()
|
244
|
+
|
245
|
+
qtbot.waitUntil(lambda: get_default_figure() is not None, timeout=10000)
|
246
|
+
plt = get_default_figure()
|
247
|
+
|
237
248
|
dock.selected_device = "bpm4i"
|
238
249
|
|
239
250
|
# we need to start the update script manually; normally this is done when the GUI is started
|
@@ -250,7 +261,6 @@ def test_auto_update(bec_client_lib, rpc_server_dock):
|
|
250
261
|
last_scan_data = queue.scan_storage.storage[-1].data
|
251
262
|
|
252
263
|
# get data from curves
|
253
|
-
plt = dock.auto_updates.get_default_figure()
|
254
264
|
widgets = plt.widget_list
|
255
265
|
plt_data = widgets[0].get_all_data()
|
256
266
|
|
@@ -271,6 +281,7 @@ def test_auto_update(bec_client_lib, rpc_server_dock):
|
|
271
281
|
|
272
282
|
plt = dock.auto_updates.get_default_figure()
|
273
283
|
widgets = plt.widget_list
|
284
|
+
qtbot.waitUntil(lambda: len(plt.widget_list) > 0, timeout=5000)
|
274
285
|
plt_data = widgets[0].get_all_data()
|
275
286
|
|
276
287
|
last_scan_data = queue.scan_storage.storage[-1].data
|
@@ -158,7 +158,7 @@ def test_rpc_motor_map(rpc_server_figure, bec_client_lib):
|
|
158
158
|
)
|
159
159
|
|
160
160
|
|
161
|
-
def test_dap_rpc(rpc_server_figure, bec_client_lib):
|
161
|
+
def test_dap_rpc(rpc_server_figure, bec_client_lib, qtbot):
|
162
162
|
|
163
163
|
fig = BECFigure(rpc_server_figure)
|
164
164
|
plt = fig.plot(x_name="samx", y_name="bpm4i", dap="GaussianModel")
|
@@ -178,13 +178,15 @@ def test_dap_rpc(rpc_server_figure, bec_client_lib):
|
|
178
178
|
res = scans.line_scan(dev.samx, 0, 8, steps=50, relative=False)
|
179
179
|
res.wait()
|
180
180
|
|
181
|
-
|
181
|
+
# especially on slow machines, the fit might not be done yet
|
182
|
+
# so we wait until the fit reaches the expected value
|
183
|
+
def wait_for_fit():
|
184
|
+
dap_curve = plt.get_curve("bpm4i-bpm4i-GaussianModel")
|
185
|
+
fit_params = dap_curve.dap_params
|
186
|
+
print(fit_params)
|
187
|
+
return np.isclose(fit_params["center"], 5, atol=0.5)
|
182
188
|
|
183
|
-
|
184
|
-
fit_params = dap_curve.dap_params
|
185
|
-
print(fit_params)
|
186
|
-
|
187
|
-
assert np.isclose(fit_params["center"], 5, atol=0.5)
|
189
|
+
qtbot.waitUntil(wait_for_fit, timeout=10000)
|
188
190
|
|
189
191
|
|
190
192
|
def test_removing_subplots(rpc_server_figure, bec_client_lib):
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|