ms-components 0.5.7__tar.gz → 0.6.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.
- {ms_components-0.5.7 → ms_components-0.6.0}/PKG-INFO +3 -1
- ms_components-0.6.0/licenses/lucide-LICENSE.txt +18 -0
- {ms_components-0.5.7 → ms_components-0.6.0}/pyproject.toml +2 -2
- {ms_components-0.5.7 → ms_components-0.6.0}/src/ms_components/base.qss +3 -3
- {ms_components-0.5.7 → ms_components-0.6.0}/src/ms_components/chips.py +11 -1
- {ms_components-0.5.7 → ms_components-0.6.0}/src/ms_components/ms_dockwidget/widget.py +20 -1
- {ms_components-0.5.7 → ms_components-0.6.0}/src/ms_components/ms_monitor/detail.py +36 -17
- ms_components-0.6.0/src/ms_components/ms_monitor/icons/cpu.svg +1 -0
- ms_components-0.6.0/src/ms_components/ms_monitor/icons/gpu.svg +1 -0
- ms_components-0.6.0/src/ms_components/ms_monitor/icons/memory.svg +1 -0
- {ms_components-0.5.7 → ms_components-0.6.0}/src/ms_components/ms_monitor/jobs.py +8 -0
- {ms_components-0.5.7 → ms_components-0.6.0}/src/ms_components/ms_monitor/models.py +6 -0
- {ms_components-0.5.7 → ms_components-0.6.0}/src/ms_components/ms_monitor/polling.py +1 -0
- {ms_components-0.5.7 → ms_components-0.6.0}/src/ms_components/ms_monitor/resources.py +206 -31
- {ms_components-0.5.7 → ms_components-0.6.0}/src/ms_components/ms_projects/browser.py +36 -16
- {ms_components-0.5.7 → ms_components-0.6.0}/src/ms_components/ms_projects/widget.py +19 -3
- {ms_components-0.5.7 → ms_components-0.6.0}/src/ms_components/ms_pymol/widget.py +7 -5
- {ms_components-0.5.7 → ms_components-0.6.0}/src/ms_components/ms_table/action_header.py +2 -2
- {ms_components-0.5.7 → ms_components-0.6.0}/src/ms_components/ms_table/pagination_control.py +1 -1
- {ms_components-0.5.7 → ms_components-0.6.0}/src/ms_components/ms_table/smart_table_view.py +2 -2
- {ms_components-0.5.7 → ms_components-0.6.0}/src/ms_components/ms_table/table_config.py +5 -0
- {ms_components-0.5.7 → ms_components-0.6.0}/src/ms_components/ms_table/table_model.py +5 -0
- {ms_components-0.5.7 → ms_components-0.6.0}/src/ms_components.egg-info/PKG-INFO +3 -1
- {ms_components-0.5.7 → ms_components-0.6.0}/src/ms_components.egg-info/SOURCES.txt +4 -0
- {ms_components-0.5.7 → ms_components-0.6.0}/src/ms_components.egg-info/scm_file_list.json +4 -0
- ms_components-0.6.0/src/ms_components.egg-info/scm_version.json +8 -0
- ms_components-0.6.0/tests/test_chips.py +81 -0
- {ms_components-0.5.7 → ms_components-0.6.0}/tests/test_dock_window.py +30 -0
- {ms_components-0.5.7 → ms_components-0.6.0}/tests/test_molsuite_monitor_widgets.py +64 -6
- {ms_components-0.5.7 → ms_components-0.6.0}/tests/test_ms_projects_widget.py +40 -1
- ms_components-0.5.7/src/ms_components.egg-info/scm_version.json +0 -8
- ms_components-0.5.7/tests/test_chips.py +0 -16
- {ms_components-0.5.7 → ms_components-0.6.0}/.github/workflows/docs.yml +0 -0
- {ms_components-0.5.7 → ms_components-0.6.0}/.github/workflows/publish.yml +0 -0
- {ms_components-0.5.7 → ms_components-0.6.0}/.gitignore +0 -0
- {ms_components-0.5.7 → ms_components-0.6.0}/LICENSE +0 -0
- {ms_components-0.5.7 → ms_components-0.6.0}/MANIFEST.in +0 -0
- {ms_components-0.5.7 → ms_components-0.6.0}/README.md +0 -0
- {ms_components-0.5.7 → ms_components-0.6.0}/examples/tutorial_demo.py +0 -0
- {ms_components-0.5.7 → ms_components-0.6.0}/examples/tutorial_demo.toml +0 -0
- {ms_components-0.5.7 → ms_components-0.6.0}/licenses/qt-themes-LICENSE.txt +0 -0
- {ms_components-0.5.7 → ms_components-0.6.0}/setup.cfg +0 -0
- {ms_components-0.5.7 → ms_components-0.6.0}/src/ms_components/__init__.py +0 -0
- {ms_components-0.5.7 → ms_components-0.6.0}/src/ms_components/backdrop.py +0 -0
- {ms_components-0.5.7 → ms_components-0.6.0}/src/ms_components/ketcher.py +0 -0
- {ms_components-0.5.7 → ms_components-0.6.0}/src/ms_components/labels.py +0 -0
- {ms_components-0.5.7 → ms_components-0.6.0}/src/ms_components/listview.py +0 -0
- {ms_components-0.5.7 → ms_components-0.6.0}/src/ms_components/ms_dockwidget/__init__.py +0 -0
- {ms_components-0.5.7 → ms_components-0.6.0}/src/ms_components/ms_dockwidget/resources/__init__.py +0 -0
- {ms_components-0.5.7 → ms_components-0.6.0}/src/ms_components/ms_dockwidget/resources/icons/__init__.py +0 -0
- {ms_components-0.5.7 → ms_components-0.6.0}/src/ms_components/ms_dockwidget/resources/icons/folder.svg +0 -0
- {ms_components-0.5.7 → ms_components-0.6.0}/src/ms_components/ms_executors.py +0 -0
- {ms_components-0.5.7 → ms_components-0.6.0}/src/ms_components/ms_monitor/__init__.py +0 -0
- {ms_components-0.5.7 → ms_components-0.6.0}/src/ms_components/ms_monitor/bridge.py +0 -0
- {ms_components-0.5.7 → ms_components-0.6.0}/src/ms_components/ms_monitor/config.py +0 -0
- {ms_components-0.5.7 → ms_components-0.6.0}/src/ms_components/ms_monitor/formatting.py +0 -0
- {ms_components-0.5.7 → ms_components-0.6.0}/src/ms_components/ms_monitor/palette.py +0 -0
- {ms_components-0.5.7 → ms_components-0.6.0}/src/ms_components/ms_monitor/widget.py +0 -0
- {ms_components-0.5.7 → ms_components-0.6.0}/src/ms_components/ms_projects/__init__.py +0 -0
- {ms_components-0.5.7 → ms_components-0.6.0}/src/ms_components/ms_projects/app.py +0 -0
- {ms_components-0.5.7 → ms_components-0.6.0}/src/ms_components/ms_projects/backend.py +0 -0
- {ms_components-0.5.7 → ms_components-0.6.0}/src/ms_components/ms_projects/scratch.py +0 -0
- {ms_components-0.5.7 → ms_components-0.6.0}/src/ms_components/ms_pymol/__init__.py +0 -0
- {ms_components-0.5.7 → ms_components-0.6.0}/src/ms_components/ms_pymol/command_line.py +0 -0
- {ms_components-0.5.7 → ms_components-0.6.0}/src/ms_components/ms_pymol/icons/actions.svg +0 -0
- {ms_components-0.5.7 → ms_components-0.6.0}/src/ms_components/ms_pymol/icons/box.svg +0 -0
- {ms_components-0.5.7 → ms_components-0.6.0}/src/ms_components/ms_pymol/icons/center.svg +0 -0
- {ms_components-0.5.7 → ms_components-0.6.0}/src/ms_components/ms_pymol/icons/display.svg +0 -0
- {ms_components-0.5.7 → ms_components-0.6.0}/src/ms_components/ms_pymol/icons/export.svg +0 -0
- {ms_components-0.5.7 → ms_components-0.6.0}/src/ms_components/ms_pymol/icons/hide.svg +0 -0
- {ms_components-0.5.7 → ms_components-0.6.0}/src/ms_components/ms_pymol/icons/hydrogens-polar.svg +0 -0
- {ms_components-0.5.7 → ms_components-0.6.0}/src/ms_components/ms_pymol/icons/hydrogens.svg +0 -0
- {ms_components-0.5.7 → ms_components-0.6.0}/src/ms_components/ms_pymol/icons/menu.svg +0 -0
- {ms_components-0.5.7 → ms_components-0.6.0}/src/ms_components/ms_pymol/icons/orient.svg +0 -0
- {ms_components-0.5.7 → ms_components-0.6.0}/src/ms_components/ms_pymol/icons/presets.svg +0 -0
- {ms_components-0.5.7 → ms_components-0.6.0}/src/ms_components/ms_pymol/icons/rock.svg +0 -0
- {ms_components-0.5.7 → ms_components-0.6.0}/src/ms_components/ms_pymol/icons/save.svg +0 -0
- {ms_components-0.5.7 → ms_components-0.6.0}/src/ms_components/ms_pymol/icons/selection.svg +0 -0
- {ms_components-0.5.7 → ms_components-0.6.0}/src/ms_components/ms_pymol/icons/settings.svg +0 -0
- {ms_components-0.5.7 → ms_components-0.6.0}/src/ms_components/ms_pymol/icons/style.svg +0 -0
- {ms_components-0.5.7 → ms_components-0.6.0}/src/ms_components/ms_pymol/icons/zoom.svg +0 -0
- {ms_components-0.5.7 → ms_components-0.6.0}/src/ms_components/ms_pymol/plugins.py +0 -0
- {ms_components-0.5.7 → ms_components-0.6.0}/src/ms_components/ms_pymol/scene.py +0 -0
- {ms_components-0.5.7 → ms_components-0.6.0}/src/ms_components/ms_settings/__init__.py +0 -0
- {ms_components-0.5.7 → ms_components-0.6.0}/src/ms_components/ms_settings/panel.py +0 -0
- {ms_components-0.5.7 → ms_components-0.6.0}/src/ms_components/ms_stepper.py +0 -0
- {ms_components-0.5.7 → ms_components-0.6.0}/src/ms_components/ms_table/__init__.py +0 -0
- {ms_components-0.5.7 → ms_components-0.6.0}/src/ms_components/ms_table/cell_delegate.py +0 -0
- {ms_components-0.5.7 → ms_components-0.6.0}/src/ms_components/ms_table/column_panel.py +0 -0
- {ms_components-0.5.7 → ms_components-0.6.0}/src/ms_components/ms_table/example_usage.py +0 -0
- {ms_components-0.5.7 → ms_components-0.6.0}/src/ms_components/ms_table/filter_panel.py +0 -0
- {ms_components-0.5.7 → ms_components-0.6.0}/src/ms_components/ms_table/icons/columns.svg +0 -0
- {ms_components-0.5.7 → ms_components-0.6.0}/src/ms_components/ms_table/icons/export.svg +0 -0
- {ms_components-0.5.7 → ms_components-0.6.0}/src/ms_components/ms_table/icons/filter.svg +0 -0
- {ms_components-0.5.7 → ms_components-0.6.0}/src/ms_components/ms_table/icons/menu.svg +0 -0
- {ms_components-0.5.7 → ms_components-0.6.0}/src/ms_components/ms_table/icons/reload.svg +0 -0
- {ms_components-0.5.7 → ms_components-0.6.0}/src/ms_components/ms_table/icons/search.svg +0 -0
- {ms_components-0.5.7 → ms_components-0.6.0}/src/ms_components/ms_table/icons/settings.svg +0 -0
- {ms_components-0.5.7 → ms_components-0.6.0}/src/ms_components/ms_table/icons/sort-asc.svg +0 -0
- {ms_components-0.5.7 → ms_components-0.6.0}/src/ms_components/ms_table/icons/sort-desc.svg +0 -0
- {ms_components-0.5.7 → ms_components-0.6.0}/src/ms_components/ms_table/icons/sort.svg +0 -0
- {ms_components-0.5.7 → ms_components-0.6.0}/src/ms_components/ms_table/metric_filter_bar.py +0 -0
- {ms_components-0.5.7 → ms_components-0.6.0}/src/ms_components/ms_table/query_builder.py +0 -0
- {ms_components-0.5.7 → ms_components-0.6.0}/src/ms_components/ms_table/session_provider.py +0 -0
- {ms_components-0.5.7 → ms_components-0.6.0}/src/ms_components/ms_table/sort_panel.py +0 -0
- {ms_components-0.5.7 → ms_components-0.6.0}/src/ms_components/ms_table/table_interaction.py +0 -0
- {ms_components-0.5.7 → ms_components-0.6.0}/src/ms_components/ms_table/test_external_filters.py +0 -0
- {ms_components-0.5.7 → ms_components-0.6.0}/src/ms_components/ms_table/test_toolbar.py +0 -0
- {ms_components-0.5.7 → ms_components-0.6.0}/src/ms_components/ms_tutorial/__init__.py +0 -0
- {ms_components-0.5.7 → ms_components-0.6.0}/src/ms_components/ms_tutorial/bindings.py +0 -0
- {ms_components-0.5.7 → ms_components-0.6.0}/src/ms_components/ms_tutorial/controller.py +0 -0
- {ms_components-0.5.7 → ms_components-0.6.0}/src/ms_components/ms_tutorial/models.py +0 -0
- {ms_components-0.5.7 → ms_components-0.6.0}/src/ms_components/ms_tutorial/overlay.py +0 -0
- {ms_components-0.5.7 → ms_components-0.6.0}/src/ms_components/opengl.py +0 -0
- {ms_components-0.5.7 → ms_components-0.6.0}/src/ms_components/pagination.py +0 -0
- {ms_components-0.5.7 → ms_components-0.6.0}/src/ms_components/palettes.py +0 -0
- {ms_components-0.5.7 → ms_components-0.6.0}/src/ms_components/step_dialog.py +0 -0
- {ms_components-0.5.7 → ms_components-0.6.0}/src/ms_components/theme.py +0 -0
- {ms_components-0.5.7 → ms_components-0.6.0}/src/ms_components/tool_panel.py +0 -0
- {ms_components-0.5.7 → ms_components-0.6.0}/src/ms_components/wheel.py +0 -0
- {ms_components-0.5.7 → ms_components-0.6.0}/src/ms_components.egg-info/dependency_links.txt +0 -0
- {ms_components-0.5.7 → ms_components-0.6.0}/src/ms_components.egg-info/requires.txt +0 -0
- {ms_components-0.5.7 → ms_components-0.6.0}/src/ms_components.egg-info/top_level.txt +0 -0
- {ms_components-0.5.7 → ms_components-0.6.0}/tests/conftest.py +0 -0
- {ms_components-0.5.7 → ms_components-0.6.0}/tests/test_app_settings.py +0 -0
- {ms_components-0.5.7 → ms_components-0.6.0}/tests/test_executors_ui.py +0 -0
- {ms_components-0.5.7 → ms_components-0.6.0}/tests/test_ketcher.py +0 -0
- {ms_components-0.5.7 → ms_components-0.6.0}/tests/test_molsuite_monitor_bridge.py +0 -0
- {ms_components-0.5.7 → ms_components-0.6.0}/tests/test_monitor_config.py +0 -0
- {ms_components-0.5.7 → ms_components-0.6.0}/tests/test_opengl.py +0 -0
- {ms_components-0.5.7 → ms_components-0.6.0}/tests/test_optional_integrations.py +0 -0
- {ms_components-0.5.7 → ms_components-0.6.0}/tests/test_progress_column.py +0 -0
- {ms_components-0.5.7 → ms_components-0.6.0}/tests/test_project_browser.py +0 -0
- {ms_components-0.5.7 → ms_components-0.6.0}/tests/test_pymol_command_line.py +0 -0
- {ms_components-0.5.7 → ms_components-0.6.0}/tests/test_pymol_grid.py +0 -0
- {ms_components-0.5.7 → ms_components-0.6.0}/tests/test_pymol_scene.py +0 -0
- {ms_components-0.5.7 → ms_components-0.6.0}/tests/test_pymol_toolbar.py +0 -0
- {ms_components-0.5.7 → ms_components-0.6.0}/tests/test_query_builder_keyset.py +0 -0
- {ms_components-0.5.7 → ms_components-0.6.0}/tests/test_shift_hscroll.py +0 -0
- {ms_components-0.5.7 → ms_components-0.6.0}/tests/test_split_button_style.py +0 -0
- {ms_components-0.5.7 → ms_components-0.6.0}/tests/test_step_dialog.py +0 -0
- {ms_components-0.5.7 → ms_components-0.6.0}/tests/test_table_autofill_lifecycle.py +0 -0
- {ms_components-0.5.7 → ms_components-0.6.0}/tests/test_table_interaction.py +0 -0
- {ms_components-0.5.7 → ms_components-0.6.0}/tests/test_table_toolbar.py +0 -0
- {ms_components-0.5.7 → ms_components-0.6.0}/tests/test_table_view_state.py +0 -0
- {ms_components-0.5.7 → ms_components-0.6.0}/tests/test_theme_contrast.py +0 -0
- {ms_components-0.5.7 → ms_components-0.6.0}/tests/test_theme_menu.py +0 -0
- {ms_components-0.5.7 → ms_components-0.6.0}/tests/test_tool_panel.py +0 -0
- {ms_components-0.5.7 → ms_components-0.6.0}/tests/test_tutorial.py +0 -0
- {ms_components-0.5.7 → ms_components-0.6.0}/zensical.toml +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ms_components
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.6.0
|
|
4
4
|
Summary: PySide6 UI components for MolSuite: smart table, project browser, job monitor, PyMOL dock, steppers.
|
|
5
5
|
Author: Mario S. Valdés-Tresanco, Mario E. Valdés-Tresanco
|
|
6
6
|
License-Expression: MIT
|
|
@@ -17,6 +17,8 @@ Classifier: Environment :: X11 Applications :: Qt
|
|
|
17
17
|
Requires-Python: >=3.12
|
|
18
18
|
Description-Content-Type: text/markdown
|
|
19
19
|
License-File: LICENSE
|
|
20
|
+
License-File: licenses/lucide-LICENSE.txt
|
|
21
|
+
License-File: licenses/qt-themes-LICENSE.txt
|
|
20
22
|
Requires-Dist: PySide6>=6.5
|
|
21
23
|
Provides-Extra: monitor
|
|
22
24
|
Requires-Dist: pydantic>=2.0; extra == "monitor"
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
The CPU, memory and GPU icons in src/ms_components/ms_monitor/icons/ come from Lucide
|
|
2
|
+
(https://lucide.dev), distributed under the ISC License:
|
|
3
|
+
|
|
4
|
+
ISC License
|
|
5
|
+
|
|
6
|
+
Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2022 as part of Feather (MIT).
|
|
7
|
+
All other copyright (c) for Lucide are held by Lucide Contributors 2022.
|
|
8
|
+
|
|
9
|
+
Permission to use, copy, modify, and/or distribute this software for any purpose with or
|
|
10
|
+
without fee is hereby granted, provided that the above copyright notice and this permission
|
|
11
|
+
notice appear in all copies.
|
|
12
|
+
|
|
13
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
|
|
14
|
+
SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
|
|
15
|
+
AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
16
|
+
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
|
|
17
|
+
NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
|
|
18
|
+
OF THIS SOFTWARE.
|
|
@@ -9,7 +9,7 @@ description = "PySide6 UI components for MolSuite: smart table, project browser,
|
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.12"
|
|
11
11
|
license = "MIT"
|
|
12
|
-
license-files = ["LICENSE"]
|
|
12
|
+
license-files = ["LICENSE", "licenses/*"]
|
|
13
13
|
authors = [
|
|
14
14
|
{ name = "Mario S. Valdés-Tresanco" },
|
|
15
15
|
{ name = "Mario E. Valdés-Tresanco" },
|
|
@@ -52,7 +52,7 @@ Issues = "https://github.com/MolSuite/ms_components/issues"
|
|
|
52
52
|
package-dir = { "" = "src" }
|
|
53
53
|
|
|
54
54
|
[tool.setuptools.package-data]
|
|
55
|
-
ms_components = ["*.qss", "ms_table/icons/*.svg", "ms_pymol/icons/*.svg", "ms_dockwidget/resources/icons/*"]
|
|
55
|
+
ms_components = ["*.qss", "ms_table/icons/*.svg", "ms_pymol/icons/*.svg", "ms_monitor/icons/*.svg", "ms_dockwidget/resources/icons/*"]
|
|
56
56
|
|
|
57
57
|
[tool.setuptools.packages.find]
|
|
58
58
|
where = ["src"]
|
|
@@ -295,9 +295,9 @@ QLabel#PymolSceneContext {
|
|
|
295
295
|
color: palette(placeholder-text);
|
|
296
296
|
}
|
|
297
297
|
|
|
298
|
-
/*
|
|
299
|
-
SVG
|
|
300
|
-
|
|
298
|
+
/* Overflow (extension) button of the embedded toolbars. Components give it a
|
|
299
|
+
hamburger SVG and open its menu when the cursor enters. The rule comes last
|
|
300
|
+
to win over the specificity of each toolbar's own rules. */
|
|
301
301
|
QToolButton#qt_toolbar_ext_button,
|
|
302
302
|
#SmartTableToolbar QToolButton#qt_toolbar_ext_button,
|
|
303
303
|
#PymolControlBar QToolButton#qt_toolbar_ext_button {
|
|
@@ -122,13 +122,20 @@ class ChipsSelect(QWidget):
|
|
|
122
122
|
if editable:
|
|
123
123
|
self._combo.setEditable(True)
|
|
124
124
|
self._combo.setInsertPolicy(QComboBox.InsertPolicy.NoInsert)
|
|
125
|
-
self._combo.lineEdit().setPlaceholderText("
|
|
125
|
+
self._combo.lineEdit().setPlaceholderText("+ Add")
|
|
126
|
+
self._combo.lineEdit().setAlignment(Qt.AlignmentFlag.AlignCenter)
|
|
126
127
|
self._combo.lineEdit().returnPressed.connect(self._on_typed)
|
|
127
128
|
self._combo.currentIndexChanged.connect(self._on_add)
|
|
128
129
|
layout.addWidget(self._combo, 0, Qt.AlignmentFlag.AlignTop)
|
|
129
130
|
self._options: list[str] = []
|
|
130
131
|
self._selected: list[str] = []
|
|
131
132
|
self._last_height = 0
|
|
133
|
+
# Enter in the typed field means "add this chip". QLineEdit emits returnPressed and then
|
|
134
|
+
# *ignores* the key, which hands it up the parent chain to a dialog that clicks its
|
|
135
|
+
# default button - an import submitted mid-edit. The key passes through the combo on its
|
|
136
|
+
# way up, so the combo is where it stops.
|
|
137
|
+
if editable:
|
|
138
|
+
self._combo.installEventFilter(self)
|
|
132
139
|
|
|
133
140
|
def sizeHint(self) -> QSize:
|
|
134
141
|
# The table sizes rows from the cell widget's sizeHint, so report the wrapped height.
|
|
@@ -228,6 +235,9 @@ class ChipsSelect(QWidget):
|
|
|
228
235
|
# --- Drag a chip onto another to reorder ------------------------------------------
|
|
229
236
|
def eventFilter(self, chip, event) -> bool:
|
|
230
237
|
kind = event.type()
|
|
238
|
+
if chip is self._combo:
|
|
239
|
+
# Only ever installed on an editable combo: see __init__.
|
|
240
|
+
return kind == QEvent.Type.KeyPress and event.key() in (Qt.Key.Key_Return, Qt.Key.Key_Enter)
|
|
231
241
|
if kind == QEvent.Type.MouseButtonPress and event.button() == Qt.MouseButton.LeftButton:
|
|
232
242
|
self._press = event.position().toPoint()
|
|
233
243
|
elif kind == QEvent.Type.MouseMove and self._press is not None:
|
|
@@ -3,7 +3,7 @@ from dataclasses import dataclass
|
|
|
3
3
|
from enum import Enum, auto
|
|
4
4
|
from typing import Dict, List, Optional
|
|
5
5
|
|
|
6
|
-
from PySide6.QtCore import Qt, QSize, QMimeData, QPoint, QByteArray, QObject, QEvent, QTimer, QtMsgType, \
|
|
6
|
+
from PySide6.QtCore import Qt, QSize, QMimeData, QPoint, QRect, QByteArray, QObject, QEvent, QTimer, QtMsgType, \
|
|
7
7
|
qInstallMessageHandler
|
|
8
8
|
from PySide6.QtGui import QAction, QDrag, QIcon
|
|
9
9
|
from PySide6.QtWidgets import (QDockWidget, QFrame, QMainWindow, QMenu, QSizePolicy, QToolBar, QToolButton, QVBoxLayout,
|
|
@@ -795,6 +795,7 @@ class DockManager:
|
|
|
795
795
|
# the region it came from. This lets users keep (for example) PyMOL on a
|
|
796
796
|
# second monitor while opening another tool in the original side panel.
|
|
797
797
|
self._windowed: set[str] = set()
|
|
798
|
+
self._window_geometry: dict[str, QRect] = {} # where each window was when docked back
|
|
798
799
|
|
|
799
800
|
# ── FIX P2: single flag that blocks ALL reactive handlers ──
|
|
800
801
|
# While True, _on_dock_visibility_changed and
|
|
@@ -991,9 +992,25 @@ class DockManager:
|
|
|
991
992
|
self._windowed.add(dock_id)
|
|
992
993
|
self._remove_region_visible(entry.region, dock_id)
|
|
993
994
|
self._make_native_window(dock_id)
|
|
995
|
+
dock.setGeometry(self._window_geometry.get(dock_id) or self._default_window_geometry(dock))
|
|
994
996
|
QTimer.singleShot(0, dock.activateWindow)
|
|
995
997
|
self.sync_buttons()
|
|
996
998
|
|
|
999
|
+
WINDOW_SCREEN_FRACTION = (0.6, 0.7) # width, height of the available screen
|
|
1000
|
+
|
|
1001
|
+
def _default_window_geometry(self, dock: QWidget) -> QRect:
|
|
1002
|
+
"""A first-time window: a good share of the main window's screen, centred on it, and
|
|
1003
|
+
never narrower than its contents ask for (a toolbar with every action showing). The
|
|
1004
|
+
docked size is a strip of the main window, too small to work in on its own."""
|
|
1005
|
+
screen = (self.mw.screen() or QApplication.primaryScreen()).availableGeometry()
|
|
1006
|
+
fw, fh = self.WINDOW_SCREEN_FRACTION
|
|
1007
|
+
wanted = max(dock.width(), int(screen.width() * fw), dock.sizeHint().width())
|
|
1008
|
+
width = min(screen.width(), wanted)
|
|
1009
|
+
height = min(screen.height(), max(dock.height(), int(screen.height() * fh)))
|
|
1010
|
+
rect = QRect(0, 0, width, height)
|
|
1011
|
+
rect.moveCenter(screen.center())
|
|
1012
|
+
return rect
|
|
1013
|
+
|
|
997
1014
|
def _make_native_window(self, dock_id: str) -> None:
|
|
998
1015
|
"""Detach directly, clearing any prior QDockWidget utility-window mode."""
|
|
999
1016
|
dock = self.docks.get(dock_id)
|
|
@@ -1038,6 +1055,8 @@ class DockManager:
|
|
|
1038
1055
|
if dock is None:
|
|
1039
1056
|
return
|
|
1040
1057
|
entry = self.entries[dock_id]
|
|
1058
|
+
if dock_id in self._windowed and dock.isWindow():
|
|
1059
|
+
self._window_geometry[dock_id] = dock.geometry() # reopens where the user left it
|
|
1041
1060
|
self._updating = True
|
|
1042
1061
|
try:
|
|
1043
1062
|
self._windowed.discard(dock_id)
|
|
@@ -406,6 +406,7 @@ class JobDetail(QWidget):
|
|
|
406
406
|
side_box.addWidget(self._tabs)
|
|
407
407
|
|
|
408
408
|
self._tasks = QTreeWidget(side)
|
|
409
|
+
self._task_rows: list[tuple] = [] # what each row shows now, so a snapshot touches only what changed
|
|
409
410
|
self._tasks.setHeaderLabels(["Input", "Host", "Attempt", "Elapsed", "Progress"])
|
|
410
411
|
self._tasks.setRootIsDecorated(False)
|
|
411
412
|
self._tasks.setUniformRowHeights(True)
|
|
@@ -466,6 +467,7 @@ class JobDetail(QWidget):
|
|
|
466
467
|
self._bar.parts, self._trend.values = (0, 0, 0, 0), []
|
|
467
468
|
self._show_grid(None)
|
|
468
469
|
self._tasks.clear()
|
|
470
|
+
self._task_rows = []
|
|
469
471
|
self._tabs.setTabText(self._tabs.indexOf(self._tasks), "Running")
|
|
470
472
|
self._tab_meta.setText("")
|
|
471
473
|
self.set_failures([], 0)
|
|
@@ -496,7 +498,11 @@ class JobDetail(QWidget):
|
|
|
496
498
|
self._left.set(format_duration(left), f"≈ {_clock(left)} · 5-min rate", hue)
|
|
497
499
|
pct = 100.0 * job.chunks_settled / total if total else job.progress
|
|
498
500
|
accent = _pal().color(QPalette.ColorRole.Highlight).name()
|
|
499
|
-
|
|
501
|
+
# What the chunks hold, in the application's unit, under the chunks every job has.
|
|
502
|
+
held = (f"{job.items_done:,}" + (f" / {job.items_total:,}" if job.items_total else "") + f" {job.items_unit}"
|
|
503
|
+
if job.items_unit else "")
|
|
504
|
+
self._progress.set(f"{job.chunks_done:,} / {total:,}" if total else f"{job.chunks_done:,}", held, accent,
|
|
505
|
+
unit="chunks" if job.items_unit else "")
|
|
500
506
|
self._pct.setText(f"{pct:.1f}%" if pct < 10 else f"{pct:.0f}%")
|
|
501
507
|
self._pct.setStyleSheet(f"color:{accent}; font-weight:650; font-size:12px;")
|
|
502
508
|
colors = _colors()
|
|
@@ -510,9 +516,9 @@ class JobDetail(QWidget):
|
|
|
510
516
|
if job.items_unit:
|
|
511
517
|
# Chunks lead: they are what every job has. What they hold is the line under it, in
|
|
512
518
|
# the application's unit (tasks and CPUs are in the header already).
|
|
513
|
-
items = format_speed(job.items_eps)
|
|
514
|
-
|
|
515
|
-
sub =
|
|
519
|
+
items = format_speed(job.items_eps)
|
|
520
|
+
items = items.replace("/", f" {job.items_unit}/") if "/" in items else f"{items} {job.items_unit}/min"
|
|
521
|
+
sub = items + (" · mean" if job.is_terminal else "")
|
|
516
522
|
else:
|
|
517
523
|
cpu = f" · {job.cpu_used:,} CPUs" if job.cpu_used else ""
|
|
518
524
|
sub = f"{job.tasks_running:,} tasks{cpu}" if not job.is_terminal else "mean over the run"
|
|
@@ -611,22 +617,35 @@ class JobDetail(QWidget):
|
|
|
611
617
|
seconds=max(0.0, datetime.now().timestamp() - since))]
|
|
612
618
|
median = statistics.median(task.seconds for task in tasks) if len(tasks) >= 3 else None
|
|
613
619
|
warn = QColor(P["warn"])
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
self._tasks.addTopLevelItem(QTreeWidgetItem())
|
|
618
|
-
slow = 0
|
|
619
|
-
for at, task in enumerate(tasks):
|
|
620
|
-
item = self._tasks.topLevelItem(at)
|
|
620
|
+
plain = self._tasks.palette().color(QPalette.ColorRole.Text)
|
|
621
|
+
rows, slow = [], 0
|
|
622
|
+
for task in tasks:
|
|
621
623
|
what = task.input + (f" +{task.chunks - 1}" if task.chunks > 1 else "")
|
|
622
|
-
for column, text in enumerate((what, task.host or "", str(task.attempt), format_duration(task.seconds),
|
|
623
|
-
"—" if task.progress is None else f"{task.progress:.0f}%")):
|
|
624
|
-
item.setText(column, text)
|
|
625
624
|
late = median is not None and median > 0 and task.seconds > SLOW * median
|
|
626
625
|
slow += late
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
626
|
+
rows.append(((what, task.host or "", str(task.attempt), format_duration(task.seconds),
|
|
627
|
+
"—" if task.progress is None else f"{task.progress:.0f}%"),
|
|
628
|
+
warn if late else plain,
|
|
629
|
+
f"slow: {task.seconds / median:.1f}× the median" if late else task.input))
|
|
630
|
+
# Every Qt call from Python waits for the GIL, which the engine's threads keep busy on a
|
|
631
|
+
# big machine: rewrite only the cells that changed (mostly just the elapsed time).
|
|
632
|
+
while self._tasks.topLevelItemCount() > len(rows):
|
|
633
|
+
self._tasks.takeTopLevelItem(self._tasks.topLevelItemCount() - 1)
|
|
634
|
+
while self._tasks.topLevelItemCount() < len(rows):
|
|
635
|
+
self._tasks.addTopLevelItem(QTreeWidgetItem())
|
|
636
|
+
before = self._task_rows
|
|
637
|
+
for at, (texts, color, tip) in enumerate(rows):
|
|
638
|
+
item = self._tasks.topLevelItem(at)
|
|
639
|
+
old_texts, old_color, old_tip = before[at] if at < len(before) else ((None,) * 5, None, None)
|
|
640
|
+
for column, (text, old_text) in enumerate(zip(texts, old_texts)):
|
|
641
|
+
if text != old_text:
|
|
642
|
+
item.setText(column, text)
|
|
643
|
+
if color != old_color:
|
|
644
|
+
for column in range(5):
|
|
645
|
+
item.setForeground(column, color)
|
|
646
|
+
if tip != old_tip:
|
|
647
|
+
item.setToolTip(0, tip)
|
|
648
|
+
self._task_rows = rows
|
|
630
649
|
self._tabs.setTabText(self._tabs.indexOf(self._tasks), f"Running {len(tasks)}" if tasks else "Running")
|
|
631
650
|
said = [f"{len(tasks)} running"] if tasks else []
|
|
632
651
|
if median is not None:
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect width="16" height="16" x="4" y="4" rx="2"/><rect width="6" height="6" x="9" y="9" rx="1"/><path d="M15 2v2"/><path d="M15 20v2"/><path d="M2 15h2"/><path d="M2 9h2"/><path d="M20 15h2"/><path d="M20 9h2"/><path d="M9 2v2"/><path d="M9 20v2"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M2 21V3"/><path d="M2 5h18a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H2.26"/><path d="M7 17v3a1 1 0 0 0 1 1h5a1 1 0 0 0 1-1v-3"/><circle cx="16" cy="11" r="2"/><circle cx="8" cy="11" r="2"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M6 19v-3"/><path d="M10 19v-3"/><path d="M14 19v-3"/><path d="M18 19v-3"/><path d="M8 11V9"/><path d="M16 11V9"/><path d="M12 11V9"/><path d="M2 15h20"/><path d="M2 7a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v1.1a2 2 0 0 0 0 3.837V17a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-5.1a2 2 0 0 0 0-3.837Z"/></svg>
|
|
@@ -30,6 +30,9 @@ def status_color(status: str, default: str | None = None) -> str:
|
|
|
30
30
|
|
|
31
31
|
def counts_label(job: JobMonitorState) -> str:
|
|
32
32
|
"""`done/total · time left`, or `· took` once it ended."""
|
|
33
|
+
if job.nothing_to_do:
|
|
34
|
+
took = (job.finished_at - job.started_at).total_seconds() if job.finished_at and job.started_at else None
|
|
35
|
+
return "0 chunks" + ("" if took is None else f" · took {format_duration(took)}")
|
|
33
36
|
total = f"{job.chunks_total:,}" if job.chunks_total else "?"
|
|
34
37
|
left = job.seconds_left
|
|
35
38
|
if job.is_terminal:
|
|
@@ -37,6 +40,9 @@ def counts_label(job: JobMonitorState) -> str:
|
|
|
37
40
|
tail = "" if took is None else f" · took {format_duration(took)}"
|
|
38
41
|
else:
|
|
39
42
|
tail = f" · {job.note or 'calculating…'}" if left is None else f" · {format_duration(left)} left"
|
|
43
|
+
if job.items_unit: # what the chunks hold, in the application's unit
|
|
44
|
+
held = f"{job.items_total:,}" if job.items_total else "?"
|
|
45
|
+
return f"{job.items_done:,}/{held} {job.items_unit}{tail}"
|
|
40
46
|
return f"{job.chunks_done:,}/{total}{tail}"
|
|
41
47
|
|
|
42
48
|
|
|
@@ -47,6 +53,8 @@ def badge_of(job) -> tuple[str, str]:
|
|
|
47
53
|
return "WAITING FOR HOST", P["warn"]
|
|
48
54
|
if job.canceling and not job.is_terminal:
|
|
49
55
|
return "CANCELING", P["warn"]
|
|
56
|
+
if job.nothing_to_do: # not a success with no work: there was nothing to run
|
|
57
|
+
return "NOTHING TO DO", P["text_muted"]
|
|
50
58
|
return job.status.replace("_", " ").upper(), status_color(job.status)
|
|
51
59
|
|
|
52
60
|
|
|
@@ -48,6 +48,7 @@ class JobMonitorState:
|
|
|
48
48
|
chunks_running: int = 0 # taken and not settled: running, carried in a task, or being written
|
|
49
49
|
tasks_running: int = 0 # what runs now, one worker each; <= chunks_running
|
|
50
50
|
cpu_used: int = 0 # the CPU tokens those tasks hold
|
|
51
|
+
asked: dict = field(default_factory=dict) # what it asked of a queue: nodes, cpus, memory_gb, gpus (each node)
|
|
51
52
|
unreachable: str = "" # what its other machine has not answered since, while it does not
|
|
52
53
|
note: str = "" # what its source says it is at, while it runs (a campaign: in the queue, how far there)
|
|
53
54
|
canceling: bool = False # canceled, waiting for its other machine to stop it there
|
|
@@ -84,6 +85,11 @@ class JobMonitorState:
|
|
|
84
85
|
def is_terminal(self) -> bool:
|
|
85
86
|
return self.status in TERMINAL_JOB_STATUSES
|
|
86
87
|
|
|
88
|
+
@property
|
|
89
|
+
def nothing_to_do(self) -> bool:
|
|
90
|
+
"""It completed without a chunk to run (its source had no work: everything was skipped)."""
|
|
91
|
+
return self.status == "completed" and not (self.chunks_total or self.chunks_settled)
|
|
92
|
+
|
|
87
93
|
|
|
88
94
|
@dataclass(slots=True)
|
|
89
95
|
class JobDetailState:
|
|
@@ -31,6 +31,7 @@ def job_state(job, now: float) -> JobMonitorState:
|
|
|
31
31
|
# ms_flow < 0.7 does not tell them apart: every chunk in flight reads as running.
|
|
32
32
|
tasks_running=getattr(job, "tasks_running", job.chunks_inflight),
|
|
33
33
|
cpu_used=getattr(job, "cpu_used", 0),
|
|
34
|
+
asked=getattr(job, "asked", None) or {}, # an older ms_flow does not say
|
|
34
35
|
unreachable=getattr(job, "unreachable", None) or "",
|
|
35
36
|
note=getattr(job, "note", None) or "", # an older ms_flow does not say
|
|
36
37
|
canceling=getattr(job, "canceling", False),
|