Skip to content
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

Fix SchemaView metadata injection and get URI #362

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

vincentkelleher
Copy link

I noticed an issue while working on our Gaia-X ontology as there is a slot named uri and also a type (from LinkML types) named uri. This caused the metadata injection (overwriting from_schema with the current schema ID) to fail as dicts are used and merged, meaning either the LinkML uri could get the correct schema ID or the Gaia-X uri slot not both.

To fix this I just proposed to merge the values in a list avoiding any collision.

Please note I also fixed the get_uri(..) method as in the case above I would get a StopIteration exception coming from the next(..) method arriving at the end of the schema map without finding element. To do so, I just added a default value to the iteration method: next(<generator function>, <fallback/default value>).

…ame are managed (mostly from_schema and URIs)

Signed-off-by: Vincent Kelleher <[email protected]>
@vincentkelleher vincentkelleher force-pushed the fix_different_types_with_same_name branch from a81859c to 259ecd1 Compare January 20, 2025 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant