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

pipeline to check class constraints #238

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

giacomociti
Copy link
Contributor

@giacomociti giacomociti commented Dec 15, 2023

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.ttl

cat 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)

Copy link

changeset-bot bot commented Dec 15, 2023

⚠️ No Changeset found

Latest commit: dead75d

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@codecov-commenter
Copy link

codecov-commenter commented Dec 16, 2023

Codecov Report

Attention: 74 lines in your changes are missing coverage. Please review.

Comparison is base (8ffdff1) 85.54% compared to head (e7fba2d) 84.49%.
Report is 41 commits behind head on master.

❗ Current head e7fba2d differs from pull request most recent head dead75d. Consider uploading reports for the commit dead75d to get more accurate results

Files Patch % Lines
packages/cube/lib/classConstraint.js 0.00% 55 Missing ⚠️
packages/shacl/report.js 0.00% 19 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #238      +/-   ##
==========================================
- Coverage   85.54%   84.49%   -1.05%     
==========================================
  Files         164      165       +1     
  Lines        5990     6064      +74     
  Branches      100      100              
==========================================
  Hits         5124     5124              
- Misses        864      938      +74     
  Partials        2        2              
Flag Coverage Δ
barnard59 80.29% <ø> (ø)
barnard59-base 37.47% <ø> (ø)
barnard59-core 92.50% <ø> (ø)
barnard59-csvw 80.21% <ø> (ø)
barnard59-cube 89.23% <0.00%> (-7.65%) ⬇️
barnard59-formats 32.63% <ø> (ø)
barnard59-ftp 85.38% <ø> (ø)
barnard59-graph-store 94.65% <ø> (ø)
barnard59-http 87.50% <ø> (ø)
barnard59-rdf 94.34% <ø> (ø)
barnard59-s3 96.02% <ø> (ø)
barnard59-shacl 52.86% <0.00%> (-7.28%) ⬇️
barnard59-sparql 82.60% <ø> (ø)
barnard59-validation 97.53% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants