Fix Biolink type lookup filters - #16
Merged
Merged
Conversation
There was a problem hiding this comment.
🟢 Approval recommended
The changes are focused, with only a non-blocking OpenAPI documentation nit remaining.
Pull request overview
Fixes Biolink type lookup filtering by supporting singular/plural query parameters and normalizing prefixes.
Changes:
- Supports
biolink_typeandbiolink_types. - Removes the optional
biolink:prefix. - Adds coverage for both parameter forms.
File summaries
| File | Summary |
|---|---|
test/test_lookup_query.py |
Adds singular and plural filter coverage. |
src/nameres/handlers/lookup.py |
Updates alias handling and prefix normalization; OpenAPI documentation for the plural query alias remains a nit. |
Review details
Suppressed comments (1)
src/nameres/handlers/lookup.py:268
- This adds
biolink_typesas a public query alias, but the OpenAPI definitions for both/lookupquery operations still advertise onlybiolink_type; the existing plural schema is a request-body property. Without updating the API specification, generated clients and Swagger users cannot discover or reliably use the alias. Please add the plural query parameter to the relevant OpenAPI operations as well.
biolink_types = [*self.get_arguments("biolink_types"), *self.get_arguments("biolink_type")]
- Files reviewed: 2/2 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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.
biolink_typeparameter and thebiolink_typesalias.biolink:prefix correctly usingremoveprefix.