Skip to content

Commit 2bd4354

Browse files
committed
PARTIALLY amended the error messages that appear as validation fails. TO BE COMPLETED.
1 parent a15258e commit 2bd4354

7 files changed

Lines changed: 22 additions & 22 deletions

File tree

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,12 @@ five-safes-crate:WorkflowMustHaveDescriptiveName
3232
a sh:PropertyShape ;
3333
sh:name "name" ;
3434
sh:minCount 1 ;
35-
sh:description "WorkflowRun MUST have a name string of at least 10 characters." ;
35+
sh:description "The `CreateAction` corresponding to the workflow run MUST have a name string of at least 10 characters." ;
3636
sh:path schema:name ;
3737
sh:datatype xsd:string ;
3838
sh:minLength 10 ;
3939
sh:severity sh:Violation ;
40-
sh:message "WorkflowRun MUST have a name string of at least 10 characters." ;
40+
sh:message "The `CreateAction` corresponding to the workflow run MUST have a name string of at least 10 characters." ;
4141
] .
4242

4343

@@ -49,7 +49,7 @@ five-safes-crate:WorkflowMustHaveActionStatusWithAllowedValues
4949
a sh:PropertyShape ;
5050
sh:minCount 1 ;
5151
sh:name "actionStatus" ;
52-
sh:description "WorkflowRun MUST have an actionStatus with an allowed value (see https://schema.org/ActionStatusType)." ;
52+
sh:description "`CreateAction` MUST have an actionStatus with an allowed value (see https://schema.org/ActionStatusType)." ;
5353
sh:path schema:actionStatus ;
5454
sh:in (
5555
"http://schema.org/PotentialActionStatus"
@@ -58,5 +58,5 @@ five-safes-crate:WorkflowMustHaveActionStatusWithAllowedValues
5858
"http://schema.org/FailedActionStatus"
5959
) ;
6060
sh:severity sh:Violation ;
61-
sh:message "WorkflowRun MUST have an actionStatus with an allowed value (see https://schema.org/ActionStatusType)." ;
61+
sh:message "`CreateAction` MUST have an actionStatus with an allowed value (see https://schema.org/ActionStatusType)." ;
6262
] .

rocrate_validator/profiles/five-safes-crate/must/7_requested_workflow_run.ttl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ five-safes-crate:RootDataEntityMentionsWorkflowRun
3737
] ;
3838
sh:qualifiedMinCount 1 ;
3939
sh:severity sh:Violation ;
40-
sh:message "`RootDataEntity` MUST reference at least one `WorkflowRun` through `mentions`" ;
40+
sh:message "`RootDataEntity` MUST reference at least one `CreateAction` (corresponding to the workflow run) through `mentions`" ;
4141
] .
4242

4343

@@ -59,7 +59,7 @@ five-safes-crate:WorkflowRunExistence
5959
}
6060
}
6161
""" ;
62-
sh:message "The crate MUST contain at least one `WorkflowRun` entity" ;
62+
sh:message "The crate MUST contain at least one `CreateAction` (corresponding to the workflow run)" ;
6363
] .
6464

6565

@@ -81,5 +81,5 @@ five-safes-crate:WorkflowRunObject
8181
FILTER NOT EXISTS { ?object a ?type . }
8282
}
8383
""" ;
84-
sh:message "Each `object` in `WorkflowRun` MUST reference an existing entity." ;
84+
sh:message "Each `object` in the `CreateAction` entity corresponding to the workflow run MUST reference an existing entity." ;
8585
] .

