Conversation
… TO BE COMPLETED.
douglowe
left a comment
There was a problem hiding this comment.
Looks generally good - a couple of items to pick up from the other PR.
Could you check out Eli's question on the order statements - run some tests and see if anything breaks without them?
| """ ; | ||
| sh:message "`CreateAction` --> `instrument` MUST reference the same entity as `Root Data Entity` --> `mainEntity`" ; | ||
| ] ; | ||
| sh:message "The `CreateAction` entity corresponding to the workflow run MUST reference through its property `instrument` the same entity as `RootData Entity` --> `mainEntity`" ; |
There was a problem hiding this comment.
Can we word this more clearly?
Perhaps 'The CreateAction entity corresponding to the workflow MUST reference, as an instrument, the entity that is referenced as mainEntity by the RO-Crate'.
|
|
||
|
|
||
| five-safes-crate:RootDataEntityMentionsCreateAction | ||
| five-safes-crate:RootDataEntityMentionsWorkflowRunAction |
There was a problem hiding this comment.
Is this test (five-safes-crate:RootDataEntityMentionsWorkflowRunAction) replicated by the test five-safes-crate:RootDataEntityShouldMentionWorkflow in the file should/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?
Closes #43.
NOTE: This PR supersedes #104. The current commit on this branch addresses all the comments made on #104.
This PR implements a solution for treating the workflow-execution
CreateActionas a dedicatedro-crate:WorkflowRunentity across the Five Safes SHACL profiles.At a high level:
A hidden SHACL rule was added to the relevant TTL files to infer the triple
CreateAction -> rdf:type -> ro-crate:WorkflowRunfor theCreateActionwhoseinstrumentmatchesRootDataEntity -> mainEntity.All SHACL constraints that are really about the actual workflow run were then retargeted from generic
CreateActiontoWorkflowRun, with corresponding updates on shapes' names and messages.Tests were updated accordingly.
One important testing detail:
In the Python tests, the graph mutations still target entities of type
CreateAction, notWorkflowRun.This is intentional:
WorkflowRunis inferred by SHACL during validation, so it is safer for the tests to alter the sourceCreateActionnodes in the RO-Crate metadata graph.This remains correct as long as the tests are understood to target the specific
CreateActionthat is effectively the workflow run, and not any otherCreateActionthat may also be present in the crate.A separate consistency note:
prefixes.ttl, the RO-Crate namespace is exposed in SPARQL viarocrate(without the dash), while elsewhere in the codebase we also usero-crate.This did not originate in this PR, but it is something we may want to clean up in future to align prefix syntax across the codebase.