ms-components 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (113) hide show
  1. ms_components-0.1.0/.github/workflows/docs.yml +58 -0
  2. ms_components-0.1.0/.github/workflows/publish.yml +31 -0
  3. ms_components-0.1.0/.gitignore +245 -0
  4. ms_components-0.1.0/LICENSE +21 -0
  5. ms_components-0.1.0/PKG-INFO +47 -0
  6. ms_components-0.1.0/README.md +21 -0
  7. ms_components-0.1.0/docs/api_reference.md +40 -0
  8. ms_components-0.1.0/docs/examples.md +137 -0
  9. ms_components-0.1.0/docs/index.md +60 -0
  10. ms_components-0.1.0/docs/usage.md +170 -0
  11. ms_components-0.1.0/pyproject.toml +57 -0
  12. ms_components-0.1.0/setup.cfg +4 -0
  13. ms_components-0.1.0/src/ms_components/__init__.py +0 -0
  14. ms_components-0.1.0/src/ms_components/base.qss +252 -0
  15. ms_components-0.1.0/src/ms_components/listview.py +1287 -0
  16. ms_components-0.1.0/src/ms_components/ms_dockwidget/__init__.py +0 -0
  17. ms_components-0.1.0/src/ms_components/ms_dockwidget/resources/__init__.py +1 -0
  18. ms_components-0.1.0/src/ms_components/ms_dockwidget/resources/icons/__init__.py +10 -0
  19. ms_components-0.1.0/src/ms_components/ms_dockwidget/resources/icons/folder.svg +5 -0
  20. ms_components-0.1.0/src/ms_components/ms_dockwidget/widget.py +1975 -0
  21. ms_components-0.1.0/src/ms_components/ms_monitor/__init__.py +43 -0
  22. ms_components-0.1.0/src/ms_components/ms_monitor/bridge.py +400 -0
  23. ms_components-0.1.0/src/ms_components/ms_monitor/cards.py +75 -0
  24. ms_components-0.1.0/src/ms_components/ms_monitor/chunk_panel.py +85 -0
  25. ms_components-0.1.0/src/ms_components/ms_monitor/config.py +20 -0
  26. ms_components-0.1.0/src/ms_components/ms_monitor/events_panel.py +178 -0
  27. ms_components-0.1.0/src/ms_components/ms_monitor/executor_panel.py +149 -0
  28. ms_components-0.1.0/src/ms_components/ms_monitor/executors_tab.py +355 -0
  29. ms_components-0.1.0/src/ms_components/ms_monitor/formatting.py +51 -0
  30. ms_components-0.1.0/src/ms_components/ms_monitor/job_cards.py +536 -0
  31. ms_components-0.1.0/src/ms_components/ms_monitor/job_filter_proxy.py +48 -0
  32. ms_components-0.1.0/src/ms_components/ms_monitor/job_tree_model.py +106 -0
  33. ms_components-0.1.0/src/ms_components/ms_monitor/models.py +165 -0
  34. ms_components-0.1.0/src/ms_components/ms_monitor/palette.py +41 -0
  35. ms_components-0.1.0/src/ms_components/ms_monitor/polling.py +498 -0
  36. ms_components-0.1.0/src/ms_components/ms_monitor/widget.py +401 -0
  37. ms_components-0.1.0/src/ms_components/ms_projects/__init__.py +4 -0
  38. ms_components-0.1.0/src/ms_components/ms_projects/app.py +18 -0
  39. ms_components-0.1.0/src/ms_components/ms_projects/browser.py +2132 -0
  40. ms_components-0.1.0/src/ms_components/ms_projects/scratch.py +772 -0
  41. ms_components-0.1.0/src/ms_components/ms_projects/widget.py +284 -0
  42. ms_components-0.1.0/src/ms_components/ms_pymol/__init__.py +13 -0
  43. ms_components-0.1.0/src/ms_components/ms_pymol/icons/actions.svg +1 -0
  44. ms_components-0.1.0/src/ms_components/ms_pymol/icons/box.svg +1 -0
  45. ms_components-0.1.0/src/ms_components/ms_pymol/icons/center.svg +1 -0
  46. ms_components-0.1.0/src/ms_components/ms_pymol/icons/display.svg +4 -0
  47. ms_components-0.1.0/src/ms_components/ms_pymol/icons/hide.svg +1 -0
  48. ms_components-0.1.0/src/ms_components/ms_pymol/icons/menu.svg +5 -0
  49. ms_components-0.1.0/src/ms_components/ms_pymol/icons/orient.svg +11 -0
  50. ms_components-0.1.0/src/ms_components/ms_pymol/icons/presets.svg +7 -0
  51. ms_components-0.1.0/src/ms_components/ms_pymol/icons/rock.svg +6 -0
  52. ms_components-0.1.0/src/ms_components/ms_pymol/icons/selection.svg +11 -0
  53. ms_components-0.1.0/src/ms_components/ms_pymol/icons/settings.svg +4 -0
  54. ms_components-0.1.0/src/ms_components/ms_pymol/icons/zoom.svg +6 -0
  55. ms_components-0.1.0/src/ms_components/ms_pymol/plugins.py +158 -0
  56. ms_components-0.1.0/src/ms_components/ms_pymol/widget.py +700 -0
  57. ms_components-0.1.0/src/ms_components/ms_settings/__init__.py +3 -0
  58. ms_components-0.1.0/src/ms_components/ms_settings/panel.py +899 -0
  59. ms_components-0.1.0/src/ms_components/ms_settings/workers_editor.py +335 -0
  60. ms_components-0.1.0/src/ms_components/ms_stepper.py +1106 -0
  61. ms_components-0.1.0/src/ms_components/ms_table/__init__.py +67 -0
  62. ms_components-0.1.0/src/ms_components/ms_table/action_header.py +502 -0
  63. ms_components-0.1.0/src/ms_components/ms_table/cell_delegate.py +278 -0
  64. ms_components-0.1.0/src/ms_components/ms_table/column_panel.py +120 -0
  65. ms_components-0.1.0/src/ms_components/ms_table/example_usage.py +376 -0
  66. ms_components-0.1.0/src/ms_components/ms_table/filter_panel.py +326 -0
  67. ms_components-0.1.0/src/ms_components/ms_table/icons/columns.svg +5 -0
  68. ms_components-0.1.0/src/ms_components/ms_table/icons/export.svg +6 -0
  69. ms_components-0.1.0/src/ms_components/ms_table/icons/filter.svg +1 -0
  70. ms_components-0.1.0/src/ms_components/ms_table/icons/menu.svg +5 -0
  71. ms_components-0.1.0/src/ms_components/ms_table/icons/reload.svg +4 -0
  72. ms_components-0.1.0/src/ms_components/ms_table/icons/search.svg +1 -0
  73. ms_components-0.1.0/src/ms_components/ms_table/icons/settings.svg +4 -0
  74. ms_components-0.1.0/src/ms_components/ms_table/icons/sort-asc.svg +1 -0
  75. ms_components-0.1.0/src/ms_components/ms_table/icons/sort-desc.svg +1 -0
  76. ms_components-0.1.0/src/ms_components/ms_table/icons/sort.svg +1 -0
  77. ms_components-0.1.0/src/ms_components/ms_table/metric_filter_bar.py +232 -0
  78. ms_components-0.1.0/src/ms_components/ms_table/pagination_control.py +178 -0
  79. ms_components-0.1.0/src/ms_components/ms_table/query_builder.py +545 -0
  80. ms_components-0.1.0/src/ms_components/ms_table/session_provider.py +11 -0
  81. ms_components-0.1.0/src/ms_components/ms_table/smart_table_view.py +1378 -0
  82. ms_components-0.1.0/src/ms_components/ms_table/sort_panel.py +171 -0
  83. ms_components-0.1.0/src/ms_components/ms_table/table_config.py +394 -0
  84. ms_components-0.1.0/src/ms_components/ms_table/table_model.py +329 -0
  85. ms_components-0.1.0/src/ms_components/ms_table/test_external_filters.py +66 -0
  86. ms_components-0.1.0/src/ms_components/ms_table/test_toolbar.py +130 -0
  87. ms_components-0.1.0/src/ms_components/pagination.py +221 -0
  88. ms_components-0.1.0/src/ms_components/step_dialog.py +135 -0
  89. ms_components-0.1.0/src/ms_components/theme.py +346 -0
  90. ms_components-0.1.0/src/ms_components/tool_panel.py +480 -0
  91. ms_components-0.1.0/src/ms_components/wheel.py +66 -0
  92. ms_components-0.1.0/src/ms_components.egg-info/PKG-INFO +47 -0
  93. ms_components-0.1.0/src/ms_components.egg-info/SOURCES.txt +111 -0
  94. ms_components-0.1.0/src/ms_components.egg-info/dependency_links.txt +1 -0
  95. ms_components-0.1.0/src/ms_components.egg-info/requires.txt +7 -0
  96. ms_components-0.1.0/src/ms_components.egg-info/scm_file_list.json +108 -0
  97. ms_components-0.1.0/src/ms_components.egg-info/scm_version.json +8 -0
  98. ms_components-0.1.0/src/ms_components.egg-info/top_level.txt +1 -0
  99. ms_components-0.1.0/tests/test_app_settings.py +188 -0
  100. ms_components-0.1.0/tests/test_dock_window.py +162 -0
  101. ms_components-0.1.0/tests/test_molsuite_monitor_bridge.py +599 -0
  102. ms_components-0.1.0/tests/test_molsuite_monitor_widgets.py +119 -0
  103. ms_components-0.1.0/tests/test_monitor_config.py +21 -0
  104. ms_components-0.1.0/tests/test_ms_projects_widget.py +169 -0
  105. ms_components-0.1.0/tests/test_project_browser.py +372 -0
  106. ms_components-0.1.0/tests/test_pymol_toolbar.py +215 -0
  107. ms_components-0.1.0/tests/test_query_builder_keyset.py +143 -0
  108. ms_components-0.1.0/tests/test_shift_hscroll.py +43 -0
  109. ms_components-0.1.0/tests/test_table_toolbar.py +122 -0
  110. ms_components-0.1.0/tests/test_table_view_state.py +49 -0
  111. ms_components-0.1.0/tests/test_theme_contrast.py +31 -0
  112. ms_components-0.1.0/tests/test_workers_editor.py +106 -0
  113. ms_components-0.1.0/zensical.toml +77 -0
