Commit 3492287
committed
Functional Version (works on my machine ;)
# LiveWatch GUI Implementation — Issue #300
## Summary
Implemented a complete PyQt5-based GUI for configuring and launching LiveWatch scan analysis, replacing the notebook-based workflow. The GUI provides an intuitive interface for users to select experiments, set analysis parameters, and monitor live processing with real-time logging.
## Key Features
- **Configuration Panel**: Browse and select scan analysis config directory, choose experiment, set date/scan number
- **Runtime Options**: Toggle dry_run mode, rerun analysis, set max items to process, enable GDoc upload
- **Live Control**: Start/stop analysis with status indicator and graceful shutdown
- **Log Output**: Real-time, color-coded logging with level filtering (DEBUG, INFO, WARNING, ERROR)
- **Config Discovery**: Automatically discovers experiment configs from the selected directory structure
## Technical Implementation
- **Location**: `/ScanAnalysis/LiveWatchGUI/` — dedicated package with isolated Poetry environment
- **Architecture**:
- `live_watch_window.py` — Main PyQt5 QMainWindow with programmatic UI
- `worker.py` — Background QThread wrapping LiveTaskRunner for non-blocking analysis
- `log_handler.py` — Custom logging.Handler bridging Python logging to Qt signals
- `main.py` — CLI entry point with `--log-level` argument
- **Dependencies**: PyQt5 5.15.9, constrained to Python >=3.10,<3.11 for compatibility
- **Config System**: Integrates with existing `scan_analysis.config.config_loader` for experiment discovery
## Bug Fix
Fixed experiment config filtering to strictly show only configs under the `experiments/` directory, excluding library configs (e.g., 148Spectro). The dropdown now correctly displays only experiment-level configurations.
## Testing
- GUI launches successfully and displays all UI elements
- Config directory browsing works with auto-refresh of experiment dropdown
- Dry-run analysis processes scans correctly with real-time log output
- Graceful shutdown on window close
## Files Created
- `GEECS-Plugins/ScanAnalysis/LiveWatchGUI/__init__.py`
- `GEECS-Plugins/ScanAnalysis/LiveWatchGUI/live_watch_window.py`
- `GEECS-Plugins/ScanAnalysis/LiveWatchGUI/worker.py`
- `GEECS-Plugins/ScanAnalysis/LiveWatchGUI/log_handler.py`
- `GEECS-Plugins/ScanAnalysis/LiveWatchGUI/main.py`
- `GEECS-Plugins/ScanAnalysis/LiveWatchGUI/pyproject.toml`
- `GEECS-Plugins/ScanAnalysis/LiveWatchGUI/README.md`
- `plans/LiveWatch_GUI_Plan.md` — Detailed architecture documentation
## Next Steps
The GUI is production-ready. Future enhancements could include:
- Packaged executable (PyInstaller/cx_Freeze)
- Additional analyzer configuration options
- Historical analysis results browser
- Performance metrics dashboard1 parent 71243f8 commit 3492287
File tree
3 files changed
+2904
-18
lines changed- ScanAnalysis/LiveWatchGUI
3 files changed
+2904
-18
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
| |||
50 | 51 | | |
51 | 52 | | |
52 | 53 | | |
53 | | - | |
54 | | - | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
55 | 63 | | |
56 | 64 | | |
57 | 65 | | |
58 | | - | |
| 66 | + | |
59 | 67 | | |
60 | 68 | | |
61 | 69 | | |
62 | 70 | | |
63 | 71 | | |
64 | 72 | | |
65 | 73 | | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
| 74 | + | |
71 | 75 | | |
72 | 76 | | |
73 | 77 | | |
| |||
162 | 166 | | |
163 | 167 | | |
164 | 168 | | |
165 | | - | |
| 169 | + | |
| 170 | + | |
166 | 171 | | |
167 | 172 | | |
168 | 173 | | |
169 | 174 | | |
170 | 175 | | |
171 | 176 | | |
172 | | - | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
173 | 189 | | |
174 | 190 | | |
175 | 191 | | |
| |||
199 | 215 | | |
200 | 216 | | |
201 | 217 | | |
202 | | - | |
| 218 | + | |
| 219 | + | |
203 | 220 | | |
204 | 221 | | |
205 | 222 | | |
206 | 223 | | |
207 | | - | |
| 224 | + | |
| 225 | + | |
208 | 226 | | |
209 | | - | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
210 | 233 | | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
211 | 237 | | |
212 | 238 | | |
213 | 239 | | |
214 | 240 | | |
215 | 241 | | |
216 | 242 | | |
217 | | - | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
218 | 251 | | |
219 | 252 | | |
220 | 253 | | |
| |||
333 | 366 | | |
334 | 367 | | |
335 | 368 | | |
336 | | - | |
337 | | - | |
338 | | - | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
339 | 386 | | |
340 | 387 | | |
341 | 388 | | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
342 | 394 | | |
343 | 395 | | |
344 | 396 | | |
| |||
487 | 539 | | |
488 | 540 | | |
489 | 541 | | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
490 | 572 | | |
491 | 573 | | |
492 | 574 | | |
| |||
497 | 579 | | |
498 | 580 | | |
499 | 581 | | |
| 582 | + | |
500 | 583 | | |
501 | 584 | | |
502 | 585 | | |
503 | 586 | | |
| 587 | + | |
504 | 588 | | |
| 589 | + | |
505 | 590 | | |
506 | 591 | | |
507 | 592 | | |
| |||
0 commit comments