Skip to content

ui: add Section 4 to invoke spimpack package from the Streamlit UI#11

Draft
Copilot wants to merge 2 commits into
mainfrom
copilot/add-spimpack-invocation
Draft

ui: add Section 4 to invoke spimpack package from the Streamlit UI#11
Copilot wants to merge 2 commits into
mainfrom
copilot/add-spimpack-invocation

Conversation

Copilot AI commented Jun 26, 2026

Copy link
Copy Markdown

The Streamlit UI only supported defining the manifest and dataset; there was no way to run spimpack package without leaving the browser.

Changes

ui/app.py

  • Added Section 4 – Run spimpack package at the bottom of the page
  • Inputs: manifest save path, output directory, backend selector (symlink), relative-symlinks checkbox
  • Live command preview updates as fields are filled:
    spimpack package --manifest /data/project/manifest.yml --output-dir /data/bids_output --backend symlink
  • "💾 Save Files & ▶️ Run spimpack package" button:
    • Writes manifest.yml + TSV to disk at the specified path
    • Calls run_package() in-process (via contextlib.redirect_stdout) to capture and display output
    • Shows inline success/error feedback with captured stdout
  • Button is disabled while validation errors exist or required paths are empty
  • Added import contextlib, import io, and imports of run_package / ValidationError from spimpack

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants