Files
mrvahepc/bin/host-workflow-ui
michael hohn 8ebe4f8f92 Add a complete standalone GUI for running MRVA analysis from the host machine
1. bin/host-workflow-ui (58 lines)
   New executable launcher script:
   - Uses uv run python for execution
   - CLI application using plumbum
   - Takes --container-name argument (default: "mrva-ghmrva")
   - Launches GUI via create_gui() function

2. mrvahepc/host_workflow_ui.py (571 lines)
   Complete Tkinter GUI application for MRVA workflow management
   - 7-step workflow: Check tool, Setup config, Launch DB selector, Browse queries, Submit job, Check status, Download results
   - Configuration panel with editable paths (GH-MRVA Dir, HEPC Dir, Metadata DB, Selection JSON)
   - Step buttons with color-coded status (green=success, red=failure)
   - Session management with multi-line text field
   - Query file browser with 2-line display for long paths
   - Real-time output with command logging and file path highlighting

Technical details:
- All commands execute inside Docker container via docker exec
- Auto-generates timestamped session numbers (format: mirva-session-YYYYMMDD-HHMMSS)
- Creates sample CodeQL queries if missing (FlatBuffersFunc.ql, Fprintf.ql)
- Handles file copying between host and container
- Thread-safe execution with queue-based UI updates
- Multi-line text widgets for better readability
2025-12-05 14:20:22 -08:00

59 lines
1.6 KiB
Python
Executable File

#!/usr/bin/env -S uv run python
# -*- python -*-
"""
MRVA Host Workflow UI
A Tkinter-based interface for managing the complete MRVA workflow:
1. Check gh-mrva tool
2. Setup configuration
3. Launch DB selector GUI
4. Select query file
5. Submit MRVA job
6. Check job status
7. Download results
Provides visual feedback, command logging, and session management.
Runs on the host and executes commands in the container.
"""
import sys
from plumbum import cli
from mrvahepc.host_workflow_ui import create_gui
class WorkflowUIApp(cli.Application):
"""
Launch a GUI for managing the MRVA workflow end-to-end.
The workflow UI provides a step-by-step interface for:
- Validating the gh-mrva tool installation
- Configuring gh-mrva settings
- Selecting CodeQL databases via the db-selector-gui
- Choosing query files for analysis
- Submitting variant analysis jobs
- Monitoring job status
- Downloading results and databases
All steps execute commands inside the specified Docker container
and display real-time output with file path highlighting.
"""
container_name = cli.SwitchAttr(
"--container-name", str, default="mrva-ghmrva",
help="Name of the Docker container to execute commands in (default: mrva-ghmrva)"
)
def main(self):
"""Launch the workflow UI."""
try:
create_gui(self.container_name)
except Exception as e:
print(f"Error launching GUI: {e}", file=sys.stderr)
return 1
return 0
if __name__ == "__main__":
WorkflowUIApp.run()