bec-widgets 0.63.1__tar.gz → 0.64.0__tar.gz

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.
Files changed (173) hide show
  1. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/.gitlab-ci.yml +34 -27
  2. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/CHANGELOG.md +36 -40
  3. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/PKG-INFO +1 -1
  4. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/bec_widgets/cli/client.py +39 -9
  5. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/bec_widgets/cli/client_utils.py +68 -41
  6. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/bec_widgets/cli/server.py +5 -1
  7. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/bec_widgets/examples/jupyter_console/jupyter_console_window.py +6 -5
  8. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/bec_widgets/utils/bec_dispatcher.py +5 -1
  9. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/bec_widgets/widgets/figure/figure.py +6 -0
  10. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/bec_widgets/widgets/figure/plots/plot_base.py +62 -6
  11. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/bec_widgets/widgets/figure/plots/waveform/waveform.py +2 -0
  12. bec_widgets-0.64.0/docs/developer/developer.md +46 -0
  13. bec_widgets-0.64.0/docs/developer/getting_started/development.md +27 -0
  14. bec_widgets-0.64.0/docs/developer/getting_started/getting_started.md +12 -0
  15. bec_widgets-0.64.0/docs/developer/widgets/widgets.md +12 -0
  16. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/docs/user/getting_started/installation.md +1 -1
  17. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/docs/user/widgets/text_box.md +1 -1
  18. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/pyproject.toml +2 -1
  19. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/tests/unit_tests/test_plot_base.py +27 -0
  20. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/tests/unit_tests/test_waveform1d.py +25 -9
  21. bec_widgets-0.63.1/docs/developer/developer.md +0 -18
  22. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/.git_hooks/pre-commit +0 -0
  23. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/.gitignore +0 -0
  24. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/.gitlab/issue_templates/bug_report_template.md +0 -0
  25. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/.gitlab/issue_templates/documentation_update_template.md +0 -0
  26. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/.gitlab/issue_templates/feature_request_template.md +0 -0
  27. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/.gitlab/merge_request_templates/default.md +0 -0
  28. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/.pylintrc +0 -0
  29. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/.readthedocs.yaml +0 -0
  30. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/LICENSE +0 -0
  31. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/README.md +0 -0
  32. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/bec_widgets/__init__.py +0 -0
  33. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/bec_widgets/assets/bec_widgets_icon.png +0 -0
  34. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/bec_widgets/assets/terminal_icon.png +0 -0
  35. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/bec_widgets/cli/__init__.py +0 -0
  36. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/bec_widgets/cli/auto_updates.py +0 -0
  37. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/bec_widgets/cli/generate_cli.py +0 -0
  38. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/bec_widgets/cli/rpc_register.py +0 -0
  39. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/bec_widgets/cli/rpc_wigdet_handler.py +0 -0
  40. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/bec_widgets/examples/__init__.py +0 -0
  41. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/bec_widgets/examples/jupyter_console/__init__.py +0 -0
  42. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/bec_widgets/examples/jupyter_console/jupyter_console_window.ui +0 -0
  43. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/bec_widgets/examples/motor_movement/__init__.py +0 -0
  44. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/bec_widgets/examples/motor_movement/motor_control_compilations.py +0 -0
  45. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/bec_widgets/examples/motor_movement/motor_controller.ui +0 -0
  46. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/bec_widgets/utils/__init__.py +0 -0
  47. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/bec_widgets/utils/bec_connector.py +0 -0
  48. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/bec_widgets/utils/bec_table.py +0 -0
  49. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/bec_widgets/utils/colors.py +0 -0
  50. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/bec_widgets/utils/container_utils.py +0 -0
  51. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/bec_widgets/utils/crosshair.py +0 -0
  52. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/bec_widgets/utils/entry_validator.py +0 -0
  53. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/bec_widgets/utils/layout_manager.py +0 -0
  54. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/bec_widgets/utils/plugin_utils.py +0 -0
  55. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/bec_widgets/utils/rpc_decorator.py +0 -0
  56. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/bec_widgets/utils/thread_checker.py +0 -0
  57. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/bec_widgets/utils/ui_loader.py +0 -0
  58. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/bec_widgets/utils/validator_delegate.py +0 -0
  59. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/bec_widgets/utils/widget_io.py +0 -0
  60. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/bec_widgets/utils/yaml_dialog.py +0 -0
  61. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/bec_widgets/widgets/__init__.py +0 -0
  62. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/bec_widgets/widgets/buttons/__init__.py +0 -0
  63. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/bec_widgets/widgets/buttons/stop_button/__init__.py +0 -0
  64. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/bec_widgets/widgets/buttons/stop_button/stop_button.py +0 -0
  65. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/bec_widgets/widgets/dock/__init__.py +0 -0
  66. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/bec_widgets/widgets/dock/dock.py +0 -0
  67. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/bec_widgets/widgets/dock/dock_area.py +0 -0
  68. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/bec_widgets/widgets/figure/__init__.py +0 -0
  69. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/bec_widgets/widgets/figure/plots/__init__.py +0 -0
  70. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/bec_widgets/widgets/figure/plots/image/__init__.py +0 -0
  71. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/bec_widgets/widgets/figure/plots/image/image.py +0 -0
  72. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/bec_widgets/widgets/figure/plots/image/image_item.py +0 -0
  73. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/bec_widgets/widgets/figure/plots/image/image_processor.py +0 -0
  74. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/bec_widgets/widgets/figure/plots/motor_map/__init__.py +0 -0
  75. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/bec_widgets/widgets/figure/plots/motor_map/motor_map.py +0 -0
  76. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/bec_widgets/widgets/figure/plots/waveform/__init__.py +0 -0
  77. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/bec_widgets/widgets/figure/plots/waveform/waveform_curve.py +0 -0
  78. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/bec_widgets/widgets/jupyter_console/__init__.py +0 -0
  79. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/bec_widgets/widgets/jupyter_console/jupyter_console.py +0 -0
  80. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/bec_widgets/widgets/motor_control/__init__.py +0 -0
  81. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/bec_widgets/widgets/motor_control/motor_control.py +0 -0
  82. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/bec_widgets/widgets/motor_control/motor_table/__init__.py +0 -0
  83. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/bec_widgets/widgets/motor_control/motor_table/motor_table.py +0 -0
  84. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/bec_widgets/widgets/motor_control/motor_table/motor_table.ui +0 -0
  85. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/bec_widgets/widgets/motor_control/movement_absolute/__init__.py +0 -0
  86. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/bec_widgets/widgets/motor_control/movement_absolute/movement_absolute.py +0 -0
  87. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/bec_widgets/widgets/motor_control/movement_absolute/movement_absolute.ui +0 -0
  88. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/bec_widgets/widgets/motor_control/movement_relative/__init__.py +0 -0
  89. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/bec_widgets/widgets/motor_control/movement_relative/movement_relative.py +0 -0
  90. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/bec_widgets/widgets/motor_control/movement_relative/movement_relative.ui +0 -0
  91. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/bec_widgets/widgets/motor_control/selection/__init__.py +0 -0
  92. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/bec_widgets/widgets/motor_control/selection/selection.py +0 -0
  93. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/bec_widgets/widgets/motor_control/selection/selection.ui +0 -0
  94. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/bec_widgets/widgets/scan_control/__init__.py +0 -0
  95. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/bec_widgets/widgets/scan_control/scan_control.py +0 -0
  96. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/bec_widgets/widgets/spiral_progress_bar/__init__.py +0 -0
  97. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/bec_widgets/widgets/spiral_progress_bar/ring.py +0 -0
  98. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/bec_widgets/widgets/spiral_progress_bar/spiral_progress_bar.py +0 -0
  99. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/bec_widgets/widgets/text_box/__init__.py +0 -0
  100. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/bec_widgets/widgets/text_box/text_box.py +0 -0
  101. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/bec_widgets/widgets/toolbar/__init__.py +0 -0
  102. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/bec_widgets/widgets/toolbar/toolbar.py +0 -0
  103. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/bec_widgets/widgets/website/__init__.py +0 -0
  104. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/bec_widgets/widgets/website/website.py +0 -0
  105. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/docs/Makefile +0 -0
  106. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/docs/_static/custom.css +0 -0
  107. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/docs/_templates/custom-class-template.rst +0 -0
  108. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/docs/_templates/custom-module-template.rst +0 -0
  109. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/docs/api_reference/api_reference.md +0 -0
  110. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/docs/assets/apps_48dp.svg +0 -0
  111. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/docs/assets/display_settings_48dp.svg +0 -0
  112. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/docs/assets/index_api.svg +0 -0
  113. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/docs/assets/index_contribute.svg +0 -0
  114. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/docs/assets/index_getting_started.svg +0 -0
  115. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/docs/assets/index_user_guide.svg +0 -0
  116. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/docs/assets/rocket_launch_48dp.svg +0 -0
  117. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/docs/conf.py +0 -0
  118. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/docs/index.md +0 -0
  119. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/docs/introduction/introduction.md +0 -0
  120. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/docs/make.bat +0 -0
  121. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/docs/requirements.txt +0 -0
  122. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/docs/user/api_reference/api_reference.md +0 -0
  123. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/docs/user/applications/applications.md +0 -0
  124. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/docs/user/customisation.md +0 -0
  125. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/docs/user/getting_started/BECDockArea.png +0 -0
  126. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/docs/user/getting_started/auto_updates.md +0 -0
  127. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/docs/user/getting_started/getting_started.md +0 -0
  128. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/docs/user/getting_started/gui_complex_gui.gif +0 -0
  129. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/docs/user/getting_started/quick_start.md +0 -0
  130. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/docs/user/user.md +0 -0
  131. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/docs/user/widgets/BECFigure.png +0 -0
  132. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/docs/user/widgets/bec_figure.md +0 -0
  133. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/docs/user/widgets/buttons.md +0 -0
  134. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/docs/user/widgets/image_plot.gif +0 -0
  135. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/docs/user/widgets/motor.gif +0 -0
  136. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/docs/user/widgets/progress_bar.gif +0 -0
  137. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/docs/user/widgets/scatter_2D.gif +0 -0
  138. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/docs/user/widgets/spiral_progress_bar.md +0 -0
  139. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/docs/user/widgets/w1D.gif +0 -0
  140. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/docs/user/widgets/website.md +0 -0
  141. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/docs/user/widgets/widgets.md +0 -0
  142. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/tests/__init__.py +0 -0
  143. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/tests/end-2-end/__init__.py +0 -0
  144. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/tests/end-2-end/conftest.py +0 -0
  145. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/tests/end-2-end/test_bec_dock_rpc_e2e.py +0 -0
  146. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/tests/end-2-end/test_bec_figure_rpc_e2e.py +0 -0
  147. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/tests/end-2-end/test_rpc_register_e2e.py +0 -0
  148. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/tests/unit_tests/__init__.py +0 -0
  149. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/tests/unit_tests/client_mocks.py +0 -0
  150. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/tests/unit_tests/conftest.py +0 -0
  151. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/tests/unit_tests/test_bec_connector.py +0 -0
  152. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/tests/unit_tests/test_bec_dispatcher.py +0 -0
  153. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/tests/unit_tests/test_bec_dock.py +0 -0
  154. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/tests/unit_tests/test_bec_figure.py +0 -0
  155. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/tests/unit_tests/test_bec_motor_map.py +0 -0
  156. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/tests/unit_tests/test_client_utils.py +0 -0
  157. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/tests/unit_tests/test_color_validation.py +0 -0
  158. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/tests/unit_tests/test_configs/config_device.yaml +0 -0
  159. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/tests/unit_tests/test_configs/config_device_no_entry.yaml +0 -0
  160. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/tests/unit_tests/test_configs/config_scan.yaml +0 -0
  161. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/tests/unit_tests/test_crosshair.py +0 -0
  162. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/tests/unit_tests/test_generate_cli_client.py +0 -0
  163. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/tests/unit_tests/test_motor_control.py +0 -0
  164. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/tests/unit_tests/test_msgs/__init__.py +0 -0
  165. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/tests/unit_tests/test_msgs/available_scans_message.py +0 -0
  166. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/tests/unit_tests/test_rpc_register.py +0 -0
  167. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/tests/unit_tests/test_scan_control.py +0 -0
  168. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/tests/unit_tests/test_spiral_progress_bar.py +0 -0
  169. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/tests/unit_tests/test_stop_button.py +0 -0
  170. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/tests/unit_tests/test_text_box_widget.py +0 -0
  171. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/tests/unit_tests/test_website_widget.py +0 -0
  172. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/tests/unit_tests/test_widget_io.py +0 -0
  173. {bec_widgets-0.63.1 → bec_widgets-0.64.0}/tests/unit_tests/test_yaml_dialog.py +0 -0
