bec-widgets 0.79.2__py3-none-any.whl → 0.80.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.
@@ -1,12 +1,12 @@
1
1
  .gitignore,sha256=cMQ1MLmnoR88aMCCJwUyfoTnufzl4-ckmHtlFUqHcT4,3253
2
- .gitlab-ci.yml,sha256=RnYDz4zKXjlqltTryprlB1s5vLXxI2-seW-Vb70NNF0,8162
3
- .pylintrc,sha256=OstrgmEyP0smNFBKoIN5_26-UmNZgMHnbjvAWX0UrLs,18535
2
+ .gitlab-ci.yml,sha256=vuDJPAYOK0995_H6fu0N5dIgIrOJgTvKr0HZkNWlxMw,8142
3
+ .pylintrc,sha256=eeY8YwSI74oFfq6IYIbCqnx3Vk8ZncKaatv96n_Y8Rs,18544
4
4
  .readthedocs.yaml,sha256=aSOc277LqXcsTI6lgvm_JY80lMlr69GbPKgivua2cS0,603
5
- CHANGELOG.md,sha256=H2PWB43cMiVfk777iGbIP-_MPmUP6ej0kB01wWyYrSU,7090
5
+ CHANGELOG.md,sha256=7xfcsl64resY5jo7fRcioA-Ew8yxeKcrN0g1QTyS5ZI,6948
6
6
  LICENSE,sha256=YRKe85CBRyP7UpEAWwU8_qSIyuy5-l_9C-HKg5Qm8MQ,1511
7
- PKG-INFO,sha256=PZcv6sFHUpaFZXjqiv4fF_Mc_EgNQNKey7EiGVytcM0,1427
8
- README.md,sha256=y4jB6wvArS7N8_iTbKWnSM_oRAqLA2GqgzUR-FMh5sU,2645
9
- pyproject.toml,sha256=xkk7LLxFc-FVNBiTpAm5C65DHXQiQIyAbT8evNl4ZYg,2403
7
+ PKG-INFO,sha256=jLF_WhEeH0HZcZ0CsaF-2aNH0Ik5sO9zF_VBKbDhpmA,1309
8
+ README.md,sha256=Od69x-RS85Hph0-WwWACwal4yUd67XkEn4APEfHhHFw,2649
9
+ pyproject.toml,sha256=wvgRT2shpytqQi873NIBurGDMu4Di_uJz0Bq3M82dtE,2358
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=d0Q6Fn44e7wFfLabDOBxpcJ1DPKWlFunGYDUBmO-4hA,22
19
19
  bec_widgets/cli/auto_updates.py,sha256=DyBV3HnjMSH-cvVkYNcDiYKVf0Xut4Qy2qGQqkW47Bw,4833
20
- bec_widgets/cli/client.py,sha256=ahOa50EN5qknxv_cnWdoBCi-FPlj6UHOGGOnl48enSk,60054
20
+ bec_widgets/cli/client.py,sha256=J011qUzqWpdwclRzB2yA8zqytALAwCwgZLgruUKeyv0,60054
21
21
  bec_widgets/cli/client_utils.py,sha256=zq1gPW7t4n9Nsn4MLkdUeKwwl-9nUcf5UjuN8lZr9iY,12281
22
- bec_widgets/cli/generate_cli.py,sha256=FUMSm84ztE6UIIHs8U0Irof1i5LRu6CXW1sl-RF_UKA,5877
22
+ bec_widgets/cli/generate_cli.py,sha256=Ea5px9KblUlcGg-1JbJBTIU7laGg2n8PM7Efw9WVVzM,5889
23
23
  bec_widgets/cli/rpc_register.py,sha256=QxXUZu5XNg00Yf5O3UHWOXg3-f_pzKjjoZYMOa-MOJc,2216
