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

Fixing the invalid xref check #1186

Merged
merged 3 commits into from
May 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- [`merge`] and 'annotate' operations '--annotate-defined-by' excludes reserved OWL 2 vocabularies [#1171]
- Handle IRIs that are not entities in export [#1168]
- Fix integration tests [#1181]
- Invalid Xrefs test has been fixed to recognise invalid CURIEs correctly [#1127]

## [1.9.5] - 2023-09-20

Expand Down
2 changes: 2 additions & 0 deletions docs/examples/report.tsv
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ Level Rule Name Subject Property Value
ERROR missing_ontology_description http://purl.obolibrary.org/obo/uberon.owl dc:description
ERROR missing_ontology_license http://purl.obolibrary.org/obo/uberon.owl dc:license
ERROR missing_ontology_title http://purl.obolibrary.org/obo/uberon.owl dc:title
WARN invalid_xref BFO:0000051 oboInOwl:hasDbXref BFO-:0000051
WARN invalid_xref BFO:0000062 oboInOwl:hasDbXref :0000062
WARN missing_definition BFO:0000050 IAO:0000115
WARN missing_definition BFO:0000051 IAO:0000115
WARN missing_definition BFO:0000063 IAO:0000115
Expand Down
4 changes: 2 additions & 2 deletions docs/examples/uberon_fragment.owl
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@
<owl:ObjectProperty rdf:about="http://purl.obolibrary.org/obo/BFO_0000051">
<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#TransitiveProperty"/>
<rdfs:label rdf:datatype="http://www.w3.org/2001/XMLSchema#string">has_part</rdfs:label>
<oboInOwl:hasDbXref rdf:datatype="http://www.w3.org/2001/XMLSchema#string">BFO:0000051</oboInOwl:hasDbXref>
<oboInOwl:hasDbXref rdf:datatype="http://www.w3.org/2001/XMLSchema#string">BFO-:0000051</oboInOwl:hasDbXref>
<oboInOwl:id rdf:datatype="http://www.w3.org/2001/XMLSchema#string">has_part</oboInOwl:id>
<oboInOwl:shorthand rdf:datatype="http://www.w3.org/2001/XMLSchema#string">has_part</oboInOwl:shorthand>
<oboInOwl:hasOBONamespace rdf:datatype="http://www.w3.org/2001/XMLSchema#string">uberon</oboInOwl:hasOBONamespace>
Expand All @@ -276,7 +276,7 @@
<owl:ObjectProperty rdf:about="http://purl.obolibrary.org/obo/BFO_0000062">
<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#TransitiveProperty"/>
<rdfs:label rdf:datatype="http://www.w3.org/2001/XMLSchema#string">preceded_by</rdfs:label>
<oboInOwl:hasDbXref rdf:datatype="http://www.w3.org/2001/XMLSchema#string">BFO:0000062</oboInOwl:hasDbXref>
<oboInOwl:hasDbXref rdf:datatype="http://www.w3.org/2001/XMLSchema#string">:0000062</oboInOwl:hasDbXref>
<obo:IAO_0000115 rdf:datatype="http://www.w3.org/2001/XMLSchema#string">X preceded_by Y iff: end(Y) before_or_simultaneous_with start(X)</obo:IAO_0000115>
<oboInOwl:hasExactSynonym rdf:datatype="http://www.w3.org/2001/XMLSchema#string">is preceded by</oboInOwl:hasExactSynonym>
<oboInOwl:shorthand rdf:datatype="http://www.w3.org/2001/XMLSchema#string">preceded_by</oboInOwl:shorthand>
Expand Down
2 changes: 1 addition & 1 deletion docs/report_queries/invalid_xref.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT DISTINCT ?entity ?property ?value WHERE {
VALUES ?property {oboInOwl:hasDbXref}
?entity ?property ?value .
FILTER (!regex(?value, "^[a-z|A-Z|_|\\-|0-9]*:(?!$)\\S*$"))
FILTER (!regex(?value, "^[A-Za-z_][A-Za-z0-9_.-]*[A-Za-z0-9_]:[^\\s]+$"))
FILTER (!isBlank(?entity))
}
ORDER BY ?entity
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT DISTINCT ?entity ?property ?value WHERE {
VALUES ?property {oboInOwl:hasDbXref}
?entity ?property ?value .
FILTER (!regex(?value, "^[a-z|A-Z|_|\\-|0-9]*:(?!$)\\S*$"))
FILTER (!regex(?value, "^[A-Za-z_][A-Za-z0-9_.-]*[A-Za-z0-9_]:[^\\s]+$"))
FILTER (!isBlank(?entity))
}
ORDER BY ?entity
Loading