mapping-commons / sssom-py

Python toolkit for SSSOM mapping format
https://mapping-commons.github.io/sssom-py/index.html#
MIT License
49 stars 12 forks source link

Re-implement reconciliation code with `curies` #426

Closed cthoyt closed 11 months ago

cthoyt commented 1 year ago

This PR replaces the reconcile_prefix_and_data with more carefully defined operations from the curies package (implemented in https://github.com/cthoyt/curies/pull/74 and https://github.com/cthoyt/curies/pull/78).

The new implementation is built on curies.remap_curie_prefixes and curies.rewire. Note that if you want to overwrite a CURIE prefix, e.g., in the Bioregistry extended prefix map, you need to provide a place for the old one to go as in {"geo": "ncbi.geo", "geogeo": "geo"}. Just doing {"geogeo": "geo"} would not work since geo already exists.

This is a slight change from the existing implementation, but I think it is better since it allows for solving a much more general problem of dependent (i.e., transitive) remappings

cthoyt commented 12 months ago

This PR is finished but is currently failing CI because of non-deterministic issues with poetry (is it time to get rid of poetry yet 😛?)

cthoyt commented 12 months ago

@hrshdhgd please help, we have a poetry issue again

matentzn commented 11 months ago

Ok, I merged it now under the flag of progress 🙏

matentzn commented 11 months ago

@hrshdhgd can you comment on wether you agree to the change in the action?