Add Seven Bridges API scripts (Python rewrite of #288)#293
Merged
amc-corey-cox merged 5 commits intomainfrom Apr 1, 2026
Merged
Add Seven Bridges API scripts (Python rewrite of #288)#293amc-corey-cox merged 5 commits intomainfrom
amc-corey-cox merged 5 commits intomainfrom
Conversation
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
Contributor
There was a problem hiding this comment.
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.csvmanifest 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.
Codecov Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
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
sbg_api.py— shared config, token resolution, API clientgenerate_manifest.py— crawl SBG folders, producebatch_tasks.csvsubmit_tasks.py— read manifest, resolve folders, launch taskscheck_status.py— dashboard of running tasks with zombie detectionCloses #287
Test plan