24
- bec_widgets/cli/rpc_wigdet_handler.py,sha256=1qQOGrM8rozaWLkoxAW8DTVLv_L_DZdZgUMDPy5MOek,1486
24
+ bec_widgets/cli/rpc_wigdet_handler.py,sha256=6kQng2DyS6rhLJqSJ7xa0kdgSxp-35A2upcf833dJRE,1483
25
25
  bec_widgets/cli/server.py,sha256=2EJvkQDzrDTsZjRPs7g2v_iPTspGqxzY34tRAnvjxjY,7281
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
@@ -38,20 +38,21 @@ 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=ZWaN9C2CKwqj4NIL1irxNDRyMJ1cBSkCAzb6xmxTIKw,9472
41
+ bec_widgets/utils/bec_connector.py,sha256=JScGWHEt4kh6C-C0O_JV_bOuiQlBjYTAPJktqgeAj70,9534
42
42
  bec_widgets/utils/bec_designer.py,sha256=ak3G8FdojUPjVBBwdPXw7tN5P2Uxr-SSoQt394jXeAA,4308
43
- bec_widgets/utils/bec_dispatcher.py,sha256=QZjRKNrZ181yt_6nLJCfdNk5EyeaGImApNA1FWR4rqo,6186
43
+ bec_widgets/utils/bec_dispatcher.py,sha256=dghOw63Ql6rQ-zH1ZaYU6kT9Dg5kNDcZwEdu2YPBJeU,6150
44
44
  bec_widgets/utils/bec_table.py,sha256=nA2b8ukSeUfquFMAxGrUVOqdrzMoDYD6O_4EYbOG2zk,717
45
+ bec_widgets/utils/bec_widget.py,sha256=Y-t90XMe2PASvY96Xve5a_jevXqnxk1SJ-mfy6ULC9Y,59
45
46
  bec_widgets/utils/colors.py,sha256=CP_lwj757CpwdVhWSfdNEXKFCEVVVF48DizD2WJKSwI,9759
46
47
  bec_widgets/utils/container_utils.py,sha256=m3VUyAYmSWkEwApP9tBvKxPYVtc2kHw4toxIpMryJy4,1495
47
48
  bec_widgets/utils/crosshair.py,sha256=SubY4FQCI6vUKsmMYGKHR7uYdGQJ6vhoYLuC1XlKS9I,9626
48
49
  bec_widgets/utils/entry_validator.py,sha256=IqmtResXQtnmMvWVSl8IrnggqSzXLp4cSggn6WdSTpE,1298
49
50
  bec_widgets/utils/generate_designer_plugin.py,sha256=T6DqL29sN4LcXLH8Hoa410UGnoRzjsZ-z0PRGTEzkRE,5809
50
51
  bec_widgets/utils/layout_manager.py,sha256=H0nKsIMaPxRkof1MEXlSmW6w1dFxA6astaGzf4stI84,4727
51
- bec_widgets/utils/plugin_utils.py,sha256=tmZkUNvVlldPjHDfL_TbaV2jjAECgPjGsvLMmmyZcfc,3342
52
+ bec_widgets/utils/plugin_utils.py,sha256=njvVdvF-AR47Yn80ntpvFldEvLuFx9GV-qEX4p_n4AI,5263
52
53
  bec_widgets/utils/rpc_decorator.py,sha256=pIvtqySQLnuS7l2Ti_UAe4WX7CRivZnsE5ZdKAihxh0,479
53
54
  bec_widgets/utils/thread_checker.py,sha256=rDNuA3X6KQyA7JPb67mccTg0z8YkInynLAENQDQpbuE,1607
54
- bec_widgets/utils/ui_loader.py,sha256=2N50GPH2nh7lT7NQVoHzcjgZzk2zFybFqrBmG91dq8M,2552
55
+ bec_widgets/utils/ui_loader.py,sha256=9C4DkMIM8PEGXs2LmbZMyLVt38EIO9-T9C2UnK2SAvE,4882
55
56
  bec_widgets/utils/validator_delegate.py,sha256=Emj1WF6W8Ke1ruBWUfmHdVJpmOSPezuOt4zvQTay_44,442
