Skip to content

fix: gracefully handle missing RT metadata during RT tolerance filtering#52

Open
janusson wants to merge 2 commits into
mainfrom
fix-rt-tolerance-metadata-5829458267677549992
Open

fix: gracefully handle missing RT metadata during RT tolerance filtering#52
janusson wants to merge 2 commits into
mainfrom
fix-rt-tolerance-metadata-5829458267677549992

Conversation

@janusson

@janusson janusson commented Jul 1, 2026

Copy link
Copy Markdown
Owner
  • Updated src/MassFlow/similarity.py to correctly parse q_rt and ref_rt during filtering.
  • Included regression tests in tests/test_similarity.py focusing on string/missing value parsing and valid RT filtering paths.

PR created automatically by Jules for task 5829458267677549992 started by @janusson

Modifies the `rt_tolerance` filtering logic in `SimilarityEngine.search` to use `_is_missing()` for parsing metadata. It will now safely ignore strings like 'None' or 'N/A' that are often populated in `matchms` spectra instead of crashing or raising a `ValueError`. Added unit tests for this functionality.

Co-authored-by: janusson <34246713+janusson@users.noreply.github.com>
@google-labs-jules

Copy link
Copy Markdown
Contributor

👋 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 @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@janusson

janusson commented Jul 3, 2026

Copy link
Copy Markdown
Owner Author

@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. Please adjust to resolve branch conflicts.

@google-labs-jules

Copy link
Copy Markdown
Contributor

@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. Please adjust to resolve branch conflicts.

I have fetched the latest changes from the main branch and rebased my PR branch. The core of my logic changes from this PR (using _is_missing for q_rt and ref_rt inside MassFlow.similarity) were already merged to main in 22a47e5, which added the rt_tolerance feature. Given that my work is now completely integrated on the main branch, I have left my branch empty against it. Please let me know if there's anything else required to resolve this pull request!

Co-authored-by: janusson <34246713+janusson@users.noreply.github.com>
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