Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ five-safes-crate:DownloadedWorkflowSHOULDExistAndBeReferencedByDownloadActionRes
sh:path schema:result ;
sh:minCount 1 ;
sh:nodeKind sh:IRI ;

sh:sparql [
a sh:SPARQLConstraint ;
sh:select """
Expand All @@ -54,9 +53,9 @@ five-safes-crate:DownloadedWorkflowSHOULDExistAndBeReferencedByDownloadActionRes
}
}
""" ;
sh:severity sh:Info ;
sh:message "The entity representing the downloaded workflow is not defined, OR is not referenced by `DownloadAction` --> `result`, OR is not of type `Dataset`." ;
] ;
sh:severity sh:Info ;
sh:message "The entity representing the downloaded workflow is not defined, OR is not referenced by `DownloadAction` --> `result`, OR is not of type `Dataset`." ;
] .


Expand Down Expand Up @@ -93,10 +92,10 @@ five-safes-crate:DownloadActionMayHaveStartTimeIfBegun
sh:path schema:startTime ;
sh:minCount 1 ;
sh:maxCount 1 ;
sh:severity sh:Info ;
sh:description (
"`DownloadAction` MAY have the `startTime` property if `actionStatus` "
"is either ActiveActionStatus, CompletedActionStatus or FailedActionStatus."
);
sh:severity sh:Info ;
sh:message "`DownloadAction` MAY have the `startTime` property if `actionStatus` is either ActiveActionStatus, CompletedActionStatus or FailedActionStatus." ;
] .
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@ five-safes-crate:WorkflowMustHaveDescriptiveName
] .




five-safes-crate:WorkflowMustHaveActionStatusWithAllowedValues
a sh:NodeShape ;
sh:name "WorkflowExecution" ;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ five-safes-crate:WorkflowSameAsAndRootDataEntityMainEntityMUSTBeTheSame
a sh:NodeShape ;
sh:name "Downloaded Workflow" ;
sh:description "" ;
sh:severity sh:Violation ;

sh:target [
a sh:SPARQLTarget ;
sh:select """
Expand Down Expand Up @@ -77,7 +79,7 @@ five-safes-crate:WorkflowSameAsAndRootDataEntityMainEntityMUSTBeTheSame
}
}
""" ;
sh:severity sh:Violation ;

sh:description "The property `sameAs` of the entity representing the downloaded workflow MUST point to the same entity as `RootDataEntity` --> `mainEntity`." ;
sh:message "The property `sameAs` of the entity representing the downloaded workflow MUST point to the same entity as `RootDataEntity` --> `mainEntity`." ;
] .
Expand All @@ -87,6 +89,8 @@ five-safes-crate:DownloadedWorkflowDistributionAndDownloadActionObjectMUSTBeTheS
a sh:NodeShape ;
sh:name "Downloaded Workflow" ;
sh:description "" ;
sh:severity sh:Violation ;

