bec-widgets 0.58.1__py3-none-any.whl → 0.59.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 +25 -108
- CHANGELOG.md +21 -20
- PKG-INFO +3 -1
- bec_widgets/cli/client.py +76 -0
- bec_widgets/cli/generate_cli.py +2 -0
- bec_widgets/cli/rpc_wigdet_handler.py +6 -1
- bec_widgets/widgets/website/__init__.py +0 -0
- bec_widgets/widgets/website/website.py +65 -0
- {bec_widgets-0.58.1.dist-info → bec_widgets-0.59.0.dist-info}/METADATA +3 -1
- {bec_widgets-0.58.1.dist-info → bec_widgets-0.59.0.dist-info}/RECORD +16 -12
- docs/user/widgets/website.md +21 -0
- docs/user/widgets/widgets.md +1 -0
- pyproject.toml +3 -3
- tests/unit_tests/test_website_widget.py +27 -0
- {bec_widgets-0.58.1.dist-info → bec_widgets-0.59.0.dist-info}/WHEEL +0 -0
- {bec_widgets-0.58.1.dist-info → bec_widgets-0.59.0.dist-info}/licenses/LICENSE +0 -0
.gitlab-ci.yml
CHANGED
@@ -31,6 +31,10 @@ stages:
|
|
31
31
|
- End2End
|
32
32
|
- Deploy
|
33
33
|
|
34
|
+
.install-qt-webengine-deps: &install-qt-webengine-deps
|
35
|
+
- apt-get -y install libnss3 libxdamage1 libasound2 libatomic1 libxcursor1
|
36
|
+
- export QTWEBENGINE_DISABLE_SANDBOX=1
|
37
|
+
|
34
38
|
before_script:
|
35
39
|
- if [[ "$CI_PROJECT_PATH" != "bec/bec_widgets" ]]; then
|
36
40
|
echo -e "\033[35;1m Using branch $CHILD_PIPELINE_BRANCH of BEC Widgets \033[0;m";
|
@@ -110,6 +114,7 @@ tests:
|
|
110
114
|
- export OHPYD_DEVICES_PATH=$PWD/ophyd_devices
|
111
115
|
- apt-get update
|
112
116
|
- apt-get install -y libgl1-mesa-glx libegl1-mesa x11-utils libxkbcommon-x11-0 libdbus-1-3
|
117
|
+
- *install-qt-webengine-deps
|
113
118
|
- pip install -e ./bec/bec_lib[dev]
|
114
119
|
- pip install -e .[dev,pyqt6]
|
115
120
|
- coverage run --source=./bec_widgets -m pytest -v --junitxml=report.xml --random-order --full-trace ./tests/unit_tests
|
@@ -123,123 +128,34 @@ tests:
|
|
123
128
|
coverage_format: cobertura
|
124
129
|
path: coverage.xml
|
125
130
|
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
- pip install -e .[dev,pyside6]
|
138
|
-
- pytest -v --junitxml=report.xml --random-order ./tests/unit_tests
|
139
|
-
allow_failure: true
|
140
|
-
|
141
|
-
tests-3.12-pyside6:
|
142
|
-
extends: "tests"
|
143
|
-
stage: AdditionalTests
|
144
|
-
image: $CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX/python:3.12
|
145
|
-
script:
|
146
|
-
- git clone --branch $BEC_CORE_BRANCH https://gitlab.psi.ch/bec/bec.git
|
147
|
-
- git clone --branch $OPHYD_DEVICES_BRANCH https://gitlab.psi.ch/bec/ophyd_devices.git
|
148
|
-
- export OHPYD_DEVICES_PATH=$PWD/ophyd_devices
|
149
|
-
- apt-get update
|
150
|
-
- apt-get install -y libgl1-mesa-glx libegl1-mesa x11-utils libxkbcommon-x11-0 libdbus-1-3
|
151
|
-
- pip install -e ./bec/bec_lib[dev]
|
152
|
-
- pip install -e .[dev,pyside6]
|
153
|
-
- pytest -v --junitxml=report.xml --random-order ./tests/unit_tests
|
154
|
-
allow_failure: true
|
155
|
-
|
156
|
-
tests-3.10-pyqt5:
|
157
|
-
extends: "tests"
|
158
|
-
stage: AdditionalTests
|
159
|
-
image: $CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX/python:3.10
|
160
|
-
script:
|
161
|
-
- git clone --branch $BEC_CORE_BRANCH https://gitlab.psi.ch/bec/bec.git
|
162
|
-
- git clone --branch $OPHYD_DEVICES_BRANCH https://gitlab.psi.ch/bec/ophyd_devices.git
|
163
|
-
- export OHPYD_DEVICES_PATH=$PWD/ophyd_devices
|
164
|
-
- apt-get update
|
165
|
-
- apt-get install -y libgl1-mesa-glx libegl1-mesa x11-utils libxkbcommon-x11-0 libdbus-1-3
|
166
|
-
- pip install -e ./bec/bec_lib[dev]
|
167
|
-
- pip install -e .[dev,pyqt5]
|
168
|
-
- pytest -v --junitxml=report.xml --random-order ./tests/unit_tests
|
169
|
-
allow_failure: true
|
131
|
+
test-matrix:
|
132
|
+
parallel:
|
133
|
+
matrix:
|
134
|
+
- PYTHON_VERSION:
|
135
|
+
- "3.10"
|
136
|
+
- "3.11"
|
137
|
+
- "3.12"
|
138
|
+
QT_PCKG:
|
139
|
+
- "pyside6"
|
140
|
+
- "pyqt5"
|
141
|
+
- "pyqt6"
|
170
142
|
|
171
|
-
tests-3.11-pyqt5:
|
172
|
-
extends: "tests"
|
173
143
|
stage: AdditionalTests
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
- apt-get install -y libgl1-mesa-glx libegl1-mesa x11-utils libxkbcommon-x11-0 libdbus-1-3
|
181
|
-
- pip install -e ./bec/bec_lib[dev]
|
182
|
-
- pip install -e .[dev,pyqt5]
|
183
|
-
- pytest -v --junitxml=report.xml --random-order ./tests/unit_tests
|
184
|
-
allow_failure: true
|
185
|
-
|
186
|
-
tests-3.12-pyqt5:
|
187
|
-
extends: "tests"
|
188
|
-
stage: AdditionalTests
|
189
|
-
image: $CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX/python:3.12
|
190
|
-
script:
|
191
|
-
- git clone --branch $BEC_CORE_BRANCH https://gitlab.psi.ch/bec/bec.git
|
192
|
-
- git clone --branch $OPHYD_DEVICES_BRANCH https://gitlab.psi.ch/bec/ophyd_devices.git
|
193
|
-
- export OHPYD_DEVICES_PATH=$PWD/ophyd_devices
|
194
|
-
- apt-get update
|
195
|
-
- apt-get install -y libgl1-mesa-glx libegl1-mesa x11-utils libxkbcommon-x11-0 libdbus-1-3
|
196
|
-
- pip install -e ./bec/bec_lib[dev]
|
197
|
-
- pip install -e .[dev,pyqt5]
|
198
|
-
- pytest -v --junitxml=report.xml --random-order ./tests/unit_tests
|
199
|
-
allow_failure: true
|
200
|
-
|
201
|
-
tests-3.10-pyqt6:
|
202
|
-
extends: "tests"
|
203
|
-
stage: AdditionalTests
|
204
|
-
image: $CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX/python:3.10
|
205
|
-
script:
|
206
|
-
- git clone --branch $BEC_CORE_BRANCH https://gitlab.psi.ch/bec/bec.git
|
207
|
-
- git clone --branch $OPHYD_DEVICES_BRANCH https://gitlab.psi.ch/bec/ophyd_devices.git
|
208
|
-
- export OHPYD_DEVICES_PATH=$PWD/ophyd_devices
|
209
|
-
- apt-get update
|
210
|
-
- apt-get install -y libgl1-mesa-glx libegl1-mesa x11-utils libxkbcommon-x11-0 libdbus-1-3
|
211
|
-
- pip install -e ./bec/bec_lib[dev]
|
212
|
-
- pip install -e .[dev,pyqt6]
|
213
|
-
- pytest -v --junitxml=report.xml --random-order ./tests/unit_tests
|
214
|
-
allow_failure: true
|
215
|
-
|
216
|
-
tests-3.11-pyqt6:
|
217
|
-
extends: "tests"
|
218
|
-
stage: AdditionalTests
|
219
|
-
image: $CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX/python:3.11
|
220
|
-
script:
|
221
|
-
- git clone --branch $BEC_CORE_BRANCH https://gitlab.psi.ch/bec/bec.git
|
222
|
-
- git clone --branch $OPHYD_DEVICES_BRANCH https://gitlab.psi.ch/bec/ophyd_devices.git
|
223
|
-
- export OHPYD_DEVICES_PATH=$PWD/ophyd_devices
|
224
|
-
- apt-get update
|
225
|
-
- apt-get install -y libgl1-mesa-glx libegl1-mesa x11-utils libxkbcommon-x11-0 libdbus-1-3
|
226
|
-
- pip install -e ./bec/bec_lib[dev]
|
227
|
-
- pip install -e .[dev,pyqt6]
|
228
|
-
- pytest -v --junitxml=report.xml --random-order ./tests/unit_tests
|
229
|
-
allow_failure: true
|
230
|
-
|
231
|
-
tests-3.12-pyqt6:
|
232
|
-
extends: "tests"
|
233
|
-
stage: AdditionalTests
|
234
|
-
image: $CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX/python:3.12
|
144
|
+
needs: []
|
145
|
+
variables:
|
146
|
+
QT_QPA_PLATFORM: "offscreen"
|
147
|
+
PYTHON_VERSION: ""
|
148
|
+
QT_PCKG: ""
|
149
|
+
image: $CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX/python:$PYTHON_VERSION
|
235
150
|
script:
|
236
151
|
- git clone --branch $BEC_CORE_BRANCH https://gitlab.psi.ch/bec/bec.git
|
237
152
|
- git clone --branch $OPHYD_DEVICES_BRANCH https://gitlab.psi.ch/bec/ophyd_devices.git
|
238
153
|
- export OHPYD_DEVICES_PATH=$PWD/ophyd_devices
|
239
154
|
- apt-get update
|
240
155
|
- apt-get install -y libgl1-mesa-glx libegl1-mesa x11-utils libxkbcommon-x11-0 libdbus-1-3
|
156
|
+
- *install-qt-webengine-deps
|
241
157
|
- pip install -e ./bec/bec_lib[dev]
|
242
|
-
- pip install -e .[dev
|
158
|
+
- pip install -e .[dev,$QT_PCKG]
|
243
159
|
- pytest -v --junitxml=report.xml --random-order ./tests/unit_tests
|
244
160
|
allow_failure: true
|
245
161
|
|
@@ -253,6 +169,7 @@ end-2-end-conda:
|
|
253
169
|
script:
|
254
170
|
- apt-get update
|
255
171
|
- apt-get install -y libgl1-mesa-glx libegl1-mesa x11-utils libxkbcommon-x11-0 libdbus-1-3
|
172
|
+
- *install-qt-webengine-deps
|
256
173
|
- conda config --prepend channels conda-forge
|
257
174
|
- conda config --set channel_priority strict
|
258
175
|
- conda config --set always_yes yes --set changeps1 no
|
CHANGELOG.md
CHANGED
@@ -2,6 +2,27 @@
|
|
2
2
|
|
3
3
|
|
4
4
|
|
5
|
+
## v0.59.0 (2024-06-07)
|
6
|
+
|
7
|
+
### Build
|
8
|
+
|
9
|
+
* build: added webengine dependency ([`d56c549`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/d56c5493cd28f379d04a79d90b01c73b0760da1b))
|
10
|
+
|
11
|
+
### Ci
|
12
|
+
|
13
|
+
* ci: merged additional tests to parallel matrix job ([`178fe4d`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/178fe4d2da3a959f7cd90e7ea0f47314dc1ef4ed))
|
14
|
+
|
15
|
+
* ci: added webengine dependencies ([`2d79ef8`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/2d79ef8fe5e52c61f4a78782770377cd6b41958b))
|
16
|
+
|
17
|
+
### Documentation
|
18
|
+
|
19
|
+
* docs: added website docs ([`cf6e5a4`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/cf6e5a40fc8320e9898a446a5bf14b77e94ef013))
|
20
|
+
|
21
|
+
### Feature
|
22
|
+
|
23
|
+
* feat(widget): added simple website widget with rpc ([`64abd67`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/64abd67b9b416bff9c89880b248d6e8639aa1e70))
|
24
|
+
|
25
|
+
|
5
26
|
## v0.58.1 (2024-06-07)
|
6
27
|
|
7
28
|
### Fix
|
@@ -138,23 +159,3 @@
|
|
138
159
|
### Feature
|
139
160
|
|
140
161
|
* feat(widgets/console): BECJupyterConsole added ([`8c03034`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/8c03034acf6b3ed1e346ebf1b785d41068513cc5))
|
141
|
-
|
142
|
-
|
143
|
-
## v0.56.3 (2024-06-05)
|
144
|
-
|
145
|
-
### Ci
|
146
|
-
|
147
|
-
* ci: increased verbosity for e2e tests ([`4af1abe`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/4af1abe4e15b62d2f7e70bf987a1a7d8694ef4d5))
|
148
|
-
|
149
|
-
### Fix
|
150
|
-
|
151
|
-
* fix: fixed support for auto updates ([`131f49d`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/131f49da8ea65af4d44b50e81c1acfc29cd92093))
|
152
|
-
|
153
|
-
|
154
|
-
## v0.56.2 (2024-06-05)
|
155
|
-
|
156
|
-
### Fix
|
157
|
-
|
158
|
-
* fix(bar): ring saves current value in config ([`9648e3e`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/9648e3ea96a4109be6be694d855151ed6d3ad661))
|
159
|
-
|
160
|
-
* fix(dock): dock saves configs of all children widgets ([`4be756a`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/4be756a8676421c3a3451458995232407295df84))
|
PKG-INFO
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.3
|
2
2
|
Name: bec_widgets
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.59.0
|
4
4
|
Summary: BEC Widgets
|
5
5
|
Project-URL: Bug Tracker, https://gitlab.psi.ch/bec/bec_widgets/issues
|
6
6
|
Project-URL: Homepage, https://gitlab.psi.ch/bec/bec_widgets
|
@@ -30,7 +30,9 @@ Requires-Dist: pytest-timeout; extra == 'dev'
|
|
30
30
|
Requires-Dist: pytest-xvfb; extra == 'dev'
|
31
31
|
Provides-Extra: pyqt5
|
32
32
|
Requires-Dist: pyqt5>=5.9; extra == 'pyqt5'
|
33
|
+
Requires-Dist: pyqtwebengine>=5.9; extra == 'pyqt5'
|
33
34
|
Provides-Extra: pyqt6
|
35
|
+
Requires-Dist: pyqt6-webengine>=6.7; extra == 'pyqt6'
|
34
36
|
Requires-Dist: pyqt6>=6.7; extra == 'pyqt6'
|
35
37
|
Provides-Extra: pyside6
|
36
38
|
Requires-Dist: pyside6>=6.7; extra == 'pyside6'
|
bec_widgets/cli/client.py
CHANGED
@@ -1932,3 +1932,79 @@ class Ring(RPCBase):
|
|
1932
1932
|
"""
|
1933
1933
|
Reset the connections for the ring widget. Disconnect the current slot and endpoint.
|
1934
1934
|
"""
|
1935
|
+
|
1936
|
+
|
1937
|
+
class WebsiteWidget(RPCBase):
|
1938
|
+
@rpc_call
|
1939
|
+
def set_url(self, url: str) -> None:
|
1940
|
+
"""
|
1941
|
+
Set the url of the website widget
|
1942
|
+
|
1943
|
+
Args:
|
1944
|
+
url (str): The url to set
|
1945
|
+
"""
|
1946
|
+
|
1947
|
+
@rpc_call
|
1948
|
+
def get_url(self) -> str:
|
1949
|
+
"""
|
1950
|
+
Get the current url of the website widget
|
1951
|
+
|
1952
|
+
Returns:
|
1953
|
+
str: The current url
|
1954
|
+
"""
|
1955
|
+
|
1956
|
+
@rpc_call
|
1957
|
+
def reload(self):
|
1958
|
+
"""
|
1959
|
+
Reload the website
|
1960
|
+
"""
|
1961
|
+
|
1962
|
+
@rpc_call
|
1963
|
+
def back(self):
|
1964
|
+
"""
|
1965
|
+
Go back in the history
|
1966
|
+
"""
|
1967
|
+
|
1968
|
+
@rpc_call
|
1969
|
+
def forward(self):
|
1970
|
+
"""
|
1971
|
+
Go forward in the history
|
1972
|
+
"""
|
1973
|
+
|
1974
|
+
|
1975
|
+
class WebsiteWidget(RPCBase):
|
1976
|
+
@rpc_call
|
1977
|
+
def set_url(self, url: str) -> None:
|
1978
|
+
"""
|
1979
|
+
Set the url of the website widget
|
1980
|
+
|
1981
|
+
Args:
|
1982
|
+
url (str): The url to set
|
1983
|
+
"""
|
1984
|
+
|
1985
|
+
@rpc_call
|
1986
|
+
def get_url(self) -> str:
|
1987
|
+
"""
|
1988
|
+
Get the current url of the website widget
|
1989
|
+
|
1990
|
+
Returns:
|
1991
|
+
str: The current url
|
1992
|
+
"""
|
1993
|
+
|
1994
|
+
@rpc_call
|
1995
|
+
def reload(self):
|
1996
|
+
"""
|
1997
|
+
Reload the website
|
1998
|
+
"""
|
1999
|
+
|
2000
|
+
@rpc_call
|
2001
|
+
def back(self):
|
2002
|
+
"""
|
2003
|
+
Go back in the history
|
2004
|
+
"""
|
2005
|
+
|
2006
|
+
@rpc_call
|
2007
|
+
def forward(self):
|
2008
|
+
"""
|
2009
|
+
Go forward in the history
|
2010
|
+
"""
|
bec_widgets/cli/generate_cli.py
CHANGED
@@ -117,6 +117,7 @@ if __name__ == "__main__": # pragma: no cover
|
|
117
117
|
from bec_widgets.widgets.figure.plots.waveform.waveform import BECWaveform
|
118
118
|
from bec_widgets.widgets.figure.plots.waveform.waveform_curve import BECCurve
|
119
119
|
from bec_widgets.widgets.spiral_progress_bar.ring import Ring
|
120
|
+
from bec_widgets.widgets.website.website import WebsiteWidget
|
120
121
|
|
121
122
|
current_path = os.path.dirname(__file__)
|
122
123
|
client_path = os.path.join(current_path, "client.py")
|
@@ -133,6 +134,7 @@ if __name__ == "__main__": # pragma: no cover
|
|
133
134
|
BECDockArea,
|
134
135
|
SpiralProgressBar,
|
135
136
|
Ring,
|
137
|
+
WebsiteWidget,
|
136
138
|
]
|
137
139
|
generator = ClientGenerator()
|
138
140
|
generator.generate_client(clss)
|
@@ -1,12 +1,17 @@
|
|
1
1
|
from bec_widgets.utils import BECConnector
|
2
2
|
from bec_widgets.widgets.figure import BECFigure
|
3
3
|
from bec_widgets.widgets.spiral_progress_bar.spiral_progress_bar import SpiralProgressBar
|
4
|
+
from bec_widgets.widgets.website.website import WebsiteWidget
|
4
5
|
|
5
6
|
|
6
7
|
class RPCWidgetHandler:
|
7
8
|
"""Handler class for creating widgets from RPC messages."""
|
8
9
|
|
9
|
-
widget_classes = {
|
10
|
+
widget_classes = {
|
11
|
+
"BECFigure": BECFigure,
|
12
|
+
"SpiralProgressBar": SpiralProgressBar,
|
13
|
+
"Website": WebsiteWidget,
|
14
|
+
}
|
10
15
|
|
11
16
|
@staticmethod
|
12
17
|
def create_widget(widget_type, **kwargs) -> BECConnector:
|
File without changes
|
@@ -0,0 +1,65 @@
|
|
1
|
+
from qtpy.QtCore import QUrl
|
2
|
+
from qtpy.QtWebEngineWidgets import QWebEngineView
|
3
|
+
from qtpy.QtWidgets import QApplication
|
4
|
+
|
5
|
+
from bec_widgets.utils import BECConnector
|
6
|
+
|
7
|
+
|
8
|
+
class WebsiteWidget(BECConnector, QWebEngineView):
|
9
|
+
"""
|
10
|
+
A simple widget to display a website
|
11
|
+
"""
|
12
|
+
|
13
|
+
USER_ACCESS = ["set_url", "get_url", "reload", "back", "forward"]
|
14
|
+
|
15
|
+
def __init__(self, url: str = None, parent=None, config=None, client=None, gui_id=None):
|
16
|
+
super().__init__(client=client, config=config, gui_id=gui_id)
|
17
|
+
QWebEngineView.__init__(self, parent=parent)
|
18
|
+
self.set_url(url)
|
19
|
+
|
20
|
+
def set_url(self, url: str) -> None:
|
21
|
+
"""
|
22
|
+
Set the url of the website widget
|
23
|
+
|
24
|
+
Args:
|
25
|
+
url (str): The url to set
|
26
|
+
"""
|
27
|
+
if not url:
|
28
|
+
return
|
29
|
+
self.setUrl(QUrl(url))
|
30
|
+
|
31
|
+
def get_url(self) -> str:
|
32
|
+
"""
|
33
|
+
Get the current url of the website widget
|
34
|
+
|
35
|
+
Returns:
|
36
|
+
str: The current url
|
37
|
+
"""
|
38
|
+
return self.url().toString()
|
39
|
+
|
40
|
+
def reload(self):
|
41
|
+
"""
|
42
|
+
Reload the website
|
43
|
+
"""
|
44
|
+
QWebEngineView.reload(self)
|
45
|
+
|
46
|
+
def back(self):
|
47
|
+
"""
|
48
|
+
Go back in the history
|
49
|
+
"""
|
50
|
+
QWebEngineView.back(self)
|
51
|
+
|
52
|
+
def forward(self):
|
53
|
+
"""
|
54
|
+
Go forward in the history
|
55
|
+
"""
|
56
|
+
QWebEngineView.forward(self)
|
57
|
+
|
58
|
+
|
59
|
+
if __name__ == "__main__":
|
60
|
+
import sys
|
61
|
+
|
62
|
+
app = QApplication(sys.argv)
|
63
|
+
mainWin = WebsiteWidget("https://scilog.psi.ch")
|
64
|
+
mainWin.show()
|
65
|
+
sys.exit(app.exec())
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.3
|
2
2
|
Name: bec_widgets
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.59.0
|
4
4
|
Summary: BEC Widgets
|
5
5
|
Project-URL: Bug Tracker, https://gitlab.psi.ch/bec/bec_widgets/issues
|
6
6
|
Project-URL: Homepage, https://gitlab.psi.ch/bec/bec_widgets
|
@@ -30,7 +30,9 @@ Requires-Dist: pytest-timeout; extra == 'dev'
|
|
30
30
|
Requires-Dist: pytest-xvfb; extra == 'dev'
|
31
31
|
Provides-Extra: pyqt5
|
32
32
|
Requires-Dist: pyqt5>=5.9; extra == 'pyqt5'
|
33
|
+
Requires-Dist: pyqtwebengine>=5.9; extra == 'pyqt5'
|
33
34
|
Provides-Extra: pyqt6
|
35
|
+
Requires-Dist: pyqt6-webengine>=6.7; extra == 'pyqt6'
|
34
36
|
Requires-Dist: pyqt6>=6.7; extra == 'pyqt6'
|
35
37
|
Provides-Extra: pyside6
|
36
38
|
Requires-Dist: pyside6>=6.7; extra == 'pyside6'
|
@@ -1,12 +1,12 @@
|
|
1
1
|
.gitignore,sha256=cMQ1MLmnoR88aMCCJwUyfoTnufzl4-ckmHtlFUqHcT4,3253
|
2
|
-
.gitlab-ci.yml,sha256=
|
2
|
+
.gitlab-ci.yml,sha256=WnkyBGO4oXDYAiNbLJn-XDSGVFS6hsDIehgZoy-uykw,8328
|
3
3
|
.pylintrc,sha256=OstrgmEyP0smNFBKoIN5_26-UmNZgMHnbjvAWX0UrLs,18535
|
4
4
|
.readthedocs.yaml,sha256=aSOc277LqXcsTI6lgvm_JY80lMlr69GbPKgivua2cS0,603
|
5
|
-
CHANGELOG.md,sha256=
|
5
|
+
CHANGELOG.md,sha256=P6Luyx0Hu_SvqXdhNIIKok5kgPW9EsyOaRw1YrrOKZA,7013
|
6
6
|
LICENSE,sha256=YRKe85CBRyP7UpEAWwU8_qSIyuy5-l_9C-HKg5Qm8MQ,1511
|
7
|
-
PKG-INFO,sha256=
|
7
|
+
PKG-INFO,sha256=MAL6cE2vhCDQphF93IQ6n5C3MuUPlzhRXuW7H6Vw9O8,1284
|
8
8
|
README.md,sha256=y4jB6wvArS7N8_iTbKWnSM_oRAqLA2GqgzUR-FMh5sU,2645
|
9
|
-
pyproject.toml,sha256=
|
9
|
+
pyproject.toml,sha256=Zi9BiQNDd0VqI7KspQh6m-7MlaULYx5lucZQuqYjXDc,1868
|
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
|
@@ -17,11 +17,11 @@ bec_widgets/assets/bec_widgets_icon.png,sha256=K8dgGwIjalDh9PRHUsSQBqgdX7a00nM3i
|
|
17
17
|
bec_widgets/assets/terminal_icon.png,sha256=bJl7Tft4Fi2uxvuXI8o14uMHnI9eAWKSU2uftXCH9ws,3889
|
18
18
|
bec_widgets/cli/__init__.py,sha256=tLD8HWgyURhMjYlKZ43pBu-qvGD1LI5o3n3rEieg-70,43
|
19
19
|
bec_widgets/cli/auto_updates.py,sha256=0sd7HiqOMn1jCbgVG3-H1nmQgdOMRwSjx6FAvdtVf1k,4747
|
20
|
-
bec_widgets/cli/client.py,sha256=
|
20
|
+
bec_widgets/cli/client.py,sha256=JBvlAr8YsNg-txbyeGSsJdovh02ePgtbt2L4JREk7rs,56378
|
21
21
|
bec_widgets/cli/client_utils.py,sha256=7u8P9EYgLPJuAcHxnFiZi-gCZohO3vAn0W7dqsSrs4M,10660
|
22
|
-
bec_widgets/cli/generate_cli.py,sha256=
|
22
|
+
bec_widgets/cli/generate_cli.py,sha256=Q_8jQP9lZFX89EK42RokLgJjN65cJgG7hjat_5iEb6w,4520
|
23
23
|
bec_widgets/cli/rpc_register.py,sha256=QxXUZu5XNg00Yf5O3UHWOXg3-f_pzKjjoZYMOa-MOJc,2216
|
24
|
-
bec_widgets/cli/rpc_wigdet_handler.py,sha256=
|
24
|
+
bec_widgets/cli/rpc_wigdet_handler.py,sha256=VRLujiICU_Gq0mO1Hr15YwjlxU7OcAzqeoM8QHqSubM,1032
|
25
25
|
bec_widgets/cli/server.py,sha256=rsj31Vsx6ayThNe4PQelQFahGjYXFZjfrNyB2fnm6Ro,5737
|
26
26
|
bec_widgets/examples/__init__.py,sha256=WWQ0cu7m8sA4Ehy-DWdTIqSISjaHsbxhsNmNrMnhDZU,202
|
27
27
|
bec_widgets/examples/jupyter_console/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -86,6 +86,8 @@ bec_widgets/widgets/spiral_progress_bar/ring.py,sha256=7i5oKpW8eUQGvLyKce2-2rlaG
|
|
86
86
|
bec_widgets/widgets/spiral_progress_bar/spiral_progress_bar.py,sha256=cMi4g7zNTLrkkzZ9ChiIBTaqigDCYwzrgA2iRmq9dUI,24050
|
87
87
|
bec_widgets/widgets/toolbar/__init__.py,sha256=d-TP4_cr_VbpwreMM4ePnfZ5YXsEPQ45ibEf75nuGoE,36
|
88
88
|
bec_widgets/widgets/toolbar/toolbar.py,sha256=e0zCD_0q7K4NVhrzD8001Qvfxt-VhqHTgofchS9NgCM,5125
|
89
|
+
bec_widgets/widgets/website/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
90
|
+
bec_widgets/widgets/website/website.py,sha256=C679bpGUoSqfLtu4_BcEQEmesNj_L9HaTu0buJzb4c0,1526
|
89
91
|
docs/Makefile,sha256=i2WHuFlgfyAPEW4ssEP8NY4cOibDJrVjvzSEU8_Ggwc,634
|
90
92
|
docs/conf.py,sha256=HxLxupNGu0Smhwn57g1kFdjZzFuaWVREgRJKhT1zi2k,2464
|
91
93
|
docs/index.md,sha256=8ZCgaLIbJsYvt-jwi--QxsNwnK4-k3rejIeOOLclG40,1101
|
@@ -122,7 +124,8 @@ docs/user/widgets/progress_bar.gif,sha256=5jh0Zw2BBGPuNxszV1DBLJCb4_6glIRX-U2ABj
|
|
122
124
|
docs/user/widgets/scatter_2D.gif,sha256=yHpsuAUseMafJjI_J5BcOhmE3nu9VFn_Xm9XHzJaH5I,13188862
|
123
125
|
docs/user/widgets/spiral_progress_bar.md,sha256=QTgUDIl6XPuK_HwSfB6sNijZ4bss26biDg6B_mJ8Pxk,2208
|
124
126
|
docs/user/widgets/w1D.gif,sha256=tuHbleJpl6bJFNNC2OdndF5LF7IyfvlkFCMGZajrQPs,622773
|
125
|
-
docs/user/widgets/
|
127
|
+
docs/user/widgets/website.md,sha256=wfudAupdtHX-Sfritg0xMWXZLLczJ4XwMLNWvu6ww-w,705
|
128
|
+
docs/user/widgets/widgets.md,sha256=05D8R97KU84vz64G_Rm8Uu8nXy098ZRkMhNG8-Lc8Ng,361
|
126
129
|
tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
127
130
|
tests/end-2-end/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
128
131
|
tests/end-2-end/conftest.py,sha256=taLqiYVzOhJjMre5ypgQjB7wzSXP4soKANW3XfAjems,1773
|
@@ -147,6 +150,7 @@ tests/unit_tests/test_rpc_register.py,sha256=hECjZEimd440mwRrO0rg7L3PKN7__3DgjmE
|
|
147
150
|
tests/unit_tests/test_scan_control.py,sha256=7dtGpE0g4FqUhhQeCkyJl-9o7NH3DFZJgEaqDmBYbBc,7551
|
148
151
|
tests/unit_tests/test_spiral_progress_bar.py,sha256=yak3N9-TmEM3lQZPSROL4cAx9mior__se1XADlMScks,12418
|
149
152
|
tests/unit_tests/test_waveform1d.py,sha256=j9-CCE0BkFVI3Gnv8pjV1gc9HwA5PYG0_ox1oZ60F6w,15272
|
153
|
+
tests/unit_tests/test_website_widget.py,sha256=fBADIJJBAHU4Ro7u95kdemFVNv196UOcuO9oLHuHt8A,761
|
150
154
|
tests/unit_tests/test_widget_io.py,sha256=FeL3ZYSBQnRt6jxj8VGYw1cmcicRQyHKleahw7XIyR0,3475
|
151
155
|
tests/unit_tests/test_yaml_dialog.py,sha256=HNrqferkdg02-9ieOhhI2mr2Qvt7GrYgXmQ061YCTbg,5794
|
152
156
|
tests/unit_tests/test_configs/config_device.yaml,sha256=h3zNb5ZaT_sA59Sf-24qsXs54MgUsspo-GOJmKWHx3o,695
|
@@ -154,7 +158,7 @@ tests/unit_tests/test_configs/config_device_no_entry.yaml,sha256=hdvue9KLc_kfNzG
|
|
154
158
|
tests/unit_tests/test_configs/config_scan.yaml,sha256=vo484BbWOjA_e-h6bTjSV9k7QaQHrlAvx-z8wtY-P4E,1915
|
155
159
|
tests/unit_tests/test_msgs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
156
160
|
tests/unit_tests/test_msgs/available_scans_message.py,sha256=m_z97hIrjHXXMa2Ex-UvsPmTxOYXfjxyJaGkIY6StTY,46532
|
157
|
-
bec_widgets-0.
|
158
|
-
bec_widgets-0.
|
159
|
-
bec_widgets-0.
|
160
|
-
bec_widgets-0.
|
161
|
+
bec_widgets-0.59.0.dist-info/METADATA,sha256=MAL6cE2vhCDQphF93IQ6n5C3MuUPlzhRXuW7H6Vw9O8,1284
|
162
|
+
bec_widgets-0.59.0.dist-info/WHEEL,sha256=zEMcRr9Kr03x1ozGwg5v9NQBKn3kndp6LSoSlVg-jhU,87
|
163
|
+
bec_widgets-0.59.0.dist-info/licenses/LICENSE,sha256=YRKe85CBRyP7UpEAWwU8_qSIyuy5-l_9C-HKg5Qm8MQ,1511
|
164
|
+
bec_widgets-0.59.0.dist-info/RECORD,,
|
@@ -0,0 +1,21 @@
|
|
1
|
+
(user.widgets.website)=
|
2
|
+
# [Website Widget](/api_reference/_autosummary/bec_widgets.cli.client.WebsiteWidget)
|
3
|
+
**Purpose:**
|
4
|
+
|
5
|
+
The Website Widget is a widget that allows you to display a website within the BEC GUI. The widget can be used to display any website.
|
6
|
+
|
7
|
+
**Key Features:**
|
8
|
+
|
9
|
+
- set the URL of the website to display.
|
10
|
+
- reload the website.
|
11
|
+
- navigate back and forward in the website history.
|
12
|
+
|
13
|
+
**Code example:**
|
14
|
+
|
15
|
+
The following code snipped demonstrates how to create a `WebsiteWidget` using BEC Widgets within BEC.
|
16
|
+
```python
|
17
|
+
# adds a new dock with a website widget
|
18
|
+
web = gui.add_dock().add_widget("Website")
|
19
|
+
# set the URL of the website to display
|
20
|
+
web.set_url("https://bec.readthedocs.io/en/latest/")
|
21
|
+
```
|
docs/user/widgets/widgets.md
CHANGED
pyproject.toml
CHANGED
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
4
4
|
|
5
5
|
[project]
|
6
6
|
name = "bec_widgets"
|
7
|
-
version = "0.
|
7
|
+
version = "0.59.0"
|
8
8
|
description = "BEC Widgets"
|
9
9
|
requires-python = ">=3.10"
|
10
10
|
classifiers = [
|
@@ -37,8 +37,8 @@ dev = [
|
|
37
37
|
"isort",
|
38
38
|
"fakeredis",
|
39
39
|
]
|
40
|
-
pyqt5 = ["PyQt5>=5.9"]
|
41
|
-
pyqt6 = ["PyQt6>=6.7"]
|
40
|
+
pyqt5 = ["PyQt5>=5.9", "PyQtWebEngine>=5.9"]
|
41
|
+
pyqt6 = ["PyQt6>=6.7", "PyQt6-WebEngine>=6.7"]
|
42
42
|
pyside6 = ["PySide6>=6.7"]
|
43
43
|
|
44
44
|
[project.urls]
|
@@ -0,0 +1,27 @@
|
|
1
|
+
import pytest
|
2
|
+
from qtpy.QtCore import QUrl
|
3
|
+
|
4
|
+
from bec_widgets.widgets.website.website import WebsiteWidget
|
5
|
+
|
6
|
+
from .client_mocks import mocked_client
|
7
|
+
|
8
|
+
|
9
|
+
@pytest.fixture
|
10
|
+
def website_widget(qtbot, mocked_client):
|
11
|
+
widget = WebsiteWidget(client=mocked_client)
|
12
|
+
qtbot.addWidget(widget)
|
13
|
+
qtbot.waitExposed(widget)
|
14
|
+
yield widget
|
15
|
+
widget.page().deleteLater()
|
16
|
+
qtbot.wait(1000)
|
17
|
+
|
18
|
+
|
19
|
+
def test_website_widget_set_url(website_widget):
|
20
|
+
website_widget.set_url("https://scilog.psi.ch")
|
21
|
+
assert website_widget.url() == QUrl("https://scilog.psi.ch")
|
22
|
+
|
23
|
+
website_widget.set_url(None)
|
24
|
+
assert website_widget.url() == QUrl("https://scilog.psi.ch")
|
25
|
+
|
26
|
+
website_widget.set_url("https://google.com")
|
27
|
+
assert website_widget.get_url() == "https://google.com"
|
File without changes
|
File without changes
|