Merged
Conversation
Only print per-sample missing warnings when debug=True. By default print a summary warning.
There was a problem hiding this comment.
Pull request overview
This PR modifies the warning behavior for missing samples in process_and_reroot_lineages. Previously, a per-sample warning was always printed for each sample not found in the FASTA file. Now, per-sample warnings are only shown when debug=True, and a summary warning (showing count and percentage) is always displayed when any samples are missing.
Changes:
- Gate per-sample "not found in FASTA" warnings behind the
debugflag, and add a summary warning showing the count/percentage of missing samples - Update the existing test to verify the new summary warning and confirm per-sample warnings are suppressed when
debug=False - Add two new tests: one verifying per-sample warnings appear with
debug=True, and one confirming the summary warning fires for any number of missing samples
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| barcodeforge/ref_muts.py | Track missing_count, gate per-sample warnings behind debug, add summary warning with count and percentage |
| tests/test_ref_muts.py | Update existing test assertions for summary warning; add test_..._debug_shows_per_sample_warning and test_..._summary_warning_any_missing tests |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Only print per-sample missing warnings when debug=True. By default print a summary warning.