Fix retention time filtering for missing metadata#44
Conversation
Updates `SimilarityEngine.search` to use a `try...except` block when calculating the difference between retention times. This prevents crashes when the query or reference spectrum has non-numeric RT metadata (e.g., `'NaN'` or `'None'`). Missing values are now safely ignored, bypassing the retention time tolerance check as intended. Co-authored-by: janusson <34246713+janusson@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
|
@jules I have made significant changes to the codebase since this PR was opened. Please re-evaluate your implementation based on the current state of the main branch and update the code to ensure it still fits the current architecture. |
I have successfully rebased the branch to the current state of the main branch and confirmed that the tests pass. The codebase update to main already includes |
Updates `SimilarityEngine.search` to use a `try...except` block when calculating the difference between retention times. This prevents crashes when the query or reference spectrum has non-numeric RT metadata (e.g., `'NaN'` or `'None'`). Missing values are now safely ignored, bypassing the retention time tolerance check as intended. Co-authored-by: janusson <34246713+janusson@users.noreply.github.com>
Fixes an issue where
SimilarityEnginewould crash withValueErrorwhen encountering non-numeric retention time metadata (like"None"or"NaN") during thert_tolerancecheck. The retention time values are now safely parsed using atry...exceptblock forValueErrorandTypeError, and missing metadata is properly ignored without crashing the engine.PR created automatically by Jules for task 17231161644105973632 started by @janusson