@@ -22,6 +22,13 @@ workflow:
22
22
 
23
23
  include:
24
24
  - template: Security/Secret-Detection.gitlab-ci.yml
25
+ - project: "bec/awi_utils"
26
+ file: "/templates/check-packages-job.yml"
27
+ inputs:
28
+ stage: test
29
+ path: "."
30
+ pytest_args: "-v --random-order tests/"
31
+ exclude_packages: ""
25
32
 
26
33
  # different stages in the pipeline
27
34
  stages:
@@ -32,21 +39,21 @@ stages:
32
39
  - Deploy
33
40
 
34
41
  .install-qt-webengine-deps: &install-qt-webengine-deps
35
- - apt-get -y install libnss3 libxdamage1 libasound2 libatomic1 libxcursor1
36
- - export QTWEBENGINE_DISABLE_SANDBOX=1
42
+ - apt-get -y install libnss3 libxdamage1 libasound2 libatomic1 libxcursor1
43
+ - export QTWEBENGINE_DISABLE_SANDBOX=1
37
44
 
38
45
  .clone-repos: &clone-repos
39
- - git clone --branch $BEC_CORE_BRANCH https://gitlab.psi.ch/bec/bec.git
40
- - git clone --branch $OPHYD_DEVICES_BRANCH https://gitlab.psi.ch/bec/ophyd_devices.git
41
- - export OHPYD_DEVICES_PATH=$PWD/ophyd_devices
42
-
46
+ - git clone --branch $BEC_CORE_BRANCH https://gitlab.psi.ch/bec/bec.git
47
+ - git clone --branch $OPHYD_DEVICES_BRANCH https://gitlab.psi.ch/bec/ophyd_devices.git
48
+ - export OHPYD_DEVICES_PATH=$PWD/ophyd_devices
49
+
43
50
  .install-os-packages: &install-os-packages
