@@ -45,7 +45,7 @@ def test_5src_download_action_does_not_have_name():
4545 expected_validation_result = False ,
4646 expected_triggered_requirements = ["DownloadAction" ],
4747 expected_triggered_issues = [
48- "DownloadAction MUST have a human readable name string of at least 10 characters ."
48+ "DownloadAction MUST have a human readable name string."
4949 ],
5050 profile_identifier = "five-safes-crate" ,
5151 rocrate_entity_mod_sparql = sparql ,
@@ -74,36 +74,7 @@ def test_5src_download_action_name_not_a_string():
7474 expected_validation_result = False ,
7575 expected_triggered_requirements = ["DownloadAction" ],
7676 expected_triggered_issues = [
77- "DownloadAction MUST have a human readable name string of at least 10 characters."
78- ],
79- profile_identifier = "five-safes-crate" ,
80- rocrate_entity_mod_sparql = sparql ,
81- )
82-
83-
84- def test_5src_download_action_name_not_long_enough ():
85- sparql = (
86- SPARQL_PREFIXES
87- + """
88- DELETE {
89- ?this schema:name ?name .
90- }
91- INSERT {
92- ?this schema:name "Short" .
93- }
94- WHERE {
95- ?this rdf:type schema:DownloadAction .
96- }
97- """
98- )
99-
100- do_entity_test (
101- rocrate_path = ValidROC ().five_safes_crate_result ,
102- requirement_severity = Severity .REQUIRED ,
103- expected_validation_result = False ,
104- expected_triggered_requirements = ["DownloadAction" ],
105- expected_triggered_issues = [
106- "DownloadAction MUST have a human readable name string of at least 10 characters."
77+ "DownloadAction MUST have a human readable name string."
10778 ],
10879 profile_identifier = "five-safes-crate" ,
10980 rocrate_entity_mod_sparql = sparql ,
@@ -361,16 +332,18 @@ def test_5src_download_action_does_not_have_end_time():
361332 )
362333
363334
364- def test_5src_downloaded_workflow_is_not_represented_by_its_own_entity ():
335+ def test_5src_downloaded_workflow_is_not_referenced_by_download_action_result ():
365336 sparql = (
366337 SPARQL_PREFIXES
367338 + """
368339 DELETE {
369- ?wf ?p ?o .
340+ ?s schema:result ?o .
341+ }
342+ INSERT {
343+ ?s schema:result "This is not the downloaded workflow entity" .
370344 }
371345 WHERE {
372- ?wf ?p ?o .
373- ?da schema:result ?wf ;
346+ ?s schema:result ?o ;
374347 rdf:type schema:DownloadAction .
375348 }
376349 """
@@ -392,19 +365,20 @@ def test_5src_downloaded_workflow_is_not_represented_by_its_own_entity():
392365 )
393366
394367
395- def test_5src_downloaded_workflow_is_not_referenced_by_download_action_result ():
368+ def test_5src_downloaded_workflow_entity_is_not_of_type_dataset ():
396369 sparql = (
397370 SPARQL_PREFIXES
398371 + """
399372 DELETE {
400- ?s schema:result ?o .
373+ ?wf rdf:type schema:Dataset .
401374 }
402375 INSERT {
403- ?s schema:result "This is not the downloaded workflow entity" .
376+ ?wf rdf:type schema:Person .
404377 }
405378 WHERE {
406- ?s schema:result ?o ;
407- rdf:type schema:DownloadAction .
379+ ?wf rdf:type schema:Dataset .
380+ ?da schema:result ?wf ;
381+ rdf:type schema:DownloadAction .
408382 }
409383 """
410384 )
@@ -425,20 +399,16 @@ def test_5src_downloaded_workflow_is_not_referenced_by_download_action_result():
425399 )
426400
427401
428- def test_5src_downloaded_workflow_entity_is_not_of_type_dataset ():
402+ def test_5src_download_action_does_not_have_action_status_property ():
429403 sparql = (
430404 SPARQL_PREFIXES
431405 + """
432406 DELETE {
433- ?wf rdf:type schema:Dataset .
434- }
435- INSERT {
436- ?wf rdf:type schema:Person .
407+ ?s schema:actionStatus ?o .
437408 }
438409 WHERE {
439- ?wf rdf:type schema:Dataset .
440- ?da schema:result ?wf ;
441- rdf:type schema:DownloadAction .
410+ ?s rdf:type schema:DownloadAction ;
411+ schema:actionStatus ?o .
442412 }
443413 """
444414 )
@@ -449,46 +419,47 @@ def test_5src_downloaded_workflow_entity_is_not_of_type_dataset():
449419 expected_validation_result = False ,
450420 expected_triggered_requirements = ["DownloadAction" ],
451421 expected_triggered_issues = [
452- (
453- "The entity represented the downloaded workflow is not properly defined in the "
454- "RO-Crate and/or it is not referenced by `DownloadAction` --> `result`."
455- )
422+ "`DownloadAction` SHOULD have `actionStatus` property."
456423 ],
457424 profile_identifier = "five-safes-crate" ,
458425 rocrate_entity_mod_sparql = sparql ,
459426 )
460427
461428
462- def test_5src_download_action_does_not_have_action_status_property ():
429+ # ----- MAY fails tests
430+
431+
432+ def test_5src_downloaded_workflow_is_not_represented_by_its_own_entity ():
463433 sparql = (
464434 SPARQL_PREFIXES
465435 + """
466436 DELETE {
467- ?s schema:actionStatus ?o .
437+ ?wf ?p ?o .
468438 }
469439 WHERE {
470- ?s rdf:type schema:DownloadAction ;
471- schema:actionStatus ?o .
440+ ?wf ?p ?o .
441+ ?da schema:result ?wf ;
442+ rdf:type schema:DownloadAction .
472443 }
473444 """
474445 )
475446
476447 do_entity_test (
477448 rocrate_path = ValidROC ().five_safes_crate_result ,
478- requirement_severity = Severity .RECOMMENDED ,
449+ requirement_severity = Severity .OPTIONAL ,
479450 expected_validation_result = False ,
480451 expected_triggered_requirements = ["DownloadAction" ],
481452 expected_triggered_issues = [
482- "`DownloadAction` SHOULD have `actionStatus` property."
453+ (
454+ "The entity represented the downloaded workflow is not properly defined in the "
455+ "RO-Crate and/or it is not referenced by `DownloadAction` --> `result`."
456+ )
483457 ],
484458 profile_identifier = "five-safes-crate" ,
485459 rocrate_entity_mod_sparql = sparql ,
486460 )
487461
488462
489- # ----- MAY fails tests
490-
491-
492463def test_5src_download_action_does_not_have_start_time ():
493464 sparql = (
494465 SPARQL_PREFIXES
0 commit comments