Skip to content

Commit f82c700

Browse files
committed
move towards modular explicit must reqs for time strings
1 parent 945a64d commit f82c700

File tree

4 files changed

+21
-11
lines changed

4 files changed

+21
-11
lines changed

rocrate_validator/profiles/five-safes-crate/may/4_sign_off.ttl

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,14 @@
2626
five-safes-crate:SignOffPhaseStartTime
2727
a sh:NodeShape ;
2828
sh:description "Sign Off start time check" ;
29-
sh:node five-safes-crate:StartTimeStamp ;
3029
sh:severity sh:Info ;
3130
sh:target [
3231
a five-safes-crate:ActionActiveCompFailSearch ;
3332
five-safes-crate:addtype shp:SignOff ;
3433
] ;
35-
sh:message "Sign Off phase MAY have a compliant startTime if action is active, completed or failed."
36-
.
34+
sh:property [
35+
sh:path schema:startTime ;
36+
sh:minCount 1 ;
37+
sh:maxCount 1 ;
38+
sh:message "Sign Off phase MAY have a startTime if action is active, completed or failed." ;
39+
] .

rocrate_validator/profiles/five-safes-crate/must/11_workflow_execution_phase.ttl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,9 @@ five-safes-crate:WorkflowexecutionObjectHasCompliantEndTimeFormat
7272
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})$" ;
7373
sh:severity sh:Violation ;
7474
sh:message "The endTime of the workflow execution object MUST follow the RFC 3339 standard (YYYY-MM-DD'T'hh:mm:ss[.fraction](Z | ±hh:mm))." ;
75-
] .
75+
] ;
76+
77+
sh:node five-safes-crate:EndTimeStamp .
7678

7779

7880
five-safes-crate:WorkflowMustHaveActionStatusWithAllowedValues

rocrate_validator/profiles/five-safes-crate/must/4_sign_off.ttl

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
@prefix sh: <http://www.w3.org/ns/shacl#> .
2222
@prefix validator: <https://github.com/crs4/rocrate-validator/> .
2323
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
24+
@prefix shp: <https://w3id.org/shp#> .
2425

2526
five-safes-crate:SignOffObjectActionAndName
2627
a sh:NodeShape ;
@@ -53,7 +54,11 @@ five-safes-crate:SignOffObjectActionAndName
5354
sh:hasValue schema:AssessAction;
5455
sh:severity sh:Violation ;
5556
sh:message "Sign Off phase MUST be a `schema:AssessAction`." ;
56-
] .
57+
] ;
58+
59+
sh:node five-safes-crate:StartTimeStamp ;
60+
61+
sh:node five-safes-crate:EndTimeStamp .
5762

5863
five-safes-crate:SignOffObjectHasActionStatus
5964
a sh:NodeShape ;

rocrate_validator/profiles/five-safes-crate/shape_library.ttl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ five-safes-crate:EndTimeStamp
3131
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})$" ;
3232
sh:description "End Time Check" ;
3333
sh:path schema:endTime ;
34-
sh:minCount 1 ;
35-
sh:maxCount 1 ;
34+
sh:minCount 0 ;
3635
sh:name "EndTimeStamp" ;
3736
sh:message "endTime property MUST follow ISO-8601 syntax. e.g. 2023-04-19T10:15:12+01:00" ;
37+
sh:severity sh:Violation ;
3838
] .
3939

4040

@@ -43,12 +43,12 @@ five-safes-crate:StartTimeStamp
4343
sh:property [
4444
sh:datatype xsd:string ;
4545
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})$" ;
46-
sh:description "End Time Check" ;
46+
sh:description "Start Time Check" ;
4747
sh:path schema:startTime ;
48-
sh:minCount 1 ;
49-
sh:maxCount 1 ;
50-
sh:name "StartTime" ;
48+
sh:minCount 0 ;
49+
sh:name "StartTimeStamp" ;
5150
sh:message "startTime property MUST follow ISO-8601 syntax. e.g. 2023-04-19T10:15:12+01:00" ;
51+
sh:severity sh:Violation ;
5252
] .
5353

5454

0 commit comments

Comments
 (0)