44
- - apt-get update
45
- - apt-get install -y libgl1-mesa-glx libegl1-mesa x11-utils libxkbcommon-x11-0 libdbus-1-3
46
- - *install-qt-webengine-deps
51
+ - apt-get update
52
+ - apt-get install -y libgl1-mesa-glx libegl1-mesa x11-utils libxkbcommon-x11-0 libdbus-1-3
53
+ - *install-qt-webengine-deps
47
54
 
48
55
  before_script:
49
- - if [[ "$CI_PROJECT_PATH" != "bec/bec_widgets" ]]; then
56
+ - if [[ "$CI_PROJECT_PATH" != "bec/bec_widgets" ]]; then
50
57
  echo -e "\033[35;1m Using branch $CHILD_PIPELINE_BRANCH of BEC Widgets \033[0;m";
51
58
  test -d bec_widgets || git clone --branch $CHILD_PIPELINE_BRANCH https://gitlab.psi.ch/bec/bec_widgets.git; cd bec_widgets;
52
59
  fi
@@ -92,10 +99,10 @@ pylint-check:
92
99
  - git fetch origin $CI_MERGE_REQUEST_TARGET_BRANCH_NAME
93
100
  # Identify changed Python files
94
101
  - if [ "$CI_PIPELINE_SOURCE" == "merge_request_event" ]; then
