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

feat: terms from SHACL-AF draft #176

Merged
merged 7 commits into from
Oct 13, 2023
Merged

feat: terms from SHACL-AF draft #176

merged 7 commits into from
Oct 13, 2023

Conversation

tpluscode
Copy link
Contributor

No description provided.

@changeset-bot
Copy link

changeset-bot bot commented Oct 12, 2023

🦋 Changeset detected

Latest commit: 80f0132

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 4 packages
Name Type
@vocabulary/sh Minor
@vocabulary/shsh Major
@zazuko/prefixes Minor
@zazuko/vocabularies Patch

Not sure what this means? Click here to learn what changesets are.

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

@github-actions
Copy link
Contributor

Did you remember to add changeset to @zazuko/prefixes?


Automated comment created by PR Commenter 🤖.

@@ -0,0 +1,230 @@
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @HolgerKnublauch. I have pieced together terms from the SHACL-AF draft so that we can present them on prefix.zazuko.com and integrate in out toolset where we generate code and provide code completion for vocabularies.

Does the below look correct? I have not seen sh:NodeExpression mentioned explicitly but I figure it makes sense at least as class. Could also add SHACL constraints to the classes according to the comments.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are no types such as sh:NodeExpression, and they would never be instantiated as all node expressions are entirely controlled and distinguished by their properties. Also, any RDF literal or URI node are also node expressions, so rdfs:Resource rdfs:subClassOf sh:NodeExpression.

So I don't see value in these classes, but the properties can be useful. Have you considered writing shapes that can point at a node expression and validate the syntax? That would be of more value, e.g. to syntax check valid node expressions.

Copy link
Contributor Author

@tpluscode tpluscode Oct 13, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, so I will remove sh:NodeExpression. I did think to make other expression types shapes with implicit target. So considered refactoring all of them like:

sh:ExistsExpression
  a rdfs:Class, sh:NodeShape ;
  sh:property [
    sh:path sh:exists ;
    sh:minCount 1 ;
    sh:maxCount 1 ;
    sh:class sh:Shape ;
  ] ;
.

Coming back to sh:NodeExpression, how, if at all, would you remodel rdfs:range sh:NodeExpression of most properties?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this would be a nice use case of pure sh:NodeShapes that point at each other using sh:node.

@codecov-commenter
Copy link

codecov-commenter commented Oct 12, 2023

Codecov Report

All modified lines are covered by tests ✅

Comparison is base (c142fb9) 95.65% compared to head (b13956f) 95.66%.
Report is 1 commits behind head on master.

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

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #176      +/-   ##
==========================================
+ Coverage   95.65%   95.66%   +0.01%     
==========================================
  Files           7        7              
  Lines         276      277       +1     
  Branches       22       22              
==========================================
+ Hits          264      265       +1     
  Misses         12       12              
Files Coverage Δ
packages/prefixes/prefixes.ts 100.00% <100.00%> (ø)

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

@tpluscode tpluscode merged commit d9501e1 into master Oct 13, 2023
5 checks passed
@tpluscode tpluscode deleted the shacl-af branch October 13, 2023 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants