Various AI agent-generated fixes - #348
Merged
Merged
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #348 +/- ##
==========================================
+ Coverage 90.87% 92.12% +1.24%
==========================================
Files 31 29 -2
Lines 2400 2857 +457
==========================================
+ Hits 2181 2632 +451
- Misses 219 225 +6
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Had an AI agent fix up grammar, typos and formatting.
GeneticCode is an AbstractDict{UInt64, AminoAcid}, and exposes a getindex
function which does not boundscheck, thereby exposing UB.
I think this issue is a smell of a deeper design issue with GeneticCode: If it
is an AbstractDict, why is the key an undocumented and internal encoding?
Why is GeneticDict private? How can users make their own?
Here, do a bandaid solution. We fix it properly in a breaking release.
When matching empty strings in sequence search, an edge case meant that the search could not advance, resulting in an infinite loop. Always advance the search even for zero-length results.
Fix issue where join! on unknown-sized iterators did not shrink the target sequence after joining. Also redesign it: Assume AbstractArray, AbstractSet and Tuple are stateless, and for all other iterables, collect the iterable first. Then, precompute the full length, copy in the content and verify the size matches.
E.g. `findnext(!=(DNA_A), rna"A")` should just return 1 without searching the RNA because DNA is unencodable in the RNA alphabet.
Previously, this would mutate the sequence and then throw when attempting to resize!. Now, add a method that throws up front. This does not solve the problem generally for non-resizable BioSequences, but I don't think there is a good way to address that. At least we can add this safety check even while not solving it generically.
GeneticCode subtypes AbstractDict, and so must yield Pairs.
This was documented but not actually implemented. Implementation is trivial.
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.
Had an AI agent review bugs in the codebase. I will fix them over a period of time, then merge.