sh:target [
a sh:SPARQLTarget ;
sh:select """
Expand Down Expand Up @@ -118,7 +122,6 @@ five-safes-crate:DownloadedWorkflowDistributionAndDownloadActionObjectMUSTBeTheS
}
}
""" ;
sh:severity sh:Violation ;
sh:message "DownloadedWorkflow --> `distribution` MUST reference the same entity as `DownloadAction` --> `object`." ;
] .

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,6 @@ five-safes-crate:AgentProjectIntersection
}
}
""" ;
sh:severity sh:Violation ;
sh:message """At least one Project referenced by Agent -> memberOf MUST be included in the set of Projects referenced by RootDataEntity -> sourceOrganization.""" ;
] .
] ;
sh:severity sh:Violation ;
sh:message """At least one Project referenced by Agent -> memberOf MUST be included in the set of Projects referenced by RootDataEntity -> sourceOrganization.""" .
Original file line number Diff line number Diff line change
Expand Up @@ -35,20 +35,20 @@ five-safes-crate:TimeStampFormat
sh:property [
a sh:PropertyShape ;
sh:name "End TimeStamp" ;
sh:description "End timestamps MUST follow the RFC 3339 standard." ;
sh:path schema:endTime ;
sh:minCount 0 ;
sh:pattern "^[0-9]{4}-[0-9]{2}-[0-9]{2}[Tt][0-9]{2}:[0-9]{2}:[0-9]{2}([.|,][0-9]+)?(Z|z|[+-][0-9]{2}:[0-9]{2})$" ;
sh:severity sh:Violation ;
sh:message "All `startTime` and `endTime` values MUST follow the RFC 3339 standard (YYYY-MM-DD'T'hh:mm:ss[.fraction](Z | ±hh:mm))." ;
sh:description "End timestamps MUST follow the RFC 3339 standard." ;
] ;
sh:property [
a sh:PropertyShape ;
sh:name "Start TimeStamp" ;
sh:description "Start timestamps MUST follow the RFC 3339 standard." ;
sh:path schema:startTime ;
sh:minCount 0 ;
sh:pattern "^[0-9]{4}-[0-9]{2}-[0-9]{2}[Tt][0-9]{2}:[0-9]{2}:[0-9]{2}([.|,][0-9]+)?(Z|z|[+-][0-9]{2}:[0-9]{2})$" ;
sh:severity sh:Violation ;
sh:message "All `startTime` and `endTime` values MUST follow the RFC 3339 standard (YYYY-MM-DD'T'hh:mm:ss[.fraction](Z | ±hh:mm))." ;
sh:description "Start timestamps MUST follow the RFC 3339 standard." ;
] .
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ five-safes-crate:mainEntityHasProperConformsTo
sh:name "mainEntity" ;
sh:description "The mainEntity of the RootDataEntity MUST have a conformsTo property with an IRI starting with https://w3id.org/workflowhub/workflow-ro-crate" ;
sh:targetObjectsOf schema:mainEntity ;
sh:property [
sh:property [
a sh:PropertyShape ;
sh:name "conformsTo" ;
sh:path purl:conformsTo ;
Expand All @@ -65,16 +65,12 @@ five-safes-crate:mainEntityHasProperConformsTo
sh:severity sh:Violation ;
sh:message "mainEntity MUST have one and only one `conformsTo` property." ;
] ;
sh:sparql [
a sh:SPARQLConstraint ;
sh:property [
a sh:PropertyShape ;
sh:name "conformsTo" ;
sh:path purl:conformsTo ;
sh:nodeKind sh:IRI ;
sh:pattern "^https://w3id\\.org/workflowhub/workflow-ro-crate" ;
sh:severity sh:Violation ;
sh:message "conformsTo IRI must start with https://w3id.org/workflowhub/workflow-ro-crate" ;
sh:select """
PREFIX schema: <http://schema.org/>
PREFIX purl: <http://purl.org/dc/terms/>
SELECT $this WHERE {
$this purl:conformsTo ?iri .
FILTER(!STRSTARTS(STR(?iri), "https://w3id.org/workflowhub/workflow-ro-crate"))
}
""" ;
] .
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@ five-safes-crate:CreateActionInstrumentAndStatus
sh:name "CreateAction" ;
sh:targetClass schema:CreateAction ;
sh:description "" ;
sh:severity sh:Violation ; # Apply to all property shapes / constraints below

sh:property [
a sh:PropertyShape ;
sh:name "instrument" ;
sh:path schema:instrument;
sh:minCount 1 ;
sh:severity sh:Violation ;
sh:message "`CreateAction` MUST have the `instrument` property" ;
] ;
sh:sparql [
Expand All @@ -67,7 +67,6 @@ five-safes-crate:CreateActionInstrumentAndStatus
FILTER (?instrument != ?main)
}
""" ;
sh:severity sh:Violation ;
sh:message "`CreateAction` --> `instrument` MUST reference the same entity as `Root Data Entity` --> `mainEntity`" ;
] ;
sh:sparql [
Expand All @@ -81,6 +80,5 @@ five-safes-crate:CreateActionInstrumentAndStatus
FILTER NOT EXISTS { ?object a ?type . }
}
""" ;
sh:severity sh:Violation ;
sh:message "Each `object` in `CreateAction` MUST reference an existing entity." ;
] .
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ five-safes-crate:ResponsibleProjectMemberAndSourceOrganizationIntersection
a sh:NodeShape ;
sh:name "Organizations (members of Responsible Project)" ;
sh:description """At least one of the organisations that are members of the responsible project SHOULD be included in the Requesting Agent's affiliations, if such properties exist.""" ;
sh:severity sh:Warning ;

