pipeline to check class constraints #238
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
an experiment (still a draft) to overcome the issue described in #236.
The new
check-class
command can check for a class constraint like the one in https://github.com/zazuko/cube-link/blob/main/constraint.ttlcat cube.ttl | npx b59 cube check-class \ --path http://ns.bergnet.org/dark-horse#room \ --class http://schema.org/Place
Of course https://github.com/zazuko/cube-link/blob/main/cube.ttl is small enough and can be checked all at once disabling batching, the command is meant for cases with a huge number of observations.
The main idea is to scan the data filtering only relevant quads and sorting them such that each type declaration is followed by the quads referencing it. The checking step can then easily spot the invalid quads (those missing the corresponding type declaration)