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

Redundant empty prefix checked needlessly by validate #306

Closed
matentzn opened this issue Aug 14, 2022 · 0 comments · Fixed by #308
Closed

Redundant empty prefix checked needlessly by validate #306

matentzn opened this issue Aug 14, 2022 · 0 comments · Fixed by #308
Assignees
Labels
bug Something isn't working

Comments

@matentzn
Copy link
Collaborator

When validating the file below:

sssom validate mp_hp_owt_impc.sssom.tsv

I get:

check_all_prefixes_in_curie_map
    raise ValidationError(
jsonschema.exceptions.ValidationError: The prefixes in [''] are missing from 'curie_map'.

This can be fixed by adding another orcid into the reviewer column. Something is wrong with the way the prefixes are extracted from the table?

# creator_id: orcid:0000-0002-2232-0967
# curie_map:
#   HP: http://purl.obolibrary.org/obo/HP_
#   MP: http://purl.obolibrary.org/obo/MP_
#   owl: http://www.w3.org/2002/07/owl#
#   rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns#
#   rdfs: http://www.w3.org/2000/01/rdf-schema#
#   skos: http://www.w3.org/2004/02/skos/core#
#   sssom: https://w3id.org/sssom/
#   orcid: https://orcid.org/
#   obo: http://purl.obolibrary.org/obo/
#   semapv: https://w3id.org/semapv/
# license: https://creativecommons.org/publicdomain/zero/1.0/
# mapping_provider: https://www.mousephenotype.org
# mapping_set_description: 'The IMPC Mouse Morphology Mappings: Organ Weight Test'
# mapping_set_id: mp_hp_owt_impc
subject_id	subject_label	predicate_id	object_id	object_label	mapping_justification	reviewer_id
MP:0001259	abnormal body weight	skos:exactMatch	HP:0004323	Abnormality of body weight	semapv:LexicalMatching	orcid:0000-0002-7356-1779
MP:0002707	abnormal kidney weight	skos:closeMatch	HP:0000077	Abnormality of the kidney	semapv:LogicalReasoning	
@matentzn matentzn added the bug Something isn't working label Aug 14, 2022
hrshdhgd added a commit that referenced this issue Aug 19, 2022
@matentzn matentzn changed the title validate Redundant empty prefix checked needlessly by validate Aug 23, 2022
hrshdhgd added a commit that referenced this issue Aug 24, 2022
* Fixes validate  #306

* fix for #305

* blank values for prefixes shouls not be added.

* undo refactor and change logic

* changed metadata check logic

* changed logic to get pref from meta

* formatted

* casting issue

* mypy fix

* mypy fix

* edits after discussion with Nico on PR
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants