skohub-io / skohub-vocabs

A lightweight tool to publish SKOS Vocabularies
https://skohub.io/
Apache License 2.0
32 stars 25 forks source link

258 shape #277

Closed sroertgen closed 8 months ago

sroertgen commented 8 months ago

SKOS files are now validated against the SkoHub shape (https://github.com/skohub-io/shapes/blob/main/skohub.shacl.ttl).

If the files violate the shape the build will stop.

If the files hit warnings, the build will continue, but the error message will still be printed to the console.

sroertgen commented 8 months ago

@acka47 I suggest trying out by pulling this branch and testing against valid and invalid SKOS turtle files with npm run build

acka47 commented 8 months ago

This seems to work fine. However, the error messages are not easy to parse for the human eye. Would it be possible to provide the path to the file where an error is located? This might already help.

Or also provide the dct:title (in English) of the vocab where the error occured, `a la:

info Node, where the error occured: LRMI Interact Type Vocabulary http://purl.org/dcx/lrmi-vocabs/interactivityType/

acka47 commented 8 months ago

It would also be good if violations could be highlighted somehow in the validation list. It would make things easier, if you have a lot of warnings and only one violation.

sroertgen commented 8 months ago

Violations are now indicated with a red Error message. Violations and Warnings are now differentiated. The filepath is also provided.

dct:title is not yet available when I'm testing, since I want to fail as early as possible, avoiding possible other bugs rising from invalid SKOS files.

sroertgen commented 8 months ago

@acka47 Please review the requested changes.