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

Should we define a shapes table? #69

Open
kcoyle opened this issue May 13, 2022 · 2 comments
Open

Should we define a shapes table? #69

kcoyle opened this issue May 13, 2022 · 2 comments
Labels
question Further information is requested

Comments

@kcoyle
Copy link
Collaborator

kcoyle commented May 13, 2022

In the TAP as it is today all constraints and notes relate to the row as a whole, which means that all of them are about a statement that MIGHT also be part of a named shape. There is no way to provide constraints or additional information that defines the shape itself. An example of the need can be found in Phil's K12OCX AP. Perhaps we should start by listing the use case requirements, and move forward from there.

@kcoyle kcoyle added the question Further information is requested label May 13, 2022
@tombaker
Copy link
Collaborator

@kcoyle
dctap-python provides a way to extend the set of elements that describe a shape beyond the defaults "shapeID" and "shapeLabel" by enabling an extension point in the configuration file.

I have also added the option of setting shape elements on their own rows, separately from statement template elements.

The documentation clarifies that shape elements are set only once, from the row where a shape is first encountered.

Does this go far enough in enabling "constraints or additional information that defines the shape itself"?

@philbarker
Copy link
Collaborator

Here is what I have on the shapes sheet of the Google sheets template for csv files to be processed by my TAP2SHACL program:

ShapeID This column will be used to provide a drop-down of valid shapeIds in the TAP sheet. The remaining columns provide information useful when processing the TAP to create SHACL rule, notably properties for NodeShapes.

label A label for the Shape. May be used for the sh:name property.

comment A comment about the shape. May be used to provide a value for the sh:description property.

target The sh:target of the sh:NodeShape

targetType the sh:targetType of the target.

closed may be used as value for sh:Closed property of a sh:NodeShape

ignoreProps A list of proprties that should be ignored if the shape if closed. Equivalent to sh:ignoredProperties.

Mandatory Is a match to this shape required in the instance data? May be used to generate a sh:minCount of 1 [I've not implemented this, I think it's not as simple as the comment makes it seem.]

severity may be used to as a value for the sh:severity property

note [just for the TAP, not processed]

I should add something for the sh:message, as I've found the lack of these annoying when getting results.

I think that, with this much information, it's better to give shapes their own sheet. That also resolves a (small) niggle that I have around using shapeID in two different ways: one to say what shape definition a statement template is part of and the other to identify what is being described.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants