Skip to content

[codex] Improve CLI validation errors#147

Merged
iskandr merged 1 commit intomasterfrom
improve-cli-errors
Apr 30, 2026
Merged

[codex] Improve CLI validation errors#147
iskandr merged 1 commit intomasterfrom
improve-cli-errors

Conversation

@iskandr
Copy link
Copy Markdown
Contributor

@iskandr iskandr commented Apr 30, 2026

Summary

This PR improves the user-facing CLI error path for missing prediction requests.

  • Stops printing the full parsed argparse namespace before every run.
  • Converts ValueError and OSError failures from the CLI prediction pipeline into normal argparse errors with usage text and exit code 2.
  • Adds upfront validation for missing MHC source and missing input source so bare topiary reports both required parts instead of surfacing a traceback.
  • Adds regression coverage for bare topiary and missing MHC source errors.
  • Bumps the package version to 5.10.1 and updates the changelog.

Root Cause

script.main printed parsed arguments unconditionally and let validation errors raised from predict_epitopes_from_args escape as normal Python exceptions. That made missing-argument mistakes look like internal crashes.

Validation

  • ./lint.sh
  • ./test.sh (1239 passed, 3 skipped, 11 warnings)

@coveralls
Copy link
Copy Markdown

Coverage Status

coverage: 89.171% (+0.3%) from 88.876% — improve-cli-errors into master

@iskandr iskandr marked this pull request as ready for review April 30, 2026 20:05
@iskandr iskandr merged commit 2b283e5 into master Apr 30, 2026
8 checks passed
@iskandr iskandr deleted the improve-cli-errors branch April 30, 2026 20:05
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