ms-components 0.5.3__tar.gz → 0.5.4__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.3 → ms_components-0.5.4}/PKG-INFO +2 -2
- {ms_components-0.5.3 → ms_components-0.5.4}/pyproject.toml +1 -1
- {ms_components-0.5.3 → ms_components-0.5.4}/src/ms_components/ms_executors.py +14 -2
- {ms_components-0.5.3 → ms_components-0.5.4}/src/ms_components/step_dialog.py +33 -2
- {ms_components-0.5.3 → ms_components-0.5.4}/src/ms_components.egg-info/PKG-INFO +2 -2
- {ms_components-0.5.3 → ms_components-0.5.4}/src/ms_components.egg-info/requires.txt +1 -1
- ms_components-0.5.4/src/ms_components.egg-info/scm_version.json +8 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/tests/test_executors_ui.py +37 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/tests/test_step_dialog.py +22 -0
- ms_components-0.5.3/src/ms_components.egg-info/scm_version.json +0 -8
- {ms_components-0.5.3 → ms_components-0.5.4}/.github/workflows/docs.yml +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/.github/workflows/publish.yml +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/.gitignore +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/LICENSE +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/MANIFEST.in +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/README.md +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/examples/tutorial_demo.py +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/examples/tutorial_demo.toml +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/licenses/qt-themes-LICENSE.txt +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/setup.cfg +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/src/ms_components/__init__.py +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/src/ms_components/backdrop.py +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/src/ms_components/base.qss +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/src/ms_components/chips.py +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/src/ms_components/ketcher.py +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/src/ms_components/listview.py +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/src/ms_components/ms_dockwidget/__init__.py +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/src/ms_components/ms_dockwidget/resources/__init__.py +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/src/ms_components/ms_dockwidget/resources/icons/__init__.py +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/src/ms_components/ms_dockwidget/resources/icons/folder.svg +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/src/ms_components/ms_dockwidget/widget.py +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/src/ms_components/ms_monitor/__init__.py +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/src/ms_components/ms_monitor/bridge.py +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/src/ms_components/ms_monitor/config.py +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/src/ms_components/ms_monitor/detail.py +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/src/ms_components/ms_monitor/formatting.py +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/src/ms_components/ms_monitor/jobs.py +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/src/ms_components/ms_monitor/models.py +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/src/ms_components/ms_monitor/palette.py +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/src/ms_components/ms_monitor/polling.py +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/src/ms_components/ms_monitor/resources.py +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/src/ms_components/ms_monitor/widget.py +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/src/ms_components/ms_projects/__init__.py +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/src/ms_components/ms_projects/app.py +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/src/ms_components/ms_projects/backend.py +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/src/ms_components/ms_projects/browser.py +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/src/ms_components/ms_projects/scratch.py +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/src/ms_components/ms_projects/widget.py +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/src/ms_components/ms_pymol/__init__.py +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/src/ms_components/ms_pymol/command_line.py +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/src/ms_components/ms_pymol/icons/actions.svg +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/src/ms_components/ms_pymol/icons/box.svg +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/src/ms_components/ms_pymol/icons/center.svg +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/src/ms_components/ms_pymol/icons/display.svg +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/src/ms_components/ms_pymol/icons/export.svg +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/src/ms_components/ms_pymol/icons/hide.svg +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/src/ms_components/ms_pymol/icons/hydrogens-polar.svg +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/src/ms_components/ms_pymol/icons/hydrogens.svg +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/src/ms_components/ms_pymol/icons/menu.svg +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/src/ms_components/ms_pymol/icons/orient.svg +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/src/ms_components/ms_pymol/icons/presets.svg +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/src/ms_components/ms_pymol/icons/rock.svg +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/src/ms_components/ms_pymol/icons/save.svg +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/src/ms_components/ms_pymol/icons/selection.svg +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/src/ms_components/ms_pymol/icons/settings.svg +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/src/ms_components/ms_pymol/icons/style.svg +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/src/ms_components/ms_pymol/icons/zoom.svg +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/src/ms_components/ms_pymol/plugins.py +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/src/ms_components/ms_pymol/scene.py +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/src/ms_components/ms_pymol/widget.py +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/src/ms_components/ms_settings/__init__.py +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/src/ms_components/ms_settings/panel.py +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/src/ms_components/ms_stepper.py +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/src/ms_components/ms_table/__init__.py +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/src/ms_components/ms_table/action_header.py +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/src/ms_components/ms_table/cell_delegate.py +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/src/ms_components/ms_table/column_panel.py +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/src/ms_components/ms_table/example_usage.py +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/src/ms_components/ms_table/filter_panel.py +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/src/ms_components/ms_table/icons/columns.svg +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/src/ms_components/ms_table/icons/export.svg +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/src/ms_components/ms_table/icons/filter.svg +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/src/ms_components/ms_table/icons/menu.svg +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/src/ms_components/ms_table/icons/reload.svg +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/src/ms_components/ms_table/icons/search.svg +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/src/ms_components/ms_table/icons/settings.svg +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/src/ms_components/ms_table/icons/sort-asc.svg +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/src/ms_components/ms_table/icons/sort-desc.svg +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/src/ms_components/ms_table/icons/sort.svg +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/src/ms_components/ms_table/metric_filter_bar.py +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/src/ms_components/ms_table/pagination_control.py +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/src/ms_components/ms_table/query_builder.py +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/src/ms_components/ms_table/session_provider.py +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/src/ms_components/ms_table/smart_table_view.py +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/src/ms_components/ms_table/sort_panel.py +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/src/ms_components/ms_table/table_config.py +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/src/ms_components/ms_table/table_interaction.py +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/src/ms_components/ms_table/table_model.py +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/src/ms_components/ms_table/test_external_filters.py +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/src/ms_components/ms_table/test_toolbar.py +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/src/ms_components/ms_tutorial/__init__.py +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/src/ms_components/ms_tutorial/bindings.py +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/src/ms_components/ms_tutorial/controller.py +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/src/ms_components/ms_tutorial/models.py +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/src/ms_components/ms_tutorial/overlay.py +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/src/ms_components/opengl.py +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/src/ms_components/pagination.py +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/src/ms_components/palettes.py +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/src/ms_components/theme.py +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/src/ms_components/tool_panel.py +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/src/ms_components/wheel.py +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/src/ms_components.egg-info/SOURCES.txt +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/src/ms_components.egg-info/dependency_links.txt +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/src/ms_components.egg-info/scm_file_list.json +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/src/ms_components.egg-info/top_level.txt +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/tests/conftest.py +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/tests/test_app_settings.py +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/tests/test_chips.py +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/tests/test_dock_window.py +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/tests/test_ketcher.py +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/tests/test_molsuite_monitor_bridge.py +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/tests/test_molsuite_monitor_widgets.py +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/tests/test_monitor_config.py +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/tests/test_ms_projects_widget.py +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/tests/test_opengl.py +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/tests/test_optional_integrations.py +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/tests/test_progress_column.py +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/tests/test_project_browser.py +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/tests/test_pymol_command_line.py +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/tests/test_pymol_grid.py +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/tests/test_pymol_scene.py +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/tests/test_pymol_toolbar.py +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/tests/test_query_builder_keyset.py +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/tests/test_shift_hscroll.py +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/tests/test_split_button_style.py +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/tests/test_table_interaction.py +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/tests/test_table_toolbar.py +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/tests/test_table_view_state.py +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/tests/test_theme_contrast.py +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/tests/test_tool_panel.py +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/tests/test_tutorial.py +0 -0
- {ms_components-0.5.3 → ms_components-0.5.4}/zensical.toml +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ms_components
|
|
3
|
-
Version: 0.5.
|
|
3
|
+
Version: 0.5.4
|
|
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
|
|
@@ -25,7 +25,7 @@ Requires-Dist: ms_flow>=0.7.1; extra == "projects"
|
|
|
25
25
|
Provides-Extra: pymol
|
|
26
26
|
Requires-Dist: pymol-open-source>=3.2.0a0; extra == "pymol"
|
|
27
27
|
Provides-Extra: steps
|
|
28
|
-
Requires-Dist: ms_env>=0.
|
|
28
|
+
Requires-Dist: ms_env>=0.4.0; extra == "steps"
|
|
29
29
|
Provides-Extra: table
|
|
30
30
|
Requires-Dist: sqlmodel>=0.0.14; extra == "table"
|
|
31
31
|
Provides-Extra: all
|
|
@@ -33,7 +33,7 @@ dependencies = [
|
|
|
33
33
|
monitor = ["pydantic>=2.0"]
|
|
34
34
|
projects = ["ms_flow>=0.7.1"]
|
|
35
35
|
pymol = ["pymol-open-source>=3.2.0a0"]
|
|
36
|
-
steps = ["ms_env>=0.
|
|
36
|
+
steps = ["ms_env>=0.4.0"]
|
|
37
37
|
table = ["sqlmodel>=0.0.14"]
|
|
38
38
|
all = ["ms_components[monitor,projects,pymol,steps,table]"]
|
|
39
39
|
# Test + development tooling.
|
|
@@ -371,8 +371,9 @@ class KeptPage(QWidget):
|
|
|
371
371
|
|
|
372
372
|
threading.Thread(target=work, name="host-check", daemon=True).start()
|
|
373
373
|
|
|
374
|
-
def _sync(self) -> None:
|
|
375
|
-
"""`Workspace.host_env` for the host as it is saved: what the app prepares there, made as it is here.
|
|
374
|
+
def _sync(self, *_, unlock=None) -> None:
|
|
375
|
+
"""`Workspace.host_env` for the host as it is saved: what the app prepares there, made as it is here.
|
|
376
|
+
`unlock` first removes the lock of an environment there that the user said was left behind."""
|
|
376
377
|
name = self.names.currentItem().text()
|
|
377
378
|
host = self._kept()[name]
|
|
378
379
|
if host.env:
|
|
@@ -388,9 +389,12 @@ class KeptPage(QWidget):
|
|
|
388
389
|
|
|
389
390
|
def work() -> None:
|
|
390
391
|
try:
|
|
392
|
+
if unlock is not None:
|
|
393
|
+
unlock()
|
|
391
394
|
self._workspace.host_env(host.address, None, lambda line: self._synced.emit(line, False))
|
|
392
395
|
said = f"\n{name} is ready."
|
|
393
396
|
except Exception as error: # noqa: BLE001 - said in the page, where it was asked for
|
|
397
|
+
self._sync_error = error
|
|
394
398
|
said = f"\nCould not prepare {name}:\n{error}"
|
|
395
399
|
self._synced.emit(said, True)
|
|
396
400
|
|
|
@@ -402,6 +406,14 @@ class KeptPage(QWidget):
|
|
|
402
406
|
self.sync_button.setEnabled(last)
|
|
403
407
|
if last:
|
|
404
408
|
self.steps.setVisible(False)
|
|
409
|
+
error, self._sync_error = getattr(self, "_sync_error", None), None
|
|
410
|
+
if error is None:
|
|
411
|
+
return
|
|
412
|
+
from ms_components.step_dialog import offer_unlock # ms_env is the `steps` extra; a sync has it
|
|
413
|
+
|
|
414
|
+
forced = offer_unlock(self, error)
|
|
415
|
+
if forced:
|
|
416
|
+
self._sync(unlock=forced)
|
|
405
417
|
|
|
406
418
|
def _show_report(self, text: str) -> None:
|
|
407
419
|
self.report.setPlainText(text)
|
|
@@ -18,6 +18,7 @@ from PySide6.QtWidgets import (
|
|
|
18
18
|
QDialogButtonBox,
|
|
19
19
|
QLabel,
|
|
20
20
|
QListWidget,
|
|
21
|
+
QMessageBox,
|
|
21
22
|
QPlainTextEdit,
|
|
22
23
|
QProgressBar,
|
|
23
24
|
QVBoxLayout,
|
|
@@ -142,9 +143,16 @@ class StepRunnerDialog(QDialog):
|
|
|
142
143
|
self._on_success()
|
|
143
144
|
self.finished_ok.emit(ok)
|
|
144
145
|
|
|
146
|
+
# The run is not left behind by Esc or the window's close either: a blocking caller would go
|
|
147
|
+
# on (and give up its locks) while the steps still change things.
|
|
148
|
+
def reject(self) -> None:
|
|
149
|
+
if not self._worker.isRunning():
|
|
150
|
+
super().reject()
|
|
151
|
+
|
|
145
152
|
def closeEvent(self, event) -> None: # noqa: N802 - Qt naming
|
|
146
153
|
if self._worker.isRunning():
|
|
147
|
-
|
|
154
|
+
event.ignore()
|
|
155
|
+
return
|
|
148
156
|
super().closeEvent(event)
|
|
149
157
|
|
|
150
158
|
|
|
@@ -168,4 +176,27 @@ def run_steps_dialog(
|
|
|
168
176
|
return dialog
|
|
169
177
|
|
|
170
178
|
|
|
171
|
-
|
|
179
|
+
def offer_unlock(parent: QWidget, error: BaseException | None) -> Callable[[], dict] | None:
|
|
180
|
+
"""When `error` is, or was raised from, an `ms_env.Locked`, ask whether to remove that lock.
|
|
181
|
+
Returns what removes it, to be run off the GUI thread (it may go over ssh) before trying
|
|
182
|
+
again; nothing when the error is another or the user said no."""
|
|
183
|
+
from ms_env import Locked, unlock
|
|
184
|
+
|
|
185
|
+
while error is not None and not isinstance(error, Locked):
|
|
186
|
+
error = error.__cause__ or error.__context__
|
|
187
|
+
if error is None:
|
|
188
|
+
return None
|
|
189
|
+
owner, where = error.owner, error.host.address or "this machine"
|
|
190
|
+
asked = QMessageBox.question(
|
|
191
|
+
parent, "Environment locked",
|
|
192
|
+
f"{error.prefix} on {where} is being changed by {owner.get('client', 'an unknown client')} "
|
|
193
|
+
f"(pid {owner.get('pid', '?')}) since {owner.get('since', '?')}.\n\n"
|
|
194
|
+
"Remove the lock only if that client has stopped: two clients changing one environment break it.\n\n"
|
|
195
|
+
"Remove the lock and try again?",
|
|
196
|
+
QMessageBox.StandardButton.Yes | QMessageBox.StandardButton.No, QMessageBox.StandardButton.No)
|
|
197
|
+
if asked != QMessageBox.StandardButton.Yes:
|
|
198
|
+
return None
|
|
199
|
+
return lambda: unlock(error.prefix, error.host)
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
__all__ = ["StepRunnerDialog", "StepWorker", "offer_unlock", "run_steps_dialog"]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ms_components
|
|
3
|
-
Version: 0.5.
|
|
3
|
+
Version: 0.5.4
|
|
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
|
|
@@ -25,7 +25,7 @@ Requires-Dist: ms_flow>=0.7.1; extra == "projects"
|
|
|
25
25
|
Provides-Extra: pymol
|
|
26
26
|
Requires-Dist: pymol-open-source>=3.2.0a0; extra == "pymol"
|
|
27
27
|
Provides-Extra: steps
|
|
28
|
-
Requires-Dist: ms_env>=0.
|
|
28
|
+
Requires-Dist: ms_env>=0.4.0; extra == "steps"
|
|
29
29
|
Provides-Extra: table
|
|
30
30
|
Requires-Dist: sqlmodel>=0.0.14; extra == "table"
|
|
31
31
|
Provides-Extra: all
|
|
@@ -182,3 +182,40 @@ def test_the_bar_says_what_is_done_for_how_long_and_waits_with_nothing_to_count(
|
|
|
182
182
|
steps.take("[0/0] starting lab")
|
|
183
183
|
assert steps.label.text() == "starting lab · 1:15"
|
|
184
184
|
assert steps.take("[2/2] pc2: ready") and steps.full() and steps.label.text() == "pc2: ready · 0:00"
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
def test_a_sync_stopped_by_a_lock_left_behind_unlocks_it_when_told_and_tries_again(tmp_path, monkeypatch):
|
|
188
|
+
import json
|
|
189
|
+
|
|
190
|
+
from ms_env import prefix_lock
|
|
191
|
+
from ms_flow.api import Workspace
|
|
192
|
+
from PySide6.QtWidgets import QMessageBox
|
|
193
|
+
|
|
194
|
+
app = QApplication.instance() or QApplication([])
|
|
195
|
+
monkeypatch.setenv("MOLSUITE_HOME", str(tmp_path / "home"))
|
|
196
|
+
prefix, lock = str(tmp_path / "env"), tmp_path / "env.ms-env-lock"
|
|
197
|
+
lock.mkdir()
|
|
198
|
+
(lock / "owner.json").write_text(json.dumps({"client": "elsewhere", "pid": 7, "since": "today"}))
|
|
199
|
+
asked = []
|
|
200
|
+
monkeypatch.setattr(QMessageBox, "question", lambda _parent, _title, text, *_: (
|
|
201
|
+
asked.append(text), QMessageBox.StandardButton.Yes)[1])
|
|
202
|
+
ms = Workspace(app_id="ui")
|
|
203
|
+
|
|
204
|
+
def prepare(address, busy, on_line):
|
|
205
|
+
try:
|
|
206
|
+
with prefix_lock(prefix):
|
|
207
|
+
return "/far/env"
|
|
208
|
+
except Exception as error:
|
|
209
|
+
raise RuntimeError("could not install") from error # as the app wraps it
|
|
210
|
+
|
|
211
|
+
ms.host_env = prepare
|
|
212
|
+
try:
|
|
213
|
+
ms.save_host("laptop", address="192.168.1.2")
|
|
214
|
+
hosts = KeptPage(ms, "hosts")
|
|
215
|
+
hosts.reload(select="laptop")
|
|
216
|
+
hosts.sync_button.click()
|
|
217
|
+
assert _until(lambda: "ready" in hosts.report.toPlainText())
|
|
218
|
+
assert len(asked) == 1 and "elsewhere" in asked[0] and not lock.exists()
|
|
219
|
+
finally:
|
|
220
|
+
ms.shutdown()
|
|
221
|
+
app.processEvents()
|
|
@@ -39,3 +39,25 @@ def test_a_failed_step_is_marked_and_opens_the_output():
|
|
|
39
39
|
|
|
40
40
|
assert rows == ["✗ Download", "○ Verify"]
|
|
41
41
|
assert dialog._log.isVisible() and "no network" in dialog._log.toPlainText()
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
def test_neither_esc_nor_the_window_close_leave_a_run_that_still_goes_on():
|
|
45
|
+
import threading
|
|
46
|
+
|
|
47
|
+
app = QApplication.instance() or QApplication([]) # noqa: F841
|
|
48
|
+
release = threading.Event()
|
|
49
|
+
dialog = StepRunnerDialog("Install", [Step("download", call=lambda: release.wait(10) and "fetched")])
|
|
50
|
+
dialog.show()
|
|
51
|
+
dialog.start()
|
|
52
|
+
dialog.reject()
|
|
53
|
+
dialog.close()
|
|
54
|
+
assert dialog.isVisible()
|
|
55
|
+
|
|
56
|
+
loop = QEventLoop()
|
|
57
|
+
dialog.finished_ok.connect(loop.quit)
|
|
58
|
+
QTimer.singleShot(10000, loop.quit)
|
|
59
|
+
release.set()
|
|
60
|
+
loop.exec()
|
|
61
|
+
dialog._worker.wait(2000)
|
|
62
|
+
dialog.reject()
|
|
63
|
+
assert not dialog.isVisible()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ms_components-0.5.3 → ms_components-0.5.4}/src/ms_components/ms_dockwidget/resources/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ms_components-0.5.3 → ms_components-0.5.4}/src/ms_components/ms_pymol/icons/hydrogens-polar.svg
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ms_components-0.5.3 → ms_components-0.5.4}/src/ms_components/ms_table/pagination_control.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ms_components-0.5.3 → ms_components-0.5.4}/src/ms_components/ms_table/test_external_filters.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|