Repository navigation
Conversation
The 21 checks of tests/test_hba_copy_number.py (four, three, two and five genes, the not-assessed cases, the MAPQ 0 guard, the command line's refusals and the demo's HBA table) now run in og-cn's cargo test through og cn's command line, in process. The Python file is gone; the docs that named it name the cargo test. Bead: D1
The checks of tests/test_bloodtype_report.py (red cell systems, RhD from depth, the VCF edge cases, null-row orientation, every null and rare HPA row positive and negative, gVCF records and blocks) and of tests/test_bloodtype_hpa_hna.py (platelet and neutrophil sites, two-allele antigens, meanings, HNA-1) now run in og-bloodtype's cargo test through og bloodtype's command line, in process. The marker table is read by the test itself, not by the crate's reader. Both Python files are gone. Bead: D1 Bead: D3
…sources The schema part of tests/test_traits_table.py (at least 30 rows, og traits check passes, a planted bad row fails) runs in og-steps' cargo test. Its --fasta and --online modes, which the e2e case traits-panel-1 and the curation guide in docs/42-traits.md use, are a new verb, og dev traits-sources, with unit tests on a synthetic FASTA and canned PubMed and dbSNP answers. The Python file is gone. Bead: D1
Temporary: the HBA row's MAPQ 0 guard at 0, KEL_02N03 with REF and ALT swapped, the lactase row's ref N, and an off-by-one in og dev traits-sources' FASTA read. Each must turn its crate's cargo test red in CI; the next commit reverts this one. Bead: D1
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 25 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
Reverts the previous commit: the ported tests went red on each planted control in CI and are green without them. Bead: D1
Collaborator
Author
|
@coderabbitai review |
Action not completed
|
# Conflicts: # CHANGELOG.md
This branch has not been deployed
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.
Part of #411. Settles D1 (no Python in 1.0.0) for four test files, and keeps the blood-group, HPA and HNA rows of D3 under test.
Problem
Four Python files tested
og cn,og bloodtypeandog traitsby running the binary as a subprocess:tests/test_hba_copy_number.py,tests/test_bloodtype_report.py,tests/test_bloodtype_hpa_hna.pyandtests/test_traits_table.py, about 1,050 lines. 1.0.0 ships without Python, so these checks had to move.test_traits_table.pywas also a tool: the e2e casetraits-panel-1and the "Adding a row" steps of the traits page ran its--fastaand--onlinemodes.Fix
Every check moves into
cargo test, through each tool's own command line, in process. The four Python files are deleted.test_hba_copy_number.py, all 21 checks: 4, 3, 2 and 5 genes, an estimate between counts, low or disagreeing flanks, the MAPQ 0 guard (none, 1%, 3%), no gene at all, the command line's refusals, the demo's HBA tablerust/crates/og-cn/tests/port_tests_cn_traits.rs, 19 teststest_bloodtype_report.pysections 1 to 14: markers against the rules, nothing planted, ABO, RhD from depth, Duffy and Kell, the VCF edge cases, a BAM without some contigs, null-row and HPA orientation, every null and rare HPA row positive and negative, gVCF records and blocks, null alleles, common variants, another ALT at a null row, two null copiesrust/crates/og-bloodtype/tests/port_tests_cn_traits.rs,s01tos14test_bloodtype_hpa_hna.pysections 1 to 4: HPA and HNA sites at their GRCh38 positions, two-allele antigens at 0/0, 0/1 and 1/1, the meaning of a missing antigen, HNA-1s15tos18test_traits_table.pyschema part: at least 30 rows,og traits checkpasses, a planted bad row failsrust/crates/og-steps/tests/traits_table.rs, 3 teststest_traits_table.py --fastaand--onlineog dev traits-sources(rust/crates/og-dev/src/traits_sources.rs), with unit tests on a synthetic FASTA and canned PubMed and dbSNP answersThe bloodtype test reads
assets/bloodtype_markers.tsvwith its own parser, not the crate's, so a reader bug cannot hide a table bug.Files outside the three test paths, each needed by the switch or the deletion:
rust/crates/og-dev/src/traits_sources.rs,rust/crates/og-dev/src/lib.rs,rust/og/src/main.rs: the newog dev traits-sourcesverb and its usage line.tests/e2e/traits-panel-1.sh: runsog dev traits-sourceswhere it ran the Python file. Same checks, same controls.docs/42-traits.md: the "Adding a row" steps nameog traits checkandog dev traits-sources.docs/35-paralogs.md,docs/cn-loci.md,tests/demo/make_demo_sample.py,assets/traits.tsv(a header comment): they named the deleted files.CHANGELOG.md: one line.No pipeline output, option or file name changes.
Decision: the e2e scope table does not list
rust/paths for any case, so a later change totraits_sources.rsalone does not runtraits-panel-1. Python'stests/test_traits_table.pyhad the same gap. This PR keeps the scope rules as they are; widening them is the e2e scope's own change.How it was checked
og dev traits-sources. Guard'scargo test --workspace --no-fail-fastwent red on each, and on nothing else: https://github.com/GeiserX/OwnGenome/actions/runs/43745565116/job/132907983428 (step "cargo test"). The six red targets: og-bloodtypeport_tests_cn_traits(s08), og-cnport_tests_cn_traits(3 tests) and its lib (hba_counts_and_guards), og-dev lib (3traits_sourcestests), og-stepstraits_table(the_table_passes_og_traits_check) and its lib (4traitstests that read the shipped table). The next commit reverts them; the tree is the same as before the plant.cargo fmt --check,cargo clippy --workspace --all-targets --all-features -D warningsandcargo doc -D warningspass.traits-panel-1ran on the fixture reference with the new verb: 25 rows checked against the FASTA, 38 PubMed ids and 36 rsIDs looked up, all pass; the planted copy fails and names both the wrong base and the missing PubMed id.ogmany times. The cargo tests run in about 2.7 s (og-bloodtype 2.5 s, og-cn under 0.1 s, og-steps and og-dev under 0.1 s).Beads: D1, D3.