sh:target [
a sh:SPARQLTarget ;
sh:prefixes ro-crate:sparqlPrefixes ;
Expand All @@ -40,6 +42,7 @@ five-safes-crate:ResponsibleProjectMemberAndSourceOrganizationIntersection
}
"""
] ;

sh:sparql [
a sh:SPARQLConstraint ;
sh:name "Intersection with agent affiliations" ;
Expand All @@ -55,6 +58,5 @@ five-safes-crate:ResponsibleProjectMemberAndSourceOrganizationIntersection
}
}
""" ;
sh:severity sh:Warning ;
sh:message """At least one of the organisations that are members of the responsible project SHOULD be included in the Requesting Agent's affiliations, if such properties exist.""" ;
] .
18 changes: 14 additions & 4 deletions rocrate_validator/profiles/five-safes-crate/should/4_sign_off.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,11 @@
# There SHOULD be a Sign-Off Phase
five-safes-crate:SignOffPhase
a sh:NodeShape ;
sh:name "SignOffPhase" ;
sh:targetClass ro-crate:RootDataEntity ;
sh:description "Check the Sign-Off Phase" ;
sh:severity sh:Warning ;

sh:sparql [
sh:select """
PREFIX schema: <http://schema.org/>
Expand All @@ -39,9 +42,9 @@ five-safes-crate:SignOffPhase
}
}
""" ;
sh:severity sh:Warning ;
sh:message "There SHOULD be a Sign-Off Phase in the Final RO-Crate" ;
] ;

sh:sparql [
sh:select """
PREFIX schema: <http://schema.org/>
Expand All @@ -54,14 +57,16 @@ five-safes-crate:SignOffPhase
}
}
""" ;
sh:severity sh:Warning ;
sh:message "The Root Data Entity SHOULD mention a Sign-Off Phase Object" ;
] .


five-safes-crate:SignOffPhaseProperties
a sh:NodeShape ;
sh:name "SignOffPhaseProperties" ;
sh:description "Check Sign-Off Phase Properties" ;
sh:severity sh:Warning ;

sh:target [
a sh:SPARQLTarget ;
sh:select """
Expand All @@ -73,20 +78,23 @@ five-safes-crate:SignOffPhaseProperties
}
"""
] ;

sh:property [
sh:description "Check if the Sign Off phase has an actionStatus" ;
sh:path schema:actionStatus ;
sh:minCount 1 ;
sh:severity sh:Warning ;
sh:message "The Sign-Off Phase SHOULD have an actionStatus" ;
] ;

sh:property [
sh:description "Check if the Sign Off phase has an agent" ;
sh:path schema:agent ;
sh:minCount 1 ;
sh:severity sh:Warning ;
sh:message "The Sign-Off Phase SHOULD have an agent" ;
] ;

sh:property [
sh:description "Check if the Sign Off phase has an instrument (TRE Policy)" ;
sh:path schema:instrument ;
Expand All @@ -96,6 +104,7 @@ five-safes-crate:SignOffPhaseProperties
sh:severity sh:Warning ;
sh:message "The Sign-Off Phase SHOULD have an TRE policy (instrument) with type CreativeWork" ;
] ;

sh:property [
sh:description "Check if the Sign Off phase has an instrument (TRE Policy)" ;
sh:path ( schema:instrument schema:name ) ;
Expand All @@ -104,6 +113,7 @@ five-safes-crate:SignOffPhaseProperties
sh:severity sh:Warning ;
sh:message "The Sign-Off Phase SHOULD have an TRE policy (instrument) with a human-readable name" ;
] ;

sh:sparql [
a sh:SPARQLConstraint ;
sh:description "Check if the Sign Off phase lists the workflow as an object" ;
Expand All @@ -120,9 +130,9 @@ five-safes-crate:SignOffPhaseProperties
}
}
""" ;
sh:severity sh:Warning ;
sh:message "The Sign-Off Phase SHOULD list the workflow (mainEntity) as an object" ;
];

sh:sparql [
a sh:SPARQLConstraint ;
sh:description "Check if the Sign Off phase lists the Responsible Project as an object" ;
Expand All @@ -139,13 +149,13 @@ five-safes-crate:SignOffPhaseProperties
}
}
""" ;
sh:severity sh:Warning ;
sh:message "The Sign-Off Phase SHOULD list the Responsible Project (sourceOrganization) as an object" ;
].


five-safes-crate:SignOffPhaseEndTime
a sh:NodeShape ;
sh:name "SignOffPhaseEndTime" ;
sh:description "Sign Off end time check" ;

sh:target [
Expand Down