biolink / ontobio

python library for working with ontologies and ontology associations
https://ontobio.readthedocs.io/en/latest/
BSD 3-Clause "New" or "Revised" License
118 stars 30 forks source link

solr search query add support for filtering based on equivalent curie prefix, leaf nodes #550

Closed kshefchek closed 3 years ago

kshefchek commented 3 years ago

Adds support for filtering in/out a prefix in a equivalent curie as well as filtering for only leaf nodes. See https://github.com/biolink/biolink-api/issues/368

kshefchek commented 3 years ago

@iimpulse could you review?

iimpulse commented 3 years ago

out of curiosity do we have any tests?

kshefchek commented 3 years ago

there are no tests, a little challenging to mock the solr request, but we could mock the solr response to make sure the _process_autocomplete_results fx is working as expected

iimpulse commented 3 years ago

I was thinking more on the golr query that it builds that fq properly or that complex equivalent stuff correctly, less so on a functional or integration

kshefchek commented 3 years ago

ah yes, that's a good idea, I'll add it before merging

kshefchek commented 3 years ago

@iimpulse tests added with add608c