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

SHACL on Graphs #25

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

SHACL on Graphs #25

wants to merge 6 commits into from

Conversation

VladimirAlexiev
Copy link
Collaborator

closes #24

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated
Comment on lines 148 to 153
- SHACL on Graphs (as discussed in [shacl#22](https://github.com/w3c/shacl/issues/22) and [Inst4CIM-KG#140](https://github.com/Sveino/Inst4CIM-KG/issues/140))
- [Data Graph](https://w3c.github.io/data-shapes/shacl/#data-graph) and Shapes Graph are the inputs to a SHACL validator - But these are "ephemeral", and spec doesn't concretize how to pass them to the validator.
- [sh:shapesGraph](https://w3c.github.io/data-shapes/shacl/#sh-shapes-graph) - A triple in the data that **suggests** which shapes to select for validation.
- `rdf4j:SHACLShapeGraph` - in RDF4J is the default shape (see [this blog](https://www.ontotext.com/blog/shacl-ing-the-data-quality-dragon-iii-a-good-artisan-knows-their-tools/)).
- `rsx:DataAndShapesGraphLink, rsx:shapesGraph, rsx:dataGraph` - in RDF4J allow to describe exactly which shapes go with which graphs (see [doc](https://graphdb.ontotext.com/documentation/10.8/shacl-validation.html#union-of-data-graphs-when-validating-the-results) or [this blog](https://www.ontotext.com/blog/shacl-ing-the-data-quality-dragon-iii-a-good-artisan-knows-their-tools/)).
- [Extending SHACL to RDF Datasets](https://afs.github.io/shacl-datasets.html) - Proposal that describes applying SHACL to RDF Datasets by Jena's author.
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm a little hesitant to accept vendor-specific extensions in the "Specifications" section.
If we are to include these, maybe add a clear separation from the standards?

Copy link
Collaborator Author

@VladimirAlexiev VladimirAlexiev Dec 3, 2024

Choose a reason for hiding this comment

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

is it ok now: https://github.com/w3c-cg/awesome-semantic-shapes/blob/VladimirAlexiev-patch-1/README.md#specifications

  • Data Graph and Shapes Graph (SHACL spec) - the inputs to a SHACL validator, but these are "ephemeral", and spec doesn't concretize how to pass them to the validator.
  • sh:shapesGraph (SHACL spec) - A triple in the data graph that suggests which shapes to select for validation.
  • rdf4j:SHACLShapeGraph (RDF4J extension) - default shape graph in RDF4J (see this blog).
  • rsx:DataAndShapesGraphLink, rsx:shapesGraph, rsx:dataGraph (RDF4J extension) - describe exactly which shapes go with which graphs (see doc or this blog).
  • Extending SHACL to RDF Datasets (by Jena's author) - Proposal that describes applying SHACL to RDF Datasets.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@tpluscode is it ok now?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Not sure, sorry. Would like a second opinion. @TallTed @amivanoff ?

Copy link
Contributor

@TallTed TallTed left a comment

Choose a reason for hiding this comment

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

I'm good with the other changes. One small additional suggestion.

README.md Outdated Show resolved Hide resolved
@amivanoff
Copy link
Contributor

amivanoff commented Dec 13, 2024

It will be good to pick a default way to ignore linter's errors.

Examples of two approaches below, assuming there are link duplication (links differs only in #fragments treated as the same) and item formatting problems:

  1. Ignore several lines. This approach will provoke inconsistencies in the formatting of list items.
<!--lint disable awesome-list-item double-link-->
A whole document
or a section,
or several list items here
<!--lint enable awesome-list-item double-link-->
  1. Ignore non-standard list items one-by-one (one per line). This approach will show more clearly problematic items. But requires more efforts.
  <!--lint ignore awesome-list-item double-link-->
  - [SomeSoftware](https://acme.com/some-duplicated-link) some text within an item's name but not a part of the link - description starts with lower-case letter and without an ending comma
  <!--lint ignore awesome-list-item double-link-->
  - [SomeSoftware](https://acme.com/some-duplicated-link) some text within an item's name but not a part of the link - description starts with lower-case letter and without an ending comma

@amivanoff
Copy link
Contributor

I added code suggestions to the relevant lines according to the approach from n.2 (one-by-one).

Copy link
Contributor

@amivanoff amivanoff left a comment

Choose a reason for hiding this comment

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

Some issues lines causes linting errors

@@ -139,6 +144,13 @@ Data viewers/Editors based on shapes.
- SHACL-related specifications
- [The Shape Topologies algorithm](https://treecg.github.io/specification/shape-topologies)
- [DASH Data Shapes](https://www.datashapes.org/) - Platform-independent extensions of SHACL for common tasks. Stuff that could become an official standard in the future.

- SHACL on Graphs (as discussed in [shacl#22](https://github.com/w3c/shacl/issues/22) and [Inst4CIM-KG#140](https://github.com/Sveino/Inst4CIM-KG/issues/140))
- [Data Graph](https://w3c.github.io/data-shapes/shacl/#data-graph) and Shapes Graph (SHACL spec) - the inputs to a SHACL validator, but these are "ephemeral", and spec doesn't concretize how to pass them to the validator.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- [Data Graph](https://w3c.github.io/data-shapes/shacl/#data-graph) and Shapes Graph (SHACL spec) - the inputs to a SHACL validator, but these are "ephemeral", and spec doesn't concretize how to pass them to the validator.
<!--lint ignore double-link-->
- [Data Graph](https://w3c.github.io/data-shapes/shacl/#data-graph) - The input to a SHACL validator (along with the Shapes Graph or SHACL spec), but these are "ephemeral", and spec doesn't concretize how to pass them to the validator.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

hi @amivanoff , so it ignores the fragment when checking for duplicated links?

Copy link
Contributor

@amivanoff amivanoff Dec 18, 2024

Choose a reason for hiding this comment

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

Yes, it does. We can enable/disable separate linter's rulesets per list item only -- "ignore" (or enable/disable it globally -- "disable").

Just put the ruleset IDs after the "lint ignore" and separate it with a space from each other.

  • double-link -- checks list item duplication
  • awesome-list-item -- checks list item formatting

Examples:

<!--lint ignore double-link-->
<!--lint ignore awesome-list-item-->
<!--lint ignore awesome-list-item double-link-->

Copy link
Contributor

@TallTed TallTed Dec 19, 2024

Choose a reason for hiding this comment

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

The awesome linter "ignores the fragment when checking for duplicated links"? That's not awesome! It should result in feedback to the linter project! Different fragments are different URIs, even if dereferencing both results in the browser displaying approximately the same information.

Ignoring double-links should not be the only way to handle such fragment differences, not only because actual double links (i.e., with no fragment differentation) should still be flagged.

- [Data Graph](https://w3c.github.io/data-shapes/shacl/#data-graph) and Shapes Graph (SHACL spec) - the inputs to a SHACL validator, but these are "ephemeral", and spec doesn't concretize how to pass them to the validator.
- [sh:shapesGraph](https://w3c.github.io/data-shapes/shacl/#sh-shapes-graph) (SHACL spec) - A triple in the data graph that **suggests** which shapes to select for validation.
- `rdf4j:SHACLShapeGraph` (RDF4J extension) - default shape graph in RDF4J (see [this blog](https://www.ontotext.com/blog/shacl-ing-the-data-quality-dragon-iii-a-good-artisan-knows-their-tools/)).
- `rsx:DataAndShapesGraphLink, rsx:shapesGraph, rsx:dataGraph` (RDF4J extension) - describe exactly which shapes go with which graphs (see [doc](https://graphdb.ontotext.com/documentation/10.8/shacl-validation.html#union-of-data-graphs-when-validating-the-results) or [this blog](https://www.ontotext.com/blog/shacl-ing-the-data-quality-dragon-iii-a-good-artisan-knows-their-tools/)).
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- `rsx:DataAndShapesGraphLink, rsx:shapesGraph, rsx:dataGraph` (RDF4J extension) - describe exactly which shapes go with which graphs (see [doc](https://graphdb.ontotext.com/documentation/10.8/shacl-validation.html#union-of-data-graphs-when-validating-the-results) or [this blog](https://www.ontotext.com/blog/shacl-ing-the-data-quality-dragon-iii-a-good-artisan-knows-their-tools/)).
<!--lint ignore awesome-list-item double-link-->
- `rsx:DataAndShapesGraphLink, rsx:shapesGraph, rsx:dataGraph` (RDF4J extension) - describe exactly which shapes go with which graphs (see [doc](https://graphdb.ontotext.com/documentation/10.8/shacl-validation.html#union-of-data-graphs-when-validating-the-results) or [this blog](https://www.ontotext.com/blog/shacl-ing-the-data-quality-dragon-iii-a-good-artisan-knows-their-tools/)).

- SHACL on Graphs (as discussed in [shacl#22](https://github.com/w3c/shacl/issues/22) and [Inst4CIM-KG#140](https://github.com/Sveino/Inst4CIM-KG/issues/140))
- [Data Graph](https://w3c.github.io/data-shapes/shacl/#data-graph) and Shapes Graph (SHACL spec) - the inputs to a SHACL validator, but these are "ephemeral", and spec doesn't concretize how to pass them to the validator.
- [sh:shapesGraph](https://w3c.github.io/data-shapes/shacl/#sh-shapes-graph) (SHACL spec) - A triple in the data graph that **suggests** which shapes to select for validation.
- `rdf4j:SHACLShapeGraph` (RDF4J extension) - default shape graph in RDF4J (see [this blog](https://www.ontotext.com/blog/shacl-ing-the-data-quality-dragon-iii-a-good-artisan-knows-their-tools/)).
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- `rdf4j:SHACLShapeGraph` (RDF4J extension) - default shape graph in RDF4J (see [this blog](https://www.ontotext.com/blog/shacl-ing-the-data-quality-dragon-iii-a-good-artisan-knows-their-tools/)).
<!--lint ignore awesome-list-item double-link-->
- `rdf4j:SHACLShapeGraph` (RDF4J extension) - default shape graph in RDF4J (see [this blog](https://www.ontotext.com/blog/shacl-ing-the-data-quality-dragon-iii-a-good-artisan-knows-their-tools/)).


- SHACL on Graphs (as discussed in [shacl#22](https://github.com/w3c/shacl/issues/22) and [Inst4CIM-KG#140](https://github.com/Sveino/Inst4CIM-KG/issues/140))
- [Data Graph](https://w3c.github.io/data-shapes/shacl/#data-graph) and Shapes Graph (SHACL spec) - the inputs to a SHACL validator, but these are "ephemeral", and spec doesn't concretize how to pass them to the validator.
- [sh:shapesGraph](https://w3c.github.io/data-shapes/shacl/#sh-shapes-graph) (SHACL spec) - A triple in the data graph that **suggests** which shapes to select for validation.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- [sh:shapesGraph](https://w3c.github.io/data-shapes/shacl/#sh-shapes-graph) (SHACL spec) - A triple in the data graph that **suggests** which shapes to select for validation.
<!--lint ignore double-link-->
- [sh:shapesGraph](https://w3c.github.io/data-shapes/shacl/#sh-shapes-graph) (SHACL spec) - A triple in the data graph that **suggests** which shapes to select for validation.

Co-authored-by: Ted Thibodeau Jr <tthibodeau@openlinksw.com>
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.

Add "SHACL on graphs" proposal
4 participants