56
57
  bec_widgets/utils/widget_io.py,sha256=4wlmXwKs7ncpCEQYXBzLVo7Z0IjU-TaJ9RtuaM8-Q98,12038
57
58
  bec_widgets/utils/yaml_dialog.py,sha256=T6UyGNGdmpXW74fa_7Nk6b99T5pp2Wvyw3AOauRc8T8,2407
@@ -64,8 +65,11 @@ bec_widgets/widgets/bec_queue/bec_queue.pyproject,sha256=VhoNmAv1DQUl9dg7dELyf5i
64
65
  bec_widgets/widgets/bec_queue/bec_queue_plugin.py,sha256=hDJm8Zd_GIDw2R8VYn4ytwrHVCmJUjC9dGDMae2omU0,1175
65
66
  bec_widgets/widgets/bec_queue/register_bec_queue.py,sha256=XnwtUSa1asK1b80knKWodcyX9qJy4DnKsQL_FoDfZy4,463
66
67
  bec_widgets/widgets/bec_status_box/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
67
- bec_widgets/widgets/bec_status_box/bec_status_box.py,sha256=6Z4P2QN-CssRA7E_7DgxVuZC022g2UKQ8o7n0iuWjSI,14534
68
- bec_widgets/widgets/bec_status_box/status_item.py,sha256=wPkDm0GCGNXXpy3rR_Ljaxy0ZHeiiYcrWFqEntZnz4E,5869
68
+ bec_widgets/widgets/bec_status_box/bec_status_box.py,sha256=mZqwwMCkSqgHToQI6qBUElhP4PFzCgi_Fo5jr9qj1DU,13023
69
+ bec_widgets/widgets/bec_status_box/bec_status_box.pyproject,sha256=JWtx3Csfn2h7ODtk10HtyBNLf6tFIqyU6g04rMWOO1U,32
70
+ bec_widgets/widgets/bec_status_box/bec_status_box_plugin.py,sha256=CNFIETpkORLQ9J3l91jefiRLJs5Ru3nsWIPoUwaRbB0,1242
71
+ bec_widgets/widgets/bec_status_box/register_bec_status_box.py,sha256=EiQITnkNw7IU7hE776wAeXro97eZd9XlsB9essgCebE,481
72
+ bec_widgets/widgets/bec_status_box/status_item.py,sha256=2SoMmgHL_MFnr7XiStFjLolHh0Vs3P68ZvP8kMIGc8w,5046
69
73
  bec_widgets/widgets/buttons/__init__.py,sha256=74ucIRU6-anoqQ-zT7wbrysmxhg_3_04xGhN_kllNUI,48
70
74
  bec_widgets/widgets/buttons/color_button/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
71
75
  bec_widgets/widgets/buttons/color_button/color_button.py,sha256=AJUMOQVLd4H39wzW2MJLhGAww7a1NtjivTkfexVhHHo,512
@@ -171,7 +175,7 @@ docs/developer/developer.md,sha256=VUdMnQBsSRCawYMFCe0vya5oj1MimLML7Pd58kY6fYY,7
171
175
  docs/developer/getting_started/development.md,sha256=aYLmuLMYpp5FcIXeDUqCfcStIV8veuiMBjOt5bTW_30,1406
172
176
  docs/developer/getting_started/getting_started.md,sha256=My_K_6O7LLaXVB_eINrRku5o-jVx95lsmGgHxgZhT7A,378
173
177
  docs/developer/widgets/widgets.md,sha256=aNsJgG7R-3EerumNB6GH84JLIXfZqGN5GjvpKWDi0Hk,504
174
- docs/introduction/introduction.md,sha256=wp7jmhkUtJnSnEnmIAZGUcau_3-5e5-FohvZb63khw4,1432
178
+ docs/introduction/introduction.md,sha256=YBEFDhxqHTcbfbNTo76xDflaFUHIqDs-sToA1HRmCnI,1436
175
179
  docs/user/customisation.md,sha256=wCW8fAbqtlgGE3mURvXOrK67Xo0_B-lxfg0sYuQWB40,3186
