Add RunConfig & GUI for interactive pipeline execution#96
Open
oh-da wants to merge 1 commit into
Open
Conversation
Refactor the complete pipeline to be configuration-driven and add a native desktop GUI (pywebview) for running it without code. Pipeline (scripts/run_complete_pipeline.py): - New RunConfig dataclass describing one run: input files, output dir, optional-step toggles, and run metadata (run_by, remarks, run_id) - CompleteHubPipeline now takes a RunConfig; all hardcoded input paths, skip-flags and output locations are sourced from it (CLI still works via default_run_config()) - resolve_inputs_from_directory(): auto-detect input files in a folder - run_pipeline() shared entry point for CLI and GUI - Per-run output directory plus a run log (run_log.json / run_log.txt) capturing input files used (with size/mtime/sha256), timestamps, who ran it, remarks, options, outputs produced and a results summary - Dependency self-check now only prompts when run directly (import-safe) GUI (app/run_model_gui.py + app/gui/*): - Native folder/file pickers; pick a directory to auto-detect inputs or choose each file individually - Name + remarks fields, option toggles, output-dir selection - Live log streaming and a results panel with output file shortcuts Docs: app/RUN_MODEL_GUI.md, README pointer, pywebview in requirements.txt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Refactors the pipeline to support both CLI and GUI execution modes by introducing a
RunConfigdataclass that fully describes a single pipeline run. Adds a new desktop GUI application (app/run_model_gui.py) with native file pickers, auto-detection of input files from directories, and comprehensive run logging.Key Changes
Core Pipeline Refactoring
run_byandremarks)validate()) and property accessors for output directoriescheck_and_install_dependencies()behindif __name__ == "__main__"guard so importing the module (e.g., by the GUI) doesn't block on interactive inputINPUT_FILE_HINTSdict andresolve_inputs_from_directory()function enable scanning a folder for expected files by extension and name patternsrun_pipeline(config)function (visible in truncated section) replaces direct script execution, accepting aRunConfiginstead of global constantsrun_<timestamp>.loginside the output directoryGUI Application (
app/run_model_gui.py)run_by) and free-text remarksskip_demand_data,skip_spatial_layers,skip_demographics,run_mc_distributionGUI Frontend (
app/gui/)Run Logging
Pipeline Integration
CompleteHubPipeline.__init__()now accepts optionalRunConfig; defaults todefault_run_config()for CLI behaviorstep_1_load_all_data(), etc.) now read fromself.configinstead of global constantsself.config.processed_dirandself.config.results_dirDocumentation
Notable Implementation Details
python scripts/run_complete_pipeline.pystill works with default pathshttps://claude.ai/code/session_01DccAxW3N1TXdepCKsTJfnF