bec-widgets 0.86.0__tar.gz → 0.87.1__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.
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/CHANGELOG.md +30 -26
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/PKG-INFO +1 -1
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/examples/jupyter_console/jupyter_console_window.py +1 -2
- bec_widgets-0.87.1/bec_widgets/qt_utils/error_popups.py +225 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/utils/bec_connector.py +23 -18
- bec_widgets-0.87.1/bec_widgets/utils/bec_widget.py +23 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/widgets/base_classes/device_input_base.py +3 -5
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/widgets/bec_queue/bec_queue.py +3 -2
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/widgets/bec_status_box/bec_status_box.py +2 -11
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/widgets/device_box/device_box.py +2 -2
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/widgets/device_combobox/device_combobox.py +1 -8
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/widgets/device_line_edit/device_line_edit.py +2 -9
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/widgets/dock/dock.py +8 -6
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/widgets/dock/dock_area.py +4 -2
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/widgets/figure/figure.py +4 -8
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/widgets/figure/plots/image/image.py +1 -4
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/widgets/figure/plots/motor_map/motor_map.py +0 -1
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/widgets/figure/plots/plot_base.py +0 -5
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/widgets/figure/plots/waveform/waveform.py +1 -3
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/widgets/figure/plots/waveform/waveform_curve.py +1 -1
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/widgets/jupyter_console/jupyter_console.py +6 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/widgets/motor_map/motor_map_widget.py +2 -6
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/widgets/ring_progress_bar/ring.py +0 -4
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/widgets/ring_progress_bar/ring_progress_bar.py +8 -8
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/widgets/scan_control/scan_control.py +2 -6
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/widgets/stop_button/stop_button.py +2 -2
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/widgets/text_box/text_box.py +3 -2
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/widgets/website/website.py +2 -2
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/pyproject.toml +1 -1
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/tests/unit_tests/test_device_input_base.py +10 -4
- bec_widgets-0.87.1/tests/unit_tests/test_error_utils.py +63 -0
- bec_widgets-0.86.0/bec_widgets/utils/bec_widget.py +0 -8
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/.git_hooks/pre-commit +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/.gitignore +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/.gitlab/issue_templates/bug_report_template.md +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/.gitlab/issue_templates/documentation_update_template.md +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/.gitlab/issue_templates/feature_request_template.md +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/.gitlab/merge_request_templates/default.md +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/.gitlab-ci.yml +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/.pylintrc +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/.readthedocs.yaml +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/LICENSE +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/README.md +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/__init__.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/assets/bec_widgets_icon.png +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/assets/terminal_icon.png +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/cli/__init__.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/cli/auto_updates.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/cli/client.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/cli/client_utils.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/cli/generate_cli.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/cli/rpc_register.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/cli/rpc_wigdet_handler.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/cli/server.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/examples/__init__.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/examples/jupyter_console/__init__.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/examples/plugin_example_pyside/__init__.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/examples/plugin_example_pyside/main.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/examples/plugin_example_pyside/registertictactoe.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/examples/plugin_example_pyside/taskmenuextension.pyproject +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/examples/plugin_example_pyside/tictactoe.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/examples/plugin_example_pyside/tictactoeplugin.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/examples/plugin_example_pyside/tictactoetaskmenu.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/qt_utils/__init__.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/qt_utils/settings_dialog.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/qt_utils/toolbar.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/utils/__init__.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/utils/bec_designer.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/utils/bec_dispatcher.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/utils/bec_table.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/utils/colors.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/utils/container_utils.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/utils/crosshair.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/utils/entry_validator.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/utils/generate_designer_plugin.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/utils/layout_manager.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/utils/plugin_templates/plugin.template +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/utils/plugin_templates/register.template +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/utils/plugin_utils.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/utils/reference_utils.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/utils/rpc_decorator.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/utils/thread_checker.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/utils/ui_loader.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/utils/validator_delegate.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/utils/widget_io.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/utils/yaml_dialog.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/widgets/__init__.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/widgets/base_classes/__init__.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/widgets/bec_queue/__init__.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/widgets/bec_queue/bec_queue.pyproject +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/widgets/bec_queue/bec_queue_plugin.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/widgets/bec_queue/register_bec_queue.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/widgets/bec_status_box/__init__.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/widgets/bec_status_box/bec_status_box.pyproject +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/widgets/bec_status_box/bec_status_box_plugin.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/widgets/bec_status_box/register_bec_status_box.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/widgets/bec_status_box/status_item.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/widgets/color_button/__init__.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/widgets/color_button/assets/color_button.png +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/widgets/color_button/color_button.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/widgets/color_button/color_button.pyproject +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/widgets/color_button/color_button_plugin.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/widgets/color_button/register_color_button.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/widgets/color_map_selector/__init__.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/widgets/color_map_selector/assets/color_map_selector_icon.png +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/widgets/color_map_selector/color_map_selector.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/widgets/color_map_selector/color_map_selector.pyproject +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/widgets/color_map_selector/color_map_selector_plugin.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/widgets/color_map_selector/register_color_map_selector.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/widgets/console/console.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/widgets/device_box/__init__.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/widgets/device_box/device_box.pyproject +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/widgets/device_box/device_box.ui +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/widgets/device_box/device_box_plugin.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/widgets/device_box/register_device_box.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/widgets/device_combobox/__init__.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/widgets/device_combobox/assets/device_combobox_icon.png +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/widgets/device_combobox/device_combobox.pyproject +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/widgets/device_combobox/device_combobox_plugin.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/widgets/device_combobox/register_device_combobox.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/widgets/device_line_edit/__init__.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/widgets/device_line_edit/assets/line_edit_icon.png +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/widgets/device_line_edit/device_line_edit.pyproject +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/widgets/device_line_edit/device_line_edit_plugin.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/widgets/device_line_edit/register_device_line_edit.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/widgets/dock/__init__.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/widgets/figure/__init__.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/widgets/figure/plots/__init__.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/widgets/figure/plots/axis_settings.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/widgets/figure/plots/axis_settings.ui +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/widgets/figure/plots/image/__init__.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/widgets/figure/plots/image/image_item.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/widgets/figure/plots/image/image_processor.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/widgets/figure/plots/motor_map/__init__.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/widgets/figure/plots/waveform/__init__.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/widgets/jupyter_console/__init__.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/widgets/motor_map/__init__.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/widgets/motor_map/assets/connection.svg +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/widgets/motor_map/assets/history.svg +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/widgets/motor_map/assets/motor_map.png +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/widgets/motor_map/assets/settings.svg +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/widgets/motor_map/bec_motor_map_widget.pyproject +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/widgets/motor_map/bec_motor_map_widget_plugin.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/widgets/motor_map/motor_map_dialog/__init__.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/widgets/motor_map/motor_map_dialog/motor_map_settings.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/widgets/motor_map/motor_map_dialog/motor_map_settings.ui +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/widgets/motor_map/motor_map_dialog/motor_map_toolbar.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/widgets/motor_map/register_bec_motor_map_widget.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/widgets/position_indicator/position_indicator.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/widgets/position_indicator/position_indicator.pyproject +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/widgets/position_indicator/position_indicator_plugin.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/widgets/position_indicator/register_position_indicator.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/widgets/ring_progress_bar/__init__.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/widgets/scan_control/__init__.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/widgets/scan_control/scan_group_box.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/widgets/spinner/__init__.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/widgets/spinner/register_spinner_widget.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/widgets/spinner/spinner.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/widgets/spinner/spinner_widget.pyproject +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/widgets/spinner/spinner_widget_plugin.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/widgets/stop_button/__init__.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/widgets/stop_button/assets/stop.png +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/widgets/stop_button/register_stop_button.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/widgets/stop_button/stop_button.pyproject +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/widgets/stop_button/stop_button_plugin.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/widgets/text_box/__init__.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/widgets/toggle/__init__.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/widgets/toggle/register_toggle_switch.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/widgets/toggle/toggle.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/widgets/toggle/toggle_switch.pyproject +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/widgets/toggle/toggle_switch_plugin.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/widgets/vscode/__init__.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/widgets/vscode/vscode.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/widgets/website/__init__.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/docs/Makefile +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/docs/_static/custom.css +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/docs/_templates/custom-class-template.rst +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/docs/_templates/custom-module-template.rst +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/docs/api_reference/api_reference.md +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/docs/assets/apps_48dp.svg +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/docs/assets/display_settings_48dp.svg +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/docs/assets/index_api.svg +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/docs/assets/index_contribute.svg +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/docs/assets/index_getting_started.svg +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/docs/assets/index_user_guide.svg +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/docs/assets/rocket_launch_48dp.svg +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/docs/conf.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/docs/developer/developer.md +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/docs/developer/getting_started/development.md +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/docs/developer/getting_started/getting_started.md +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/docs/developer/widgets/widgets.md +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/docs/index.md +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/docs/introduction/introduction.md +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/docs/make.bat +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/docs/requirements.txt +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/docs/user/api_reference/api_reference.md +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/docs/user/applications/applications.md +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/docs/user/customisation.md +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/docs/user/getting_started/BECDockArea.png +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/docs/user/getting_started/auto_updates.md +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/docs/user/getting_started/getting_started.md +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/docs/user/getting_started/gui_complex_gui.gif +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/docs/user/getting_started/installation.md +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/docs/user/getting_started/quick_start.md +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/docs/user/user.md +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/docs/user/widgets/BECFigure.png +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/docs/user/widgets/bec_figure.md +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/docs/user/widgets/bec_figure_dap.gif +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/docs/user/widgets/bec_status_box.gif +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/docs/user/widgets/bec_status_box.md +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/docs/user/widgets/buttons.md +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/docs/user/widgets/image_plot.gif +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/docs/user/widgets/motor.gif +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/docs/user/widgets/progress_bar.gif +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/docs/user/widgets/ring_progress_bar.md +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/docs/user/widgets/scan_control.gif +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/docs/user/widgets/scan_control.md +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/docs/user/widgets/scatter_2D.gif +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/docs/user/widgets/text_box.md +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/docs/user/widgets/w1D.gif +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/docs/user/widgets/website.md +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/docs/user/widgets/widgets.md +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/tests/__init__.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/tests/end-2-end/__init__.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/tests/end-2-end/conftest.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/tests/end-2-end/test_bec_dock_rpc_e2e.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/tests/end-2-end/test_bec_figure_rpc_e2e.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/tests/end-2-end/test_rpc_register_e2e.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/tests/end-2-end/test_scan_control_e2e.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/tests/references/SpinnerWidget/SpinnerWidget_darwin.png +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/tests/references/SpinnerWidget/SpinnerWidget_linux.png +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/tests/references/SpinnerWidget/SpinnerWidget_started_darwin.png +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/tests/references/SpinnerWidget/SpinnerWidget_started_linux.png +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/tests/unit_tests/__init__.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/tests/unit_tests/client_mocks.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/tests/unit_tests/conftest.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/tests/unit_tests/test_bec_connector.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/tests/unit_tests/test_bec_dispatcher.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/tests/unit_tests/test_bec_dock.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/tests/unit_tests/test_bec_figure.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/tests/unit_tests/test_bec_image.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/tests/unit_tests/test_bec_motor_map.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/tests/unit_tests/test_bec_queue.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/tests/unit_tests/test_bec_status_box.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/tests/unit_tests/test_client_utils.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/tests/unit_tests/test_color_map_selector.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/tests/unit_tests/test_color_validation.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/tests/unit_tests/test_configs/config_device.yaml +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/tests/unit_tests/test_configs/config_device_no_entry.yaml +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/tests/unit_tests/test_configs/config_scan.yaml +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/tests/unit_tests/test_crosshair.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/tests/unit_tests/test_device_box.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/tests/unit_tests/test_device_input_widgets.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/tests/unit_tests/test_generate_cli_client.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/tests/unit_tests/test_generate_plugin.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/tests/unit_tests/test_motor_map_widget.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/tests/unit_tests/test_msgs/__init__.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/tests/unit_tests/test_msgs/available_scans_message.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/tests/unit_tests/test_plot_base.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/tests/unit_tests/test_plugin_utils.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/tests/unit_tests/test_ring_progress_bar.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/tests/unit_tests/test_rpc_register.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/tests/unit_tests/test_rpc_server.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/tests/unit_tests/test_rpc_widget_handler.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/tests/unit_tests/test_scan_control.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/tests/unit_tests/test_scan_control_group_box.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/tests/unit_tests/test_setting_dialog.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/tests/unit_tests/test_spinner.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/tests/unit_tests/test_stop_button.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/tests/unit_tests/test_text_box_widget.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/tests/unit_tests/test_toggle.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/tests/unit_tests/test_vscode_widget.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/tests/unit_tests/test_waveform1d.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/tests/unit_tests/test_website_widget.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/tests/unit_tests/test_widget_io.py +0 -0
- {bec_widgets-0.86.0 → bec_widgets-0.87.1}/tests/unit_tests/test_yaml_dialog.py +0 -0
@@ -1,5 +1,35 @@
|
|
1
1
|
# CHANGELOG
|
2
2
|
|
3
|
+
## v0.87.1 (2024-07-18)
|
4
|
+
|
5
|
+
### Fix
|
6
|
+
|
7
|
+
* fix(dock): added hasattr to cleanup method for widgets ([`d75c55b`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/d75c55b2b1ccf156fb789c7813f1c5bdf256f860))
|
8
|
+
|
9
|
+
* fix: add missing close() call, ensure jupyter console client.shutdown() is called in closeEvent ([`e52ee26`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/e52ee2604cb35096f1bd833ca9516d8a34197d35))
|
10
|
+
|
11
|
+
* fix: BECWidget checks if it is a widget, and implements closeEvent and cleanup ([`d64758f`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/d64758f268cad69e6a17bd52dc9913a6367d3cde))
|
12
|
+
|
13
|
+
* fix: add exit handlers for BECConnection objects ([`6202d22`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/6202d224fe85c103a4c33bd8c255f18cfd027303))
|
14
|
+
|
15
|
+
### Refactor
|
16
|
+
|
17
|
+
* refactor: BECWidget is a mixin based on BECConnector, for each QWidget in BEC
|
18
|
+
|
19
|
+
Handles closeEvent() and RPC registering/unregistering ([`c7feb69`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/c7feb6952d590b569f7b0cba3b019a9af0ce0c93))
|
20
|
+
|
21
|
+
## v0.87.0 (2024-07-17)
|
22
|
+
|
23
|
+
### Feature
|
24
|
+
|
25
|
+
* feat(qt_utils): added warning utility with simple API to setup warning message ([`787f749`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/787f74949bac27aaa51cbb43911919071481707c))
|
26
|
+
|
27
|
+
* feat(qt_utils): added error handle utility with popup messageBoxes ([`196ef7a`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/196ef7afe11a1b5dcc536f8859dc3b6044ea628e))
|
28
|
+
|
29
|
+
### Unknown
|
30
|
+
|
31
|
+
* tests: add unit tests for error and warning message boxes ([`8f104cf`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/8f104cf4024d3a4516e6aba5daa8fb78c85e2bfd))
|
32
|
+
|
3
33
|
## v0.86.0 (2024-07-17)
|
4
34
|
|
5
35
|
### Feature
|
@@ -106,12 +136,6 @@
|
|
106
136
|
|
107
137
|
* fix(motor_map): bug where motors without limits were selected ([`c78cd89`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/c78cd898f203f950d7cb589eb5609feaa88062cf))
|
108
138
|
|
109
|
-
### Refactor
|
110
|
-
|
111
|
-
* refactor(setting_dialog): moved to qt_utils ([`3826bb3`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/3826bb3d9e870e85709b5b20ef09a4d22641280c))
|
112
|
-
|
113
|
-
* refactor(toolbar): toolbar moved from widgets to qt_utils ([`7ffc06f`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/7ffc06f3c7ddd86a1681408a75221b9bbadb236b))
|
114
|
-
|
115
139
|
### Test
|
116
140
|
|
117
141
|
* test(setting_dialog): tests added ([`74a249b`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/74a249bd065d01006cb532bfff2a9bfedb34b592))
|
@@ -119,23 +143,3 @@
|
|
119
143
|
### Unknown
|
120
144
|
|
121
145
|
* tests(motor_map_widget): tests added ([`734f4c7`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/734f4c77507a1edafd477d81b5f7401d8e759be2))
|
122
|
-
|
123
|
-
* feat(settings_dialog):apply button ([`2020953`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/2020953b933b6fcad61ecc770588d39518c26fdd))
|
124
|
-
|
125
|
-
## v0.82.0 (2024-07-07)
|
126
|
-
|
127
|
-
### Feature
|
128
|
-
|
129
|
-
* feat(toggle): added angular component-like toggle ([`b9bff38`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/b9bff38b64b86f06b3bc047922ef9df0c7d32e71))
|
130
|
-
|
131
|
-
### Refactor
|
132
|
-
|
133
|
-
* refactor(device_input): DeviceComboBox and DeviceLineEdit moved to top layer of widgets ([`f048629`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/f04862933f049030554086adef3ec9e1aebd3eda))
|
134
|
-
|
135
|
-
* refactor(stop_button): moved to top layer, plugin added ([`f5b8375`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/f5b8375fd36e3bb681de571da86a6c0bdb3cb6f0))
|
136
|
-
|
137
|
-
* refactor(motor_map_widget): removed restriction of only PySide6 for widget ([`db1cdf4`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/db1cdf42806fef6d7c6d2db83528f32df3f9751d))
|
138
|
-
|
139
|
-
* refactor(color_button): ColorButton moved to top level of widgets ([`fa1e86f`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/fa1e86ff07b25d2c47c73117b00765b8e2f25da4))
|
140
|
-
|
141
|
-
## v0.81.2 (2024-07-07)
|
@@ -175,12 +175,11 @@ class JupyterConsoleWindow(QWidget): # pragma: no cover:
|
|
175
175
|
|
176
176
|
def closeEvent(self, event):
|
177
177
|
"""Override to handle things when main window is closed."""
|
178
|
-
self.dock.clear_all()
|
179
178
|
self.dock.cleanup()
|
180
179
|
self.dock.close()
|
181
|
-
self.figure.clear_all()
|
182
180
|
self.figure.cleanup()
|
183
181
|
self.figure.close()
|
182
|
+
self.console.close()
|
184
183
|
|
185
184
|
super().closeEvent(event)
|
186
185
|
|
@@ -0,0 +1,225 @@
|
|
1
|
+
import functools
|
2
|
+
import sys
|
3
|
+
import traceback
|
4
|
+
|
5
|
+
from qtpy.QtCore import QObject, Qt, Signal, Slot
|
6
|
+
from qtpy.QtWidgets import QApplication, QMessageBox, QPushButton, QVBoxLayout, QWidget
|
7
|
+
|
8
|
+
|
9
|
+
def SafeSlot(*slot_args, **slot_kwargs):
|
10
|
+
"""Function with args, acting like a decorator, applying "error_managed" decorator + Qt Slot
|
11
|
+
to the passed function, to display errors instead of potentially raising an exception
|
12
|
+
|
13
|
+
'popup_error' keyword argument can be passed with boolean value if a dialog should pop up,
|
14
|
+
otherwise error display is left to the original exception hook
|
15
|
+
"""
|
16
|
+
popup_error = bool(slot_kwargs.pop("popup_error", False))
|
17
|
+
|
18
|
+
def error_managed(method):
|
19
|
+
@Slot(*slot_args, **slot_kwargs)
|
20
|
+
@functools.wraps(method)
|
21
|
+
def wrapper(*args, **kwargs):
|
22
|
+
try:
|
23
|
+
return method(*args, **kwargs)
|
24
|
+
except Exception:
|
25
|
+
ErrorPopupUtility().custom_exception_hook(*sys.exc_info(), popup_error=popup_error)
|
26
|
+
|
27
|
+
return wrapper
|
28
|
+
|
29
|
+
return error_managed
|
30
|
+
|
31
|
+
|
32
|
+
class WarningPopupUtility(QObject):
|
33
|
+
"""
|
34
|
+
Utility class to show warning popups in the application.
|
35
|
+
"""
|
36
|
+
|
37
|
+
def __init__(self, parent=None):
|
38
|
+
super().__init__(parent)
|
39
|
+
|
40
|
+
@Slot(str, str, str, QWidget)
|
41
|
+
def show_warning_message(self, title, message, detailed_text, widget):
|
42
|
+
msg = QMessageBox(widget)
|
43
|
+
msg.setIcon(QMessageBox.Warning)
|
44
|
+
msg.setWindowTitle(title)
|
45
|
+
msg.setText(message)
|
46
|
+
msg.setStandardButtons(QMessageBox.Ok)
|
47
|
+
msg.setDetailedText(detailed_text)
|
48
|
+
msg.exec_()
|
49
|
+
|
50
|
+
def show_warning(self, title: str, message: str, detailed_text: str, widget: QWidget = None):
|
51
|
+
"""
|
52
|
+
Show a warning message with the given title, message, and detailed text.
|
53
|
+
|
54
|
+
Args:
|
55
|
+
title (str): The title of the warning message.
|
56
|
+
message (str): The main text of the warning message.
|
57
|
+
detailed_text (str): The detailed text to show when the user expands the message.
|
58
|
+
widget (QWidget): The parent widget for the message box.
|
59
|
+
"""
|
60
|
+
self.show_warning_message(title, message, detailed_text, widget)
|
61
|
+
|
62
|
+
|
63
|
+
class ErrorPopupUtility(QObject):
|
64
|
+
"""
|
65
|
+
Utility class to manage error popups in the application to show error messages to the users.
|
66
|
+
This class is singleton and the error popup can be enabled or disabled globally or attach to widget methods with decorator @error_managed.
|
67
|
+
"""
|
68
|
+
|
69
|
+
error_occurred = Signal(str, str, QWidget)
|
70
|
+
|
71
|
+
_instance = None
|
72
|
+
_initialized = False
|
73
|
+
|
74
|
+
def __new__(cls, *args, **kwargs):
|
75
|
+
if cls._instance is None:
|
76
|
+
cls._instance = super(ErrorPopupUtility, cls).__new__(cls)
|
77
|
+
cls._instance._initialized = False
|
78
|
+
return cls._instance
|
79
|
+
|
80
|
+
def __init__(self, parent=None):
|
81
|
+
if not self._initialized:
|
82
|
+
super().__init__(parent=parent)
|
83
|
+
self.error_occurred.connect(self.show_error_message)
|
84
|
+
self.enable_error_popup = False
|
85
|
+
self._initialized = True
|
86
|
+
sys.excepthook = self.custom_exception_hook
|
87
|
+
|
88
|
+
@Slot(str, str, QWidget)
|
89
|
+
def show_error_message(self, title, message, widget):
|
90
|
+
detailed_text = self.format_traceback(message)
|
91
|
+
error_message = self.parse_error_message(detailed_text)
|
92
|
+
|
93
|
+
msg = QMessageBox(widget)
|
94
|
+
msg.setIcon(QMessageBox.Critical)
|
95
|
+
msg.setWindowTitle(title)
|
96
|
+
msg.setText(error_message)
|
97
|
+
msg.setStandardButtons(QMessageBox.Ok)
|
98
|
+
msg.setDetailedText(detailed_text)
|
99
|
+
msg.setTextInteractionFlags(Qt.TextSelectableByMouse)
|
100
|
+
msg.setMinimumWidth(600)
|
101
|
+
msg.setMinimumHeight(400)
|
102
|
+
msg.exec_()
|
103
|
+
|
104
|
+
def format_traceback(self, traceback_message: str) -> str:
|
105
|
+
"""
|
106
|
+
Format the traceback message to be displayed in the error popup by adding indentation to each line.
|
107
|
+
|
108
|
+
Args:
|
109
|
+
traceback_message(str): The traceback message to be formatted.
|
110
|
+
|
111
|
+
Returns:
|
112
|
+
str: The formatted traceback message.
|
113
|
+
"""
|
114
|
+
formatted_lines = []
|
115
|
+
lines = traceback_message.split("\n")
|
116
|
+
for line in lines:
|
117
|
+
formatted_lines.append(" " + line) # Add indentation to each line
|
118
|
+
return "\n".join(formatted_lines)
|
119
|
+
|
120
|
+
def parse_error_message(self, traceback_message):
|
121
|
+
lines = traceback_message.split("\n")
|
122
|
+
error_message = "Error occurred. See details."
|
123
|
+
capture = False
|
124
|
+
captured_message = []
|
125
|
+
|
126
|
+
for line in lines:
|
127
|
+
if "raise" in line:
|
128
|
+
capture = True
|
129
|
+
continue
|
130
|
+
if capture:
|
131
|
+
if line.strip() and not line.startswith(" File "):
|
132
|
+
captured_message.append(line.strip())
|
133
|
+
else:
|
134
|
+
break
|
135
|
+
|
136
|
+
if captured_message:
|
137
|
+
error_message = " ".join(captured_message)
|
138
|
+
return error_message
|
139
|
+
|
140
|
+
def custom_exception_hook(self, exctype, value, tb, popup_error=False):
|
141
|
+
if popup_error or self.enable_error_popup:
|
142
|
+
error_message = traceback.format_exception(exctype, value, tb)
|
143
|
+
self.error_occurred.emit(
|
144
|
+
"Method error" if popup_error else "Application Error",
|
145
|
+
"".join(error_message),
|
146
|
+
self.parent(),
|
147
|
+
)
|
148
|
+
else:
|
149
|
+
sys.__excepthook__(exctype, value, tb) # Call the original excepthook
|
150
|
+
|
151
|
+
def enable_global_error_popups(self, state: bool):
|
152
|
+
"""
|
153
|
+
Enable or disable global error popups for all applications.
|
154
|
+
|
155
|
+
Args:
|
156
|
+
state(bool): True to enable error popups, False to disable error popups.
|
157
|
+
"""
|
158
|
+
self.enable_error_popup = bool(state)
|
159
|
+
|
160
|
+
@classmethod
|
161
|
+
def reset_singleton(cls):
|
162
|
+
"""
|
163
|
+
Reset the singleton instance.
|
164
|
+
"""
|
165
|
+
cls._instance = None
|
166
|
+
cls._initialized = False
|
167
|
+
|
168
|
+
|
169
|
+
class ExampleWidget(QWidget): # pragma: no cover
|
170
|
+
"""
|
171
|
+
Example widget to demonstrate error handling with the ErrorPopupUtility.
|
172
|
+
|
173
|
+
Warnings -> This example works properly only with PySide6, PyQt6 has a bug with the error handling.
|
174
|
+
"""
|
175
|
+
|
176
|
+
def __init__(self, parent=None):
|
177
|
+
super().__init__(parent=parent)
|
178
|
+
self.init_ui()
|
179
|
+
self.warning_utility = WarningPopupUtility(self)
|
180
|
+
|
181
|
+
def init_ui(self):
|
182
|
+
self.layout = QVBoxLayout(self)
|
183
|
+
|
184
|
+
# Button to trigger method with error handling
|
185
|
+
self.error_button = QPushButton("Trigger Handled Error", self)
|
186
|
+
self.error_button.clicked.connect(self.method_with_error_handling)
|
187
|
+
self.layout.addWidget(self.error_button)
|
188
|
+
|
189
|
+
# Button to trigger method without error handling
|
190
|
+
self.normal_button = QPushButton("Trigger Normal Error", self)
|
191
|
+
self.normal_button.clicked.connect(self.method_without_error_handling)
|
192
|
+
self.layout.addWidget(self.normal_button)
|
193
|
+
|
194
|
+
# Button to trigger warning popup
|
195
|
+
self.warning_button = QPushButton("Trigger Warning", self)
|
196
|
+
self.warning_button.clicked.connect(self.trigger_warning)
|
197
|
+
self.layout.addWidget(self.warning_button)
|
198
|
+
|
199
|
+
@SafeSlot(popup_error=True)
|
200
|
+
def method_with_error_handling(self):
|
201
|
+
"""This method raises an error and the exception is handled by the decorator."""
|
202
|
+
raise ValueError("This is a handled error.")
|
203
|
+
|
204
|
+
@SafeSlot()
|
205
|
+
def method_without_error_handling(self):
|
206
|
+
"""This method raises an error and the exception is not handled here."""
|
207
|
+
raise ValueError("This is an unhandled error.")
|
208
|
+
|
209
|
+
@SafeSlot()
|
210
|
+
def trigger_warning(self):
|
211
|
+
"""Trigger a warning using the WarningPopupUtility."""
|
212
|
+
self.warning_utility.show_warning(
|
213
|
+
title="Warning",
|
214
|
+
message="This is a warning message.",
|
215
|
+
detailed_text="This is the detailed text of the warning message.",
|
216
|
+
widget=self,
|
217
|
+
)
|
218
|
+
|
219
|
+
|
220
|
+
if __name__ == "__main__": # pragma: no cover
|
221
|
+
|
222
|
+
app = QApplication(sys.argv)
|
223
|
+
widget = ExampleWidget()
|
224
|
+
widget.show()
|
225
|
+
sys.exit(app.exec_())
|
@@ -11,9 +11,10 @@ from bec_lib.utils.import_utils import lazy_import_from
|
|
11
11
|
from pydantic import BaseModel, Field, field_validator
|
12
12
|
from qtpy.QtCore import QObject, QRunnable, QThreadPool, Signal
|
13
13
|
from qtpy.QtCore import Slot as pyqtSlot
|
14
|
+
from qtpy.QtWidgets import QApplication
|
14
15
|
|
15
16
|
from bec_widgets.cli.rpc_register import RPCRegister
|
16
|
-
from bec_widgets.
|
17
|
+
from bec_widgets.qt_utils.error_popups import ErrorPopupUtility
|
17
18
|
from bec_widgets.utils.yaml_dialog import load_yaml, load_yaml_gui, save_yaml, save_yaml_gui
|
18
19
|
|
19
20
|
BECDispatcher = lazy_import_from("bec_widgets.utils.bec_dispatcher", ("BECDispatcher",))
|
@@ -64,16 +65,30 @@ class Worker(QRunnable):
|
|
64
65
|
self.signals.completed.emit()
|
65
66
|
|
66
67
|
|
67
|
-
class BECConnector
|
68
|
-
"""Connection mixin class
|
68
|
+
class BECConnector:
|
69
|
+
"""Connection mixin class to handle BEC client and device manager"""
|
69
70
|
|
70
71
|
USER_ACCESS = ["_config_dict", "_get_all_rpc"]
|
72
|
+
EXIT_HANDLERS = {}
|
71
73
|
|
72
74
|
def __init__(self, client=None, config: ConnectionConfig = None, gui_id: str = None):
|
73
75
|
# BEC related connections
|
74
76
|
self.bec_dispatcher = BECDispatcher(client=client)
|
75
77
|
self.client = self.bec_dispatcher.client if client is None else client
|
76
78
|
|
79
|
+
if not self.client in BECConnector.EXIT_HANDLERS:
|
80
|
+
# register function to clean connections at exit;
|
81
|
+
# the function depends on BECClient, and BECDispatcher
|
82
|
+
@pyqtSlot()
|
83
|
+
def terminate(client=self.client, dispatcher=self.bec_dispatcher):
|
84
|
+
print("Disconnecting", repr(dispatcher))
|
85
|
+
dispatcher.disconnect_all()
|
86
|
+
print("Shutting down BEC Client", repr(client))
|
87
|
+
client.shutdown()
|
88
|
+
|
89
|
+
BECConnector.EXIT_HANDLERS[self.client] = terminate
|
90
|
+
QApplication.instance().aboutToQuit.connect(terminate)
|
91
|
+
|
77
92
|
if config:
|
78
93
|
self.config = config
|
79
94
|
self.config.widget_class = self.__class__.__name__
|
@@ -91,9 +106,14 @@ class BECConnector(BECWidget):
|
|
91
106
|
self.gui_id = self.config.gui_id
|
92
107
|
|
93
108
|
# register widget to rpc register
|
109
|
+
# be careful: when registering, and the object is not a BECWidget,
|
110
|
+
# cleanup has to called manually since there is no 'closeEvent'
|
94
111
|
self.rpc_register = RPCRegister()
|
95
112
|
self.rpc_register.add_rpc(self)
|
96
113
|
|
114
|
+
# Error popups
|
115
|
+
self.error_utility = ErrorPopupUtility()
|
116
|
+
|
97
117
|
self._thread_pool = QThreadPool.globalInstance()
|
98
118
|
|
99
119
|
def submit_task(self, fn, *args, on_complete: pyqtSlot = None, **kwargs) -> Worker:
|
@@ -280,18 +300,3 @@ class BECConnector(BECWidget):
|
|
280
300
|
return self.config.model_dump()
|
281
301
|
else:
|
282
302
|
return self.config
|
283
|
-
|
284
|
-
def cleanup(self):
|
285
|
-
"""Cleanup the widget."""
|
286
|
-
self.rpc_register.remove_rpc(self)
|
287
|
-
all_connections = self.rpc_register.list_all_connections()
|
288
|
-
if len(all_connections) == 0:
|
289
|
-
print("No more connections. Shutting down GUI BEC client.")
|
290
|
-
self.bec_dispatcher.disconnect_all()
|
291
|
-
self.client.shutdown()
|
292
|
-
if hasattr(super(), "cleanup"):
|
293
|
-
super().cleanup()
|
294
|
-
|
295
|
-
# def closeEvent(self, event):
|
296
|
-
# self.cleanup()
|
297
|
-
# super().closeEvent(event)
|
@@ -0,0 +1,23 @@
|
|
1
|
+
from qtpy.QtWidgets import QWidget
|
2
|
+
|
3
|
+
from bec_widgets.utils.bec_connector import BECConnector, ConnectionConfig
|
4
|
+
|
5
|
+
|
6
|
+
class BECWidget(BECConnector):
|
7
|
+
"""Mixin class for all BEC widgets, to handle cleanup"""
|
8
|
+
|
9
|
+
def __init__(self, client=None, config: ConnectionConfig = None, gui_id: str = None):
|
10
|
+
if not isinstance(self, QWidget):
|
11
|
+
raise RuntimeError(f"{repr(self)} is not a subclass of QWidget")
|
12
|
+
super().__init__(client, config, gui_id)
|
13
|
+
|
14
|
+
def cleanup(self):
|
15
|
+
"""Cleanup the widget."""
|
16
|
+
pass
|
17
|
+
|
18
|
+
def closeEvent(self, event):
|
19
|
+
self.rpc_register.remove_rpc(self)
|
20
|
+
try:
|
21
|
+
self.cleanup()
|
22
|
+
finally:
|
23
|
+
super().closeEvent(event)
|
{bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/widgets/base_classes/device_input_base.py
RENAMED
@@ -1,6 +1,7 @@
|
|
1
1
|
from __future__ import annotations
|
2
2
|
|
3
|
-
from bec_widgets.utils import
|
3
|
+
from bec_widgets.utils import ConnectionConfig
|
4
|
+
from bec_widgets.utils.bec_widget import BECWidget
|
4
5
|
|
5
6
|
|
6
7
|
class DeviceInputConfig(ConnectionConfig):
|
@@ -9,7 +10,7 @@ class DeviceInputConfig(ConnectionConfig):
|
|
9
10
|
arg_name: str | None = None
|
10
11
|
|
11
12
|
|
12
|
-
class DeviceInputBase(
|
13
|
+
class DeviceInputBase(BECWidget):
|
13
14
|
"""
|
14
15
|
Mixin class for device input widgets. This class provides methods to get the device list and device object based
|
15
16
|
on the current text of the widget.
|
@@ -120,6 +121,3 @@ class DeviceInputBase(BECConnector):
|
|
120
121
|
"""
|
121
122
|
if device not in self.get_device_list(self.config.device_filter):
|
122
123
|
raise ValueError(f"Device {device} is not valid.")
|
123
|
-
|
124
|
-
def cleanup(self):
|
125
|
-
super().cleanup()
|
@@ -2,10 +2,11 @@ from bec_lib.endpoints import MessageEndpoints
|
|
2
2
|
from qtpy.QtCore import Qt, Slot
|
3
3
|
from qtpy.QtWidgets import QHeaderView, QTableWidget, QTableWidgetItem, QWidget
|
4
4
|
|
5
|
-
from bec_widgets.utils.bec_connector import
|
5
|
+
from bec_widgets.utils.bec_connector import ConnectionConfig
|
6
|
+
from bec_widgets.utils.bec_widget import BECWidget
|
6
7
|
|
7
8
|
|
8
|
-
class BECQueue(
|
9
|
+
class BECQueue(BECWidget, QTableWidget):
|
9
10
|
"""
|
10
11
|
Widget to display the BEC queue.
|
11
12
|
"""
|
{bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/widgets/bec_status_box/bec_status_box.py
RENAMED
@@ -13,7 +13,7 @@ from bec_lib.utils.import_utils import lazy_import_from
|
|
13
13
|
from qtpy.QtCore import QObject, QTimer, Signal, Slot
|
14
14
|
from qtpy.QtWidgets import QHBoxLayout, QTreeWidget, QTreeWidgetItem, QWidget
|
15
15
|
|
16
|
-
from bec_widgets.utils.
|
16
|
+
from bec_widgets.utils.bec_widget import BECWidget
|
17
17
|
from bec_widgets.utils.colors import apply_theme
|
18
18
|
from bec_widgets.widgets.bec_status_box.status_item import StatusItem
|
19
19
|
|
@@ -57,7 +57,7 @@ class BECServiceStatusMixin(QObject):
|
|
57
57
|
self.services_update.emit(self.client._services_info, self.client._services_metric)
|
58
58
|
|
59
59
|
|
60
|
-
class BECStatusBox(
|
60
|
+
class BECStatusBox(BECWidget, QWidget):
|
61
61
|
"""An autonomous widget to display the status of BEC services.
|
62
62
|
|
63
63
|
Args:
|
@@ -290,15 +290,6 @@ class BECStatusBox(BECConnector, QWidget):
|
|
290
290
|
if objects["item"] == item:
|
291
291
|
objects["widget"].show_popup()
|
292
292
|
|
293
|
-
def closeEvent(self, event):
|
294
|
-
"""Upon closing the widget, clean up the BECStatusBox and the QWidget.
|
295
|
-
|
296
|
-
Args:
|
297
|
-
event: The close event.
|
298
|
-
"""
|
299
|
-
super().cleanup()
|
300
|
-
super().closeEvent(event)
|
301
|
-
|
302
293
|
|
303
294
|
def main():
|
304
295
|
"""Main method to run the BECStatusBox widget."""
|
@@ -8,11 +8,11 @@ from qtpy.QtGui import QDoubleValidator
|
|
8
8
|
from qtpy.QtWidgets import QDoubleSpinBox, QVBoxLayout, QWidget
|
9
9
|
|
10
10
|
from bec_widgets.utils import UILoader
|
11
|
-
from bec_widgets.utils.
|
11
|
+
from bec_widgets.utils.bec_widget import BECWidget
|
12
12
|
from bec_widgets.utils.colors import apply_theme
|
13
13
|
|
14
14
|
|
15
|
-
class DeviceBox(
|
15
|
+
class DeviceBox(BECWidget, QWidget):
|
16
16
|
device_changed = Signal(str, str)
|
17
17
|
|
18
18
|
def __init__(self, parent=None, device=None, *args, **kwargs):
|
{bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/widgets/device_combobox/device_combobox.py
RENAMED
@@ -2,6 +2,7 @@ from typing import TYPE_CHECKING
|
|
2
2
|
|
3
3
|
from qtpy.QtWidgets import QComboBox
|
4
4
|
|
5
|
+
from bec_widgets.utils.bec_widget import BECWidget
|
5
6
|
from bec_widgets.widgets.base_classes.device_input_base import DeviceInputBase, DeviceInputConfig
|
6
7
|
|
7
8
|
if TYPE_CHECKING:
|
@@ -82,11 +83,3 @@ class DeviceComboBox(DeviceInputBase, QComboBox):
|
|
82
83
|
if device_obj is None:
|
83
84
|
raise ValueError(f"Device {device_name} is not found.")
|
84
85
|
return device_obj
|
85
|
-
|
86
|
-
def cleanup(self):
|
87
|
-
"""Cleanup the widget."""
|
88
|
-
super().cleanup()
|
89
|
-
|
90
|
-
def closeEvent(self, event):
|
91
|
-
super().cleanup()
|
92
|
-
return QComboBox.closeEvent(self, event)
|
{bec_widgets-0.86.0 → bec_widgets-0.87.1}/bec_widgets/widgets/device_line_edit/device_line_edit.py
RENAMED
@@ -3,6 +3,7 @@ from typing import TYPE_CHECKING
|
|
3
3
|
from qtpy.QtCore import QSize
|
4
4
|
from qtpy.QtWidgets import QCompleter, QLineEdit, QSizePolicy
|
5
5
|
|
6
|
+
from bec_widgets.utils.bec_widget import BECWidget
|
6
7
|
from bec_widgets.widgets.base_classes.device_input_base import DeviceInputBase, DeviceInputConfig
|
7
8
|
|
8
9
|
if TYPE_CHECKING:
|
@@ -33,8 +34,8 @@ class DeviceLineEdit(DeviceInputBase, QLineEdit):
|
|
33
34
|
default: str | None = None,
|
34
35
|
arg_name: str | None = None,
|
35
36
|
):
|
37
|
+
super().__init__(client=client, config=config, gui_id=gui_id)
|
36
38
|
QLineEdit.__init__(self, parent=parent)
|
37
|
-
DeviceInputBase.__init__(self, client=client, config=config, gui_id=gui_id)
|
38
39
|
|
39
40
|
self.completer = QCompleter(self)
|
40
41
|
self.setCompleter(self.completer)
|
@@ -94,11 +95,3 @@ class DeviceLineEdit(DeviceInputBase, QLineEdit):
|
|
94
95
|
if device_obj is None:
|
95
96
|
raise ValueError(f"Device {device_name} is not found.")
|
96
97
|
return device_obj
|
97
|
-
|
98
|
-
def cleanup(self):
|
99
|
-
"""Cleanup the widget."""
|
100
|
-
super().cleanup()
|
101
|
-
|
102
|
-
def closeEvent(self, event):
|
103
|
-
super().cleanup()
|
104
|
-
return QLineEdit.closeEvent(self, event)
|
@@ -6,7 +6,8 @@ from pydantic import Field
|
|
6
6
|
from pyqtgraph.dockarea import Dock
|
7
7
|
|
8
8
|
from bec_widgets.cli.rpc_wigdet_handler import widget_handler
|
9
|
-
from bec_widgets.utils import
|
9
|
+
from bec_widgets.utils import ConnectionConfig, GridLayoutManager
|
10
|
+
from bec_widgets.utils.bec_widget import BECWidget
|
10
11
|
|
11
12
|
if TYPE_CHECKING:
|
12
13
|
from qtpy.QtWidgets import QWidget
|
@@ -24,7 +25,7 @@ class DockConfig(ConnectionConfig):
|
|
24
25
|
)
|
25
26
|
|
26
27
|
|
27
|
-
class BECDock(
|
28
|
+
class BECDock(BECWidget, Dock):
|
28
29
|
USER_ACCESS = [
|
29
30
|
"_config_dict",
|
30
31
|
"_rpc_id",
|
@@ -91,7 +92,7 @@ class BECDock(BECConnector, Dock):
|
|
91
92
|
super().float()
|
92
93
|
|
93
94
|
@property
|
94
|
-
def widget_list(self) -> list[
|
95
|
+
def widget_list(self) -> list[BECWidget]:
|
95
96
|
"""
|
96
97
|
Get the widgets in the dock.
|
97
98
|
|
@@ -101,7 +102,7 @@ class BECDock(BECConnector, Dock):
|
|
101
102
|
return self.widgets
|
102
103
|
|
103
104
|
@widget_list.setter
|
104
|
-
def widget_list(self, value: list[
|
105
|
+
def widget_list(self, value: list[BECWidget]):
|
105
106
|
self.widgets = value
|
106
107
|
|
107
108
|
def hide_title_bar(self):
|
@@ -153,13 +154,13 @@ class BECDock(BECConnector, Dock):
|
|
153
154
|
|
154
155
|
def add_widget(
|
155
156
|
self,
|
156
|
-
widget:
|
157
|
+
widget: BECWidget | str,
|
157
158
|
row=None,
|
158
159
|
col=0,
|
159
160
|
rowspan=1,
|
160
161
|
colspan=1,
|
161
162
|
shift: Literal["down", "up", "left", "right"] = "down",
|
162
|
-
) ->
|
163
|
+
) -> BECWidget:
|
163
164
|
"""
|
164
165
|
Add a widget to the dock.
|
165
166
|
|
@@ -238,6 +239,7 @@ class BECDock(BECConnector, Dock):
|
|
238
239
|
for widget in self.widgets:
|
239
240
|
if hasattr(widget, "cleanup"):
|
240
241
|
widget.cleanup()
|
242
|
+
self.widgets.clear()
|
241
243
|
super().cleanup()
|
242
244
|
|
243
245
|
def close(self):
|
@@ -9,7 +9,8 @@ from qtpy.QtCore import Qt
|
|
9
9
|
from qtpy.QtGui import QPainter, QPaintEvent
|
10
10
|
from qtpy.QtWidgets import QWidget
|
11
11
|
|
12
|
-
from bec_widgets.utils import
|
12
|
+
from bec_widgets.utils import ConnectionConfig, WidgetContainerUtils
|
13
|
+
from bec_widgets.utils.bec_widget import BECWidget
|
13
14
|
|
14
15
|
from .dock import BECDock, DockConfig
|
15
16
|
|
@@ -21,7 +22,7 @@ class DockAreaConfig(ConnectionConfig):
|
|
21
22
|
)
|
22
23
|
|
23
24
|
|
24
|
-
class BECDockArea(
|
25
|
+
class BECDockArea(BECWidget, DockArea):
|
25
26
|
USER_ACCESS = [
|
26
27
|
"_config_dict",
|
27
28
|
"panels",
|
@@ -227,6 +228,7 @@ class BECDockArea(BECConnector, DockArea):
|
|
227
228
|
self.attach_all()
|
228
229
|
for dock in dict(self.docks).values():
|
229
230
|
dock.remove()
|
231
|
+
self.docks.clear()
|
230
232
|
|
231
233
|
def cleanup(self):
|
232
234
|
"""
|