176
180
  docs/user/user.md,sha256=uCTcjclIi6rdjYRQebko6bWFEVsjyfshsVU3BDYrC-Y,1403
177
181
  docs/user/api_reference/api_reference.md,sha256=q2Imc48Rq6GcAP0R4bS3KuW5ptZZdsV4wxGJb3JJQHg,174
@@ -180,7 +184,7 @@ docs/user/getting_started/BECDockArea.png,sha256=t3vSm_rVRk371J5LOutbolETuEjStNc
180
184
  docs/user/getting_started/auto_updates.md,sha256=Gicx3lplI6JRBlnPj_VL6IhqOIcsWjYF4_EdZSCje2A,3754
181
185
  docs/user/getting_started/getting_started.md,sha256=lxZXCr6HAkM61oo5Bu-YjINSKo4wihWhAPJdotEAAVQ,358
182
186
  docs/user/getting_started/gui_complex_gui.gif,sha256=ovv9u371BGG5GqhzyBMl4mvqMHLfJS0ylr-dR0Ydwtw,6550393
183
- docs/user/getting_started/installation.md,sha256=5_fPbmUqLGtwOskFHTlytd4PJKrMcHqHShzM9ymM0oI,1149
187
+ docs/user/getting_started/installation.md,sha256=VqtHasD0BAPt-K6YJQicWpyqb91RJYkZ8qpvwSLsgaY,1153
184
188
  docs/user/getting_started/quick_start.md,sha256=ABDRRB8DM8dFYdsWUfzQV0eaffRFAlcn2HIfw7yiUGs,9401
185
189
  docs/user/widgets/BECFigure.png,sha256=8dQr4u0uk_y0VV-R1Jh9yTR3Vidd9HDEno_07R0swaE,1605920
186
190
  docs/user/widgets/bec_figure.md,sha256=tNT-5QP3DekY_iC9jOMULzdxmUU8wMkkX5Ru9yq0Txo,6671
@@ -216,17 +220,17 @@ tests/unit_tests/test_bec_figure.py,sha256=8AojxszCIzMi6EYB5mVFMQjk4pjgBCSp6PH2J
216
220
  tests/unit_tests/test_bec_image.py,sha256=mjvcrHgOF_FCj6WbUyxvZH9HL63QGA5C0PNZ5dXYn50,2541
217
221
  tests/unit_tests/test_bec_motor_map.py,sha256=dSYopbZS8lGD9cB26Kwmqw5zBoKCZs8t7DEEr50ug-g,8532
218
222
  tests/unit_tests/test_bec_queue.py,sha256=u-uc-iZeGAS8P90o6Cxy5oz_60zHpirGAu04OgQPDXw,4598
219
- tests/unit_tests/test_bec_status_box.py,sha256=xR8c-hXFI9gKpNGhnnC5l_nzazfvPkWkhcAfJ77hxqY,4731
223
+ tests/unit_tests/test_bec_status_box.py,sha256=gZdjyy9DNuUP9UwleTLj2Dp5HUImiqnkHjXWiqL0Q-o,4868
220
224
  tests/unit_tests/test_client_utils.py,sha256=eViJ1Tz-HX9TkMvQH6W8cO-c3_1I8bUc4_Yen6LOc0E,830
221
225
  tests/unit_tests/test_color_validation.py,sha256=xbFbtFDia36XLgaNrX2IwvAX3IDC_Odpj5BGoJSgiIE,2389
222
226
  tests/unit_tests/test_crosshair.py,sha256=3OMAJ2ZaISYXMOtkXf1rPdy94vCr8njeLi6uHblBL9Q,5045
223
227
  tests/unit_tests/test_device_input_base.py,sha256=Bf2lk_utvLsDqDX5NWgyArSAo-dWMQ72yiCPGoWVwxM,2431
224
228
  tests/unit_tests/test_device_input_widgets.py,sha256=PmUL8aJXg_BYwWDE3Gh1kGm8q6fQZD5sWlVXz3KLwI0,5837
