Skip to content

Commit e877b80

Browse files
committed
sign-off instrument check
1 parent 6638185 commit e877b80

2 files changed

Lines changed: 39 additions & 1 deletion

File tree

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,13 @@ five-safes-crate:SignOffPhaseProperties
9696
sh:minCount 1 ;
9797
sh:severity sh:Warning ;
9898
sh:message "The Sign-Off Phase SHOULD have an agent" ;
99+
] ;
100+
sh:property [
101+
sh:description "Check if the Sign Off phase has an instrument" ;
102+
sh:path schema:instrument ;
103+
sh:minCount 1 ;
104+
sh:severity sh:Warning ;
105+
sh:message "The Sign-Off Phase SHOULD have an instrument" ;
99106
] .
100107

101108

tests/integration/profiles/five-safes-crate/test_5src_signoff_phase.py

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,4 +174,35 @@ def test_5src_signoff_phase_no_agent():
174174
],
175175
profile_identifier="five-safes-crate",
176176
rocrate_entity_mod_sparql=sparql,
177-
)
177+
)
178+
179+
180+
def test_5src_signoff_phase_no_instrument():
181+
"""
182+
Test a Five Safes Crate where the Sign-Off phase has no instrument.
183+
"""
184+
sparql = (
185+
SPARQL_PREFIXES
186+
+ """
187+
DELETE {
188+
?signoff schema:instrument ?instrument .
189+
}
190+
WHERE {
191+
?signoff a schema:AssessAction ;
192+
schema:additionalType <https://w3id.org/shp#SignOff> ;
193+
schema:instrument ?instrument .
194+
}
195+
"""
196+
)
197+
198+
do_entity_test(
199+
rocrate_path=ValidROC().five_safes_crate_result,
200+
requirement_severity=Severity.RECOMMENDED,
201+
expected_validation_result=False,
202+
expected_triggered_requirements=["SignOffPhaseProperties"],
203+
expected_triggered_issues=[
204+
"The Sign-Off Phase SHOULD have an instrument"
205+
],
206+
profile_identifier="five-safes-crate",
207+
rocrate_entity_mod_sparql=sparql,
208+
)

0 commit comments

Comments
 (0)