rocrate_validator/profiles/five-safes-crate/should/2_requesting_agent.ttl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,12 @@ five-safes-crate:PersonAgentHasAffiliation
3838
"""
3939
] ;
4040

41-
# The agent of a WorkflowRun entity SHOULD have an affiliation
41+
# The agent of the `CreateAction` corresponding to the workflowrun SHOULD have an affiliation
4242
sh:property [
4343
a sh:PropertyShape ;
4444
sh:name "Presence of affiliations" ;
4545
sh:path schema:affiliation ;
4646
sh:minCount 1 ;
4747
sh:severity sh:Warning ;
48-
sh:message "The agent of a WorkflowRun entity SHOULD have an affiliation" ;
48+
sh:message "The agent of the `CreateAction` corresponding to the workflowrun SHOULD have an affiliation" ;
4949
] .

rocrate_validator/profiles/five-safes-crate/should/7_requested_workflow_run.ttl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,5 @@ five-safes-crate:WorkflowRunShouldHaveObjectProperty
3232
sh:minCount 1 ;
3333
sh:nodeKind sh:IRI ;
3434
sh:severity sh:Warning ;
35-
sh:message "`WorkflowRun` SHOULD have the property `object` with IRI values." ;
35+
sh:message "`CreateAction` (corresponding to the workflow run) SHOULD have the property `object` with IRI values." ;
3636
] .

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def test_5src_workflow_object_with_no_name():
4747
expected_validation_result=False,
4848
expected_triggered_requirements=["WorkflowExecution"],
4949
expected_triggered_issues=[
50-
"WorkflowRun MUST have a name string of at least 10 characters."
50+
"The `CreateAction` corresponding to the workflow run MUST have a name string of at least 10 characters."
5151
],
5252
profile_identifier="five-safes-crate",
5353
rocrate_entity_mod_sparql=sparql,
@@ -78,7 +78,7 @@ def test_5src_workflow_object_with_name_not_string():
7878
expected_validation_result=False,
7979
expected_triggered_requirements=["WorkflowExecution"],
8080
expected_triggered_issues=[
81-
"WorkflowRun MUST have a name string of at least 10 characters."
81+
"The `CreateAction` corresponding to the workflow run MUST have a name string of at least 10 characters."
8282
],
8383
profile_identifier="five-safes-crate",
8484
rocrate_entity_mod_sparql=sparql,
@@ -109,7 +109,7 @@ def test_5src_workflow_object_with_not_long_enough_name():
109109
expected_validation_result=False,
110110
expected_triggered_requirements=["WorkflowExecution"],
111111
expected_triggered_issues=[
112-
"WorkflowRun MUST have a name string of at least 10 characters."
112+
"The `CreateAction` corresponding to the workflow run MUST have a name string of at least 10 characters."
113113
],
114114
profile_identifier="five-safes-crate",
115115
rocrate_entity_mod_sparql=sparql,
@@ -203,7 +203,7 @@ def test_5src_workflow_object_with_no_action_status():
203203
expected_triggered_requirements=["WorkflowExecution"],
204204
expected_triggered_issues=[
205205
(
206-
"WorkflowRun MUST have an actionStatus "
206+
"`CreateAction` MUST have an actionStatus "
207207
"with an allowed value (see https://schema.org/ActionStatusType)."
208208
)
209209
],
@@ -236,7 +236,7 @@ def test_5src_workflow_object_with_no_properly_valued_action_status():
236236
expected_triggered_requirements=["WorkflowExecution"],
237237
expected_triggered_issues=[
238238
(
239-
"WorkflowRun MUST have an actionStatus "
239+
"`CreateAction` MUST have an actionStatus "
240240
"with an allowed value (see https://schema.org/ActionStatusType)."
241241
)
242242
],

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ def test_5src_agent_does_not_have_affiliation():
158158
expected_validation_result=False,
159159
expected_triggered_requirements=["Agent of WorkflowRun"],
160160
expected_triggered_issues=[
161-
"The agent of a WorkflowRun entity SHOULD have an affiliation"
161+
"The agent of the `CreateAction` corresponding to the workflowrun SHOULD have an affiliation"
162162
],
163163
profile_identifier="five-safes-crate",
164164
rocrate_entity_mod_sparql=sparql,

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ def test_rocrate_does_not_have_createaction():
5252
expected_validation_result=False,
5353
expected_triggered_requirements=["RootDataEntity"],
5454
expected_triggered_issues=[
55-
"`RootDataEntity` MUST reference at least one `WorkflowRun` through `mentions`",
56-
"The crate MUST contain at least one `WorkflowRun` entity",
55+
"`RootDataEntity` MUST reference at least one `CreateAction` (corresponding to the workflow run) through `mentions`",
56+
"The crate MUST contain at least one `CreateAction` (corresponding to the workflow run)",
5757
],
5858
profile_identifier="five-safes-crate",
5959
rocrate_entity_mod_sparql=sparql,
@@ -83,7 +83,7 @@ def test_rootdataentity_does_not_have_mentions_property():
8383
expected_validation_result=False,
8484
expected_triggered_requirements=["RootDataEntity"],
8585
expected_triggered_issues=[
86-
"`RootDataEntity` MUST reference at least one `WorkflowRun` through `mentions`"
86+
"`RootDataEntity` MUST reference at least one `CreateAction` (corresponding to the workflow run) through `mentions`"
8787
],
8888
profile_identifier="five-safes-crate",
8989
rocrate_entity_mod_sparql=sparql,
@@ -116,7 +116,7 @@ def test_rootdataentity_does_not_mention_create_action():
116116
expected_validation_result=False,
117117
expected_triggered_requirements=["RootDataEntity"],
118118
expected_triggered_issues=[
119-
"`RootDataEntity` MUST reference at least one `WorkflowRun` through `mentions`"
119+
"`RootDataEntity` MUST reference at least one `CreateAction` (corresponding to the workflow run) through `mentions`"
120120
],
121121
profile_identifier="five-safes-crate",
122122
rocrate_entity_mod_sparql=sparql,
@@ -151,7 +151,7 @@ def test_createaction_object_does_not_reference_existing_entities():
151151
expected_validation_result=False,
152152
expected_triggered_requirements=["WorkflowRun"],
153153
expected_triggered_issues=[
154-
"Each `object` in `WorkflowRun` MUST reference an existing entity."
154+
"Each `object` in the `CreateAction` entity corresponding to the workflow run MUST reference an existing entity."
155155
],
156156
profile_identifier="five-safes-crate",
157157
rocrate_entity_mod_sparql=sparql,
@@ -185,7 +185,7 @@ def test_createaction_does_not_have_object_property():
185185
expected_validation_result=False,
186186
expected_triggered_requirements=["WorkflowRun"],
187187
expected_triggered_issues=[
188-
"`WorkflowRun` SHOULD have the property `object` with IRI values."
188+
"`CreateAction` (corresponding to the workflow run) SHOULD have the property `object` with IRI values."
189189
],
190190
profile_identifier="five-safes-crate",
191191
rocrate_entity_mod_sparql=sparql,

0 commit comments

Comments
 (0)