225
- tests/unit_tests/test_generate_cli_client.py,sha256=adcMoXjWpFLVjpauCu0r31CMMibUY1LF1MMf8rO-6rw,2815
229
+ tests/unit_tests/test_generate_cli_client.py,sha256=ng-eV5iF7Dhm-6YpxYo99CMY0KgqoaZBQNkMeKULDBU,3355
226
230
  tests/unit_tests/test_generate_plugin.py,sha256=9603ucZChM-pYpHadzsR94U1Zec1KZT34WedX9qzgMo,4464
227
231
  tests/unit_tests/test_motor_control.py,sha256=bdCjhthWEy9iNyNZiD1JAeN_PSMaOblS780XGDjVwsw,20851
228
232
  tests/unit_tests/test_plot_base.py,sha256=vWbt-QO5blSoE5C1392MIFha9A9JnUsx_D_9yTqhcRo,3845
229
- tests/unit_tests/test_plugin_utils.py,sha256=PonKNpu4fZaFmKbI2v0tZJjZrsTvBGSF96bPHvKJvrE,608
233
+ tests/unit_tests/test_plugin_utils.py,sha256=ayksWdrFY7kOiA0wVEjKFmFCF3UhH3lG8tzPVOpwysk,528
230
234
  tests/unit_tests/test_ring_progress_bar.py,sha256=hDlqkQho7FR7HAfM4Zrr4q1m773a3_rQ8CbM1GqDDSE,12252
231
235
  tests/unit_tests/test_rpc_register.py,sha256=hECjZEimd440mwRrO0rg7L3PKN7__3DgjmESN6wx3bo,1179
232
236
  tests/unit_tests/test_rpc_widget_handler.py,sha256=ceQ3BPnBIFY2Hy-sDPw0wxxREVTTphILts0gvX9qoUw,234
@@ -244,8 +248,8 @@ tests/unit_tests/test_configs/config_device_no_entry.yaml,sha256=hdvue9KLc_kfNzG
244
248
  tests/unit_tests/test_configs/config_scan.yaml,sha256=vo484BbWOjA_e-h6bTjSV9k7QaQHrlAvx-z8wtY-P4E,1915
245
249
  tests/unit_tests/test_msgs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
246
250
  tests/unit_tests/test_msgs/available_scans_message.py,sha256=m_z97hIrjHXXMa2Ex-UvsPmTxOYXfjxyJaGkIY6StTY,46532
247
- bec_widgets-0.79.2.dist-info/METADATA,sha256=PZcv6sFHUpaFZXjqiv4fF_Mc_EgNQNKey7EiGVytcM0,1427
248
- bec_widgets-0.79.2.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
249
- bec_widgets-0.79.2.dist-info/entry_points.txt,sha256=3otEkCdDB9LZJuBLzG4pFLK5Di0CVybN_12IsZrQ-58,166
250
- bec_widgets-0.79.2.dist-info/licenses/LICENSE,sha256=YRKe85CBRyP7UpEAWwU8_qSIyuy5-l_9C-HKg5Qm8MQ,1511
251
- bec_widgets-0.79.2.dist-info/RECORD,,
251
+ bec_widgets-0.80.0.dist-info/METADATA,sha256=jLF_WhEeH0HZcZ0CsaF-2aNH0Ik5sO9zF_VBKbDhpmA,1309
252
+ bec_widgets-0.80.0.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
253
+ bec_widgets-0.80.0.dist-info/entry_points.txt,sha256=3otEkCdDB9LZJuBLzG4pFLK5Di0CVybN_12IsZrQ-58,166
254
+ bec_widgets-0.80.0.dist-info/licenses/LICENSE,sha256=YRKe85CBRyP7UpEAWwU8_qSIyuy5-l_9C-HKg5Qm8MQ,1511
255
+ bec_widgets-0.80.0.dist-info/RECORD,,
@@ -10,7 +10,7 @@ Targeting the unique needs of beamline scientists, BEC Widgets stands out with i
10
10
  **Key Features**:
