Open uscholdm opened 4 years ago
@rjyounes, @sa-bpelakh, @Jamie-SA I think we do a lot of this now, what is the situation?
Currently we use SHACL to check:
Additions to get full coverage of the style guide:
skos:definition
, skos:scopeNote
, skos:note
, and skos:editorialNote
. A sentence case shape is defined but not used; perhaps this wasn't working?rdfs:label
and rdfs:comment
are not used anywhere except in the rdfsAnnotations
ontology that is created during the release. We have to make sure the check applies before this file is created.I also see the need for some refactoring:
Min 1 definition - should really be exactly one with either no language tag or a specific tag
Min 1 and exactly 1 are not the same meaning. Not sure what you mean here. We generally avoid min 1 in favor of someValuesFrom
I mean: you should have exactly one definition and exactly one prefLabel, unless they have different language tags.
We can definitely augment the current checks to support the extra suggestions you made. I have become a bit disillusioned with SHACL with respect to reporting the context of complex validations - i.e. if you have some simple sh:property
for a value constraint, the report entry will indicate the erroneous value and the nature of the violation, but for more complex conditions build with sh:or
, you will get something like OR constrain violated
with no further info.
We should create a small test-suite covering the sort of issues we want to detect, and perhaps convert some of the SHACL shapes into SPARQL queries that would provide better information about the failures.
Whatever style conventions we finally agree to, e.g. case for IRIs and annotations, we can REGEX for capitalization either through SHACL or through query. We can address it between onto_tool and the bundle script.