Repository navigation
fix: parse EBI OLS lookups given with the /ols4/ path - #886
Merged
Merged
Conversation
Guided choices with nt:possibleValuesFromApi pointing at https://www.ebi.ac.uk/ols4/api/select showed no suggestions. Only the older /ols/ path was routed to OlsParser; the /ols4/ path fell through to CanonicalParser, which finds no top-level results array in the OLS answer. Both paths now go to OlsParser (/ols/ redirects to /ols4/ and answers the same). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Problem
A guided choice whose
nt:possibleValuesFromApipoints at EBI OLS under its current path shows no suggestions, e.g.There is no error. The field just stays empty. The same happens in the live template https://w3id.org/np/RAIV7ms4vqtxSccNNQvTT8uiSYGKCtpgUGgUD3O4MbG_U ("Expressing an association between an organism and a nucleotide sequence"), whose "choose the type of sample" field uses
https://www.ebi.ac.uk/ols4/api/select?ontology=uberon&q=.Cause
LookupApiRegistrysends onlyhttps://www.ebi.ac.uk/ols/api/selecttoOlsParser. An/ols4/URL falls through toCanonicalParser. That parser looks for a top-level array of results withuri/@idfields, but OLS answers{"response": {"docs": [{"iri": …}]}}, so it finds nothing.The old
/ols/path still works because EBI redirects it (301) to/ols4/, and the answer is the same.Fix
OlsParseris now registered for both/ols/api/selectand/ols4/api/select.Tests
LookupApiRegistryTest: new row checking that an/ols4/URL is handled byOlsParser.LookupApis.getPossibleValueswith the NCBITaxon URL above and the termmousenow returns 10 NCBITaxon terms with labels.heart.🤖 Generated with Claude Code