11
11
 
12
12
  - **Integration:** Seamlessly integrates with [BEC (Beamline Experiment Control)](https://gitlab.psi.ch/bec/bec), ensuring a cohesive and efficient experiment control experience.
13
- - **Support for PyQt5 and PyQt6:** Provides compatibility with both PyQt5 and PyQt6, offering versatility in your development environment.
13
+ - **Support for Pyside6 and PyQt6:** Provides compatibility with both Pyside6 and PyQt6, offering versatility in your development environment.
14
14
  - **Widget Modularity:** Features modular widgets that can be easily combined to create customized applications, perfectly aligning with the diverse needs of beamline experiments.
15
15
 
16
16
  ## Getting Started
@@ -16,10 +16,10 @@ To install BEC Widgets using the pip package manager, execute the following comm
16
16
  pip install 'bec_widgets[pyqt6]'
17
17
  ```
18
18
 
19
- In case you want to use PyQt5, you can install it by using the following command:
19
+ In case you want to use Pyside6, you can install it by using the following command:
20
20
 
21
21
  ```bash
22
- pip install 'bec_widgets[pyqt5]'
22
+ pip install 'bec_widgets[pyside6]'
23
23
  ```
24
24
 
25
25
  **Troubleshooting**
pyproject.toml CHANGED
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "bec_widgets"
7
- version = "0.79.2"
7
+ version = "0.80.0"
8
8
  description = "BEC Widgets"
9
9
  requires-python = ">=3.10"
10
10
  classifiers = [
@@ -37,7 +37,6 @@ dev = [
37
37
  "pytest-xvfb~=3.0",
38
38
  "pytest~=8.0",
39
39
  ]
40
- pyqt5 = ["PyQt5>=5.9", "PyQtWebEngine>=5.9"]
41
40
  pyqt6 = ["PyQt6>=6.7", "PyQt6-WebEngine>=6.7"]
42
41
  pyside6 = ["PySide6>=6.7"]
43
42
 
@@ -1,3 +1,4 @@
1
+ # pylint: skip-file
1
2
  from unittest import mock
2
3
 
3
4
  import pytest
@@ -15,19 +16,18 @@ def service_status_fixture():
15
16
 
16
17
  @pytest.fixture
17
18
  def status_box(qtbot, mocked_client, service_status_fixture):
18
- widget = BECStatusBox(
19
- client=mocked_client, service_name="test", bec_service_status_mixin=service_status_fixture
20
- )
19
+ widget = BECStatusBox(client=mocked_client, bec_service_status_mixin=service_status_fixture)
21
20
  qtbot.addWidget(widget)
22
21
  qtbot.waitExposed(widget)
23
22
  yield widget
24
23
 
25
24
 
26
25
  def test_update_top_item(status_box):
27
- assert status_box.children()[0].children()[0].config.status == "IDLE"
26
+ assert status_box.tree.children()[0].children()[0].config.status == "IDLE"
27
+ name = status_box.box_name
28
28
  status_box.update_top_item_status(status="RUNNING")
29
- assert status_box.bec_service_info_container["test"].status == "RUNNING"
30
- assert status_box.children()[0].children()[0].config.status == "RUNNING"
29
+ assert status_box.status_container[name]["info"].status == "RUNNING"
30
+ assert status_box.tree.children()[0].children()[0].config.status == "RUNNING"
31
31
 
32
32
 
33
33
  def test_create_status_widget(status_box):
@@ -48,13 +48,13 @@ def test_bec_service_container(status_box):
48
48
  info = {"test": "test"}
49
49
  metrics = {"metric": "test_metric"}
50
50
  expected_return = BECServiceInfoContainer(
51
- service_name=name, status=status, info=info, metrics=metrics
51
+ service_name=name, status=status.name, info=info, metrics=metrics
52
52
  )
53
- assert status_box.service_name in status_box.bec_service_info_container
54
- assert len(status_box.bec_service_info_container) == 1
55
- status_box._update_bec_service_container(name, status, info, metrics)
56
- assert len(status_box.bec_service_info_container) == 2
57
- assert status_box.bec_service_info_container[name] == expected_return
53
+ assert status_box.box_name in status_box.status_container
54
+ assert len(status_box.status_container) == 1
55
+ status_box._update_status_container(name, status, info, metrics)
56
+ assert len(status_box.status_container) == 2
57
+ assert status_box.status_container[name]["info"] == expected_return
58
58
 
59
59
 
60
60
  def test_add_tree_item(status_box):
@@ -62,10 +62,10 @@ def test_add_tree_item(status_box):
62
62
  status = BECStatus.IDLE
63
63
  info = {"test": "test"}
64
64
  metrics = {"metric": "test_metric"}
65
- assert len(status_box.children()[0].children()) == 1
65
+ assert len(status_box.tree.children()[0].children()) == 1
66
66
  status_box.add_tree_item(name, status, info, metrics)
67
- assert len(status_box.children()[0].children()) == 2
68
- assert name in status_box.tree_items
67
+ assert len(status_box.tree.children()[0].children()) == 2
68
+ assert name in status_box.status_container
69
69
 
70
70
 
71
71
  def test_update_service_status(status_box):
@@ -82,10 +82,10 @@ def test_update_service_status(status_box):
82
82
  services_metrics = {name: ServiceMetricMessage(name=name, metrics=metrics)}
83
83
 
84
84
  with mock.patch.object(status_box, "update_core_services", return_value=services_status):
85
- assert not_connected_name in status_box.tree_items
85
+ assert not_connected_name in status_box.status_container
86
86
  status_box.update_service_status(services_status, services_metrics)
87
- assert status_box.tree_items[name][1].config.metrics == metrics
88
- assert not_connected_name not in status_box.tree_items
87
+ assert status_box.status_container[name]["widget"].config.metrics == metrics
88
+ assert not_connected_name not in status_box.status_container
89
89
 
90
90
 
91
91
  def test_update_core_services(status_box):
@@ -98,15 +98,15 @@ def test_update_core_services(status_box):
98
98
  services_metrics = {name: ServiceMetricMessage(name=name, metrics=metrics)}
99
99
 
100
100
  status_box.update_core_services(services_status, services_metrics)
101
- assert status_box.children()[0].children()[0].config.status == "RUNNING"
102
- assert status_box.tree_items[name][1].config.metrics == metrics
101
+ assert status_box.tree.children()[0].children()[0].config.status == "RUNNING"
102
+ assert status_box.status_container[name]["widget"].config.metrics == metrics
103
103
 
104
104
  status = BECStatus.IDLE
105
105
  services_status = {name: StatusMessage(name=name, status=status, info=info)}
106
106
  services_metrics = {name: ServiceMetricMessage(name=name, metrics=metrics)}
107
107
  status_box.update_core_services(services_status, services_metrics)
108
- assert status_box.children()[0].children()[0].config.status == "ERROR"
109
- assert status_box.tree_items[name][1].config.metrics == metrics
108
+ assert status_box.tree.children()[0].children()[0].config.status == status.name
109
+ assert status_box.status_container[name]["widget"].config.metrics == metrics
110
110
 
111
111
 
112
112
  def test_double_click_item(status_box):
@@ -115,7 +115,9 @@ def test_double_click_item(status_box):
115
115
  info = {"test": "test"}
116
116
  metrics = {"MyData": "This should be shown nicely"}
117
117
  status_box.add_tree_item(name, status, info, metrics)
118
- item, status_item = status_box.tree_items[name]
118
+ container = status_box.status_container[name]
119
+ item = container["item"]
120
+ status_item = container["widget"]
119
121
  with mock.patch.object(status_item, "show_popup") as mock_show_popup:
120
- status_box.itemDoubleClicked.emit(item, 0)
122
+ status_box.tree.itemDoubleClicked.emit(item, 0)
121
123
  assert mock_show_popup.call_count == 1
@@ -4,6 +4,7 @@ import black
4
4
  import isort
5
5
 
6
6
  from bec_widgets.cli.generate_cli import ClientGenerator
7
+ from bec_widgets.utils.plugin_utils import BECClassContainer, BECClassInfo
7
8
 
8
9
  # pylint: disable=missing-function-docstring
9
10
 
@@ -33,11 +34,31 @@ class MockBECFigure:
33
34
 
34
35
  def test_client_generator_with_black_formatting():
35
36
  generator = ClientGenerator()
36
- rpc_classes = {
37
- "connector_classes": [MockBECWaveform1D, MockBECFigure],
38
- "top_level_classes": [MockBECFigure],
39
- }
40
- generator.generate_client(rpc_classes)
37
+ container = BECClassContainer()
38
+ container.add_class(
39
+ BECClassInfo(
40
+ name="MockBECWaveform1D",
41
+ module="test_module",
42
+ file="test_file",
43
+ obj=MockBECWaveform1D,
44
+ is_connector=True,
45
+ is_widget=True,
46
+ is_top_level=False,
47
+ )
48
+ )
49
+ container.add_class(
50
+ BECClassInfo(
51
+ name="MockBECFigure",
52
+ module="test_module",
53
+ file="test_file",
54
+ obj=MockBECFigure,
55
+ is_connector=True,
56
+ is_widget=True,
57
+ is_top_level=True,
58
+ )
59
+ )
60
+
61
+ generator.generate_client(container)
41
62
 
42
63
  # Format the expected output with black to ensure it matches the generator output
43
64
  expected_output = dedent(
@@ -51,6 +72,7 @@ def test_client_generator_with_black_formatting():
51
72
 
52
73
  # pylint: skip-file
53
74
 
75
+
54
76
  class Widgets(str, enum.Enum):
55
77
  """
56
78
  Enum for the available widgets.
@@ -59,18 +81,6 @@ def test_client_generator_with_black_formatting():
59
81
  MockBECFigure = "MockBECFigure"
60
82
 
61
83
 
62
- class MockBECWaveform1D(RPCBase):
63
- @rpc_call
64
- def set_frequency(self, frequency: float) -> list:
65
- """
66
- Set the frequency of the waveform.
67
- """
68
- @rpc_call
69
- def set_amplitude(self, amplitude: float) -> tuple[float, float]:
70
- """
71
- Set the amplitude of the waveform.
72
- """
73
-
74
84
  class MockBECFigure(RPCBase):
75
85
  @rpc_call
76
86
  def add_plot(self, plot_id: str):
@@ -83,6 +93,20 @@ def test_client_generator_with_black_formatting():
83
93
  """
84
94
  Remove a plot from the figure.
85
95
  """
96
+
97
+
98
+ class MockBECWaveform1D(RPCBase):
99
+ @rpc_call
100
+ def set_frequency(self, frequency: float) -> list:
101
+ """
102
+ Set the frequency of the waveform.
103
+ """
104
+
105
+ @rpc_call
106
+ def set_amplitude(self, amplitude: float) -> tuple[float, float]:
107
+ """
108
+ Set the amplitude of the waveform.
109
+ """
86
110
  '''
87
111
  )
88
112
 
@@ -3,9 +3,8 @@ from bec_widgets.utils.plugin_utils import get_rpc_classes
3
3
 
4
4
  def test_client_generator_classes():
5
5
  out = get_rpc_classes("bec_widgets")
6
- assert list(out.keys()) == ["connector_classes", "top_level_classes"]
7
- connector_cls_names = [cls.__name__ for cls in out["connector_classes"]]
8
- top_level_cls_names = [cls.__name__ for cls in out["top_level_classes"]]
6
+ connector_cls_names = [cls.__name__ for cls in out.connector_classes]
7
+ top_level_cls_names = [cls.__name__ for cls in out.top_level_classes]
9
8
 
10
9
  assert "BECFigure" in connector_cls_names
11
10
  assert "BECWaveform" in connector_cls_names