caddforge-gui 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.
Files changed (39) hide show
  1. caddforge_gui-0.6.0/.github/workflows/release.yml +94 -0
  2. caddforge_gui-0.6.0/.gitignore +27 -0
  3. caddforge_gui-0.6.0/LICENSE +21 -0
  4. caddforge_gui-0.6.0/PKG-INFO +121 -0
  5. caddforge_gui-0.6.0/README.md +105 -0
  6. caddforge_gui-0.6.0/docs/plugin-gui-authoring.md +343 -0
  7. caddforge_gui-0.6.0/frontend/index.html +15 -0
  8. caddforge_gui-0.6.0/frontend/package.json +22 -0
  9. caddforge_gui-0.6.0/frontend/src/App.tsx +243 -0
  10. caddforge_gui-0.6.0/frontend/src/components/TopBar.tsx +34 -0
  11. caddforge_gui-0.6.0/frontend/src/lib/api.ts +95 -0
  12. caddforge_gui-0.6.0/frontend/src/lib/extensions.ts +40 -0
  13. caddforge_gui-0.6.0/frontend/src/lib/ui.tsx +21 -0
  14. caddforge_gui-0.6.0/frontend/src/main.tsx +10 -0
  15. caddforge_gui-0.6.0/frontend/src/pages/DashboardPage.tsx +459 -0
  16. caddforge_gui-0.6.0/frontend/src/pages/JobDetailPage.tsx +423 -0
  17. caddforge_gui-0.6.0/frontend/src/pages/JobsPage.tsx +242 -0
  18. caddforge_gui-0.6.0/frontend/src/styles.css +1028 -0
  19. caddforge_gui-0.6.0/frontend/vite.config.ts +15 -0
  20. caddforge_gui-0.6.0/pyproject.toml +38 -0
  21. caddforge_gui-0.6.0/scripts/check_release.py +98 -0
  22. caddforge_gui-0.6.0/scripts/ci_tests.json +8 -0
  23. caddforge_gui-0.6.0/scripts/run_ci_tests.py +84 -0
  24. caddforge_gui-0.6.0/src/caddforge_gui/__init__.py +3 -0
  25. caddforge_gui-0.6.0/src/caddforge_gui/app.py +644 -0
  26. caddforge_gui-0.6.0/src/caddforge_gui/artifacts.py +159 -0
  27. caddforge_gui-0.6.0/src/caddforge_gui/config.py +94 -0
  28. caddforge_gui-0.6.0/src/caddforge_gui/plugin_runtime.py +163 -0
  29. caddforge_gui-0.6.0/src/caddforge_gui/static/THIRD_PARTY_LICENSES/NOTICE.txt +18 -0
  30. caddforge_gui-0.6.0/src/caddforge_gui/static/THIRD_PARTY_LICENSES/React-MIT.txt +21 -0
  31. caddforge_gui-0.6.0/src/caddforge_gui/static/assets/index-BTgKXQul.css +1 -0
  32. caddforge_gui-0.6.0/src/caddforge_gui/static/assets/index-KWr4_uhS.js +42 -0
  33. caddforge_gui-0.6.0/src/caddforge_gui/static/assets/molstar_viewer.js +508 -0
  34. caddforge_gui-0.6.0/src/caddforge_gui/static/assets/plugin_uikit.js +500 -0
  35. caddforge_gui-0.6.0/src/caddforge_gui/static/index.html +16 -0
  36. caddforge_gui-0.6.0/tests/test_dashboard.py +379 -0
  37. caddforge_gui-0.6.0/tests/test_log_stream.py +48 -0
  38. caddforge_gui-0.6.0/tests/test_plugin_runtime.py +57 -0
  39. caddforge_gui-0.6.0/tests/test_release_metadata.py +77 -0