95
- TARGET_BRANCH_COMMIT_SHA=$(git rev-parse origin/$CI_MERGE_REQUEST_TARGET_BRANCH_NAME);
96
- CHANGED_FILES=$(git diff --name-only $TARGET_BRANCH_COMMIT_SHA HEAD | grep '\.py$' || true);
102
+ TARGET_BRANCH_COMMIT_SHA=$(git rev-parse origin/$CI_MERGE_REQUEST_TARGET_BRANCH_NAME);
103
+ CHANGED_FILES=$(git diff --name-only $TARGET_BRANCH_COMMIT_SHA HEAD | grep '\.py$' || true);
97
104
  else
98
- CHANGED_FILES=$(git diff --name-only $CI_COMMIT_BEFORE_SHA $CI_COMMIT_SHA | grep '\.py$' || true);
105
+ CHANGED_FILES=$(git diff --name-only $CI_COMMIT_BEFORE_SHA $CI_COMMIT_SHA | grep '\.py$' || true);
99
106
  fi
100
107
  - if [ -z "$CHANGED_FILES" ]; then echo "No Python files changed."; exit 0; fi
101
108
 
@@ -120,7 +127,7 @@ tests:
120
127
  stage: test
121
128
  needs: []
122
129
  variables:
123
- QT_QPA_PLATFORM: "offscreen"
130
+ QT_QPA_PLATFORM: "offscreen"
124
131
  script:
125
132
  - *clone-repos
126
133
  - *install-os-packages
@@ -141,21 +148,21 @@ tests:
141
148
  test-matrix:
142
149
  parallel:
143
150
  matrix:
144
- - PYTHON_VERSION:
145
- - "3.10"
146
- - "3.11"
147
- - "3.12"
148
- QT_PCKG:
149
- - "pyside6"
150
- - "pyqt5"
151
- - "pyqt6"
151
+ - PYTHON_VERSION:
152
+ - "3.10"
153
+ - "3.11"
154
+ - "3.12"
155
+ QT_PCKG:
156
+ - "pyside6"
157
+ - "pyqt5"
158
+ - "pyqt6"
152
159
 
153
160
  stage: AdditionalTests
154
161
  needs: []
155
162
  variables:
156
- QT_QPA_PLATFORM: "offscreen"
157
- PYTHON_VERSION: ""
158
- QT_PCKG: ""
163
+ QT_QPA_PLATFORM: "offscreen"
164
+ PYTHON_VERSION: ""
165
+ QT_PCKG: ""
159
166
  image: $CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX/python:$PYTHON_VERSION
160
167
  script:
161
168
  - *clone-repos
@@ -226,7 +233,7 @@ semver:
226
233
  - pip install python-semantic-release==9.* wheel build twine
227
234
  - export GL_TOKEN=$CI_UPDATES
228
235
  - semantic-release -vv version
229
-
236
+
230
237
  # check if any artifacts were created
231
238
  - if [ ! -d dist ]; then echo No release will be made; exit 0; fi
