Skip to content

Add SHACL warnings for five-safes-profile conformance, datePublished, and licence#107

Open
EttoreM wants to merge 5 commits intodevelopfrom
106-add-shacl-warnings-for-five-safes-profile-conformance-conformsto-datepublished-licence
Open

Add SHACL warnings for five-safes-profile conformance, datePublished, and licence#107
EttoreM wants to merge 5 commits intodevelopfrom
106-add-shacl-warnings-for-five-safes-profile-conformance-conformsto-datepublished-licence

Conversation

@EttoreM
Copy link
Copy Markdown

@EttoreM EttoreM commented Apr 29, 2026

Closes #106.

Copy link
Copy Markdown

@douglowe douglowe left a comment

Choose a reason for hiding this comment

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

I wonder if we should use sh:xone instead of sh:or - see my comments in the code.

a sh:NodeShape ;
sh:name "License present on published crates" ;
sh:description "If the root dataset is published (has schema:publisher), it SHOULD declare a license." ;
sh:targetNode ro: ;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Which Node is ro:? Is this the root node of the RO-Crate?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Done in the new commit.

sh:path schema:datePublished ;
sh:minCount 1 ;
]]
) .
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Would it be more appropriate to use the sh:xone constraint here? If there should only be a publication date if there's a publisher then I think we don't ever want to have both of these checks to be true.
See https://www.w3.org/TR/shacl/#XoneConstraintComponent

This would then require an extra test, in which we add a schema:datePublished object without any schema:publisher object.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Addressed in the new commit

EttoreM added 2 commits May 5, 2026 15:17
…for the new potential failing situation introduced by point 2.
…Entity', (2) Replaced 'sh:or' with 'sh:xone', and (3) added a test to account for the new potential failing situation introduced by point 2.
@EttoreM EttoreM requested a review from douglowe May 5, 2026 14:38
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 warnings for Five Safes profile conformance (conformsTo, datePublished, licence)

2 participants