@@ -0,0 +1,58 @@
1
+ name: Documentation
2
+ on:
3
+ push:
4
+ branches:
5
+ - main
6
+ tags:
7
+ - "v*"
8
+ workflow_dispatch:
9
+
10
+ concurrency:
11
+ group: documentation
12
+ cancel-in-progress: false
13
+
14
+ permissions:
15
+ contents: write
16
+ pages: write
17
+ id-token: write
18
+
19
+ jobs:
20
+ deploy:
21
+ environment:
22
+ name: github-pages
23
+ url: ${{ steps.deployment.outputs.page_url }}
24
+ runs-on: ubuntu-latest
25
+ steps:
26
+ - uses: actions/checkout@v6
27
+ with:
28
+ fetch-depth: 0
29
+ - uses: actions/configure-pages@v6
30
+ - uses: actions/setup-python@v6
31
+ with:
32
+ python-version: 3.x
33
+ - run: pip install zensical "mkdocstrings[python]" "mike @ git+https://github.com/squidfunk/mike.git"
34
+ - name: Configure Git author
35
+ run: |
36
+ git config user.name "github-actions[bot]"
37
+ git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
38
+ - name: Deploy development documentation
39
+ if: github.ref == 'refs/heads/main'
40
+ run: |
41
+ mike deploy --push dev
42
+ if ! mike list latest >/dev/null 2>&1; then
43
+ mike set-default --push dev
44
+ fi
45
+ - name: Deploy release documentation
46
+ if: startsWith(github.ref, 'refs/tags/v')
47
+ run: |
48
+ mike deploy --push --update-aliases --alias-type redirect "$GITHUB_REF_NAME" latest
49
+ mike set-default --push latest
50
+ - name: Export versioned site
51
+ run: |
52
+ mkdir -p site
53
+ git archive gh-pages | tar -x -C site
54
+ - uses: actions/upload-pages-artifact@v5
55
+ with:
56
+ path: site
57
+ - uses: actions/deploy-pages@v5
58
+ id: deployment
@@ -0,0 +1,31 @@
1
+ # Publish to PyPI on a GitHub release.
2
+ #
3
+ # No secrets: the job authenticates to PyPI over OIDC (Trusted Publishing).
4
+ # It has to be enabled on the PyPI side *before* the first upload -- for a
5
+ # project that does not exist yet, that is a "pending publisher" under
6
+ # Your projects > Publishing, and it must name this repo, `publish.yml`
7
+ # and the `pypi` environment below.
8
+ name: publish
9
+
10
+ on:
11
+ release:
12
+ types: [published]
13
+
14
+ jobs:
15
+ pypi:
16
+ runs-on: ubuntu-latest
17
+ environment: pypi
18
+ permissions:
19
+ # A permissions block sets every scope it does not name to none, so
20
+ # checkout needs contents spelled out or it cannot read a private repo.
21
+ contents: read
22
+ id-token: write # mint the OIDC token PyPI checks; no secret involved
23
+ steps:
24
+ - uses: actions/checkout@v7
25
+ with:
26
+ fetch-depth: 0 # setuptools-scm reads the version off the tag
27
+ - uses: actions/setup-python@v7
28
+ with:
29
+ python-version: "3.12"
30
+ - run: pipx run build
31
+ - uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,245 @@
1
+ ### JetBrains template
2
+ # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
3
+ # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
4
+
5
+ # User-specific stuff
6
+ .idea/**/workspace.xml
7
+ .idea/**/tasks.xml
8
+ .idea/**/usage.statistics.xml
9
+ .idea/**/dictionaries
10
+ .idea/**/shelf
11
+
12
+ # AWS User-specific
13
+ .idea/**/aws.xml
14
+
15
+ # Generated files
16
+ .idea/**/contentModel.xml
17
+
18
+ # Sensitive or high-churn files
19
+ .idea/**/dataSources/
20
+ .idea/**/dataSources.ids
21
+ .idea/**/dataSources.local.xml
22
+ .idea/**/sqlDataSources.xml
23
+ .idea/**/dynamic.xml
24
+ .idea/**/uiDesigner.xml
25
+ .idea/**/dbnavigator.xml
26
+
27
+ # Gradle
28
+ .idea/**/gradle.xml
29
+ .idea/**/libraries
30
+
31
+ # Gradle and Maven with auto-import
32
+ # When using Gradle or Maven with auto-import, you should exclude module files,
33
+ # since they will be recreated, and may cause churn. Uncomment if using
34
+ # auto-import.
35
+ # .idea/artifacts
36
+ # .idea/compiler.xml
37
+ # .idea/jarRepositories.xml
38
+ # .idea/modules.xml
39
+ # .idea/*.iml
40
+ # .idea/modules
41
+ # *.iml
42
+ # *.ipr
43
+
44
+ # CMake
45
+ cmake-build-*/
46
+
47
+ # Mongo Explorer plugin
48
+ .idea/**/mongoSettings.xml
49
+
50
+ # File-based project format
51
+ *.iws
52
+
53
+ # IntelliJ
54
+ out/
55
+
56
+ # mpeltonen/sbt-idea plugin
57
+ .idea_modules/
58
+
59
+ # JIRA plugin
60
+ atlassian-ide-plugin.xml
61
+
62
+ # Cursive Clojure plugin
63
+ .idea/replstate.xml
64
+
65
+ # SonarLint plugin
66
+ .idea/sonarlint/
67
+
68
+ # Crashlytics plugin (for Android Studio and IntelliJ)
69
+ com_crashlytics_export_strings.xml
70
+ crashlytics.properties
71
+ crashlytics-build.properties
72
+ fabric.properties
73
+
74
+ # Editor-based Rest Client
75
+ .idea/httpRequests
76
+
77
+ # Android studio 3.1+ serialized cache file
78
+ .idea/caches/build_file_checksums.ser
79
+
80
+ ### Python template
81
+ # Byte-compiled / optimized / DLL files
82
+ __pycache__/
83
+ *.py[cod]
84
+ *$py.class
85
+
86
+ # C extensions
87
+ *.so
88
+
89
+ # Distribution / packaging
90
+ .Python
91
+ build/
92
+ develop-eggs/
93
+ dist/
94
+ downloads/
95
+ eggs/
96
+ .eggs/
97
+ lib/
98
+ lib64/
99
+ parts/
100
+ sdist/
101
+ var/
102
+ wheels/
103
+ share/python-wheels/
104
+ *.egg-info/
105
+ .installed.cfg
106
+ *.egg
107
+ MANIFEST
108
+
109
+ # PyInstaller
110
+ # Usually these files are written by a python script from a template
111
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
112
+ *.manifest
113
+ *.spec
114
+
115
+ # Installer logs
116
+ pip-log.txt
117
+ pip-delete-this-directory.txt
118
+
119
+ # Unit test / coverage reports
120
+ htmlcov/
121
+ .tox/
122
+ .nox/
123
+ .coverage
124
+ .coverage.*
125
+ .cache
126
+ nosetests.xml
127
+ coverage.xml
128
+ *.cover
129
+ *.py,cover
130
+ .hypothesis/
131
+ .pytest_cache/
132
+ cover/
133
+
134
+ # Translations
135
+ *.mo
136
+ *.pot
137
+
138
+ # Django stuff:
139
+ *.log
140
+ local_settings.py
141
+ db.sqlite3
142
+ db.sqlite3-journal
143
+
144
+ # Flask stuff:
145
+ instance/
146
+ .webassets-cache
147
+
148
+ # Scrapy stuff:
149
+ .scrapy
150
+
151
+ # Sphinx documentation
152
+ docs/_build/
153
+
154
+ # PyBuilder
155
+ .pybuilder/
156
+ target/
157
+
158
+ # Jupyter Notebook
159
+ .ipynb_checkpoints
160
+
161
+ # IPython
162
+ profile_default/
163
+ ipython_config.py
164
+
165
+ # pyenv
166
+ # For a library or package, you might want to ignore these files since the code is
167
+ # intended to run in multiple environments; otherwise, check them in:
168
+ # .python-version
169
+
170
+ # pipenv
171
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
172
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
173
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
174
+ # install all needed dependencies.
175
+ #Pipfile.lock
176
+
177
+ # poetry
178
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
179
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
180
+ # commonly ignored for libraries.
181
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
182
+ #poetry.lock
183
+
184
+ # pdm
185
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
186
+ #pdm.lock
187
+ # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
188
+ # in version control.
189
+ # https://pdm.fming.dev/latest/usage/project/#working-with-version-control
190
+ .pdm.toml
191
+ .pdm-python
192
+ .pdm-build/
193
+
194
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
195
+ __pypackages__/
196
+
197
+ # Celery stuff
198
+ celerybeat-schedule
199
+ celerybeat.pid
200
+
201
+ # SageMath parsed files
202
+ *.sage.py
203
+
204
+ # Environments
205
+ .env
206
+ .venv
207
+ env/
208
+ venv/
209
+ ENV/
210
+ env.bak/
211
+ venv.bak/
212
+
213
+ # Spyder project settings
214
+ .spyderproject
215
+ .spyproject
216
+
217
+ # Rope project settings
218
+ .ropeproject
219
+
220
+ # mkdocs documentation
221
+ /site
222
+
223
+ # mypy
224
+ .mypy_cache/
225
+ .dmypy.json
226
+ dmypy.json
227
+
228
+ # Pyre type checker
229
+ .pyre/
230
+
231
+ # pytype static type analyzer
232
+ .pytype/
233
+
234
+ # Cython debug symbols
235
+ cython_debug/
236
+
237
+ # PyCharm
238
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
239
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
240
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
241
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
242
+ #.idea/
243
+
244
+
245
+ .idea/
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Mario S. Valdés-Tresanco, Mario E. Valdés-Tresanco, Ernesto Moreno, Pedro A. Valiente
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,47 @@
1
+ Metadata-Version: 2.4
2
+ Name: ms_components
3
+ Version: 0.1.0
4
+ Summary: PySide6 UI components for MolSuite: smart table, project browser, job monitor, PyMOL dock, steppers.
5
+ Author: Mario S. Valdés-Tresanco, Mario E. Valdés-Tresanco
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/MolSuite/ms_components
8
+ Project-URL: Issues, https://github.com/MolSuite/ms_components/issues
9
+ Keywords: pyside6,qt,widgets,molsuite,table,monitor
10
+ Classifier: Development Status :: 4 - Beta
11
+ Classifier: Intended Audience :: Science/Research
12
+ Classifier: Programming Language :: Python :: 3 :: Only
13
+ Classifier: Operating System :: OS Independent
14
+ Classifier: Topic :: Scientific/Engineering
15
+ Classifier: Environment :: X11 Applications :: Qt
16
+ Requires-Python: >=3.12
17
+ Description-Content-Type: text/markdown
18
+ License-File: LICENSE
19
+ Requires-Dist: ms_flow
20
+ Requires-Dist: PySide6>=6.5
21
+ Requires-Dist: pymol-open-source>=3.2.0a0
22
+ Requires-Dist: sqlmodel>=0.0.14
23
+ Provides-Extra: dev
24
+ Requires-Dist: pytest>=7.0; extra == "dev"
25
+ Dynamic: license-file
26
+
27
+ # ms_components
28
+
29
+ PySide6 UI components for MolSuite: smart table, project browser, job monitor,
30
+ PyMOL dock, steppers and the shared theming (`themes/` + `base.qss`).
31
+
32
+ Part of the [MolSuite](https://molsuite.github.io/) stack. Built on top of
33
+ [`ms_flow`](https://github.com/MolSuite/ms_flow).
34
+
35
+ ## Install
36
+
37
+ PyMOL is installed automatically from the `pymol-open-source` alpha wheels on
38
+ PyPI (`>=3.2.0a0`):
39
+
40
+ ```bash
41
+ pip install git+https://github.com/MolSuite/ms_flow
42
+ pip install git+https://github.com/MolSuite/ms_components
43
+ ```
44
+
45
+ ## License
46
+
47
+ MIT — see [LICENSE](LICENSE). Third-party icon/asset licenses live in `licenses/`.
@@ -0,0 +1,21 @@
1
+ # ms_components
2
+
3
+ PySide6 UI components for MolSuite: smart table, project browser, job monitor,
4
+ PyMOL dock, steppers and the shared theming (`themes/` + `base.qss`).
5
+
6
+ Part of the [MolSuite](https://molsuite.github.io/) stack. Built on top of
7
+ [`ms_flow`](https://github.com/MolSuite/ms_flow).
8
+
9
+ ## Install
10
+
11
+ PyMOL is installed automatically from the `pymol-open-source` alpha wheels on
12
+ PyPI (`>=3.2.0a0`):
13
+
14
+ ```bash
15
+ pip install git+https://github.com/MolSuite/ms_flow
16
+ pip install git+https://github.com/MolSuite/ms_components
17
+ ```
18
+
19
+ ## License
20
+
21
+ MIT — see [LICENSE](LICENSE). Third-party icon/asset licenses live in `licenses/`.
@@ -0,0 +1,40 @@
1
+ # API reference
2
+
3
+ The reference below is generated directly from the current Python sources.
4
+ Names beginning with an underscore are implementation details.
5
+
6
+ ## Smart table
7
+
8
+ ::: ms_components.ms_table
9
+
10
+ ## Monitor
11
+
12
+ ::: ms_components.ms_monitor
13
+
14
+ ## Projects
15
+
16
+ ::: ms_components.ms_projects
17
+
18
+ ## Settings
19
+
20
+ ::: ms_components.ms_settings
21
+
22
+ ## PyMOL
23
+
24
+ ::: ms_components.ms_pymol
25
+
26
+ ## Stepper
27
+
28
+ ::: ms_components.ms_stepper
29
+
30
+ ## Tool panel
31
+
32
+ ::: ms_components.tool_panel
33
+
34
+ ## Step dialog
35
+
36
+ ::: ms_components.step_dialog
37
+
38
+ ## Theme
39
+
40
+ ::: ms_components.theme
@@ -0,0 +1,137 @@
1
+ # Examples
2
+
3
+ ## Tool panel with a simulated run
4
+
5
+ A themed tool panel whose action bar reports the progress of a fake run driven
6
+ by a timer. In an application, the same calls are driven by job events.
7
+
8
+ ```python
9
+ from PySide6.QtCore import QTimer
10
+ from PySide6.QtWidgets import QApplication, QComboBox, QPushButton, QSpinBox
11
+
12
+ from ms_components.theme import apply_theme
13
+ from ms_components.tool_panel import ToolPanel
14
+
15
+ app = QApplication([])
16
+ apply_theme("auto", app)
17
+
18
+ panel = ToolPanel()
19
+ options = panel.add_section("Options")
20
+ engine = QComboBox()
21
+ engine.addItems(["vina", "vinardo"])
22
+ options.add_row("Scoring function", engine)
23
+ options.add_row("Exhaustiveness", QSpinBox(value=8))
24
+ panel.advanced.add_row("Seed", QSpinBox())
25
+
26
+ total = 50
27
+ state = {"done": 0}
28
+ bar = panel.action_bar
29
+ bar.set_summary(f"{total} ligands selected")
30
+ run_button = QPushButton("Run")
31
+ bar.add_action(run_button)
32
+
33
+ timer = QTimer(interval=50)
34
+
35
+
36
+ def tick():
37
+ state["done"] += 1
38
+ bar.set_progress(state["done"], total, unit="ligands")
39
+ if state["done"] == total:
40
+ timer.stop()
41
+ bar.finish("Done", f"{total} ligands docked")
42
+
43
+
44
+ def start():
45
+ state["done"] = 0
46
+ bar.start("Docking…")
47
+ timer.start()
48
+
49
+
50
+ timer.timeout.connect(tick)
51
+ run_button.clicked.connect(start)
52
+
53
+ panel.resize(420, 360)
54
+ panel.show()
55
+ app.exec()
56
+ ```
57
+
58
+ ## Three-step wizard
59
+
60
+ ```python
61
+ from PySide6.QtWidgets import QApplication, QLabel, QLineEdit
62
+
63
+ from ms_components.ms_stepper import QStepper
64
+ from ms_components.theme import apply_theme
65
+
66
+ app = QApplication([])
67
+ apply_theme("auto", app)
68
+
69
+ stepper = QStepper()
70
+
71
+ name_step = stepper.add_step("Project", "Name the project")
72
+ name = QLineEdit()
73
+ name_step.add_widget(name)
74
+
75
+ files_step = stepper.add_step("Input", "Choose the files")
76
+ files_step.add_widget(QLabel("Ligands: ligands.sdf\nReceptor: receptor.pdb"))
77
+
78
+ review_step = stepper.add_step("Review", "Check and finish")
79
+ review_step.add_widget(QLabel("Press Finish to create the project."))
80
+
81
+ stepper.finished.connect(lambda: print("create project", name.text()))
82
+ stepper.finished.connect(app.quit)
83
+
84
+ stepper.resize(640, 320)
85
+ stepper.show()
86
+ app.exec()
87
+ ```
88
+
89
+ ## Job monitor for a running job
90
+
91
+ Attach the monitor to a `MolSuite` runtime and watch a job advance. The worker
92
+ must live in an importable module:
93
+
94
+ ```python
95
+ # workers.py
96
+ import time
97
+
98
+
99
+ def slow_square(payload: dict) -> dict:
100
+ time.sleep(0.1)
101
+ value = int(payload["value"])
102
+ return {"value": value, "square": value * value}
103
+ ```
104
+
105
+ ```python
106
+ from PySide6.QtWidgets import QApplication
107
+
108
+ from ms_components.ms_monitor import MolSuiteMonitorBridge, MolSuiteMonitorWidget
109
+ from ms_components.theme import apply_theme
110
+ from ms_flow.api import MolSuite
111
+ from workers import slow_square
112
+
113
+ app = QApplication([])
114
+ apply_theme("auto", app)
115
+
116
+ ms = MolSuite(app_id="monitor-demo")
117
+ ms.create_or_open_project(name="monitor-demo", folder="./monitor-demo", activate=True)
118
+
119
+ bridge = MolSuiteMonitorBridge(molsuite=ms, poll_ms=500)
120
+ monitor = MolSuiteMonitorWidget(bridge=bridge)
121
+ bridge.start()
122
+ app.aboutToQuit.connect(bridge.stop) # stop polling before the runtime shuts down
123
+
124
+ ms.run(
125
+ name="slow-squares",
126
+ input=[{"value": value} for value in range(100)],
127
+ process=slow_square,
128
+ executor="thread",
129
+ )
130
+
131
+ monitor.resize(1100, 650)
132
+ monitor.show()
133
+ try:
134
+ app.exec()
135
+ finally:
136
+ ms.shutdown()
137
+ ```
@@ -0,0 +1,60 @@
1
+ # ms_components
2
+
3
+ `ms_components` is a set of reusable PySide6 widgets for MolSuite applications:
4
+ SQLModel tables, a job monitor, a project browser, settings panels, a PyMOL
5
+ dock, steppers, tool panels, and the shared theme.
6
+
7
+ ## Install
8
+
9
+ `ms_components` requires Python 3.12. PyMOL comes from the
10
+ `pymol-open-source` alpha wheels on PyPI and is installed automatically as a
11
+ dependency; no conda environment is needed. Until the MolSuite packages are
12
+ published on PyPI, install them from Git:
13
+
14
+ ```bash
15
+ pip install "ms_flow @ git+https://github.com/MolSuite/ms_flow"
16
+ pip install "ms_components @ git+https://github.com/MolSuite/ms_components"
17
+ ```
18
+
19
+ ## Components
20
+
21
+ | Module | Responsibility |
22
+ | --- | --- |
23
+ | `ms_components.ms_table` | Declarative, paginated table over SQLModel |
24
+ | `ms_components.ms_monitor` | Job, executor, and event monitor for a MolSuite runtime |
25
+ | `ms_components.ms_projects` | Project browser and project menu |
26
+ | `ms_components.ms_settings` | Typed editor for application settings |
27
+ | `ms_components.ms_pymol` | PyMOL dock and control bar |
28
+ | `ms_components.ms_stepper` | Step-by-step wizard widget |
29
+ | `ms_components.tool_panel` | Configure-then-run frame shared by tools |
30
+ | `ms_components.step_dialog` | Dialog that runs provisioning steps off the GUI thread |
31
+ | `ms_components.theme` | Themes, palette roles, and fonts |
32
+
33
+ Every component receives its dependencies through the constructor. The package
34
+ keeps no UI singleton and never creates a Qt application implicitly.
35
+
36
+ ## Quick look
37
+
38
+ ```python
39
+ from PySide6.QtWidgets import QApplication, QLineEdit
40
+
41
+ from ms_components.theme import apply_theme
42
+ from ms_components.tool_panel import ToolPanel
43
+
44
+ app = QApplication([])
45
+ apply_theme("auto", app)
46
+
47
+ panel = ToolPanel()
48
+ section = panel.add_section("Input")
49
+ section.add_row("Name", QLineEdit())
50
+ panel.show()
51
+ app.exec()
52
+ ```
53
+
54
+ Continue with the [API guide](usage.md), copy a complete
55
+ [example](examples.md), or browse the generated [API reference](api_reference.md).
56
+
57
+ ## License
58
+
59
+ `ms_components` is released under the MIT License. Icon and asset licenses are
60
+ listed in the `licenses/` directory of the repository.