232
239
  - twine upload dist/* -u __token__ -p $CI_PYPI_TOKEN --skip-existing
@@ -242,7 +249,7 @@ pages:
242
249
  variables:
243
250
  TARGET_BRANCH: $CI_COMMIT_REF_NAME
244
251
  rules:
245
- - if: '$CI_COMMIT_TAG != null'
252
+ - if: "$CI_COMMIT_TAG != null"
246
253
  variables:
247
254
  TARGET_BRANCH: $CI_COMMIT_TAG
248
255
  - if: '$CI_COMMIT_REF_NAME == "main" && $CI_PROJECT_PATH == "bec/bec_widgets"'
@@ -1,6 +1,42 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## v0.64.0 (2024-06-19)
3
4
 
5
+ ### Ci
6
+
7
+ * ci: add job optional dependency check ([`27426ce`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/27426ce7a52b4cbad7f3bef114d6efe6ad73bd7f))
8
+
9
+ ### Documentation
10
+
11
+ * docs: fix links in developer section ([`9e16f2f`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/9e16f2faf9c59a5d36ae878512c5a910cca31e69))
12
+
13
+ * docs: refactor developer section, add widget tutorial ([`2a36d93`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/2a36d9364f242bf42e4cda4b50e6f46aa3833bbd))
14
+
15
+ ### Feature
16
+
17
+ * feat: add option to change size of the fonts ([`ea805d1`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/ea805d1362fc084d3b703b6f81b0180072f0825d))
18
+
19
+ ### Fix
20
+
21
+ * fix(plot_base): font size is set with setScale which is scaling the whole legend window ([`5d66720`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/5d6672069ea1cbceb62104f66c127e4e3c23e4a4))
22
+
23
+ ### Test
24
+
25
+ * test: add tests ([`140ad83`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/140ad83380808928edf7953e23c762ab72a0a1e9))
26
+
27
+ ## v0.63.2 (2024-06-14)
28
+
29
+ ### Fix
30
+
31
+ * fix: do not import "server" in client, prevents from having trouble with QApplication creation order
32
+
33
+ Like with QtWebEngine ([`6f96498`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/6f96498de66358b89f3a2035627eed2e02dde5a1))
34
+
35
+ ### Unknown
36
+
37
+ * Reapply "feat: implement non-polling, interruptible waiting of gui instruction response with timeout"
38
+
39
+ This reverts commit fe04dd80e59a0e74f7fdea603e0642707ecc7c2a. ([`836b6e6`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/836b6e64f694916d6b6f909dedf11a4a6d2c86a4))
4
40
 
5
41
  ## v0.63.1 (2024-06-13)
6
42
 
@@ -11,7 +47,6 @@
11
47
  The proper finalization sequence will be executed by the remote process
12
48
  on SIGTERM ([`9263f8e`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/9263f8ef5c17ae7a007a1a564baf787b39061756))
13
49
 
14
-
15
50
  ## v0.63.0 (2024-06-13)
16
51
 
17
52
  ### Documentation
@@ -36,7 +71,6 @@ on SIGTERM ([`9263f8e`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/9263f8ef5
36
71
 
37
72
  This reverts commit abc6caa2d0b6141dfbe1f3d025f78ae14deddcb3 ([`fe04dd8`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/fe04dd80e59a0e74f7fdea603e0642707ecc7c2a))
38
73
 
39
-
40
74
  ## v0.62.0 (2024-06-12)
41
75
 
42
76
  ### Feature
@@ -47,7 +81,6 @@ This reverts commit abc6caa2d0b6141dfbe1f3d025f78ae14deddcb3 ([`fe04dd8`](https:
47
81
 
48
82
  * doc: add documentation about creating custom GUI applications embedding BEC Widgets ([`17a0068`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/17a00687579f5efab1990cd83862ec0e78198633))
49
83
 
50
-
51
84
  ## v0.61.0 (2024-06-12)
52
85
 
53
86
  ### Feature
@@ -58,7 +91,6 @@ This reverts commit abc6caa2d0b6141dfbe1f3d025f78ae14deddcb3 ([`fe04dd8`](https:
58
91
 
59
92
  * refactor: improve labe of auto_update script ([`40b5688`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/40b568815893cd41af3531bb2e647ca1e2e315f4))
60
93
 
61
-
62
94
  ## v0.60.0 (2024-06-08)
63
95
 
64
96
  ### Ci
@@ -101,14 +133,12 @@ This reverts commit abc6caa2d0b6141dfbe1f3d025f78ae14deddcb3 ([`fe04dd8`](https:
101
133
 
102
134
  * test: added missing pylint statement to header ([`f662985`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/f6629852ebc2b4ee239fa560cc310a5ae2627cf7))
103
135
 
104
-
105
136
  ## v0.59.1 (2024-06-07)
106
137
 
107
138
  ### Fix
108
139
 
109
140
  * fix(curve): set_color_map_z typo fixed in user access ([`e7838b0`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/e7838b0f2fc23b0a232ed7d68fbd7f3493a91b9e))
110
141
 
111
-
112
142
  ## v0.59.0 (2024-06-07)
113
143
 
114
144
  ### Build
@@ -129,44 +159,10 @@ This reverts commit abc6caa2d0b6141dfbe1f3d025f78ae14deddcb3 ([`fe04dd8`](https:
129
159
 
130
160
  * feat(widget): added simple website widget with rpc ([`64abd67`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/64abd67b9b416bff9c89880b248d6e8639aa1e70))
131
161
 
132
-
133
162
  ## v0.58.1 (2024-06-07)
134
163
 
135
164
  ### Fix
136
165
 
137
166
  * fix(dock): new dock can be detached upon creation ([`02a2608`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/02a26086c4540127a11c235cba30afc4fd712007))
138
167
 
139
-
140
168
  ## v0.58.0 (2024-06-07)
141
-
142
- ### Feature
143
-
144
- * feat(utils.colors): general color validators ([`3094632`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/30946321348abc349fb4003dc39d0232dc19606c))
145
-
146
- ### Fix
147
-
148
- * fix: bar colormap dynamic setting ([`67fd5e8`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/67fd5e8581f60fe64027ac57f1f12cefa4d28343))
149
-
150
- * fix: formatting isort ([`bf699ec`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/bf699ec1fbe2aacd31854e84fb0438c336840fcf))
151
-
152
- * fix(curve): 2D scatter updated if color_map_z is changed ([`6985ff0`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/6985ff0fcef9791b53198206ec8cbccd1d65ef99))
153
-
154
- * fix(curve): color_map_z setting works ([`33f7be4`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/33f7be42c512402dab3fdd9781a8234e3ec5f4ba))
155
-
156
- ### Test
157
-
158
- * test(color): validation tests added ([`c0ddece`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/c0ddeceeeabacbf33019a8f24b18821926dc17ac))
159
-
160
-
161
- ## v0.57.7 (2024-06-07)
162
-
163
- ### Documentation
164
-
165
- * docs: added schema of BECDockArea and BECFigure ([`828067f`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/828067f486a905eb4678538df58e2bdd6c770de1))
166
-
167
- ### Fix
168
-
169
- * fix: add model_config to pydantic models to allow runtime checks after creation ([`ca5e8d2`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/ca5e8d2fbbffbf221cc5472710fef81a33ee29d6))
170
-
171
-
172
- ## v0.57.6 (2024-06-06)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: bec_widgets
3
- Version: 0.63.1
3
+ Version: 0.64.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
@@ -1044,33 +1044,37 @@ class BECImageShow(RPCBase):
1044
1044
  - y_scale: Literal["linear", "log"]
1045
1045
  - x_lim: tuple
1046
1046
  - y_lim: tuple
1047
+ - legend_label_size: int
1047
1048
  """
1048
1049
 
1049
1050
  @rpc_call
1050
- def set_title(self, title: "str"):
1051
+ def set_title(self, title: "str", size: "int" = None):
1051
1052
  """
1052
1053
  Set the title of the plot widget.
1053
1054
 
1054
1055
  Args:
1055
1056
  title(str): Title of the plot widget.
1057
+ size(int): Font size of the title.
1056
1058
  """
1057
1059
 
1058
1060
  @rpc_call
1059
- def set_x_label(self, label: "str"):
1061
+ def set_x_label(self, label: "str", size: "int" = None):
1060
1062
  """
1061
1063
  Set the label of the x-axis.
1062
1064
 
1063
1065
  Args:
1064
1066
  label(str): Label of the x-axis.
1067
+ size(int): Font size of the label.
1065
1068
  """
1066
1069
 
1067
1070
  @rpc_call
1068
- def set_y_label(self, label: "str"):
1071
+ def set_y_label(self, label: "str", size: "int" = None):
1069
1072
  """
1070
1073
  Set the label of the y-axis.
1071
1074
 
1072
1075
  Args:
1073
1076
  label(str): Label of the y-axis.
1077
+ size(int): Font size of the label.
1074
1078
  """
1075
1079
 
1076
1080
  @rpc_call
@@ -1268,33 +1272,37 @@ class BECPlotBase(RPCBase):
1268
1272
  - y_scale: Literal["linear", "log"]
1269
1273
  - x_lim: tuple
1270
1274
  - y_lim: tuple
1275
+ - legend_label_size: int
1271
1276
  """
1272
1277
 
1273
1278
  @rpc_call
1274
- def set_title(self, title: "str"):
1279
+ def set_title(self, title: "str", size: "int" = None):
1275
1280
  """
1276
1281
  Set the title of the plot widget.
1277
1282
 
1278
1283
  Args:
1279
1284
  title(str): Title of the plot widget.
1285
+ size(int): Font size of the title.
1280
1286
  """
1281
1287
 
1282
1288
  @rpc_call
1283
- def set_x_label(self, label: "str"):
1289
+ def set_x_label(self, label: "str", size: "int" = None):
1284
1290
  """
1285
1291
  Set the label of the x-axis.
1286
1292
 
1287
1293
  Args:
1288
1294
  label(str): Label of the x-axis.
1295
+ size(int): Font size of the label.
1289
1296
  """
1290
1297
 
1291
1298
  @rpc_call
1292
- def set_y_label(self, label: "str"):
1299
+ def set_y_label(self, label: "str", size: "int" = None):
1293
1300
  """
1294
1301
  Set the label of the y-axis.
1295
1302
 
1296
1303
  Args:
1297
1304
  label(str): Label of the y-axis.
1305
+ size(int): Font size of the label.
1298
1306
  """
1299
1307
 
1300
1308
  @rpc_call
@@ -1370,6 +1378,15 @@ class BECPlotBase(RPCBase):
1370
1378
  Remove the plot widget from the figure.
1371
1379
  """
1372
1380
 
1381
+ @rpc_call
1382
+ def set_legend_label_size(self, size: "int" = None):
1383
+ """
1384
+ Set the font size of the legend.
1385
+
1386
+ Args:
1387
+ size(int): Font size of the legend.
1388
+ """
1389
+
1373
1390
 
1374
1391
  class BECWaveform(RPCBase):
1375
1392
  @property
@@ -1516,33 +1533,37 @@ class BECWaveform(RPCBase):
1516
1533
  - y_scale: Literal["linear", "log"]
1517
1534
  - x_lim: tuple
1518
1535
  - y_lim: tuple
1536
+ - legend_label_size: int
1519
1537
  """
1520
1538
 
1521
1539
  @rpc_call
1522
- def set_title(self, title: "str"):
1540
+ def set_title(self, title: "str", size: "int" = None):
1523
1541
  """
1524
1542
  Set the title of the plot widget.
1525
1543
 
1526
1544
  Args:
1527
1545
  title(str): Title of the plot widget.
1546
+ size(int): Font size of the title.
1528
1547
  """
1529
1548
 
1530
1549
  @rpc_call
1531
- def set_x_label(self, label: "str"):
1550
+ def set_x_label(self, label: "str", size: "int" = None):
1532
1551
  """
1533
1552
  Set the label of the x-axis.
1534
1553
 
1535
1554
  Args:
1536
1555
  label(str): Label of the x-axis.
1556
+ size(int): Font size of the label.
1537
1557
  """
1538
1558
 
1539
1559
  @rpc_call
1540
- def set_y_label(self, label: "str"):
1560
+ def set_y_label(self, label: "str", size: "int" = None):
1541
1561
  """
1542
1562
  Set the label of the y-axis.
1543
1563
 
1544
1564
  Args:
1545
1565
  label(str): Label of the y-axis.
1566
+ size(int): Font size of the label.
1546
1567
  """
1547
1568
 
1548
1569
  @rpc_call
@@ -1618,6 +1639,15 @@ class BECWaveform(RPCBase):
1618
1639
  Remove the plot widget from the figure.
1619
1640
  """
1620
1641
 
1642
+ @rpc_call
1643
+ def set_legend_label_size(self, size: "int" = None):
1644
+ """
1645
+ Set the font size of the legend.
1646
+
1647
+ Args:
1648
+ size(int): Font size of the legend.
1649
+ """
1650
+
1621
1651
 
1622
1652
  class Ring(RPCBase):
1623
1653
  @rpc_call
@@ -14,7 +14,7 @@ from typing import TYPE_CHECKING
14
14
 
15
15
  from bec_lib.endpoints import MessageEndpoints
16
16
  from bec_lib.utils.import_utils import isinstance_based_on_class_name, lazy_import, lazy_import_from
17
- from qtpy.QtCore import QCoreApplication
17
+ from qtpy.QtCore import QEventLoop, QSocketNotifier, QTimer
18
18
 
19
19
  import bec_widgets.cli.client as client
20
20
  from bec_widgets.cli.auto_updates import AutoUpdates
@@ -24,6 +24,8 @@ if TYPE_CHECKING:
24
24
 
25
25
  from bec_widgets.cli.client import BECDockArea, BECFigure
26
26
 
27
+ from bec_lib.serialization import MsgpackSerialization
28
+
27
29
  messages = lazy_import("bec_lib.messages")
28
30
  # from bec_lib.connector import MessageObject
29
31
  MessageObject = lazy_import_from("bec_lib.connector", ("MessageObject",))
@@ -84,13 +86,8 @@ def _start_plot_process(gui_id, gui_class, config) -> None:
84
86
  Start the plot in a new process.
85
87
  """
86
88
  # pylint: disable=subprocess-run-check
87
- monitor_module = importlib.import_module("bec_widgets.cli.server")
88
- monitor_path = monitor_module.__file__
89
-
90
89
  command = [
91
- sys.executable,
92
- "-u",
93
- monitor_path,
90
+ "bec-gui-server",
94
91
  "--id",
95
92
  gui_id,
96
93
  "--config",
@@ -98,7 +95,11 @@ def _start_plot_process(gui_id, gui_class, config) -> None:
98
95
  "--gui_class",
99
96
  gui_class.__name__,
100
97
  ]
101
- process = subprocess.Popen(command, text=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
98
+ env_dict = os.environ.copy()
99
+ env_dict["PYTHONUNBUFFERED"] = "1"
100
+ process = subprocess.Popen(
101
+ command, text=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, env=env_dict
102
+ )
102
103
  process_output_processing_thread = threading.Thread(target=_get_output, args=(process,))
103
104
  process_output_processing_thread.start()
104
105
  return process, process_output_processing_thread
@@ -200,6 +201,48 @@ class RPCResponseTimeoutError(Exception):
200
201
  )
201
202
 
202
203
 
204
+ class QtRedisMessageWaiter:
205
+ def __init__(self, redis_connector, message_to_wait):
206
+ self.ev_loop = QEventLoop()
207
+ self.response = None
208
+ self.connector = redis_connector
209
+ self.message_to_wait = message_to_wait
210
+ self.pubsub = redis_connector._redis_conn.pubsub()
211
+ self.pubsub.subscribe(self.message_to_wait.endpoint)
212
+ fd = self.pubsub.connection._sock.fileno()
213
+ self.notifier = QSocketNotifier(fd, QSocketNotifier.Read)
214
+ self.notifier.activated.connect(self._pubsub_readable)
215
+
216
+ def _msg_received(self, msg_obj):
217
+ self.response = msg_obj.value
218
+ self.ev_loop.quit()
219
+
220
+ def wait(self, timeout=1):
221
+ timer = QTimer()
222
+ timer.singleShot(timeout * 1000, self.ev_loop.quit)
223
+ self.ev_loop.exec_()
224
+ timer.stop()
225
+ self.notifier.setEnabled(False)
226
+ self.pubsub.close()
227
+ return self.response
228
+
229
+ def _pubsub_readable(self, fd):
230
+ while True:
231
+ msg = self.pubsub.get_message()
232
+ if msg:
233
+ if msg["type"] == "subscribe":
234
+ # get_message buffers, so we may already have the answer
235
+ # let's check...
236
+ continue
237
+ else:
238
+ break
239
+ else:
240
+ return
241
+ channel = msg["channel"].decode()
242
+ msg = MessageObject(topic=channel, value=MsgpackSerialization.loads(msg["data"]))
243
+ self.connector._execute_callback(self._msg_received, msg, {})
244
+
245
+
203
246
  class RPCBase:
204
247
  def __init__(self, gui_id: str = None, config: dict = None, parent=None) -> None:
205
248
  self._client = BECDispatcher().client
@@ -226,7 +269,7 @@ class RPCBase:
226
269
  parent = parent._parent
227
270
  return parent
228
271
 
229
- def _run_rpc(self, method, *args, wait_for_rpc_response=True, **kwargs):
272
+ def _run_rpc(self, method, *args, wait_for_rpc_response=True, timeout=3, **kwargs):
230
273
  """
231
274
  Run the RPC call.
232
275
 
@@ -248,16 +291,24 @@ class RPCBase:
248
291
 
249
292
  # pylint: disable=protected-access
250
293
  receiver = self._root._gui_id
294
+ if wait_for_rpc_response:
295
+ redis_msg = QtRedisMessageWaiter(
296
+ self._client.connector, MessageEndpoints.gui_instruction_response(request_id)
297
+ )
298
+
251
299
  self._client.connector.set_and_publish(MessageEndpoints.gui_instructions(receiver), rpc_msg)
252
300
 
253
- if not wait_for_rpc_response:
254
- return None
255
- response = self._wait_for_response(request_id)
256
- # get class name
257
- if not response.content["accepted"]:
258
- raise ValueError(response.content["message"]["error"])
259
- msg_result = response.content["message"].get("result")
260
- return self._create_widget_from_msg_result(msg_result)
301
+ if wait_for_rpc_response:
302
+ response = redis_msg.wait(timeout)
303
+
304
+ if response is None:
305
+ raise RPCResponseTimeoutError(request_id, timeout)
306
+
307
+ # get class name
308
+ if not response.accepted:
309
+ raise ValueError(response.message["error"])
310
+ msg_result = response.message.get("result")
311
+ return self._create_widget_from_msg_result(msg_result)
261
312
 
262
313
  def _create_widget_from_msg_result(self, msg_result):
263
314
  if msg_result is None:
@@ -280,30 +331,6 @@ class RPCBase:
280
331
  return cls(parent=self, **msg_result)
281
332
  return msg_result
282
333
 
283
- def _wait_for_response(self, request_id: str, timeout: int = 5):
284
- """
285
- Wait for the response from the server.
286
-
287
- Args:
288
- request_id(str): The request ID.
289
- timeout(int): The timeout in seconds.
290
-
291
- Returns:
292
- The response from the server.
293
- """
294
- start_time = time.time()
295
- response = None
296
-
297
- while response is None and self.gui_is_alive() and (time.time() - start_time) < timeout:
298
- response = self._client.connector.get(
299
- MessageEndpoints.gui_instruction_response(request_id)
300
- )
301
- QCoreApplication.processEvents() # keep UI responsive (and execute signals/slots)
302
- if response is None and (time.time() - start_time) >= timeout:
303
- raise RPCResponseTimeoutError(request_id, timeout)
304
-
305
- return response
306
-
307
334
  def gui_is_alive(self):
308
335
  """
309
336
  Check if the GUI is alive.
@@ -114,7 +114,7 @@ class BECWidgetsCLIServer:
114
114
  self.client.shutdown()
115
115
 
116
116
 
117
- if __name__ == "__main__": # pragma: no cover
117
+ def main():
118
118
  import argparse
119
119
  import os
120
120
  import sys
@@ -166,3 +166,7 @@ if __name__ == "__main__": # pragma: no cover
166
166
 
167
167
  app.aboutToQuit.connect(server.shutdown)
168
168
  sys.exit(app.exec())
169
+
170
+
171
+ if __name__ == "__main__": # pragma: no cover
172
+ main()
@@ -136,17 +136,18 @@ if __name__ == "__main__": # pragma: no cover
136
136
 
137
137
  module_path = os.path.dirname(bec_widgets.__file__)
138
138
 
139
- bec_dispatcher = BECDispatcher()
140
- client = bec_dispatcher.client
141
- client.start()
142
-
143
139
  app = QApplication(sys.argv)
144
140
  app.setApplicationName("Jupyter Console")
145
141
  app.setApplicationDisplayName("Jupyter Console")
146
- # qdarktheme.setup_theme("auto")
142
+ qdarktheme.setup_theme("auto")
147
143
  icon = QIcon()
148
144
  icon.addFile(os.path.join(module_path, "assets", "terminal_icon.png"), size=QSize(48, 48))
149
145
  app.setWindowIcon(icon)
146
+
147
+ bec_dispatcher = BECDispatcher()
148
+ client = bec_dispatcher.client
149
+ client.start()
150
+
150
151
  win = JupyterConsoleWindow()
151
152
  win.show()
152
153
 
@@ -9,7 +9,7 @@ import redis
9
9
  from bec_lib.client import BECClient
10
10
  from bec_lib.redis_connector import MessageObject, RedisConnector
11
11
  from bec_lib.service_config import ServiceConfig
12
- from qtpy.QtCore import QObject
12
+ from qtpy.QtCore import QCoreApplication, QObject
13
13
  from qtpy.QtCore import Signal as pyqtSignal
14
14
 
15
15
  if TYPE_CHECKING:
@@ -71,6 +71,7 @@ class BECDispatcher:
71
71
 
72
72
  _instance = None
73
73
  _initialized = False
74
+ qapp = None
74
75
 
75
76
  def __new__(cls, client=None, config: str = None, *args, **kwargs):
76
77
  if cls._instance is None:
@@ -82,6 +83,9 @@ class BECDispatcher:
82
83
  if self._initialized:
83
84
  return
84
85
 
86
+ if not QCoreApplication.instance():
87
+ BECDispatcher.qapp = QCoreApplication([])
88
+
85
89
  self._slots = collections.defaultdict(set)
86
90
  self.client = client
87
91
 
@@ -711,6 +711,12 @@ class BECFigure(BECConnector, pg.GraphicsLayoutWidget):
711
711
  qdarktheme.setup_theme(theme)
712
712
  self.setBackground("k" if theme == "dark" else "w")
713
713
  self.config.theme = theme
714
+ for plot in self.widget_list:
715
+ plot.set_x_label(plot.plot_item.getAxis("bottom").label.toPlainText())
716
+ plot.set_y_label(plot.plot_item.getAxis("left").label.toPlainText())
717
+ if plot.plot_item.titleLabel.text:
718
+ plot.set_title(plot.plot_item.titleLabel.text)
719
+ plot.set_legend_label_size()
714
720
 
715
721
  def _remove_by_coordinates(self, row: int, col: int) -> None:
716
722
  """