-
Notifications
You must be signed in to change notification settings - Fork 14
Closed
mapping-commons/sssom
#358Labels
bugSomething isn't workingSomething isn't working
Description
Overview
I'm running sssom validate and was getting an error that my creator_id was invalid. The docs for creator_id show that it is of type EntityReference, typeof: uriorcurie.
However, when I have a URI, creator_id: https://orcid.org/0000-0002-2906-7319, validation fails with:
File "/Users/joeflack4/virtualenvs/icd11/lib/python3.10/site-packages/sssom/util.py", line 1319, in get_all_prefixes
raise ValidationError(
jsonschema.exceptions.ValidationError: Slot 'creator_id' has an incorrect value: ['https://orcid.org/0000-0002-2906-7319']
If I change it to a CURIE, validation passes.
Suggested solution
a. Update the docs for EntityReference: typeof: curie.
b. Update get_all_prefixes() so that it ignores metadata slots where the typedef is not simply 'curie'. Or, if it's UriOrCurie, check to make sure at least one is valid.
Additional info
Example files
FYI: docstring issue
The docstring for get_all_prefixes() shows :raises ValidationError: If slot is wrong. twice.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working