Add FastqFile.Offset enum - #928
Conversation
|
Thanks for tackling the issue! This change is planned for |
| assert np.array_equal(test_scores, ref_scores) | ||
|
|
||
|
|
||
| @pytest.mark.parametrize( |
There was a problem hiding this comment.
Without the need of the legacy names I think this test can be omitted.
There was a problem hiding this comment.
Addressed in eb4753b7 — I removed the obsolete legacy-string test. The broader update also applies FastqFile.Offset throughout biotite.application.sra. Validation: 23 FASTQ tests passed and pixi run lint completed successfully.
Merging this PR will improve performance by 13.39%
Performance Changes
Tip Curious why this is faster? Comment Comparing Footnotes
|
Summary
FastqFile.OffsetIntEnumfor the supported FASTQ quality-score encodings.read(),read_iter(), andwrite_iter()type hints and documentation.biotite.application.srato expose the same offset API.Motivation
The enum makes the supported FASTQ variants discoverable while mapping directly to their numeric ASCII offsets. Since this change targets Biotite v2, the legacy string aliases are removed rather than carried forward as compatibility behavior.
Validation
pixi run -e test test tests/sequence/test_fastq.py -q— 23 passedpixi run lintCloses #923