-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Making prefix mapping less strict, fixes #702
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.
- Loading branch information
Showing
26 changed files
with
773 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
.../obo-compliance/expansion-conflict-main-idspace/expansion-conflict-main-idspace.meta.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
name: expansion-conflict-main-idspace | ||
name: expansion-conflict-main-idspace | ||
description: tests conflicting expansions for the main ID space | ||
invalid: true |
10 changes: 10 additions & 0 deletions
10
.../input/obo-compliance/expansion-conflict-main-idspace/expansion-conflict-main-idspace.obo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
format-version: 1.4 | ||
ontology: expansion-conflict-main-idspace | ||
idspace: X http://example.org/X/ | ||
idspace: X http://example.org/FAKEX/ | ||
|
||
[Term] | ||
id: X:1 | ||
name: X:1 | ||
|
||
|
31 changes: 31 additions & 0 deletions
31
tests/input/obo-compliance/gci-is-a/gci-is-a.expected.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{ | ||
"graphs" : [ { | ||
"id" : "http://purl.obolibrary.org/obo/gci-is-a.owl", | ||
"meta" : { | ||
"basicPropertyValues" : [ { | ||
"pred" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", | ||
"val" : "1.4" | ||
} ] | ||
}, | ||
"nodes" : [ { | ||
"id" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", | ||
"lbl" : "has_obo_format_version", | ||
"type" : "PROPERTY" | ||
}, { | ||
"id" : "http://www.geneontology.org/formats/oboInOwl#id", | ||
"lbl" : "id", | ||
"type" : "PROPERTY" | ||
} ], | ||
"edges" : [ { | ||
"sub" : "http://purl.obolibrary.org/obo/X_1", | ||
"pred" : "is_a", | ||
"obj" : "http://purl.obolibrary.org/obo/X_2", | ||
"meta" : { | ||
"basicPropertyValues" : [ { | ||
"pred" : "http://www.geneontology.org/formats/oboInOwl#gci_predicate", | ||
"val" : "R:2" | ||
} ] | ||
} | ||
} ] | ||
} ] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
<?xml version="1.0"?> | ||
<rdf:RDF xmlns="http://purl.obolibrary.org/obo/gci-is-a.owl#" | ||
xml:base="http://purl.obolibrary.org/obo/gci-is-a.owl" | ||
xmlns:owl="http://www.w3.org/2002/07/owl#" | ||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" | ||
xmlns:xml="http://www.w3.org/XML/1998/namespace" | ||
xmlns:xsd="http://www.w3.org/2001/XMLSchema#" | ||
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" | ||
xmlns:oboInOwl="http://www.geneontology.org/formats/oboInOwl#"> | ||
<owl:Ontology rdf:about="http://purl.obolibrary.org/obo/gci-is-a.owl"> | ||
<oboInOwl:hasOBOFormatVersion>1.4</oboInOwl:hasOBOFormatVersion> | ||
</owl:Ontology> | ||
|
||
|
||
|
||
<!-- | ||
/////////////////////////////////////////////////////////////////////////////////////// | ||
// | ||
// Annotation properties | ||
// | ||
/////////////////////////////////////////////////////////////////////////////////////// | ||
--> | ||
|
||
|
||
|
||
|
||
<!-- http://www.geneontology.org/formats/oboInOwl#gci_predicate --> | ||
|
||
<owl:AnnotationProperty rdf:about="http://www.geneontology.org/formats/oboInOwl#gci_predicate"/> | ||
|
||
|
||
|
||
<!-- http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion --> | ||
|
||
<owl:AnnotationProperty rdf:about="http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion"> | ||
<rdfs:label>has_obo_format_version</rdfs:label> | ||
</owl:AnnotationProperty> | ||
|
||
|
||
|
||
<!-- http://www.geneontology.org/formats/oboInOwl#id --> | ||
|
||
<owl:AnnotationProperty rdf:about="http://www.geneontology.org/formats/oboInOwl#id"> | ||
<rdfs:label>id</rdfs:label> | ||
</owl:AnnotationProperty> | ||
|
||
|
||
|
||
<!-- | ||
/////////////////////////////////////////////////////////////////////////////////////// | ||
// | ||
// Classes | ||
// | ||
/////////////////////////////////////////////////////////////////////////////////////// | ||
--> | ||
|
||
|
||
|
||
|
||
<!-- http://purl.obolibrary.org/obo/X_1 --> | ||
|
||
<owl:Class rdf:about="http://purl.obolibrary.org/obo/X_1"> | ||
<rdfs:subClassOf rdf:resource="http://purl.obolibrary.org/obo/X_2"/> | ||
<oboInOwl:id>X:1</oboInOwl:id> | ||
</owl:Class> | ||
<owl:Axiom> | ||
<owl:annotatedSource rdf:resource="http://purl.obolibrary.org/obo/X_1"/> | ||
<owl:annotatedProperty rdf:resource="http://www.w3.org/2000/01/rdf-schema#subClassOf"/> | ||
<owl:annotatedTarget rdf:resource="http://purl.obolibrary.org/obo/X_2"/> | ||
<oboInOwl:gci_predicate>R:2</oboInOwl:gci_predicate> | ||
</owl:Axiom> | ||
|
||
|
||
|
||
<!-- http://purl.obolibrary.org/obo/X_2 --> | ||
|
||
<owl:Class rdf:about="http://purl.obolibrary.org/obo/X_2"/> | ||
</rdf:RDF> | ||
|
||
|
||
|
||
<!-- Generated by the OWL API (version 4.5.26) https://github.com/owlcs/owlapi --> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
name: gci-is-a | ||
name: gci-is-a | ||
description: General Class Inclusion is_a |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
format-version: 1.4 | ||
ontology: gci-is-a | ||
|
||
[Term] | ||
id: X:1 | ||
is_a: X:2 {gci_predicate="R:2", gci_filler="X:3"} | ||
|
31 changes: 31 additions & 0 deletions
31
tests/input/obo-compliance/gci-relation/gci-relation.expected.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{ | ||
"graphs" : [ { | ||
"id" : "http://purl.obolibrary.org/obo/gci-relation.owl", | ||
"meta" : { | ||
"basicPropertyValues" : [ { | ||
"pred" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", | ||
"val" : "1.4" | ||
} ] | ||
}, | ||
"nodes" : [ { | ||
"id" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion", | ||
"lbl" : "has_obo_format_version", | ||
"type" : "PROPERTY" | ||
}, { | ||
"id" : "http://www.geneontology.org/formats/oboInOwl#id", | ||
"lbl" : "id", | ||
"type" : "PROPERTY" | ||
} ], | ||
"edges" : [ { | ||
"sub" : "http://purl.obolibrary.org/obo/X_1", | ||
"pred" : "http://purl.obolibrary.org/obo/R_1", | ||
"obj" : "http://purl.obolibrary.org/obo/X_2", | ||
"meta" : { | ||
"basicPropertyValues" : [ { | ||
"pred" : "http://www.geneontology.org/formats/oboInOwl#gci_predicate", | ||
"val" : "R:2" | ||
} ] | ||
} | ||
} ] | ||
} ] | ||
} |
104 changes: 104 additions & 0 deletions
104
tests/input/obo-compliance/gci-relation/gci-relation.expected.owl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
<?xml version="1.0"?> | ||
<rdf:RDF xmlns="http://purl.obolibrary.org/obo/gci-relation.owl#" | ||
xml:base="http://purl.obolibrary.org/obo/gci-relation.owl" | ||
xmlns:owl="http://www.w3.org/2002/07/owl#" | ||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" | ||
xmlns:xml="http://www.w3.org/XML/1998/namespace" | ||
xmlns:xsd="http://www.w3.org/2001/XMLSchema#" | ||
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" | ||
xmlns:oboInOwl="http://www.geneontology.org/formats/oboInOwl#"> | ||
<owl:Ontology rdf:about="http://purl.obolibrary.org/obo/gci-relation.owl"> | ||
<oboInOwl:hasOBOFormatVersion>1.4</oboInOwl:hasOBOFormatVersion> | ||
</owl:Ontology> | ||
|
||
|
||
|
||
<!-- | ||
/////////////////////////////////////////////////////////////////////////////////////// | ||
// | ||
// Annotation properties | ||
// | ||
/////////////////////////////////////////////////////////////////////////////////////// | ||
--> | ||
|
||
|
||
|
||
|
||
<!-- http://www.geneontology.org/formats/oboInOwl#gci_predicate --> | ||
|
||
<owl:AnnotationProperty rdf:about="http://www.geneontology.org/formats/oboInOwl#gci_predicate"/> | ||
|
||
|
||
|
||
<!-- http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion --> | ||
|
||
<owl:AnnotationProperty rdf:about="http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion"> | ||
<rdfs:label>has_obo_format_version</rdfs:label> | ||
</owl:AnnotationProperty> | ||
|
||
|
||
|
||
<!-- http://www.geneontology.org/formats/oboInOwl#id --> | ||
|
||
<owl:AnnotationProperty rdf:about="http://www.geneontology.org/formats/oboInOwl#id"> | ||
<rdfs:label>id</rdfs:label> | ||
</owl:AnnotationProperty> | ||
|
||
|
||
|
||
<!-- | ||
/////////////////////////////////////////////////////////////////////////////////////// | ||
// | ||
// Object Properties | ||
// | ||
/////////////////////////////////////////////////////////////////////////////////////// | ||
--> | ||
|
||
|
||
|
||
|
||
<!-- http://purl.obolibrary.org/obo/R_1 --> | ||
|
||
<owl:ObjectProperty rdf:about="http://purl.obolibrary.org/obo/R_1"/> | ||
|
||
|
||
|
||
<!-- | ||
/////////////////////////////////////////////////////////////////////////////////////// | ||
// | ||
// Classes | ||
// | ||
/////////////////////////////////////////////////////////////////////////////////////// | ||
--> | ||
|
||
|
||
|
||
|
||
<!-- http://purl.obolibrary.org/obo/X_1 --> | ||
|
||
<owl:Class rdf:about="http://purl.obolibrary.org/obo/X_1"> | ||
<rdfs:subClassOf rdf:nodeID="genid1"/> | ||
<oboInOwl:id>X:1</oboInOwl:id> | ||
</owl:Class> | ||
<owl:Restriction rdf:nodeID="genid1"> | ||
<owl:onProperty rdf:resource="http://purl.obolibrary.org/obo/R_1"/> | ||
<owl:someValuesFrom rdf:resource="http://purl.obolibrary.org/obo/X_2"/> | ||
</owl:Restriction> | ||
<owl:Axiom> | ||
<owl:annotatedSource rdf:resource="http://purl.obolibrary.org/obo/X_1"/> | ||
<owl:annotatedProperty rdf:resource="http://www.w3.org/2000/01/rdf-schema#subClassOf"/> | ||
<owl:annotatedTarget rdf:nodeID="genid1"/> | ||
<oboInOwl:gci_predicate>R:2</oboInOwl:gci_predicate> | ||
</owl:Axiom> | ||
|
||
|
||
|
||
<!-- http://purl.obolibrary.org/obo/X_2 --> | ||
|
||
<owl:Class rdf:about="http://purl.obolibrary.org/obo/X_2"/> | ||
</rdf:RDF> | ||
|
||
|
||
|
||
<!-- Generated by the OWL API (version 4.5.26) https://github.com/owlcs/owlapi --> | ||
|
3 changes: 3 additions & 0 deletions
3
tests/input/obo-compliance/gci-relation/gci-relation.meta.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
name: gci-relation | ||
name: gci-relation | ||
description: General Class Inclusion relation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
format-version: 1.4 | ||
ontology: gci-relation | ||
|
||
[Term] | ||
id: X:1 | ||
relationship: R:1 X:2 {gci_predicate="R:2", gci_filler="X:3"} | ||
|
4 changes: 4 additions & 0 deletions
4
...ut/obo-compliance/prefixes-conflict-main-idspace/prefixes-conflict-main-idspace.meta.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
name: prefixes-conflict-main-idspace | ||
name: prefixes-conflict-main-idspace | ||
description: tests conflicting prefixes for the main ID space | ||
invalid: true |
9 changes: 9 additions & 0 deletions
9
tests/input/obo-compliance/prefixes-conflict-main-idspace/prefixes-conflict-main-idspace.obo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
format-version: 1.4 | ||
ontology: prefixes-conflict-main-idspace | ||
idspace: X http://example.org/X/ | ||
idspace: FAKEX http://example.org/X/ | ||
|
||
[Term] | ||
id: X:1 | ||
name: X:1 | ||
|
Oops, something went wrong.