Skip to content

test: CLI integration tests for gold-standard, external-predict, pilot-confident, diversity-check - #85

Merged
cschanhniem merged 2 commits into
mainfrom
feat/cli-coverage-tests
Jun 28, 2026
Merged

cschanhniem merged 2 commits into
mainfrom
feat/cli-coverage-tests

Conversation

@cschanhniem

Copy link
Copy Markdown
Collaborator

Summary

Adds 14 new CLI integration tests to tests/test_cli.py covering the four CLI handlers that had no test coverage.

Test class Handler covered Tests
TestGoldStandard _run_gold_standard 5
TestExternalPredict _run_external_predict 4
TestPilotConfident _run_pilot_confident 3
TestDiversityCheck _run_diversity_check 2

Also adds a _write_panel() helper and PANEL_CSV_* constants (using actual SEED-009_VAR_033 and SEED-007_VAR_009 sequences from the current pilot panel) to avoid repeating panel setup across tests.

Coverage impact

Module Before After
cli.py 51% 86%
Overall 88% 96%

Test plan

  • All 1272 tests pass (1258 existing + 14 new)
  • TestGoldStandard::test_gold_standard_includes_disclaimer verifies AUROC=0.8420 in output (regression guard for the AUROC fix in PR docs: wet-lab probability analysis, gold standard calibration, AUROC fix #81)
  • TestExternalPredict verifies FASTA contains actual sequences (RRLPRPGYMPRP) — regression guard for stale-FASTA issue discovered in this session
  • TestPilotConfident::test_pilot_confident_filters_to_keep_ids verifies n_confident=1 from n_input=2 when only one ID is in --keep

🤖 Generated with Claude Code

cschanhniem and others added 2 commits June 28, 2026 23:15
…pilot-confident, diversity-check

Adds 14 new tests across 4 new test classes:
- TestGoldStandard (5 tests): returns 0, creates output, panel range in output,
  stdout status=ok, AUROC=0.8420 disclaimer present
- TestExternalPredict (4 tests): returns 0, creates FASTA with sequences,
  creates checklist with CAMPR4 reference, stdout n_candidates
- TestPilotConfident (3 tests): returns 0, creates .csv and .md, filters to
  specified keep IDs (n_confident=1 from n_input=2)
- TestDiversityCheck (2 tests): returns 0, creates report with Diversity heading

Coverage: cli.py 51%→86%, overall 88%→96%
- Strengthen n_gold_scored assertion to == 6 (not >= 4)
- Add candidate ID assertions to diversity check test
- Rename helper param rows -> two_rows for clearer semantics
- Merge redundant gold standard zero/exists tests into one

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@cschanhniem
cschanhniem merged commit f3c640d into main Jun 28, 2026
@cschanhniem
cschanhniem deleted the feat/cli-coverage-tests branch June 28, 2026 16:22
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.

1 participant