Repository navigation
test: CLI integration tests for gold-standard, external-predict, pilot-confident, diversity-check - #85
Merged
Conversation
…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>
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
Adds 14 new CLI integration tests to
tests/test_cli.pycovering the four CLI handlers that had no test coverage.TestGoldStandard_run_gold_standardTestExternalPredict_run_external_predictTestPilotConfident_run_pilot_confidentTestDiversityCheck_run_diversity_checkAlso adds a
_write_panel()helper andPANEL_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
cli.pyTest plan
TestGoldStandard::test_gold_standard_includes_disclaimerverifies AUROC=0.8420 in output (regression guard for the AUROC fix in PR docs: wet-lab probability analysis, gold standard calibration, AUROC fix #81)TestExternalPredictverifies FASTA contains actual sequences (RRLPRPGYMPRP) — regression guard for stale-FASTA issue discovered in this sessionTestPilotConfident::test_pilot_confident_filters_to_keep_idsverifies n_confident=1 from n_input=2 when only one ID is in--keep🤖 Generated with Claude Code