bec-widgets 0.94.5__py3-none-any.whl → 0.94.6__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 +6 -6
- PKG-INFO +1 -1
- bec_widgets/cli/client_utils.py +5 -1
- bec_widgets/cli/server.py +12 -9
- {bec_widgets-0.94.5.dist-info → bec_widgets-0.94.6.dist-info}/METADATA +1 -1
- {bec_widgets-0.94.5.dist-info → bec_widgets-0.94.6.dist-info}/RECORD +10 -10
- pyproject.toml +1 -1
- {bec_widgets-0.94.5.dist-info → bec_widgets-0.94.6.dist-info}/WHEEL +0 -0
- {bec_widgets-0.94.5.dist-info → bec_widgets-0.94.6.dist-info}/entry_points.txt +0 -0
- {bec_widgets-0.94.5.dist-info → bec_widgets-0.94.6.dist-info}/licenses/LICENSE +0 -0
CHANGELOG.md
CHANGED
@@ -1,5 +1,11 @@
|
|
1
1
|
# CHANGELOG
|
2
2
|
|
3
|
+
## v0.94.6 (2024-08-14)
|
4
|
+
|
5
|
+
### Fix
|
6
|
+
|
7
|
+
* fix(server): emit heartbeat with state ([`bc2abe9`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/bc2abe945fb5adeec89ed5ac45e966db86ce6ffc))
|
8
|
+
|
3
9
|
## v0.94.5 (2024-08-14)
|
4
10
|
|
5
11
|
### Build
|
@@ -149,9 +155,3 @@ This reverts commit fd6ae91993a23a7b8dbb2cf3c4b7c3eda6d2b0f6 ([`5aad401`](https:
|
|
149
155
|
* test: register all widgets with qtbot and close them ([`73cd11e`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/73cd11e47277e4437554b785a9551b28a572094f))
|
150
156
|
|
151
157
|
## v0.92.4 (2024-07-31)
|
152
|
-
|
153
|
-
### Fix
|
154
|
-
|
155
|
-
* fix: fix missmatch of signal/slot in image and motormap ([`dcc5fd7`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/dcc5fd71ee9f51767a7b2b1ed6200e89d1ef754c))
|
156
|
-
|
157
|
-
## v0.92.3 (2024-07-28)
|
PKG-INFO
CHANGED
bec_widgets/cli/client_utils.py
CHANGED
@@ -331,4 +331,8 @@ class RPCBase:
|
|
331
331
|
Check if the GUI is alive.
|
332
332
|
"""
|
333
333
|
heart = self._client.connector.get(MessageEndpoints.gui_heartbeat(self._root._gui_id))
|
334
|
-
|
334
|
+
if heart is None:
|
335
|
+
return False
|
336
|
+
if heart.status == messages.BECStatus.RUNNING:
|
337
|
+
return True
|
338
|
+
return False
|
bec_widgets/cli/server.py
CHANGED
@@ -28,12 +28,13 @@ class BECWidgetsCLIServer:
|
|
28
28
|
|
29
29
|
def __init__(
|
30
30
|
self,
|
31
|
-
gui_id: str
|
31
|
+
gui_id: str,
|
32
32
|
dispatcher: BECDispatcher = None,
|
33
33
|
client=None,
|
34
34
|
config=None,
|
35
35
|
gui_class: Union[BECFigure, BECDockArea] = BECFigure,
|
36
36
|
) -> None:
|
37
|
+
self.status = messages.BECStatus.BUSY
|
37
38
|
self.dispatcher = BECDispatcher(config=config) if dispatcher is None else dispatcher
|
38
39
|
self.client = self.dispatcher.client if client is None else client
|
39
40
|
self.client.start()
|
@@ -47,11 +48,12 @@ class BECWidgetsCLIServer:
|
|
47
48
|
)
|
48
49
|
|
49
50
|
# Setup QTimer for heartbeat
|
50
|
-
self._shutdown_event = False
|
51
51
|
self._heartbeat_timer = QTimer()
|
52
52
|
self._heartbeat_timer.timeout.connect(self.emit_heartbeat)
|
53
53
|
self._heartbeat_timer.start(200)
|
54
54
|
|
55
|
+
self.status = messages.BECStatus.RUNNING
|
56
|
+
|
55
57
|
def on_rpc_update(self, msg: dict, metadata: dict):
|
56
58
|
request_id = metadata.get("request_id")
|
57
59
|
try:
|
@@ -111,16 +113,16 @@ class BECWidgetsCLIServer:
|
|
111
113
|
return obj
|
112
114
|
|
113
115
|
def emit_heartbeat(self):
|
114
|
-
|
115
|
-
self.
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
)
|
116
|
+
self.client.connector.set(
|
117
|
+
MessageEndpoints.gui_heartbeat(self.gui_id),
|
118
|
+
messages.StatusMessage(name=self.gui_id, status=self.status, info={}),
|
119
|
+
expire=10,
|
120
|
+
)
|
120
121
|
|
121
122
|
def shutdown(self): # TODO not sure if needed when cleanup is done at level of BECConnector
|
122
|
-
self.
|
123
|
+
self.status = messages.BECStatus.IDLE
|
123
124
|
self._heartbeat_timer.stop()
|
125
|
+
self.emit_heartbeat()
|
124
126
|
self.gui.close()
|
125
127
|
self.client.shutdown()
|
126
128
|
|
@@ -231,4 +233,5 @@ def main():
|
|
231
233
|
|
232
234
|
|
233
235
|
if __name__ == "__main__": # pragma: no cover
|
236
|
+
sys.argv = ["bec_widgets.cli.server", "--id", "test", "--gui_class", "BECDockArea"]
|
234
237
|
main()
|
@@ -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=vh4KRXHX8QnPOzzV8aVx3rBJNez27sWs3kt78tFvdPA,6702
|
6
6
|
LICENSE,sha256=YRKe85CBRyP7UpEAWwU8_qSIyuy5-l_9C-HKg5Qm8MQ,1511
|
7
|
-
PKG-INFO,sha256=
|
7
|
+
PKG-INFO,sha256=HDSao-gKVMBQrpl-wbiQt5TUz8osSuXFQw3BdN_5Ybw,1325
|
8
8
|
README.md,sha256=Od69x-RS85Hph0-WwWACwal4yUd67XkEn4APEfHhHFw,2649
|
9
|
-
pyproject.toml,sha256=
|
9
|
+
pyproject.toml,sha256=D2SWYeuuU85azl57OHL5LQY4Rda2p07m0coRTeSHQLE,2416
|
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
|
@@ -83,11 +83,11 @@ bec_widgets/assets/toolbar_icons/waveform.svg,sha256=darXWaIww4HEu9skFUd8Vs1NSAg
|
|
83
83
|
bec_widgets/cli/__init__.py,sha256=d0Q6Fn44e7wFfLabDOBxpcJ1DPKWlFunGYDUBmO-4hA,22
|
84
84
|
bec_widgets/cli/auto_updates.py,sha256=DwzRChcFIWPH2kCYvp8H7dXvyYSKGYv6LwCmK2sDR2E,5676
|
85
85
|
bec_widgets/cli/client.py,sha256=HjBxjthimBvbyVrjvLZoeBN1NdezupowRYjZxqDlOX8,76261
|
86
|
-
bec_widgets/cli/client_utils.py,sha256=
|
86
|
+
bec_widgets/cli/client_utils.py,sha256=AgWAtoioMeaIiz1hFem4U4v6fXl0__DdSZdzsVgsAOo,11712
|
87
87
|
bec_widgets/cli/generate_cli.py,sha256=Ea5px9KblUlcGg-1JbJBTIU7laGg2n8PM7Efw9WVVzM,5889
|
88
88
|
bec_widgets/cli/rpc_register.py,sha256=QxXUZu5XNg00Yf5O3UHWOXg3-f_pzKjjoZYMOa-MOJc,2216
|
89
89
|
bec_widgets/cli/rpc_wigdet_handler.py,sha256=6kQng2DyS6rhLJqSJ7xa0kdgSxp-35A2upcf833dJRE,1483
|
90
|
-
bec_widgets/cli/server.py,sha256=
|
90
|
+
bec_widgets/cli/server.py,sha256=Dc05uELdDSbarlxHVBE_wWZ6kxqPdSdFfY6V3wXYFB4,7881
|
91
91
|
bec_widgets/examples/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
92
92
|
bec_widgets/examples/general_app/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
93
93
|
bec_widgets/examples/general_app/general_app.py,sha256=Ks9CKtIQIFOzKosh204zVg1ltSnp07LDqkwoVAaCd9k,3046
|
@@ -378,8 +378,8 @@ tests/unit_tests/test_configs/config_device_no_entry.yaml,sha256=hdvue9KLc_kfNzG
|
|
378
378
|
tests/unit_tests/test_configs/config_scan.yaml,sha256=vo484BbWOjA_e-h6bTjSV9k7QaQHrlAvx-z8wtY-P4E,1915
|
379
379
|
tests/unit_tests/test_msgs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
380
380
|
tests/unit_tests/test_msgs/available_scans_message.py,sha256=m_z97hIrjHXXMa2Ex-UvsPmTxOYXfjxyJaGkIY6StTY,46532
|
381
|
-
bec_widgets-0.94.
|
382
|
-
bec_widgets-0.94.
|
383
|
-
bec_widgets-0.94.
|
384
|
-
bec_widgets-0.94.
|
385
|
-
bec_widgets-0.94.
|
381
|
+
bec_widgets-0.94.6.dist-info/METADATA,sha256=HDSao-gKVMBQrpl-wbiQt5TUz8osSuXFQw3BdN_5Ybw,1325
|
382
|
+
bec_widgets-0.94.6.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
|
383
|
+
bec_widgets-0.94.6.dist-info/entry_points.txt,sha256=3otEkCdDB9LZJuBLzG4pFLK5Di0CVybN_12IsZrQ-58,166
|
384
|
+
bec_widgets-0.94.6.dist-info/licenses/LICENSE,sha256=YRKe85CBRyP7UpEAWwU8_qSIyuy5-l_9C-HKg5Qm8MQ,1511
|
385
|
+
bec_widgets-0.94.6.dist-info/RECORD,,
|
pyproject.toml
CHANGED
File without changes
|
File without changes
|
File without changes
|