@@ -0,0 +1,94 @@
1
+ name: CI and PyPI release
2
+ 'on':
3
+ push:
4
+ branches:
5
+ - '**'
6
+ tags:
7
+ - v*
8
+ pull_request: null
9
+ workflow_dispatch: null
10
+ permissions:
11
+ contents: read
12
+ jobs:
13
+ build:
14
+ name: Build and validate distributions
15
+ runs-on: ubuntu-24.04
16
+ steps:
17
+ - uses: actions/checkout@v7.0.1
18
+ with:
19
+ fetch-depth: 0
20
+ persist-credentials: false
21
+ - uses: actions/setup-python@v7.0.0
22
+ with:
23
+ python-version: '3.12'
24
+ - name: Install build tools
25
+ run: python -m pip --isolated install --index-url https://pypi.org/simple --upgrade build twine packaging
26
+ - name: Build wheel from source distribution
27
+ run: python -m build
28
+ - name: Validate package metadata
29
+ run: python -m twine check --strict dist/*
30
+ - name: Check distribution identity and release version
31
+ env:
32
+ IS_RELEASE: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') }}
33
+ RELEASE_TAG: ${{ github.ref_name }}
34
+ run: python scripts/check_release.py .
35
+ - uses: actions/upload-artifact@v7.0.2
36
+ with:
37
+ name: distributions
38
+ path: dist/*
39
+ if-no-files-found: error
40
+ test:
41
+ name: Test wheel (Python ${{ matrix.python }})
42
+ needs: build
43
+ runs-on: ubuntu-24.04
44
+ strategy:
45
+ fail-fast: false
46
+ matrix:
47
+ python:
48
+ - '3.10'
49
+ - '3.12'
50
+ steps:
51
+ - uses: actions/checkout@v7.0.1
52
+ with:
53
+ persist-credentials: false
54
+ - uses: actions/setup-python@v7.0.0
55
+ with:
56
+ python-version: ${{ matrix.python }}
57
+ - uses: actions/download-artifact@v8.0.1
58
+ with:
59
+ name: distributions
60
+ path: dist
61
+ - name: Install built wheel and test dependencies
62
+ shell: bash
63
+ run: |-
64
+ python -m pip --isolated install --index-url https://pypi.org/simple dist/*.whl
65
+ python -m pip --isolated install --index-url https://pypi.org/simple pytest packaging 'tomli; python_version < "3.11"' 'httpx'
66
+ - name: Test installed wheel outside the checkout
67
+ env:
68
+ MPLBACKEND: Agg
69
+ OMP_NUM_THREADS: '1'
70
+ OPENBLAS_NUM_THREADS: '1'
71
+ run: python scripts/run_ci_tests.py
72
+ - name: Check installed dependencies
73
+ run: python -m pip check
74
+ publish:
75
+ name: Publish to PyPI
76
+ if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
77
+ needs:
78
+ - build
79
+ - test
80
+ runs-on: ubuntu-24.04
81
+ environment:
82
+ name: pypi
83
+ url: https://pypi.org/project/caddforge-gui/
84
+ permissions:
85
+ id-token: write
86
+ concurrency:
87
+ group: pypi-${{ github.ref }}
88
+ cancel-in-progress: false
89
+ steps:
90
+ - uses: actions/download-artifact@v8.0.1
91
+ with:
92
+ name: distributions
93
+ path: dist
94
+ - uses: pypa/gh-action-pypi-publish@v1.14.2
@@ -0,0 +1,27 @@
1
+ # Python
2
+ __pycache__/
3
+ *.py[cod]
4
+ *.pyd
5
+ .pytest_cache/
6
+ .mypy_cache/
7
+ .ruff_cache/
8
+ .coverage
9
+ coverage.xml
10
+ *.egg-info/
11
+ .eggs/
12
+ build/
13
+ dist/
14
+ .venv/
15
+ venv/
16
+ .env
17
+
18
+ # Logs
19
+ *.log
20
+
21
+ # Frontend
22
+ frontend/node_modules/
23
+ frontend/.vite/
24
+ frontend/dist/
25
+ frontend/npm-debug.log*
26
+ frontend/yarn-error.log*
27
+ frontend/pnpm-debug.log*
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2026 The CADDForge Authors
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
13
+ all 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
21
+ THE SOFTWARE.
@@ -0,0 +1,121 @@
1
+ Metadata-Version: 2.5
2
+ Name: caddforge-gui
3
+ Version: 0.6.0
4
+ Summary: FastAPI-based GUI server and web UI for CADDForge.
5
+ Author-email: Manuel Sellner <manuel.sellner@idorsia.com>, Christoph Sager <christoph.sager@idorsia.com>
6
+ License: MIT
7
+ License-File: LICENSE
8
+ Requires-Python: >=3.10
9
+ Requires-Dist: caddforge-core>=0.21.0
10
+ Requires-Dist: fastapi>=0.110
11
+ Requires-Dist: pydantic>=2.5
12
+ Requires-Dist: python-multipart>=0.0.26
13
+ Requires-Dist: pyyaml>=6.0
14
+ Requires-Dist: uvicorn>=0.29
15
+ Description-Content-Type: text/markdown
16
+
17
+ # CADDForge GUI
18
+
19
+ Install this plugin with `python -m pip install caddforge-gui`. It depends directly
20
+ on `caddforge-core>=0.21.0`; Python imports and CLI commands still use `caddforge`.
21
+ For the complete public toolbox, including user-facing extras, install
22
+ `python -m pip install caddforge`. When migrating an existing environment, uninstall
23
+ the former `caddforge` core distribution before installing renamed core and updated plugins.
24
+
25
+ FastAPI server that hosts the CADDForge GUI and REST/SSE API.
26
+
27
+ ## Documentation
28
+
29
+ - Plugin GUI authoring guide:
30
+ - `docs/plugin-gui-authoring.md`
31
+ - Shared plugin UI kit module:
32
+ - `src/caddforge_gui/static/assets/plugin_uikit.js`
33
+ - Shared plugin backend helpers:
34
+ - `src/caddforge_gui/plugin_runtime.py`
35
+
36
+ ## Development (frontend)
37
+
38
+ ```bash
39
+ cd caddforge-gui/frontend
40
+ npm install
41
+ npm run build
42
+ ```
43
+
44
+ This builds static assets into `caddforge-gui/src/caddforge_gui/static`.
45
+
46
+ ## Run
47
+
48
+ ```bash
49
+ caddforge gui --host 0.0.0.0 --port 8000
50
+ ```
51
+
52
+ ## Theme
53
+
54
+ - Default theme: light
55
+ - Toggle: top-bar `Dark Mode` / `Light Mode` button
56
+ - Persistence: saved in browser `localStorage` (`caddforge-theme`)
57
+
58
+ ## Plugin UI Kit
59
+
60
+ `caddforge-gui` provides a small reusable UI kit for plugin pages:
61
+
62
+ - Module: `caddforge_gui/static/assets/plugin_uikit.js`
63
+ - Runtime URL for extensions: `/static/assets/plugin_uikit.js`
64
+
65
+ Extension modules can import shared primitives (fields, sections, collapsibles, file pickers, etc.) via:
66
+
67
+ ```js
68
+ import { field, row, section, createFilePicker } from "../../assets/plugin_uikit.js";
69
+ ```
70
+
71
+ Available higher-level helpers include:
72
+
73
+ - `stepSection(stepNumber, title, note)`
74
+ - `modeSwitchSection(...)`
75
+ - `backendSection()`
76
+ - `submitBar(label)`
77
+ - `createPathOrFileInput(...)`
78
+
79
+ For docking/pose analysis pages, there is also a reusable Mol* viewer panel:
80
+
81
+ - Module: `caddforge_gui/static/assets/molstar_viewer.js`
82
+ - Export: `createDockingMolstarViewer({ title, description })`
83
+ - Runtime URL for extensions: `/static/assets/molstar_viewer.js`
84
+
85
+ This keeps plugin GUIs visually consistent and avoids re-implementing common form/layout logic.
86
+
87
+ ## Plugin Backend Helpers
88
+
89
+ For extension backend routers (`gui_extension.py`), `caddforge-gui` also provides reusable helpers in
90
+ `caddforge_gui.plugin_runtime`:
91
+
92
+ - `encode_path_token` / `decode_path_token`
93
+ - `list_tool_jobs`
94
+ - `make_staging_dir`
95
+ - `store_upload` (streamed upload writes)
96
+ - `move_to_directory`
97
+ - `ensure_job_within_run_dir`
98
+
99
+ For non-GUI/general runtime concerns (backend construction, backend submission, registry normalization),
100
+ use `caddforge.core.execution` from `caddforge-core`.
101
+
102
+ ## Third-party notices
103
+
104
+ The bundled React frontend retains its upstream MIT licence. Copyright and full
105
+ licence text ship in [static/THIRD_PARTY_LICENSES](src/caddforge_gui/static/THIRD_PARTY_LICENSES/NOTICE.txt)
106
+ in source distributions and wheels. Preserve these files when redistributing the
107
+ frontend, and review them whenever frontend dependencies change.
108
+
109
+ ## Continuous integration and releases
110
+
111
+ `.github/workflows/release.yml` builds a wheel and source archive, validates
112
+ metadata, and tests the installed wheel on Linux with Python 3.10 and 3.12.
113
+ The lightweight test selection is recorded in `scripts/ci_tests.json`;
114
+ external scientific engines are validated separately.
115
+
116
+ Pushing a matching `v*` release tag publishes the tested artifacts to PyPI.
117
+ Branch pushes, pull requests and manual runs never publish. Configure a
118
+ PyPI Trusted Publisher for the `idorsia` repository, `release.yml` workflow
119
+ and `pypi` environment before pushing release tags. Runtime CADDForge
120
+ dependencies must already be available publicly; publish core first,
121
+ and publish docking/descriptors before MD.
@@ -0,0 +1,105 @@
1
+ # CADDForge GUI
2
+
3
+ Install this plugin with `python -m pip install caddforge-gui`. It depends directly
4
+ on `caddforge-core>=0.21.0`; Python imports and CLI commands still use `caddforge`.
5
+ For the complete public toolbox, including user-facing extras, install
6
+ `python -m pip install caddforge`. When migrating an existing environment, uninstall
7
+ the former `caddforge` core distribution before installing renamed core and updated plugins.
8
+
9
+ FastAPI server that hosts the CADDForge GUI and REST/SSE API.
10
+
11
+ ## Documentation
12
+
13
+ - Plugin GUI authoring guide:
14
+ - `docs/plugin-gui-authoring.md`
15
+ - Shared plugin UI kit module:
16
+ - `src/caddforge_gui/static/assets/plugin_uikit.js`
17
+ - Shared plugin backend helpers:
18
+ - `src/caddforge_gui/plugin_runtime.py`
19
+
20
+ ## Development (frontend)
21
+
22
+ ```bash
23
+ cd caddforge-gui/frontend
24
+ npm install
25
+ npm run build
26
+ ```
27
+
28
+ This builds static assets into `caddforge-gui/src/caddforge_gui/static`.
29
+
30
+ ## Run
31
+
32
+ ```bash
33
+ caddforge gui --host 0.0.0.0 --port 8000
34
+ ```
35
+
36
+ ## Theme
37
+
38
+ - Default theme: light
39
+ - Toggle: top-bar `Dark Mode` / `Light Mode` button
40
+ - Persistence: saved in browser `localStorage` (`caddforge-theme`)
41
+
42
+ ## Plugin UI Kit
43
+
44
+ `caddforge-gui` provides a small reusable UI kit for plugin pages:
45
+
46
+ - Module: `caddforge_gui/static/assets/plugin_uikit.js`
47
+ - Runtime URL for extensions: `/static/assets/plugin_uikit.js`
48
+
49
+ Extension modules can import shared primitives (fields, sections, collapsibles, file pickers, etc.) via:
50
+
51
+ ```js
52
+ import { field, row, section, createFilePicker } from "../../assets/plugin_uikit.js";
53
+ ```
54
+
55
+ Available higher-level helpers include:
56
+
57
+ - `stepSection(stepNumber, title, note)`
58
+ - `modeSwitchSection(...)`
59
+ - `backendSection()`
60
+ - `submitBar(label)`
61
+ - `createPathOrFileInput(...)`
62
+
63
+ For docking/pose analysis pages, there is also a reusable Mol* viewer panel:
64
+
65
+ - Module: `caddforge_gui/static/assets/molstar_viewer.js`
66
+ - Export: `createDockingMolstarViewer({ title, description })`
67
+ - Runtime URL for extensions: `/static/assets/molstar_viewer.js`
68
+
69
+ This keeps plugin GUIs visually consistent and avoids re-implementing common form/layout logic.
70
+
71
+ ## Plugin Backend Helpers
72
+
73
+ For extension backend routers (`gui_extension.py`), `caddforge-gui` also provides reusable helpers in
74
+ `caddforge_gui.plugin_runtime`:
75
+
76
+ - `encode_path_token` / `decode_path_token`
77
+ - `list_tool_jobs`
78
+ - `make_staging_dir`
79
+ - `store_upload` (streamed upload writes)
80
+ - `move_to_directory`
81
+ - `ensure_job_within_run_dir`
82
+
83
+ For non-GUI/general runtime concerns (backend construction, backend submission, registry normalization),
84
+ use `caddforge.core.execution` from `caddforge-core`.
85
+
86
+ ## Third-party notices
87
+
88
+ The bundled React frontend retains its upstream MIT licence. Copyright and full
89
+ licence text ship in [static/THIRD_PARTY_LICENSES](src/caddforge_gui/static/THIRD_PARTY_LICENSES/NOTICE.txt)
90
+ in source distributions and wheels. Preserve these files when redistributing the
91
+ frontend, and review them whenever frontend dependencies change.
92
+
93
+ ## Continuous integration and releases
94
+
95
+ `.github/workflows/release.yml` builds a wheel and source archive, validates
96
+ metadata, and tests the installed wheel on Linux with Python 3.10 and 3.12.
97
+ The lightweight test selection is recorded in `scripts/ci_tests.json`;
98
+ external scientific engines are validated separately.
99
+
100
+ Pushing a matching `v*` release tag publishes the tested artifacts to PyPI.
101
+ Branch pushes, pull requests and manual runs never publish. Configure a
102
+ PyPI Trusted Publisher for the `idorsia` repository, `release.yml` workflow
103
+ and `pypi` environment before pushing release tags. Runtime CADDForge
104
+ dependencies must already be available publicly; publish core first,
105
+ and publish docking/descriptors before MD.