Repository navigation
Conversation
padix-key
requested changes
Nov 11, 2026
padix-key
left a comment
Member
There was a problem hiding this comment.
Thanks for the fix, I only have one minor comment.
| "incomplete_entry", | ||
| ["@seq", "@seq\nACGT", "@seq\nACGT\n+", "@seq\nACGT\n+\n!!"], | ||
| ) | ||
| def test_incomplete_last_entry(reader, prefix, incomplete_entry): |
Member
There was a problem hiding this comment.
Could you add a docstring for this test?
Author
There was a problem hiding this comment.
Thanks for the review and the positive feedback! Added the requested docstring to test_incomplete_last_entry() to explain that both readers reject incomplete final FASTQ entries, with or without a preceding complete entry.
Validation: 92 FASTA/FASTQ tests passed; Ruff lint and formatting checks passed.
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.
FastqFile.read_iter()silently stops when the final FASTQ entry ends in its sequence or quality section. For example,@read\nACGT\n+\n!!produces no entries instead of reporting the truncated quality scores, whileFastqFile.read()raisesInvalidFileErrorfor the same input.Check the parser state when the iterator reaches EOF and raise the same incomplete-entry error as the non-streaming reader. The regression test covers a header without sequence data, a missing separator, absent quality scores, and truncated quality scores, both alone and after a complete entry, for both readers.
Validation on Windows with CPython 3.12.12 and NumPy 2.5.4 (
PYTHONPATHpointed at this checkout'ssrc):python -m pytest tests/sequence/test_fasta.py tests/sequence/test_fastq.py -p no:cacheprovider -q— 92 passed.ruff check src/biotite/sequence/io/fastq/file.py tests/sequence/test_fastq.py— passed with Ruff 0.9.7.ruff format --check src/biotite/sequence/io/fastq/file.py tests/sequence/test_fastq.py— passed.Before the fix, the new regression cases produced 8 failures for
read_iter()and 8 passes forread(). The checkout's Python modules were tested with the native Rust extension from the official Biotite 2.0.0cp312-win_amd64wheel. A full source build and the full test suite were not run.