BlueBrain / nexus-forge

Building and Using Knowledge Graphs made easy
https://nexus-forge.readthedocs.io
GNU Lesser General Public License v3.0
38 stars 19 forks source link

forge.resolve returns inconsistent result #309

Closed lecriste closed 1 year ago

lecriste commented 1 year ago

forge.resolve("MC", scope="ontology", target="terms", strategy="EXACT_MATCH")

returns a Resource with two "label"s:

Resource(_last_action=None, _validated=False, _synchronized=False, _store_metadata=None, id='http://uri.interlex.org/base/ilx_0107933', type='Class', label=['Olfactory Bulb Main Mitral Cell', 'AOB_MC'], _inner_sync=False, notation='AOBMC', prefLabel='Olfactory Bulb Main Mitral Cell', subClassOf=['nsg:MType', 'bmo:NewNeuronType', 'bmo:NeuronMorphologicalType', 'https://bbp.epfl.ch/nexus/v1/resources/neurosciencegraph/datamodels//NeuronMorphologicalType'])

while it is registered with only one: https://bbp.epfl.ch/nexus/v1/resources/neurosciencegraph/datamodels/datashapes:ontologyentity/http:%2F%2Furi.interlex.org%2Fbase%2Filx_0107933?rev=20

lecriste commented 1 year ago

I updated the ontology to reflect Francois's comment and now ''MC" is resolved correctly. To reproduce this issue behavior:

forge.resolve("AOB_MC", scope="ontology", target="terms", strategy="EXACT_MATCH")

lecriste commented 1 year ago

I confirm that https://github.com/BlueBrain/nexus-forge/pull/310 fixes this bug.