bec-widgets 0.102.0__py3-none-any.whl → 0.103.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 +6 -2
- CHANGELOG.md +22 -24
- PKG-INFO +1 -1
- bec_widgets/utils/bec_widget.py +7 -1
- bec_widgets/widgets/vscode/vscode.py +17 -1
- bec_widgets/widgets/website/website.py +15 -1
- {bec_widgets-0.102.0.dist-info → bec_widgets-0.103.0.dist-info}/METADATA +1 -1
- {bec_widgets-0.102.0.dist-info → bec_widgets-0.103.0.dist-info}/RECORD +12 -12
- pyproject.toml +1 -1
- {bec_widgets-0.102.0.dist-info → bec_widgets-0.103.0.dist-info}/WHEEL +0 -0
- {bec_widgets-0.102.0.dist-info → bec_widgets-0.103.0.dist-info}/entry_points.txt +0 -0
- {bec_widgets-0.102.0.dist-info → bec_widgets-0.103.0.dist-info}/licenses/LICENSE +0 -0
.gitlab-ci.yml
CHANGED
@@ -5,8 +5,12 @@ image: $CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX/python:3.11
|
|
5
5
|
#commands to run in the Docker container before starting each job.
|
6
6
|
variables:
|
7
7
|
DOCKER_TLS_CERTDIR: ""
|
8
|
-
BEC_CORE_BRANCH:
|
9
|
-
|
8
|
+
BEC_CORE_BRANCH:
|
9
|
+
description: bec branch
|
10
|
+
value: main
|
11
|
+
OPHYD_DEVICES_BRANCH:
|
12
|
+
description: ophyd_devices branch
|
13
|
+
value: main
|
10
14
|
CHILD_PIPELINE_BRANCH: $CI_DEFAULT_BRANCH
|
11
15
|
|
12
16
|
workflow:
|
CHANGELOG.md
CHANGED
@@ -1,5 +1,27 @@
|
|
1
1
|
# CHANGELOG
|
2
2
|
|
3
|
+
## v0.103.0 (2024-09-04)
|
4
|
+
|
5
|
+
### Ci
|
6
|
+
|
7
|
+
* ci: prefill variables for manual pipeline start ([`158c19e`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/158c19eda771562a325fd59405f9fd4cb9a17ed6))
|
8
|
+
|
9
|
+
### Feature
|
10
|
+
|
11
|
+
* feat(vscode): open vscode on a free port ([`52da835`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/52da835803f2453096a8b7df23bee5fdf93ae2bb))
|
12
|
+
|
13
|
+
* feat(website): added method to wait until the webpage is loaded ([`9be19d4`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/9be19d4abebad08c5fc6bea936dd97475fe8f628))
|
14
|
+
|
15
|
+
### Fix
|
16
|
+
|
17
|
+
* fix(theme): fixed segfault for webengineview for auto updates ([`9866075`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/9866075100577948755b563dc7b7dc4cdc60d040))
|
18
|
+
|
19
|
+
### Test
|
20
|
+
|
21
|
+
* test(webview): fixed tests after refactoring ([`d5eb30c`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/d5eb30cd7df4cb0dc3275dd362768afc211eaf2d))
|
22
|
+
|
23
|
+
* test(vscode): popen call does not have to be the only one ([`39f98ec`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/39f98ec223ba8b59e478ac788c08c59ffe886b4e))
|
24
|
+
|
3
25
|
## v0.102.0 (2024-09-04)
|
4
26
|
|
5
27
|
### Documentation
|
@@ -130,30 +152,6 @@
|
|
130
152
|
|
131
153
|
## v0.99.6 (2024-08-28)
|
132
154
|
|
133
|
-
### Documentation
|
134
|
-
|
135
|
-
* docs: various bugs fixed ([`c31e9a3`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/c31e9a3aff3ee8e984674dee0965ee7f1b6e2b8f))
|
136
|
-
|
137
155
|
### Fix
|
138
156
|
|
139
157
|
* fix(toolbar): use of native qt separators ([`09c6c93`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/09c6c93c397ce4a21c293f6c79106c74b2db65ca))
|
140
|
-
|
141
|
-
## v0.99.5 (2024-08-28)
|
142
|
-
|
143
|
-
### Documentation
|
144
|
-
|
145
|
-
* docs(index): index page is centered ([`02239de`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/02239de0a36fcd6cbf97990b0dec1ddf7ecf6ba6))
|
146
|
-
|
147
|
-
### Fix
|
148
|
-
|
149
|
-
* fix(dock_area): dark button added ([`e6f204b`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/e6f204b6aa295747a68769f43af2e549149b401a))
|
150
|
-
|
151
|
-
## v0.99.4 (2024-08-28)
|
152
|
-
|
153
|
-
### Documentation
|
154
|
-
|
155
|
-
* docs(buttons): added missing buttons docs ([`4e5520a`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/4e5520aee2115d2fc0cebb3865433478a5ec8253))
|
156
|
-
|
157
|
-
### Fix
|
158
|
-
|
159
|
-
* fix(theme): apply theme to all pyqtgraph widgets on manual updates ([`c550186`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/c5501860e8e07a53f4bce144d44ed39eda6290ef))
|
PKG-INFO
CHANGED
bec_widgets/utils/bec_widget.py
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
from __future__ import annotations
|
2
2
|
|
3
|
+
import darkdetect
|
3
4
|
from qtpy.QtCore import Slot
|
4
5
|
from qtpy.QtWidgets import QApplication, QWidget
|
5
6
|
|
@@ -45,7 +46,12 @@ class BECWidget(BECConnector):
|
|
45
46
|
# Set the theme to auto if it is not set yet
|
46
47
|
app = QApplication.instance()
|
47
48
|
if not hasattr(app, "theme"):
|
48
|
-
|
49
|
+
# DO NOT SET THE THEME TO AUTO! Otherwise, the qwebengineview will segfault
|
50
|
+
# Instead, we will set the theme to the system setting on startup
|
51
|
+
if darkdetect.isDark():
|
52
|
+
set_theme("dark")
|
53
|
+
else:
|
54
|
+
set_theme("light")
|
49
55
|
|
50
56
|
if theme_update:
|
51
57
|
self._connect_to_theme_change()
|
@@ -2,12 +2,27 @@ import os
|
|
2
2
|
import select
|
3
3
|
import shlex
|
4
4
|
import signal
|
5
|
+
import socket
|
5
6
|
import subprocess
|
6
7
|
import sys
|
7
8
|
|
8
9
|
from bec_widgets.widgets.website.website import WebsiteWidget
|
9
10
|
|
10
11
|
|
12
|
+
def get_free_port():
|
13
|
+
"""
|
14
|
+
Get a free port on the local machine.
|
15
|
+
|
16
|
+
Returns:
|
17
|
+
int: The free port number
|
18
|
+
"""
|
19
|
+
sock = socket.socket()
|
20
|
+
sock.bind(("", 0))
|
21
|
+
port = sock.getsockname()[1]
|
22
|
+
sock.close()
|
23
|
+
return port
|
24
|
+
|
25
|
+
|
11
26
|
class VSCodeEditor(WebsiteWidget):
|
12
27
|
"""
|
13
28
|
A widget to display the VSCode editor.
|
@@ -15,7 +30,6 @@ class VSCodeEditor(WebsiteWidget):
|
|
15
30
|
|
16
31
|
token = "bec"
|
17
32
|
host = "127.0.0.1"
|
18
|
-
port = 7000
|
19
33
|
|
20
34
|
USER_ACCESS = []
|
21
35
|
ICON_NAME = "developer_mode_tv"
|
@@ -23,6 +37,7 @@ class VSCodeEditor(WebsiteWidget):
|
|
23
37
|
def __init__(self, parent=None, config=None, client=None, gui_id=None):
|
24
38
|
|
25
39
|
self.process = None
|
40
|
+
self.port = get_free_port()
|
26
41
|
self._url = f"http://{self.host}:{self.port}?tkn={self.token}"
|
27
42
|
super().__init__(parent=parent, config=config, client=client, gui_id=gui_id)
|
28
43
|
self.start_server()
|
@@ -49,6 +64,7 @@ class VSCodeEditor(WebsiteWidget):
|
|
49
64
|
if output and f"available at {self._url}" in output:
|
50
65
|
break
|
51
66
|
self.set_url(self._url)
|
67
|
+
self.wait_until_loaded()
|
52
68
|
|
53
69
|
def cleanup_vscode(self):
|
54
70
|
"""
|
@@ -1,5 +1,5 @@
|
|
1
1
|
from qtpy.QtCore import Property, QUrl, Slot, qInstallMessageHandler
|
2
|
-
from qtpy.QtWebEngineWidgets import QWebEngineView
|
2
|
+
from qtpy.QtWebEngineWidgets import QWebEngineSettings, QWebEngineView
|
3
3
|
from qtpy.QtWidgets import QApplication, QVBoxLayout, QWidget
|
4
4
|
|
5
5
|
from bec_widgets.utils.bec_widget import BECWidget
|
@@ -32,6 +32,19 @@ class WebsiteWidget(BECWidget, QWidget):
|
|
32
32
|
self.setLayout(layout)
|
33
33
|
self.set_url(url)
|
34
34
|
|
35
|
+
self._loaded = False
|
36
|
+
self.website.loadFinished.connect(self._on_load_finished)
|
37
|
+
|
38
|
+
def wait_until_loaded(self):
|
39
|
+
while not self._loaded:
|
40
|
+
QApplication.processEvents()
|
41
|
+
|
42
|
+
def _on_load_finished(self):
|
43
|
+
"""
|
44
|
+
Callback when the website has finished loading
|
45
|
+
"""
|
46
|
+
self._loaded = True
|
47
|
+
|
35
48
|
@Property(str)
|
36
49
|
def url(self) -> str:
|
37
50
|
"""
|
@@ -64,6 +77,7 @@ class WebsiteWidget(BECWidget, QWidget):
|
|
64
77
|
return
|
65
78
|
if not isinstance(url, str):
|
66
79
|
return
|
80
|
+
self._loaded = False
|
67
81
|
self.website.setUrl(QUrl(url))
|
68
82
|
|
69
83
|
def get_url(self) -> str:
|
@@ -1,12 +1,12 @@
|
|
1
1
|
.gitignore,sha256=cMQ1MLmnoR88aMCCJwUyfoTnufzl4-ckmHtlFUqHcT4,3253
|
2
|
-
.gitlab-ci.yml,sha256=
|
2
|
+
.gitlab-ci.yml,sha256=Dc1iDjsc72UxdUtihx4uSZU0lrTQeR8hZwGx1MQBfKE,8432
|
3
3
|
.pylintrc,sha256=eeY8YwSI74oFfq6IYIbCqnx3Vk8ZncKaatv96n_Y8Rs,18544
|
4
4
|
.readthedocs.yaml,sha256=aSOc277LqXcsTI6lgvm_JY80lMlr69GbPKgivua2cS0,603
|
5
|
-
CHANGELOG.md,sha256=
|
5
|
+
CHANGELOG.md,sha256=abbFjREleIlw-KWxjTt2ZeXKTuUoXVZohRHwZKCEbdQ,6861
|
6
6
|
LICENSE,sha256=YRKe85CBRyP7UpEAWwU8_qSIyuy5-l_9C-HKg5Qm8MQ,1511
|
7
|
-
PKG-INFO,sha256=
|
7
|
+
PKG-INFO,sha256=ryZgSj3emn4stYet02hDdz1wPwtYB1d_2vmJ_E25unU,1334
|
8
8
|
README.md,sha256=Od69x-RS85Hph0-WwWACwal4yUd67XkEn4APEfHhHFw,2649
|
9
|
-
pyproject.toml,sha256=
|
9
|
+
pyproject.toml,sha256=AZloCb8F4BsMTj5wlWFeonigrmle-L0zd96zTyOZfRc,2544
|
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
|
@@ -52,7 +52,7 @@ bec_widgets/utils/bec_connector.py,sha256=SivHKXVyNVqeu3kCXYEPpbleTVw8g1cW0FKq1Q
|
|
52
52
|
bec_widgets/utils/bec_designer.py,sha256=Z3MeMju-KmTz8POtm23VQfp4rvtD2sF6eIOKQkl2F7w,4729
|
53
53
|
bec_widgets/utils/bec_dispatcher.py,sha256=NkObWO_gRO9Uobz-fy0gVTZqQsbFRaKj6fbjYZoErFI,6400
|
54
54
|
bec_widgets/utils/bec_table.py,sha256=nA2b8ukSeUfquFMAxGrUVOqdrzMoDYD6O_4EYbOG2zk,717
|
55
|
-
bec_widgets/utils/bec_widget.py,sha256=
|
55
|
+
bec_widgets/utils/bec_widget.py,sha256=cQIAXdQJQWTtWPshOdMT-UMxfrah7BM8n059YGofyX0,3158
|
56
56
|
bec_widgets/utils/colors.py,sha256=N3GbVBpExfC1m_dnYFDoua-iRLM90E5kTKVOIkZVmDM,12372
|
57
57
|
bec_widgets/utils/container_utils.py,sha256=0wr3ZfuMiAFKCrQHVjxjw-Vuk8wsHdridqcjy2eY840,1531
|
58
58
|
bec_widgets/utils/crosshair.py,sha256=8lik9k69WI2WMj5FGLbrKtny9duxqXUJAhpX8tHoyp0,11543
|
@@ -227,7 +227,7 @@ bec_widgets/widgets/vscode/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJ
|
|
227
227
|
bec_widgets/widgets/vscode/register_vs_code_editor.py,sha256=JATKBkTEuReeQ2Jj402xasjgVRMFI8uUOAAwmnFOWRA,473
|
228
228
|
bec_widgets/widgets/vscode/vs_code_editor.pyproject,sha256=bxx0jZlSfBo-Em7p15W1QIJ9lFr9jqTqGynUQG01ocU,24
|
229
229
|
bec_widgets/widgets/vscode/vs_code_editor_plugin.py,sha256=exFR6HTVdLLPfn2U6BMDugPoxZaebcHTnHWMrX2n_d4,1338
|
230
|
-
bec_widgets/widgets/vscode/vscode.py,sha256=
|
230
|
+
bec_widgets/widgets/vscode/vscode.py,sha256=3HDWYJZPi4lNr7gW4IabTYyivMdhZGhq5ETGlJihqlc,2579
|
231
231
|
bec_widgets/widgets/waveform/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
232
232
|
bec_widgets/widgets/waveform/bec_waveform_widget.pyproject,sha256=GLD8GN9dXx9wNbtnevrxqqcwk7vKV-Uv8QYSycdaoaI,33
|
233
233
|
bec_widgets/widgets/waveform/bec_waveform_widget_plugin.py,sha256=qSQTeCzIUn8rgDkjIM47Rr3-fqg1uk8rDf_lCoY9gZw,1402
|
@@ -241,11 +241,11 @@ bec_widgets/widgets/waveform/waveform_popups/dap_summary_dialog/__init__.py,sha2
|
|
241
241
|
bec_widgets/widgets/waveform/waveform_popups/dap_summary_dialog/dap_summary_dialog.py,sha256=XOHppMcONwfhAYpqIc51VOrpunWmPSn50sT3I0MjW2c,1173
|
242
242
|
bec_widgets/widgets/website/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
243
243
|
bec_widgets/widgets/website/register_website_widget.py,sha256=LIQJpV9uqcBiPR9cEAiDjaUS_l7JroYVdsotnLpD9H0,476
|
244
|
-
bec_widgets/widgets/website/website.py,sha256=
|
244
|
+
bec_widgets/widgets/website/website.py,sha256=42pncCc_zI2eqeMArIurVmPUukRo5bTxa2h1Skah-io,3012
|
245
245
|
bec_widgets/widgets/website/website_widget.pyproject,sha256=scOiV3cV1_BjbzpPzy2N8rIJL5P2qIZz8ObTJ-Uvdtg,25
|
246
246
|
bec_widgets/widgets/website/website_widget_plugin.py,sha256=pz38_C2cZ0yvPPS02wdIPcmhFo_yiwUhflsASocAPQQ,1341
|
247
|
-
bec_widgets-0.
|
248
|
-
bec_widgets-0.
|
249
|
-
bec_widgets-0.
|
250
|
-
bec_widgets-0.
|
251
|
-
bec_widgets-0.
|
247
|
+
bec_widgets-0.103.0.dist-info/METADATA,sha256=ryZgSj3emn4stYet02hDdz1wPwtYB1d_2vmJ_E25unU,1334
|
248
|
+
bec_widgets-0.103.0.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
|
249
|
+
bec_widgets-0.103.0.dist-info/entry_points.txt,sha256=3otEkCdDB9LZJuBLzG4pFLK5Di0CVybN_12IsZrQ-58,166
|
250
|
+
bec_widgets-0.103.0.dist-info/licenses/LICENSE,sha256=YRKe85CBRyP7UpEAWwU8_qSIyuy5-l_9C-HKg5Qm8MQ,1511
|
251
|
+
bec_widgets-0.103.0.dist-info/RECORD,,
|
pyproject.toml
CHANGED
File without changes
|
File without changes
|
File without changes
|