-
Notifications
You must be signed in to change notification settings - Fork 29
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
Making prefix mapping less strict, fixes #702 #761
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.
Nice suite! Cant see anything particularly wrong, left two comments.
Probably too late now but this is a robot jar we could run after this is merged to check all the changes in obographs-json and obo format against the suite:
https://incenp.org/files/softs/robot/1.10/robot-1.10.0-SNAPSHOT.jar
# Class: <http://purl.obolibrary.org/obo/X_1> (<http://purl.obolibrary.org/obo/X_1>) | ||
|
||
AnnotationAssertion(<http://www.geneontology.org/formats/oboInOwl#id> <http://purl.obolibrary.org/obo/X_1> "X:1") | ||
SubClassOf(Annotation(<http://www.geneontology.org/formats/oboInOwl#gci_predicate> "R:2") <http://purl.obolibrary.org/obo/X_1> <http://purl.obolibrary.org/obo/X_2>) |
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.
Is this expected? Should it be R:2 some X:2 subClassOf X:1
?
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.
I think this is because the input file is using the wrong qualifier (see my other comment below).
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.
Good catch.
The main issue with this suite (as I mentioned here #751) is that it's self-bootstrapping there is a one-off TestByGuru run where both inputs and outputs need carefully checked against the spec.
@@ -0,0 +1,4 @@ | |||
name: prefixes-conflict-main-idspace | |||
name: prefixes-conflict-main-idspace |
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.
Why do the metadata yaml files have the same line twice? All of them.
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.
I believe this is a bug in the split_compiled_obo
function (src/tests/test_converters/test_obo_format.py
), lines 113–119. The name: ...
line is added to the yamls[ontology_id]
dictionary twice:
if k == "name":
ontology_id = v
if ontology_id in blocks:
raise ValueError(f"Duplicate ontology id: {ontology_id}")
metadata[ontology_id] = {}
yamls[ontology_id] = [yaml.rstrip()] # First addition of `name: ...`
blocks[ontology_id] = [
"format-version: 1.4\n",
f"ontology: {ontology_id}\n",
]
metadata[ontology_id][k.strip()] = v.strip()
yamls[ontology_id].append(yaml.strip()) # Second addition of `name: ...`
tests/input/obo-compliance.obo
Outdated
|
||
[Term] | ||
id: X:1 | ||
is_a: X:2 {gci_predicate="R:2", gci_filler="X:3"} |
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.
Shouldn’t that be gci_relation
instead of gci_predicate
? I don’t think I have ever seen that gci_predicate
qualifier, and the OBO spec does not mention it at all.
I totally lost track of this, and this is now breaking some OAK pipelines we have (especially the multilingual stuff). Oops. |
Adds test that currently codifies ambiguous behavior.
See also #760 for broader issue.
This PR also extends the obo test suite to include this,
and adds some derived files previously missing.