Skip to content

Conversation

@pcm32
Copy link
Member

@pcm32 pcm32 commented Jan 5, 2026

Description

The search_tools_by_name() function was using gi.tools.get_tools(name=query), which doesn't support substring matching in the Galaxy/bioblend API. This resulted in tools not being found even when they existed in the instance. For example, searching for "celltypist" would return 0 results even though tools like celltypist_predict exist.

This PR changes the implementation to fetch all tools and filter client-side for substring matches in both tool name and ID with case-insensitive matching, matching the behavior already used in search_tools_by_keywords().

Type of Change

  • 🐛 Bug fix (non-breaking change that fixes an issue)
  • ✨ New feature (non-breaking change that adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 📚 Documentation update
  • ⬆️ Dependency update
  • 🧰 Maintenance/chore

Checklist

  • I have performed a self-review of my code
  • I have added tests for my changes
  • I have updated the documentation accordingly
  • My changes generate no new warnings

Related Issues

Closes #

Testing

Verified manually against a production Galaxy instance that celltypist tools are now found when searching for "celltypist", whereas previously they returned 0 results.

The get_tools(name=query) bioblend API call does not support substring
matching and returns empty results for partial matches. This fix changes
search_tools_by_name() to:

1. Fetch all tools using get_tools() without the name parameter
2. Filter client-side for substring matches in both tool name and ID
3. Support case-insensitive matching

This ensures tools like 'celltypist_predict' are found when searching
for 'celltypist', matching the behavior of search_tools_by_keywords.

Updated tests to reflect the new behavior where get_tools() is called
without parameters and filtering happens client-side.
@pcm32 pcm32 marked this pull request as draft January 5, 2026 15:27
@pcm32 pcm32 marked this pull request as ready for review January 5, 2026 16:51
Copy link
Member

@dannon dannon left a comment

Choose a reason for hiding this comment

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

@pcm32 Nice! I looked at this earlier and I was going to suggest that we needed to look at description too, to match search_tools_by_keywords more completely, but you've already got to it :)

@dannon dannon merged commit 19cf115 into galaxyproject:main Jan 5, 2026
6 checks passed
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.

2 participants