bec-widgets 0.71.1__py3-none-any.whl → 0.72.1__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 CHANGED
@@ -1,5 +1,25 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## v0.72.1 (2024-06-24)
4
+
5
+ ### Fix
6
+
7
+ * fix: renamed spiral progress bar to ring progress bar; closes #235 ([`e5c0087`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/e5c0087c9aed831edbe1c172746325a772a3bafa))
8
+
9
+ ### Test
10
+
11
+ * test: bugfix to prohibit leackage of mock ([`4348ed1`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/4348ed1bb2182da6bdecaf372d6db85279e60af8))
12
+
13
+ ## v0.72.0 (2024-06-24)
14
+
15
+ ### Feature
16
+
17
+ * feat(connector): added threadpool wrapper ([`4ca1efe`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/4ca1efeeb8955604069f7b98374c7f82e1a8da67))
18
+
19
+ ### Unknown
20
+
21
+ * tests(status_box_test): temporary disabled tests for status_box due to high rate of failures ([`aa7ce2e`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/aa7ce2ea27bb9564d4f5104bbff30725b8656453))
22
+
3
23
  ## v0.71.1 (2024-06-23)
4
24
 
5
25
  ### Fix
@@ -133,21 +153,3 @@ in their parent process ([`ce37416`](https://gitlab.psi.ch/bec/bec_widgets/-/com
133
153
  ### Feature
134
154
 
135
155
  * feat(rpc): discover widgets automatically ([`ef25f56`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/ef25f5638032f931ceb292540ada618508bb2aed))
136
-
137
- ## v0.65.2 (2024-06-20)
138
-
139
- ### Fix
140
-
141
- * fix(pyqt): webengine must be imported before qcoreapplication ([`cbbd23a`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/cbbd23aa33095141e4c265719d176c4aa8c25996))
142
-
143
- ## v0.65.1 (2024-06-20)
144
-
145
- ### Fix
146
-
147
- * fix: prevent segfault by closing the QCoreApplication, if any ([`fa344a5`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/fa344a5799b07a2d8ace63cc7010b69bc4ed6f1d))
148
-
149
- ## v0.65.0 (2024-06-20)
150
-
151
- ### Test
152
-
153
- * test(device_input): tests added ([`1a0a98a`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/1a0a98a45367db414bed813bbd346b3e1ae8d550))
PKG-INFO CHANGED
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: bec_widgets
3
- Version: 0.71.1
3
+ Version: 0.72.1
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
bec_widgets/cli/client.py CHANGED
@@ -17,8 +17,8 @@ class Widgets(str, enum.Enum):
17
17
  BECDock = "BECDock"
18
18
  BECDockArea = "BECDockArea"
19
19
  BECFigure = "BECFigure"
20
+ RingProgressBar = "RingProgressBar"
20
21
  ScanControl = "ScanControl"
21
- SpiralProgressBar = "SpiralProgressBar"
22
22
  TextBox = "TextBox"
23
23
  VSCodeEditor = "VSCodeEditor"
24
24
  WebsiteWidget = "WebsiteWidget"
@@ -1824,25 +1824,7 @@ class Ring(RPCBase):
1824
1824
  """
1825
1825
 
1826
1826
 
1827
- class ScanControl(RPCBase):
1828
- @property
1829
- @rpc_call
1830
- def config_dict(self) -> "dict":
1831
- """
1832
- Get the configuration of the widget.
1833
-
1834
- Returns:
1835
- dict: The configuration of the widget.
1836
- """
1837
-
1838
- @rpc_call
1839
- def get_all_rpc(self) -> "dict":
1840
- """
1841
- Get all registered RPC objects.
1842
- """
1843
-
1844
-
1845
- class SpiralProgressBar(RPCBase):
1827
+ class RingProgressBar(RPCBase):
1846
1828
  @rpc_call
1847
1829
  def get_all_rpc(self) -> "dict":
1848
1830
  """
@@ -1874,7 +1856,7 @@ class SpiralProgressBar(RPCBase):
1874
1856
  """
1875
1857
 
1876
1858
  @rpc_call
1877
- def update_config(self, config: "SpiralProgressBarConfig | dict"):
1859
+ def update_config(self, config: "RingProgressBarConfig | dict"):
1878
1860
  """
1879
1861
  Update the configuration of the widget.
1880
1862
 
@@ -2021,6 +2003,24 @@ class SpiralProgressBar(RPCBase):
2021
2003
  """
2022
2004
 
2023
2005
 
2006
+ class ScanControl(RPCBase):
2007
+ @property
2008
+ @rpc_call
2009
+ def config_dict(self) -> "dict":
2010
+ """
2011
+ Get the configuration of the widget.
2012
+
2013
+ Returns:
2014
+ dict: The configuration of the widget.
2015
+ """
2016
+
2017
+ @rpc_call
2018
+ def get_all_rpc(self) -> "dict":
2019
+ """
2020
+ Get all registered RPC objects.
2021
+ """
2022
+
2023
+
2024
2024
  class StopButton(RPCBase):
2025
2025
  @property
2026
2026
  @rpc_call
@@ -116,7 +116,7 @@ class JupyterConsoleWindow(QWidget): # pragma: no cover:
116
116
  self.d2 = self.dock.add_dock(name="dock_2", position="bottom")
117
117
  self.fig2 = self.d2.add_widget("BECFigure", row=0, col=0)
118
118
  self.fig2.plot(x_name="samx", y_name="bpm4i")
119
- self.bar = self.d2.add_widget("SpiralProgressBar", row=0, col=1)
119
+ self.bar = self.d2.add_widget("RingProgressBar", row=0, col=1)
120
120
  self.bar.set_diameter(200)
121
121
 
122
122
  self.dock.save_state()
@@ -2,10 +2,11 @@
2
2
  from __future__ import annotations
3
3
 
4
4
  import time
5
- from typing import Optional, Type
5
+ from typing import Optional
6
6
 
7
- from bec_lib.utils.import_utils import lazy_import, lazy_import_from
7
+ from bec_lib.utils.import_utils import lazy_import_from
8
8
  from pydantic import BaseModel, Field, field_validator
9
+ from qtpy.QtCore import QObject, QRunnable, QThreadPool, Signal
9
10
  from qtpy.QtCore import Slot as pyqtSlot
10
11
 
11
12
  from bec_widgets.cli.rpc_register import RPCRegister
@@ -33,6 +34,31 @@ class ConnectionConfig(BaseModel):
33
34
  return v
34
35
 
35
36
 
37
+ class WorkerSignals(QObject):
38
+ progress = Signal(dict)
39
+ completed = Signal()
40
+
41
+
42
+ class Worker(QRunnable):
43
+ """
44
+ Worker class to run a function in a separate thread.
45
+ """
46
+
47
+ def __init__(self, func, *args, **kwargs):
48
+ super().__init__()
49
+ self.signals = WorkerSignals()
50
+ self.func = func
51
+ self.args = args
52
+ self.kwargs = kwargs
53
+
54
+ def run(self):
55
+ """
56
+ Run the specified function in the thread.
57
+ """
58
+ self.func(*self.args, **self.kwargs)
59
+ self.signals.completed.emit()
60
+
61
+
36
62
  class BECConnector:
37
63
  """Connection mixin class for all BEC widgets, to handle BEC client and device manager"""
38
64
 
@@ -63,6 +89,43 @@ class BECConnector:
63
89
  self.rpc_register = RPCRegister()
64
90
  self.rpc_register.add_rpc(self)
65
91
 
92
+ self._thread_pool = QThreadPool.globalInstance()
93
+
94
+ def submit_task(self, fn, *args, on_complete: pyqtSlot = None, **kwargs) -> Worker:
95
+ """
96
+ Submit a task to run in a separate thread. The task will run the specified
97
+ function with the provided arguments and emit the completed signal when done.
98
+
99
+ Use this method if you want to wait for a task to complete without blocking the
100
+ main thread.
101
+
102
+ Args:
103
+ fn: Function to run in a separate thread.
104
+ *args: Arguments for the function.
105
+ on_complete: Slot to run when the task is complete.
106
+ **kwargs: Keyword arguments for the function.
107
+
108
+ Returns:
109
+ worker: The worker object that will run the task.
110
+
111
+ Examples:
112
+ >>> def my_function(a, b):
113
+ >>> print(a + b)
114
+ >>> self.submit_task(my_function, 1, 2)
115
+
116
+ >>> def my_function(a, b):
117
+ >>> print(a + b)
118
+ >>> def on_complete():
119
+ >>> print("Task complete")
120
+ >>> self.submit_task(my_function, 1, 2, on_complete=on_complete)
121
+
122
+ """
123
+ worker = Worker(fn, *args, **kwargs)
124
+ if on_complete:
125
+ worker.signals.completed.connect(on_complete)
126
+ self._thread_pool.start(worker)
127
+ return worker
128
+
66
129
  def get_all_rpc(self) -> dict:
67
130
  """Get all registered RPC objects."""
68
131
  all_connections = self.rpc_register.list_all_connections()
@@ -1,5 +1 @@
1
- # from .buttons import StopButton
2
- # from .dock import BECDock, BECDockArea
3
- # from .figure import BECFigure, FigureConfig
4
- # from .scan_control import ScanControl
5
- # from .spiral_progress_bar import SpiralProgressBar
1
+
@@ -11,7 +11,7 @@ import qdarktheme
11
11
  from bec_lib.utils.import_utils import lazy_import_from
12
12
  from pydantic import BaseModel, Field, field_validator
13
13
  from qtpy.QtCore import QObject, QTimer, Signal, Slot
14
- from qtpy.QtWidgets import QTreeWidget, QTreeWidgetItem, QVBoxLayout, QWidget
14
+ from qtpy.QtWidgets import QTreeWidget, QTreeWidgetItem
15
15
 
16
16
  from bec_widgets.utils.bec_connector import BECConnector, ConnectionConfig
17
17
  from bec_widgets.widgets.bec_status_box.status_item import StatusItem
@@ -108,6 +108,7 @@ class BECStatusBox(BECConnector, QTreeWidget):
108
108
  service_name: str = "BEC Server",
109
109
  client: BECClient = None,
110
110
  config: BECStatusBoxConfig | dict = None,
111
+ bec_service_status_mixin: BECServiceStatusMixin = None,
111
112
  gui_id: str = None,
112
113
  ):
113
114
  if config is None:
@@ -124,7 +125,10 @@ class BECStatusBox(BECConnector, QTreeWidget):
124
125
  self.bec_service_info_container = {}
125
126
  self.tree_items = {}
126
127
  self.tree_top_item = None
127
- self.bec_service_status = BECServiceStatusMixin(client=self.client)
128
+
129
+ if not bec_service_status_mixin:
130
+ bec_service_status_mixin = BECServiceStatusMixin(client=self.client)
131
+ self.bec_service_status = bec_service_status_mixin
128
132
 
129
133
  self.init_ui()
130
134
  self.bec_service_status.services_update.connect(self.update_service_status)
@@ -0,0 +1 @@
1
+ from .ring_progress_bar import RingProgressBar
@@ -10,12 +10,13 @@ from qtpy import QtGui
10
10
  from bec_widgets.utils import BECConnector, ConnectionConfig
11
11
 
12
12
 
13
- class RingConnections(BaseModel):
13
+ class ProgressbarConnections(BaseModel):
14
14
  slot: Literal["on_scan_progress", "on_device_readback"] = None
15
15
  endpoint: EndpointInfo | str = None
16
16
  model_config: dict = {"validate_assignment": True}
17
17
 
18
18
  @field_validator("endpoint")
19
+ @classmethod
19
20
  def validate_endpoint(cls, v, values):
20
21
  slot = values.data["slot"]
21
22
  v = v.endpoint if isinstance(v, EndpointInfo) else v
@@ -36,7 +37,7 @@ class RingConnections(BaseModel):
36
37
  return v
37
38
 
38
39
 
39
- class RingConfig(ConnectionConfig):
40
+ class ProgressbarConfig(ConnectionConfig):
40
41
  value: int | float | None = Field(0, description="Value for the progress bars.")
41
42
  direction: int | None = Field(
42
43
  -1, description="Direction of the progress bars. -1 for clockwise, 1 for counter-clockwise."
@@ -62,8 +63,17 @@ class RingConfig(ConnectionConfig):
62
63
  update_behaviour: Literal["manual", "auto"] | None = Field(
63
64
  "auto", description="Update behaviour for the progress bars."
64
65
  )
65
- connections: RingConnections | None = Field(
66
- default_factory=RingConnections, description="Connections for the progress bars."
66
+ connections: ProgressbarConnections | None = Field(
67
+ default_factory=ProgressbarConnections, description="Connections for the progress bars."
68
+ )
69
+
70
+
71
+ class RingConfig(ProgressbarConfig):
72
+ index: int | None = Field(0, description="Index of the progress bar. 0 is outer ring.")
73
+ start_position: int | None = Field(
74
+ 90,
75
+ description="Start position for the progress bars in degrees. Default is 90 degrees - corespons to "
76
+ "the top of the ring.",
67
77
  )
68
78
 
69
79
 
@@ -230,7 +240,7 @@ class Ring(BECConnector):
230
240
  self.bec_dispatcher.disconnect_slot(
231
241
  self.config.connections.slot, self.config.connections.endpoint
232
242
  )
233
- self.config.connections = RingConnections(slot=slot, endpoint=endpoint)
243
+ self.config.connections = ProgressbarConnections(slot=slot, endpoint=endpoint)
234
244
  self.bec_dispatcher.connect_slot(getattr(self, slot), endpoint)
235
245
 
236
246
  def reset_connection(self):
@@ -240,7 +250,7 @@ class Ring(BECConnector):
240
250
  self.bec_dispatcher.disconnect_slot(
241
251
  self.config.connections.slot, self.config.connections.endpoint
242
252
  )
243
- self.config.connections = RingConnections()
253
+ self.config.connections = ProgressbarConnections()
244
254
 
245
255
  def on_scan_progress(self, msg, meta):
246
256
  """
@@ -11,10 +11,10 @@ from qtpy.QtCore import QSize, Slot
11
11
  from qtpy.QtWidgets import QSizePolicy, QWidget
12
12
 
13
13
  from bec_widgets.utils import BECConnector, Colors, ConnectionConfig, EntryValidator
14
- from bec_widgets.widgets.spiral_progress_bar.ring import Ring, RingConfig
14
+ from bec_widgets.widgets.ring_progress_bar.ring import Ring, RingConfig
15
15
 
16
16
 
17
- class SpiralProgressBarConfig(ConnectionConfig):
17
+ class RingProgressBarConfig(ConnectionConfig):
18
18
  color_map: Optional[str] = Field(
19
19
  "magma", description="Color scheme for the progress bars.", validate_default=True
20
20
  )
@@ -32,6 +32,7 @@ class SpiralProgressBarConfig(ConnectionConfig):
32
32
  rings: list[RingConfig] | None = Field([], description="List of ring configurations.")
33
33
 
34
34
  @field_validator("num_bars")
35
+ @classmethod
35
36
  def validate_num_bars(cls, v, values):
36
37
  min_number_of_bars = values.data.get("min_number_of_bars", None)
37
38
  max_number_of_bars = values.data.get("max_number_of_bars", None)
@@ -43,6 +44,7 @@ class SpiralProgressBarConfig(ConnectionConfig):
43
44
  return v
44
45
 
45
46
  @field_validator("rings")
47
+ @classmethod
46
48
  def validate_rings(cls, v, values):
47
49
  if v is not None and v is not []:
48
50
  num_bars = values.data.get("num_bars", None)
@@ -64,7 +66,7 @@ class SpiralProgressBarConfig(ConnectionConfig):
64
66
  _validate_colormap = field_validator("color_map")(Colors.validate_color_map)
65
67
 
66
68
 
67
- class SpiralProgressBar(BECConnector, QWidget):
69
+ class RingProgressBar(BECConnector, QWidget):
68
70
  USER_ACCESS = [
69
71
  "get_all_rpc",
70
72
  "rpc_id",
@@ -89,17 +91,17 @@ class SpiralProgressBar(BECConnector, QWidget):
89
91
  def __init__(
90
92
  self,
91
93
  parent=None,
92
- config: SpiralProgressBarConfig | dict | None = None,
94
+ config: RingProgressBarConfig | dict | None = None,
93
95
  client=None,
94
96
  gui_id: str | None = None,
95
97
  num_bars: int | None = None,
96
98
  ):
97
99
  if config is None:
98
- config = SpiralProgressBarConfig(widget_class=self.__class__.__name__)
100
+ config = RingProgressBarConfig(widget_class=self.__class__.__name__)
99
101
  self.config = config
100
102
  else:
101
103
  if isinstance(config, dict):
102
- config = SpiralProgressBarConfig(**config, widget_class=self.__class__.__name__)
104
+ config = RingProgressBarConfig(**config, widget_class=self.__class__.__name__)
103
105
  self.config = config
104
106
  super().__init__(client=client, config=config, gui_id=gui_id)
105
107
  QWidget.__init__(self, parent=None)
@@ -129,7 +131,7 @@ class SpiralProgressBar(BECConnector, QWidget):
129
131
  def rings(self, value):
130
132
  self._rings = value
131
133
 
132
- def update_config(self, config: SpiralProgressBarConfig | dict):
134
+ def update_config(self, config: RingProgressBarConfig | dict):
133
135
  """
134
136
  Update the configuration of the widget.
135
137
 
@@ -137,7 +139,7 @@ class SpiralProgressBar(BECConnector, QWidget):
137
139
  config(SpiralProgressBarConfig|dict): Configuration to update.
138
140
  """
139
141
  if isinstance(config, dict):
140
- config = SpiralProgressBarConfig(**config, widget_class=self.__class__.__name__)
142
+ config = RingProgressBarConfig(**config, widget_class=self.__class__.__name__)
141
143
  self.config = config
142
144
  self.clear_all()
143
145
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: bec_widgets
3
- Version: 0.71.1
3
+ Version: 0.72.1
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
@@ -2,11 +2,11 @@
2
2
  .gitlab-ci.yml,sha256=RnYDz4zKXjlqltTryprlB1s5vLXxI2-seW-Vb70NNF0,8162
3
3
  .pylintrc,sha256=OstrgmEyP0smNFBKoIN5_26-UmNZgMHnbjvAWX0UrLs,18535
4
4
  .readthedocs.yaml,sha256=aSOc277LqXcsTI6lgvm_JY80lMlr69GbPKgivua2cS0,603
5
- CHANGELOG.md,sha256=_R1eWdzIRI3AGRiceSJ4M0exUQpmhna-6EnHGCnKyTY,7250
5
+ CHANGELOG.md,sha256=eHyBoADzbbpQThtx4Ywy0qQu93GH7jzX0eUUJy0RRzA,7436
6
6
  LICENSE,sha256=YRKe85CBRyP7UpEAWwU8_qSIyuy5-l_9C-HKg5Qm8MQ,1511
7
- PKG-INFO,sha256=RNczP6CEQ2RoLlvJS4a3dXCtGs_YMez-JN-lwA5Y26o,1302
7
+ PKG-INFO,sha256=a90k8syu1mPZ4wpjIW825ULD4vCl95ZzY53r_M6cPJQ,1302
8
8
  README.md,sha256=y4jB6wvArS7N8_iTbKWnSM_oRAqLA2GqgzUR-FMh5sU,2645
9
- pyproject.toml,sha256=B8txiKi1TOe-Jyfm1YsqnH-d95k3cEE0yGiRyyo09nk,2215
9
+ pyproject.toml,sha256=hmU4NawNbuIpaWkx3FB55zWk3drnSyNXWE7aKRNqiTs,2215
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,7 +17,7 @@ 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=d0Q6Fn44e7wFfLabDOBxpcJ1DPKWlFunGYDUBmO-4hA,22
19
19
  bec_widgets/cli/auto_updates.py,sha256=DyBV3HnjMSH-cvVkYNcDiYKVf0Xut4Qy2qGQqkW47Bw,4833
20
- bec_widgets/cli/client.py,sha256=6W85QrsOAmNipucjWBf65AOUd-ODvuzlCAjtE9YMskM,58455
20
+ bec_widgets/cli/client.py,sha256=IGtxHvLP6zkvzIEVloX9ygKRvrplNhXGmqQN-BnYlQE,58447
21
21
  bec_widgets/cli/client_utils.py,sha256=tJwENsYTdWd4BKuoQ8fEkfp2JTuJqLJUImzRekd-Kos,12376
22
22
  bec_widgets/cli/generate_cli.py,sha256=InKBVYM7DRfAVLNJhRJbWWSSPBQBHI8Ek6v7NCsK0ME,4997
23
23
  bec_widgets/cli/rpc_register.py,sha256=QxXUZu5XNg00Yf5O3UHWOXg3-f_pzKjjoZYMOa-MOJc,2216
@@ -25,7 +25,7 @@ bec_widgets/cli/rpc_wigdet_handler.py,sha256=1qQOGrM8rozaWLkoxAW8DTVLv_L_DZdZgUM
25
25
  bec_widgets/cli/server.py,sha256=3bFBPmtXKXFMjeja18d0hF3CO66Jo0-LEDtcF7lYb7k,7166
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
28
- bec_widgets/examples/jupyter_console/jupyter_console_window.py,sha256=FXf0q7oz9GyJSct8PAgeOalzNnIJjApiaRvNfXsZPs0,5345
28
+ bec_widgets/examples/jupyter_console/jupyter_console_window.py,sha256=VdX3OwlIiUCD4b75MQS4YwLLaZGvsJ-z3QFPe2y9f78,5343
29
29
  bec_widgets/examples/jupyter_console/jupyter_console_window.ui,sha256=2A2mNTUMZBYygz8K4qWzrcjnNqZBMVyeHm26iLZVRWI,1473
30
30
  bec_widgets/examples/motor_movement/__init__.py,sha256=LzPJkxLAxOsZCbXR-fRCPmeYobp7Yqds6tDxW4W1gSw,214
31
31
  bec_widgets/examples/motor_movement/motor_control_compilations.py,sha256=8rpA7a2xVZTDMrx7YQIj3IJew78J1gcVMkHvloS0U_Q,9055
@@ -38,7 +38,7 @@ bec_widgets/examples/plugin_example_pyside/tictactoe.py,sha256=s3rCurXloVcmMdzZi
38
38
  bec_widgets/examples/plugin_example_pyside/tictactoeplugin.py,sha256=BBt3MD8oDLUMCCY3mioJa1QRR0WQdW6DuvVmK1Taovk,1734
39
39
  bec_widgets/examples/plugin_example_pyside/tictactoetaskmenu.py,sha256=LNwplI6deUdKY6FOhUuWBanotxk9asF2G-6k7lFfA8Y,2301
40
40
  bec_widgets/utils/__init__.py,sha256=1930ji1Jj6dVuY81Wd2kYBhHYNV-2R0bN_L4o9zBj1U,533
41
- bec_widgets/utils/bec_connector.py,sha256=RxHJNF7JjtY5pRbTMu2eQTiRXvoyJ53QuTYxHjZba38,5357
41
+ bec_widgets/utils/bec_connector.py,sha256=3BNkb83HZDNL_fwbvMnG6FM28VTmlsndnc4z84E3v1w,7286
42
42
  bec_widgets/utils/bec_designer.py,sha256=gaxNuxRu-3rQylUd5lGSysK1lqoRg8gtmfad0CnsUPU,2613
43
43
  bec_widgets/utils/bec_dispatcher.py,sha256=yM9PG04O7ABhiA9Nzk38Rv9Qbjc5O93wi2xfSbOlOxc,6202
44
44
  bec_widgets/utils/bec_table.py,sha256=nA2b8ukSeUfquFMAxGrUVOqdrzMoDYD6O_4EYbOG2zk,717
@@ -54,9 +54,9 @@ bec_widgets/utils/ui_loader.py,sha256=5NktcP1r1HQub7K82fW_jkj8rT2cqJQdMvDxwToLY4
54
54
  bec_widgets/utils/validator_delegate.py,sha256=Emj1WF6W8Ke1ruBWUfmHdVJpmOSPezuOt4zvQTay_44,442
55
55
  bec_widgets/utils/widget_io.py,sha256=U_02ESf9Ukz63B01AzYioNepSc6SX11nJhPPSDmL4IA,11318
56
56
  bec_widgets/utils/yaml_dialog.py,sha256=cMVif-39SB9WjwGH5FWBJcFs4tnfFJFs5cacydRyhy0,1853
57
- bec_widgets/widgets/__init__.py,sha256=6RE9Pot2ud6BNJc_ZKiE--U-lgVRUff2IVR91lPcCbo,214
57
+ bec_widgets/widgets/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
58
58
  bec_widgets/widgets/bec_status_box/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
59
- bec_widgets/widgets/bec_status_box/bec_status_box.py,sha256=ARdVzwabmbT_Jti6Wp-5KrxDQIingYVC-pZQHd6uz7o,14375
59
+ bec_widgets/widgets/bec_status_box/bec_status_box.py,sha256=twWugYlGVSl9ziSbjeB75BZwuruXFszRoOlN0d79Gnk,14523
60
60
  bec_widgets/widgets/bec_status_box/status_item.py,sha256=wPkDm0GCGNXXpy3rR_Ljaxy0ZHeiiYcrWFqEntZnz4E,5869
61
61
  bec_widgets/widgets/buttons/__init__.py,sha256=74ucIRU6-anoqQ-zT7wbrysmxhg_3_04xGhN_kllNUI,48
62
62
  bec_widgets/widgets/buttons/stop_button/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -107,12 +107,12 @@ bec_widgets/widgets/motor_control/movement_relative/movement_relative.ui,sha256=
107
107
  bec_widgets/widgets/motor_control/selection/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
108
108
  bec_widgets/widgets/motor_control/selection/selection.py,sha256=WNHndvv4JvxeAMnDFBMTvUILcn9u_0mWGRsgNiBZEsM,3988
109
109
  bec_widgets/widgets/motor_control/selection/selection.ui,sha256=vXXpvNWuL6xyHhW7Lx1zmVFX-95Z5AXGlhKQD2HmM1A,1779
110
+ bec_widgets/widgets/ring_progress_bar/__init__.py,sha256=_uoJKnDM2YAeUBfwc5WLbIHSJj7zm_FAurSKP3WRaCw,47
111
+ bec_widgets/widgets/ring_progress_bar/ring.py,sha256=cMxnw8iKimO_NlwUht5VfK1GE3tkToYrLC9HskoOl-c,10913
112
+ bec_widgets/widgets/ring_progress_bar/ring_progress_bar.py,sha256=jc-2VtFBASzA15M8S2ZNAvu0Z7RFp130jHz7HpLyIRs,24068
110
113
  bec_widgets/widgets/scan_control/__init__.py,sha256=IOfHl15vxb_uC6KN62-PeUzbBha_vQyqkkXbJ2HU674,38
111
114
  bec_widgets/widgets/scan_control/scan_control.py,sha256=u2fjSUiSRYTkIq9WhdfQuQV6Sv3iWWcSfCraVGro1RQ,7686
112
115
  bec_widgets/widgets/scan_control/scan_group_box.py,sha256=8XGpYcdKTEtiqOFbBxZ6xV07ZJ_tg9R-JDfsdTdqXSI,7400
113
- bec_widgets/widgets/spiral_progress_bar/__init__.py,sha256=4efbtcqCToMIw5bkQrTzy2TzuBCXvlhuUPh1bYC_Yzg,51
114
- bec_widgets/widgets/spiral_progress_bar/ring.py,sha256=7i5oKpW8eUQGvLyKce2-2rlaGDVLec__DoWp6hfJlRw,10524
115
- bec_widgets/widgets/spiral_progress_bar/spiral_progress_bar.py,sha256=cMi4g7zNTLrkkzZ9ChiIBTaqigDCYwzrgA2iRmq9dUI,24050
116
116
  bec_widgets/widgets/text_box/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
117
117
  bec_widgets/widgets/text_box/text_box.py,sha256=kykQ_Zcxh8IGcPEP5-oGGQwoZEpY9vhxRIM8TY8kTYg,4240
118
118
  bec_widgets/widgets/toolbar/__init__.py,sha256=d-TP4_cr_VbpwreMM4ePnfZ5YXsEPQ45ibEf75nuGoE,36
@@ -151,7 +151,7 @@ docs/user/getting_started/auto_updates.md,sha256=Gicx3lplI6JRBlnPj_VL6IhqOIcsWjY
151
151
  docs/user/getting_started/getting_started.md,sha256=lxZXCr6HAkM61oo5Bu-YjINSKo4wihWhAPJdotEAAVQ,358
152
152
  docs/user/getting_started/gui_complex_gui.gif,sha256=ovv9u371BGG5GqhzyBMl4mvqMHLfJS0ylr-dR0Ydwtw,6550393
153
153
  docs/user/getting_started/installation.md,sha256=5_fPbmUqLGtwOskFHTlytd4PJKrMcHqHShzM9ymM0oI,1149
154
- docs/user/getting_started/quick_start.md,sha256=VGU880GwamcIZcBE8tjxuqX2syE-71jqZedtskCoBbA,9405
154
+ docs/user/getting_started/quick_start.md,sha256=ABDRRB8DM8dFYdsWUfzQV0eaffRFAlcn2HIfw7yiUGs,9401
155
155
  docs/user/widgets/BECFigure.png,sha256=8dQr4u0uk_y0VV-R1Jh9yTR3Vidd9HDEno_07R0swaE,1605920
156
156
  docs/user/widgets/bec_figure.md,sha256=BwcumbhZd6a2zKmoHTvwKr8kG8WxBx9lS_QwxNiBMpQ,5155
157
157
  docs/user/widgets/bec_status_box.gif,sha256=kLxf40HbS6fjdUIQ2b9SiduBEXdBd4DDWGEnQDOFMcY,1259044
@@ -160,30 +160,30 @@ docs/user/widgets/buttons.md,sha256=Yci21PmxlRvfKcrvY7mVI7JkECPmE6j9WyWyH3j7Y2o,
160
160
  docs/user/widgets/image_plot.gif,sha256=_mVFhMTXGqwDOcEtrBHMZj5Thn2sLhDAHEeL2XyHN-s,14098977
161
161
  docs/user/widgets/motor.gif,sha256=FtaWdRHx4UZaGJPpq8LNhMMgX4PFcAB6IZ93JCMEh_w,2280719
162
162
  docs/user/widgets/progress_bar.gif,sha256=5jh0Zw2BBGPuNxszV1DBLJCb4_6glIRX-U2ABjnsK2k,5263592
163
+ docs/user/widgets/ring_progress_bar.md,sha256=9qIGZnhOe3EEAgKLUZJX3B1tMm77PQyUH7rGWLPbQ3U,2188
163
164
  docs/user/widgets/scan_control.gif,sha256=zrVOZgleMbu7Jd8AAIn2fQ08tNAEMSud3g0ZLyNUcjQ,1506739
164
165
  docs/user/widgets/scan_control.md,sha256=lsn08uw90uRajxfBqRxIYiq52xWKqRPVO6mfI6qzolI,1721
165
166
  docs/user/widgets/scatter_2D.gif,sha256=yHpsuAUseMafJjI_J5BcOhmE3nu9VFn_Xm9XHzJaH5I,13188862
166
- docs/user/widgets/spiral_progress_bar.md,sha256=QTgUDIl6XPuK_HwSfB6sNijZ4bss26biDg6B_mJ8Pxk,2208
167
167
  docs/user/widgets/text_box.md,sha256=_ST7RQWXl67MKLm6dTa995GjoughPUyK_hLnF8SPZcM,925
168
168
  docs/user/widgets/w1D.gif,sha256=tuHbleJpl6bJFNNC2OdndF5LF7IyfvlkFCMGZajrQPs,622773
169
169
  docs/user/widgets/website.md,sha256=wfudAupdtHX-Sfritg0xMWXZLLczJ4XwMLNWvu6ww-w,705
170
- docs/user/widgets/widgets.md,sha256=6H8C8M2fFmTxFFlrAuOE-jBpOUVUrOIIzWP0l_EwMGo,397
170
+ docs/user/widgets/widgets.md,sha256=ZeRNmP7GUOu8kEoGu9XHsyF8Hb1foqZKEbwpgFP7ITk,395
171
171
  tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
172
172
  tests/end-2-end/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
173
173
  tests/end-2-end/conftest.py,sha256=-BLnFE-NeCerf6xahGCkbZ4Ktactowi6RkBnboIzRvg,1767
174
- tests/end-2-end/test_bec_dock_rpc_e2e.py,sha256=8iJz4lITspY7eHdSgy9YvGUGTu3fsSperoVGBvTGT0U,9067
174
+ tests/end-2-end/test_bec_dock_rpc_e2e.py,sha256=RyVSYBSA4XnECJlHnXL2ISG17QSKS5dXEsZT-VP2PzM,9057
175
175
  tests/end-2-end/test_bec_figure_rpc_e2e.py,sha256=zTbB_F4Fs-QG8KhMK24xfsrCQBgZUAguMk3KFdEdP2o,5095
176
176
  tests/end-2-end/test_rpc_register_e2e.py,sha256=3dfCnSvdcRO92pzHt9WlCTK0vzTKAvPtliEoEKrtuzQ,1604
177
177
  tests/end-2-end/test_scan_control_e2e.py,sha256=u7oLgFyltkMW2apSZKDukMIXvYrbhHrU32p4mBdn8VE,2276
178
178
  tests/unit_tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
179
179
  tests/unit_tests/client_mocks.py,sha256=R71MJSu8IEyxcJjaIWCPACO_wOfx2Uv_qkmFVVmv7EQ,4195
180
180
  tests/unit_tests/conftest.py,sha256=KrnktXPWmZhnKNue-xGWOLD1XGEvdz9Vf7V2eO3XQ3A,596
181
- tests/unit_tests/test_bec_connector.py,sha256=f2XXGGw3NoZLIUrDuZuEWwF_ttOYmmquCgUrV5XkIOY,1951
181
+ tests/unit_tests/test_bec_connector.py,sha256=zGDfNHwLFZTbpyX6-yc7Pwzr2jWO_HGZ8T4NFCNo4IE,2444
182
182
  tests/unit_tests/test_bec_dispatcher.py,sha256=rYPiRizHaswhGZw55IBMneDFxmPiCCLAZQBqjEkpdyY,3992
183
183
  tests/unit_tests/test_bec_dock.py,sha256=BXKXpuyIYj-l6KSyhQtM_p3kRFCRECIoXLzvkcJZDlM,3611
184
184
  tests/unit_tests/test_bec_figure.py,sha256=aEd2R8K6fU2ON8QvPemGWpql_LaaYLipRlvnjBY2qFA,8009
185
185
  tests/unit_tests/test_bec_motor_map.py,sha256=AfD_9-x6VV3TPnkQgNfFYRndPHDsGx-a_YknFeDr6hc,4588
186
- tests/unit_tests/test_bec_status_box.py,sha256=zZ4pe7DaBzzpRsy62yHFkUGgAGb3zZU3I6zQIPsqUTY,6070
186
+ tests/unit_tests/test_bec_status_box.py,sha256=xR8c-hXFI9gKpNGhnnC5l_nzazfvPkWkhcAfJ77hxqY,4731
187
187
  tests/unit_tests/test_client_utils.py,sha256=eViJ1Tz-HX9TkMvQH6W8cO-c3_1I8bUc4_Yen6LOc0E,830
188
188
  tests/unit_tests/test_color_validation.py,sha256=csdvVKAohENZIRY-JQ97Hv-TShb1erj4oKMX7QRwo78,1883
189
189
  tests/unit_tests/test_crosshair.py,sha256=3OMAJ2ZaISYXMOtkXf1rPdy94vCr8njeLi6uHblBL9Q,5045
@@ -193,11 +193,11 @@ tests/unit_tests/test_generate_cli_client.py,sha256=adcMoXjWpFLVjpauCu0r31CMMibU
193
193
  tests/unit_tests/test_motor_control.py,sha256=NBekcGALo5mYkuyBJvBhvJkWiQDV82hI4GmsobRzjTI,20770
194
194
  tests/unit_tests/test_plot_base.py,sha256=Akr_JgglUCrtERtdtsMqWko_MLUYoAYRGzV2sum-YHo,3836
195
195
  tests/unit_tests/test_plugin_utils.py,sha256=PonKNpu4fZaFmKbI2v0tZJjZrsTvBGSF96bPHvKJvrE,608
196
+ tests/unit_tests/test_ring_progress_bar.py,sha256=hDlqkQho7FR7HAfM4Zrr4q1m773a3_rQ8CbM1GqDDSE,12252
196
197
  tests/unit_tests/test_rpc_register.py,sha256=hECjZEimd440mwRrO0rg7L3PKN7__3DgjmESN6wx3bo,1179
197
- tests/unit_tests/test_rpc_widget_handler.py,sha256=QC85N48UAFsROKRNkoDIfInzy1mLhp2buLVSJifkhiU,236
198
+ tests/unit_tests/test_rpc_widget_handler.py,sha256=ceQ3BPnBIFY2Hy-sDPw0wxxREVTTphILts0gvX9qoUw,234
198
199
  tests/unit_tests/test_scan_control.py,sha256=Wr6KcE8av4sEIOx5VgYbzVCem3Jgb4Kzx_oOuvwlmkE,13459
199
200
  tests/unit_tests/test_scan_control_group_box.py,sha256=HNqjP10B_NonikspNwKz9upJU-t7xf6hwBerNhbC-uo,5563
200
- tests/unit_tests/test_spiral_progress_bar.py,sha256=n5aLSZ2B6K5a1vQuKTERnCSmIz9hYGFyk7jP3TU0AwQ,12438
201
201
  tests/unit_tests/test_stop_button.py,sha256=2OH9dhs_-S5QovPPgU-5hJoViE1YKZa0gxisb4vOY28,712
202
202
  tests/unit_tests/test_text_box_widget.py,sha256=cT0uEHt_6d-FwST0A_wE9sFW9E3F_nJbKhuBAeU4yHg,1862
203
203
  tests/unit_tests/test_vscode_widget.py,sha256=sCVNAuWVMiPFinh9mDqz_ulBay_H3qwHyEwkHsbWh4c,2173
@@ -210,8 +210,8 @@ tests/unit_tests/test_configs/config_device_no_entry.yaml,sha256=hdvue9KLc_kfNzG
210
210
  tests/unit_tests/test_configs/config_scan.yaml,sha256=vo484BbWOjA_e-h6bTjSV9k7QaQHrlAvx-z8wtY-P4E,1915
211
211
  tests/unit_tests/test_msgs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
212
212
  tests/unit_tests/test_msgs/available_scans_message.py,sha256=m_z97hIrjHXXMa2Ex-UvsPmTxOYXfjxyJaGkIY6StTY,46532
213
- bec_widgets-0.71.1.dist-info/METADATA,sha256=RNczP6CEQ2RoLlvJS4a3dXCtGs_YMez-JN-lwA5Y26o,1302
214
- bec_widgets-0.71.1.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
215
- bec_widgets-0.71.1.dist-info/entry_points.txt,sha256=3otEkCdDB9LZJuBLzG4pFLK5Di0CVybN_12IsZrQ-58,166
216
- bec_widgets-0.71.1.dist-info/licenses/LICENSE,sha256=YRKe85CBRyP7UpEAWwU8_qSIyuy5-l_9C-HKg5Qm8MQ,1511
217
- bec_widgets-0.71.1.dist-info/RECORD,,
213
+ bec_widgets-0.72.1.dist-info/METADATA,sha256=a90k8syu1mPZ4wpjIW825ULD4vCl95ZzY53r_M6cPJQ,1302
214
+ bec_widgets-0.72.1.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
215
+ bec_widgets-0.72.1.dist-info/entry_points.txt,sha256=3otEkCdDB9LZJuBLzG4pFLK5Di0CVybN_12IsZrQ-58,166
216
+ bec_widgets-0.72.1.dist-info/licenses/LICENSE,sha256=YRKe85CBRyP7UpEAWwU8_qSIyuy5-l_9C-HKg5Qm8MQ,1511
217
+ bec_widgets-0.72.1.dist-info/RECORD,,
@@ -97,11 +97,11 @@ Note, we chain commands here which is possible since the `add_dock` and `add_wid
97
97
  cam_widget.set_title("Camera Image Eiger")
98
98
  cam_widget.set_vrange(vmin=0, vmax=100)
99
99
  ```
100
- As a final step, we can now add also a SpiralProgressBar to a new dock, and perform a grid_scan with the motors *samx* and *samy*.
100
+ As a final step, we can now add also a RingProgressBar to a new dock, and perform a grid_scan with the motors *samx* and *samy*.
101
101
  As you see in the example below, all docks are arranged below each other. This is the default behavior of the `add_dock` method. However, the docks can be freely arranged by drag and drop as desired by the user. We invite you to explore this by yourself following the example in the video, and build your custom GUI with BEC Widgets.
102
102
 
103
103
  ```python
104
- prog_bar = gui.add_dock(name="prog_dock").add_widget('SpiralProgressBar')
104
+ prog_bar = gui.add_dock(name="prog_dock").add_widget('RingProgressBar')
105
105
  prog_bar.set_line_widths(15)
106
106
  scans.grid_scan(dev.samy, -2, 2, 10, dev.samx, -5, 5, 10, exp_time=0.1, relative=False)
107
107
  ```
@@ -1,9 +1,9 @@
1
1
  (user.widgets.spiral_progress_bar)=
2
- # [Spiral Progress Bar](/api_reference/_autosummary/bec_widgets.cli.client.SpiralProgressBar)
2
+ # [Ring Progress Bar](/api_reference/_autosummary/bec_widgets.cli.client.RingProgressBar)
3
3
 
4
4
  **Purpose:**
5
5
 
6
- The Spiral Progress Bar widget is a circular progress bar that can be used to visualize the progress of a task. The
6
+ The ring Progress Bar widget is a circular progress bar that can be used to visualize the progress of a task. The
7
7
  widget is designed to be used in applications where the progress of a task is represented as a percentage. The Spiral
8
8
  Progress Bar widget is a part of the BEC Widgets library and can be controlled directly using its API, or hooked up to
9
9
  the progress of a device readback or scan.
@@ -15,22 +15,22 @@ the progress of a device readback or scan.
15
15
  - multiple progress rings to show different tasks in parallel.
16
16
 
17
17
  **Example of Use:**
18
- ![SpiralProgressBar](./progress_bar.gif)
18
+ ![RingProgressBar](./progress_bar.gif)
19
19
 
20
20
  **Code example:**
21
21
 
22
- The following code snipped demonstrates how to create a `SpiralProgressBar` using BEC Widgets within BEC.
22
+ The following code snipped demonstrates how to create a `RingProgressBar` using BEC Widgets within BEC.
23
23
  ```python
24
- # adds a new dock with a spiral progress bar
25
- progress = gui.add_dock().add_widget("SpiralProgressBar")
24
+ # adds a new dock with a ring progress bar
25
+ progress = gui.add_dock().add_widget("RingProgressBar")
26
26
  # customize the size of the ring
27
27
  progress.set_line_width(20)
28
28
  ```
29
29
 
30
- By default, the Spiral Progress Bar widget will display a single ring. To add more rings, use the add_ring method:
30
+ By default, the Ring Progress Bar widget will display a single ring. To add more rings, use the add_ring method:
31
31
 
32
32
  ```python
33
- # adds a new dock with a spiral progress bar
33
+ # adds a new dock with a ring progress bar
34
34
  progress.add_ring()
35
35
  ```
36
36
 
@@ -42,7 +42,7 @@ progress.rings[0].set_line_width(20) # set the width of the first ring
42
42
  progress.rings[1].set_line_width(10) # set the width of the second ring
43
43
  ```
44
44
 
45
- By default, the `SpiralProgressBar` widget is set with `progress.enable_auto_update(True)`, which will automatically
45
+ By default, the `RingProgressBar` widget is set with `progress.enable_auto_update(True)`, which will automatically
46
46
  update the bars in the widget. To manually set updates for each progress bar, use the set_update method. Note that
47
47
  manually updating a ring will disable the automatic update for the whole widget:
48
48
 
@@ -9,7 +9,7 @@ hidden: false
9
9
  ---
10
10
 
11
11
  bec_figure/
12
- spiral_progress_bar/
12
+ ring_progress_bar/
13
13
  website/
14
14
  buttons/
15
15
  text_box/
pyproject.toml CHANGED
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "bec_widgets"
7
- version = "0.71.1"
7
+ version = "0.72.1"
8
8
  description = "BEC Widgets"
9
9
  requires-python = ">=3.10"
10
10
  classifiers = [