biolink / biolink-model-toolkit

A collection of useful python functions for looking up information and working with the Biolink Model
https://biolink.github.io/biolink-model-toolkit/
BSD 3-Clause "New" or "Revised" License
20 stars 11 forks source link

Unable to use get_all_element_by_mapping() to retrieve mappings for STY values #111

Closed gaurav closed 1 year ago

gaurav commented 1 year ago

In the Biolink model, STY:T071 is mapped to biolink:NamedThing as an exact mapping.

I was previously able to run:

biolink_class = toolkit.get_element_by_mapping('STY:T071', most_specific=True, formatted=True, mixin=True)

to map STY:T071 to biolink:NamedThing. However, attempting to do this with the development version of biolink-model-toolkit gives me the following error:

AttributeError: 'functools._lru_cache_wrapper' object has no attribute 'uri_for'

I've added two tests to the test suite that demonstrates this in a draft PR at https://github.com/biolink/biolink-model-toolkit/pull/112. Please do let me know if you need any more details from me or if I'm just calling this method incorrectly!

gaurav commented 1 year ago

Just wanted to check if you'd been able to confirm that this is a bug with BMT, and if you had an estimate for when it might be fixed. Thanks!