-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use curies.Converter
more natively
#401
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some quick comments, didnt do a thorough review yet.
There wont be any reason to distinguish internal and external converters moving forward, because we update the EPM during release and can ensure consistency with QC.
src/sssom/context.py
Outdated
) | ||
return prefix_map | ||
converter = Converter.from_prefix_map(prefix_map) | ||
return curies.chain([converter, get_built_in_converter()]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cool this is possible but not needed anymore: we just use the bioregistry converter and make sure through unit testing that it never violates our prefix preferences when updating the EPM.
src/sssom/parsers.py
Outdated
@@ -556,7 +561,7 @@ def from_sssom_rdf( | |||
|
|||
ms.mappings = mlist # type: ignore | |||
_set_metadata_in_mapping_set(mapping_set=ms, metadata=meta) | |||
mdoc = MappingSetDocument(mapping_set=ms, prefix_map=prefix_map) | |||
mdoc = MappingSetDocument(mapping_set=ms, prefix_map=converter.prefix_map) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now I get it. Great.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Next step will be replace the prefix_map object in the mapping set document with a converter directly
Lost track of this. @cthoyt I know you will be swamped, so let me know when this is ready for review. |
This has been split into many other PRs |
Blocked by #418
This PR is the next step towards using
curies.Converter
.prefix_map
inside theMetadata
definition with aconverter
. Next steps are to do this for all models.curies.chain
as the one true implementation