You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Follow-up to PR #295's design discussion (thread).
Today the result-submission flow is: a contributor runs meds-dev-pack-result to produce result.json, then manually navigates to the GitHub issue form, pastes the JSON into a fenced code block, types the dataset / task / model names by hand, and submits. The submission workflow then parses that issue body and validates.
Manual copy-paste between a JSON file and a textarea invites copy errors.
The contributor doesn't see whether the JSON is valid until after the workflow has fired (or until they trigger validation locally with meds-dev-validate-result, which is a separate step).
Submission requires browser navigation, which interrupts a CLI-driven workflow.
Proposal: meds-dev-submit-result <result.json>
A client-side CLI that does the whole thing in one step:
meds-dev-submit-result path/to/result.json
What it does:
Loads and validates the JSON locally via Result.from_json (the existing logic). Fails fast with a clear error if invalid — contributor never gets a "broken submission" issue filed.
Confirms the GitHub repo (Medical-Event-Data-Standard/MEDS-DEV by default; configurable for forks/testing).
Builds the issue body with the JSON pre-pasted into the right shape, the typed fields pre-filled from the parsed JSON (result.dataset → form field, etc.), and the result-submission label applied.
Opens the issue via gh issue create (relies on the local gh auth).
Returns the issue URL.
Implementation lives in MEDS_DEV.web.submit_result (or submit_submission); CLI: meds-dev-submit-result.
Why this is better than form-only
Validation happens client-side, so invalid submissions never reach the workflow at all.
No copy-paste: the JSON is read from disk; the form fields are derived from it.
No browser: contributors in a CLI loop can submit without context-switching.
Form fields and JSON are guaranteed to match because both are populated from the same parsed Result object.
Plays well with the existing form: web-form submissions still work for users who don't want to install meds-dev. The CLI is opt-in convenience, not a replacement.
Open questions
Should the CLI also poll for issue closure and report success/failure back to the user?
What about non-Medical-Event-Data-Standard forks? Default to whatever gh repo view returns? Take an explicit --repo flag?
For users who already use gh issue create directly: should there be a --print-body mode that just emits the body for piping (meds-dev-submit-result --print-body x.json | gh issue create --body-file -)?
Could this CLI eventually open a PR against the _results branch directly, bypassing the issue layer entirely? (Speculative; would need different permission model.)
Acceptance criteria
meds-dev-submit-result <result.json> validates and submits in one invocation.
Local validation: invalid JSON, missing fields, NaN values, etc. are caught before the issue is opened.
Authenticated via the user's gh CLI; no token-management required.
Doctest / unit-test coverage for the body-building logic (no live GitHub call required for those).
Mention in src/MEDS_DEV/web/README.md as the recommended submission path; preserve the form as a fallback.
Follow-up to PR #295's design discussion (thread).
Today the result-submission flow is: a contributor runs
meds-dev-pack-resultto produceresult.json, then manually navigates to the GitHub issue form, pastes the JSON into a fenced code block, types the dataset / task / model names by hand, and submits. The submission workflow then parses that issue body and validates.There are a few sharp edges here:
meds-dev-validate-result, which is a separate step).Proposal:
meds-dev-submit-result <result.json>A client-side CLI that does the whole thing in one step:
What it does:
Result.from_json(the existing logic). Fails fast with a clear error if invalid — contributor never gets a "broken submission" issue filed.Medical-Event-Data-Standard/MEDS-DEVby default; configurable for forks/testing).result.dataset→ form field, etc.), and theresult-submissionlabel applied.gh issue create(relies on the localghauth).Implementation lives in
MEDS_DEV.web.submit_result(orsubmit_submission); CLI:meds-dev-submit-result.Why this is better than form-only
Resultobject.meds-dev. The CLI is opt-in convenience, not a replacement.Open questions
gh repo viewreturns? Take an explicit--repoflag?gh issue createdirectly: should there be a--print-bodymode that just emits the body for piping (meds-dev-submit-result --print-body x.json | gh issue create --body-file -)?_resultsbranch directly, bypassing the issue layer entirely? (Speculative; would need different permission model.)Acceptance criteria
meds-dev-submit-result <result.json>validates and submits in one invocation.ghCLI; no token-management required.src/MEDS_DEV/web/README.mdas the recommended submission path; preserve the form as a fallback.Related