Skip to content

Add Seven Bridges API scripts (Python rewrite of #288)#293

Merged
amc-corey-cox merged 5 commits intomainfrom
sevenbridges-scripts
Apr 1, 2026
Merged

Add Seven Bridges API scripts (Python rewrite of #288)#293
amc-corey-cox merged 5 commits intomainfrom
sevenbridges-scripts

Conversation

@amc-corey-cox
Copy link
Copy Markdown
Collaborator

@amc-corey-cox amc-corey-cox commented Mar 31, 2026

Summary

  • Python rewrite of the PowerShell scripts from Add SevenBridges API scripts for automated task execution and status monitoring #288
  • Four scripts using typer for CLI and urllib for HTTP (no new dependencies)
    • sbg_api.py — shared config, token resolution, API client
    • generate_manifest.py — crawl SBG folders, produce batch_tasks.csv
    • submit_tasks.py — read manifest, resolve folders, launch tasks
    • check_status.py — dashboard of running tasks with zombie detection

Closes #287

Test plan

  • Generate manifest from live SBG project
  • Submit a single test task and verify it launches
  • Check status dashboard shows running tasks

Python rewrite of the PowerShell scripts from #288. Four scripts
using typer for CLI and urllib for HTTP (no new dependencies):

- sbg_api.py: shared config, token resolution, API client
- generate_manifest.py: crawl SBG folders, produce batch_tasks.csv
- submit_tasks.py: read manifest, resolve folders, launch tasks
- check_status.py: dashboard of running tasks with zombie detection

Closes #287
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new scripts/sevenbridges/ toolkit (Python/Typer + stdlib urllib) to automate Seven Bridges BioData Catalyst task execution: generate a CSV manifest from project folders, submit harmonization tasks from that manifest, and monitor running task status.

Changes:

  • Introduces a small SBG API helper (sbg_api.py) for token resolution and authenticated HTTP requests.
  • Adds three CLIs: manifest generator, batch task submitter (with throttling), and a running-task status dashboard (with zombie detection).
  • Ignores the generated batch_tasks.csv manifest via .gitignore.

Reviewed changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
scripts/sevenbridges/sbg_api.py Shared token/config + urllib request helper + folder listing utility.
scripts/sevenbridges/generate_manifest.py Crawls SBG folder structure and writes batch_tasks.csv.
scripts/sevenbridges/submit_tasks.py Reads manifest, resolves folders, creates and runs SBG tasks with throttling.
scripts/sevenbridges/check_status.py Displays a dashboard of running tasks and flags zombies via execution details.
scripts/sevenbridges/README.md Setup + usage documentation for the new scripts.
.gitignore Ignores generated Seven Bridges manifest CSV.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread scripts/sevenbridges/sbg_api.py Outdated
Comment thread scripts/sevenbridges/sbg_api.py
Comment thread scripts/sevenbridges/sbg_api.py
Comment thread scripts/sevenbridges/README.md
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Apr 1, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 65.63%. Comparing base (9dd6efc) to head (49b81e6).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #293      +/-   ##
==========================================
- Coverage   74.36%   65.63%   -8.73%     
==========================================
  Files           6        5       -1     
  Lines         433      227     -206     
==========================================
- Hits          322      149     -173     
+ Misses        111       78      -33     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@amc-corey-cox amc-corey-cox merged commit cbb7c9d into main Apr 1, 2026
3 checks passed
@amc-corey-cox amc-corey-cox deleted the sevenbridges-scripts branch April 1, 2026 18:03
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.

Add SevenBridges API scripts for automated task execution and status monitoring

3 participants