Skip to content

Dep/handle n fraction with sassy - #192

Merged
noamteyssier merged 7 commits into
dev-0.5.11from
dep/handle-n-fraction-with-sassy
Jul 6, 2026
Merged

Dep/handle n fraction with sassy#192
noamteyssier merged 7 commits into
dev-0.5.11from
dep/handle-n-fraction-with-sassy

Conversation

@noamteyssier

Copy link
Copy Markdown
Collaborator

No description provided.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces the --max-n-frac command-line option to limit the fraction of ambiguous N bases allowed in fuzzy matches, defaulting to k / pattern_length. The changes integrate this option across FuzzyMatcher, FuzzyPatternCounter, and FuzzySplitter, alongside comprehensive unit tests. The review feedback suggests adding pattern length validation to FuzzyPatternCounter to prevent potential panics from variable-length patterns, and capping the default fraction calculation at 1.0 to handle cases where the edit distance k is larger than the pattern length.

Comment thread src/commands/grep/pattern_count/fuzzy_pc.rs
Comment thread src/commands/utils.rs
@noamteyssier
noamteyssier merged commit e9d3c9b into dev-0.5.11 Jul 6, 2026
8 checks passed
@noamteyssier
noamteyssier deleted the dep/handle-n-fraction-with-sassy branch July 6, 2026 20:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant