semanticarts / gist

Semantic Arts gist upper enterprise ontology
Creative Commons Attribution 4.0 International
160 stars 18 forks source link

Add automated style checking #386

Open uscholdm opened 4 years ago

uscholdm commented 4 years ago

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.

uscholdm commented 1 year ago

@rjyounes, @sa-bpelakh, @Jamie-SA I think we do a lot of this now, what is the situation?

rjyounes commented 1 year ago

Currently we use SHACL to check:

Additions to get full coverage of the style guide:

I also see the need for some refactoring:

uscholdm commented 1 year ago

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

rjyounes commented 1 year ago

I mean: you should have exactly one definition and exactly one prefLabel, unless they have different language tags.

sa-bpelakh commented 1 year ago

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.