forked from crs4/rocrate-validator
-
Notifications
You must be signed in to change notification settings - Fork 0
Infer WorkflowRun from CreateAction in five-safes SHACL profiles - NEW #109
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
Merged
elichad
merged 17 commits into
develop
from
107-run-createaction-checks-only-against-the-createactions-that-the-profile-cares-about
May 12, 2026
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
662cbcd
Infer WorkflowRun from CreateAction in five-safes SHACL profiles
EttoreM 364a81f
Modification of @graph is now centralised
EttoreM eaa0f9d
PARTIALLY amended the error messages that appear as validation fails.…
EttoreM 4862149
completion of amended error messages for workflowrun / createaction
douglowe 474a297
linting test files
douglowe 51efbd6
update 5s-rocrate tests
douglowe f0b4879
Renamed to
EttoreM acd5533
Amended message in 7_requested_workflow_run.ttl and corresponding test
EttoreM e4a1c23
Added blank space in message in SHACL shape of
EttoreM f1f5c63
improved message in 11_workflow_execution_phase.ttl
EttoreM eddf1b7
Improved comment in 11_workflow_execution_phase.ttl
EttoreM 5996412
Addressed extra comments about message in SHACL shapes.
EttoreM cfb2729
Improved sh:message
EttoreM d576f73
Improved sh:message
EttoreM 53e5b52
Removed reduntant SHACL shape and corresponding test.
EttoreM 8f4ce24
Update rocrate_validator/profiles/ro-crate/must/2_root_data_entity_me…
EttoreM 8a42e4f
Update rocrate_validator/profiles/five-safes-crate/must/0_workflow_ru…
EttoreM File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
rocrate_validator/profiles/five-safes-crate/must/0_workflow_run_inference.ttl
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| # Copyright (c) 2025 eScience Lab, The University of Manchester | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| @prefix ro-crate: <https://github.com/crs4/rocrate-validator/profiles/ro-crate/> . | ||
| @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . | ||
| @prefix schema: <http://schema.org/> . | ||
| @prefix sh: <http://www.w3.org/ns/shacl#> . | ||
| @prefix validator: <https://github.com/crs4/rocrate-validator/> . | ||
|
|
||
|
|
||
| ro-crate:FindWorkflowRunAction a sh:NodeShape, validator:HiddenShape; | ||
| sh:order 1 ; # load this check after ro-crate:FindRootDataEntity; pySHACL sorts rules by sh:order before execution | ||
| sh:name "Identify the CreateAction Entity that corresponds to the Workflow run" ; | ||
| sh:description """The Workflow Run is the CreateAction entity that refers to Workflow run. | ||
| This is identified by checking that the CreateAction entity has an `instrument` property | ||
| that references the same entity as the `mainEntity` property of the Root Data Entity.""" ; | ||
| sh:target [ | ||
| a sh:SPARQLTarget ; | ||
| sh:prefixes ro-crate:sparqlPrefixes ; | ||
| sh:select """ | ||
| SELECT ?this | ||
| WHERE { | ||
| ?this a schema:CreateAction ; | ||
| schema:instrument ?instrument . | ||
| ?root a ro-crate:RootDataEntity ; | ||
| schema:mainEntity ?instrument . | ||
| } | ||
| """ | ||
| ] ; | ||
|
|
||
| sh:rule [ | ||
| a sh:TripleRule ; | ||
| sh:subject sh:this ; | ||
| sh:predicate rdf:type ; | ||
| sh:object ro-crate:WorkflowRunAction ; | ||
| ] . |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| # Copyright (c) 2024-2026 CRS4 | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| @prefix ro: <./> . | ||
| @prefix owl: <http://www.w3.org/2002/07/owl#> . | ||
| @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . | ||
| @prefix xml: <http://www.w3.org/XML/1998/namespace#> . | ||
| @prefix xsd: <http://www.w3.org/2001/XMLSchema#> . | ||
| @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . | ||
| @prefix schema: <http://schema.org/> . | ||
| @prefix rocrate: <https://w3id.org/ro/crate/1.1/> . | ||
| @prefix bioschemas: <https://bioschemas.org/> . | ||
| @prefix ro-crate: <https://github.com/crs4/rocrate-validator/profiles/ro-crate/> . | ||
| @prefix isa-ro-crate: <https://github.com/crs4/rocrate-validator/profiles/isa-ro-crate/> . | ||
|
|
||
| <urn:absolute:.> rdf:type owl:Ontology ; | ||
| owl:versionIRI <urn:absolute:1.0> . | ||
|
|
||
| # # ################################################################# | ||
| # # # Classes | ||
| # # ################################################################# | ||
|
|
||
| # Declare a WorkflowRunAction class | ||
| ro-crate:WorkflowRunAction rdf:type owl:Class ; | ||
| rdfs:subClassOf schema:CreateAction ; | ||
| rdfs:label "WorkflowRunAction"@en . |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this test (
five-safes-crate:RootDataEntityMentionsWorkflowRunAction) replicated by the testfive-safes-crate:RootDataEntityShouldMentionWorkflowin the fileshould/11_workflow_execution_phase.ttl?Can you check, and see if they are the same test, and if so then decide if we should keep the MUST or the SHOULD version?
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the excel file we have
sh:severitymentions@elichad, do you still hold the same opinion about the second rule in the table above?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, just double checked this, the second rule is redundant. The MUST version in this file is the one we should keep.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The redundant rule of phase 11 (Workflow Execution Phase) has been removed.