From 5fa806857fa5c7cd118c9db2f0306c3569a7de33 Mon Sep 17 00:00:00 2001 From: EttoreM Date: Thu, 2 Jul 2026 15:20:36 +0100 Subject: [PATCH 1/6] Add Five Safes Crate profile to upstream RO-Crate 1.2 base --- .../0_workflow_run_inference.ttl | 4 ++++ .../profiles/five-safes-crate/10_outputs.ttl | 4 ++++ .../11_workflow_execution_phase.ttl | 12 +++++++++++ .../five-safes-crate/12_check_phase.ttl | 4 ++++ .../five-safes-crate/13_validation_phase.ttl | 4 ++++ .../14_workflow_retrieval_phase.ttl | 4 ++++ .../five-safes-crate/15_metadata_file.ttl | 4 ++++ .../five-safes-crate/16_publishing_phase.ttl | 4 ++++ .../five-safes-crate/1_requesting_agent.ttl | 4 ++++ .../1_responsible_project.ttl | 4 ++++ .../five-safes-crate/1_root_data_entity.ttl | 4 ++++ .../five-safes-crate/2_requesting_agent.ttl | 4 ++++ .../five-safes-crate/3_timestamp_format.ttl | 4 ++++ .../profiles/five-safes-crate/4_sign_off.ttl | 12 +++++++++++ .../5_profile_conformance.ttl | 4 ++++ .../five-safes-crate/6_workflow_reference.ttl | 4 ++++ .../7_requested_workflow_run.ttl | 4 ++++ .../five-safes-crate/8_disclosure_phase.ttl | 4 ++++ .../profiles/five-safes-crate/9_inputs.ttl | 4 ++++ .../profiles/five-safes-crate/ontology.ttl | 4 ++++ .../profiles/five-safes-crate/profile.ttl | 4 ++++ .../ro-crate-metadata.json | 5 +++++ .../five-safes-crate/test_valid_5src.py | 20 +++++++++++++++++++ tests/ro_crates.py | 4 ++++ tests/shared.py | 4 ++++ 25 files changed, 133 insertions(+) diff --git a/rocrate_validator/profiles/five-safes-crate/0_workflow_run_inference.ttl b/rocrate_validator/profiles/five-safes-crate/0_workflow_run_inference.ttl index 2cfafdd79..8c82dd798 100644 --- a/rocrate_validator/profiles/five-safes-crate/0_workflow_run_inference.ttl +++ b/rocrate_validator/profiles/five-safes-crate/0_workflow_run_inference.ttl @@ -12,7 +12,11 @@ # See the License for the specific language governing permissions and # limitations under the License. +<<<<<<< HEAD @prefix ro-crate: . +======= +@prefix ro-crate: . +>>>>>>> ab465be7 (Add Five Safes Crate profile to upstream RO-Crate 1.2 base) @prefix rdf: . @prefix schema: . @prefix sh: . diff --git a/rocrate_validator/profiles/five-safes-crate/10_outputs.ttl b/rocrate_validator/profiles/five-safes-crate/10_outputs.ttl index 66b10b6a1..2ca83acd8 100644 --- a/rocrate_validator/profiles/five-safes-crate/10_outputs.ttl +++ b/rocrate_validator/profiles/five-safes-crate/10_outputs.ttl @@ -13,7 +13,11 @@ # limitations under the License. @prefix ro: <./> . +<<<<<<< HEAD @prefix ro-crate: . +======= +@prefix ro-crate: . +>>>>>>> ab465be7 (Add Five Safes Crate profile to upstream RO-Crate 1.2 base) @prefix five-safes-crate: . @prefix rdf: . @prefix schema: . diff --git a/rocrate_validator/profiles/five-safes-crate/11_workflow_execution_phase.ttl b/rocrate_validator/profiles/five-safes-crate/11_workflow_execution_phase.ttl index 6eab5680b..259b203eb 100644 --- a/rocrate_validator/profiles/five-safes-crate/11_workflow_execution_phase.ttl +++ b/rocrate_validator/profiles/five-safes-crate/11_workflow_execution_phase.ttl @@ -13,7 +13,11 @@ # limitations under the License. @prefix ro: <./> . +<<<<<<< HEAD @prefix ro-crate: . +======= +@prefix ro-crate: . +>>>>>>> ab465be7 (Add Five Safes Crate profile to upstream RO-Crate 1.2 base) @prefix five-safes-crate: . @prefix rdf: . @prefix schema: . @@ -75,7 +79,11 @@ five-safes-crate:WorkflowexecutionObjectHasEndTimeIfEnded a sh:SPARQLTarget ; sh:select """ PREFIX schema: +<<<<<<< HEAD PREFIX rocrate: +======= + PREFIX rocrate: +>>>>>>> ab465be7 (Add Five Safes Crate profile to upstream RO-Crate 1.2 base) SELECT ?this WHERE { @@ -115,7 +123,11 @@ five-safes-crate:WorkflowexecutionObjectHasStartTimeIfBegun a sh:SPARQLTarget ; sh:select """ PREFIX schema: +<<<<<<< HEAD PREFIX rocrate: +======= + PREFIX rocrate: +>>>>>>> ab465be7 (Add Five Safes Crate profile to upstream RO-Crate 1.2 base) SELECT ?this WHERE { diff --git a/rocrate_validator/profiles/five-safes-crate/12_check_phase.ttl b/rocrate_validator/profiles/five-safes-crate/12_check_phase.ttl index ca7ec44f1..d9429e805 100644 --- a/rocrate_validator/profiles/five-safes-crate/12_check_phase.ttl +++ b/rocrate_validator/profiles/five-safes-crate/12_check_phase.ttl @@ -13,7 +13,11 @@ # limitations under the License. @prefix ro: <./> . +<<<<<<< HEAD @prefix ro-crate: . +======= +@prefix ro-crate: . +>>>>>>> ab465be7 (Add Five Safes Crate profile to upstream RO-Crate 1.2 base) @prefix five-safes-crate: . @prefix rdf: . @prefix schema: . diff --git a/rocrate_validator/profiles/five-safes-crate/13_validation_phase.ttl b/rocrate_validator/profiles/five-safes-crate/13_validation_phase.ttl index f93ed2452..42e96265f 100644 --- a/rocrate_validator/profiles/five-safes-crate/13_validation_phase.ttl +++ b/rocrate_validator/profiles/five-safes-crate/13_validation_phase.ttl @@ -13,7 +13,11 @@ # limitations under the License. @prefix ro: <./> . +<<<<<<< HEAD @prefix ro-crate: . +======= +@prefix ro-crate: . +>>>>>>> ab465be7 (Add Five Safes Crate profile to upstream RO-Crate 1.2 base) @prefix five-safes-crate: . @prefix rdf: . @prefix schema: . diff --git a/rocrate_validator/profiles/five-safes-crate/14_workflow_retrieval_phase.ttl b/rocrate_validator/profiles/five-safes-crate/14_workflow_retrieval_phase.ttl index 97e7970ef..cb43b706b 100644 --- a/rocrate_validator/profiles/five-safes-crate/14_workflow_retrieval_phase.ttl +++ b/rocrate_validator/profiles/five-safes-crate/14_workflow_retrieval_phase.ttl @@ -13,7 +13,11 @@ # limitations under the License. @prefix ro: <./> . +<<<<<<< HEAD @prefix ro-crate: . +======= +@prefix ro-crate: . +>>>>>>> ab465be7 (Add Five Safes Crate profile to upstream RO-Crate 1.2 base) @prefix five-safes-crate: . @prefix rdf: . @prefix schema: . diff --git a/rocrate_validator/profiles/five-safes-crate/15_metadata_file.ttl b/rocrate_validator/profiles/five-safes-crate/15_metadata_file.ttl index 9de856f0e..5ede2e505 100644 --- a/rocrate_validator/profiles/five-safes-crate/15_metadata_file.ttl +++ b/rocrate_validator/profiles/five-safes-crate/15_metadata_file.ttl @@ -12,7 +12,11 @@ # See the License for the specific language governing permissions and # limitations under the License. +<<<<<<< HEAD @prefix ro-crate: . +======= +@prefix ro-crate: . +>>>>>>> ab465be7 (Add Five Safes Crate profile to upstream RO-Crate 1.2 base) @prefix five-safes-crate: . @prefix rdf: . @prefix schema: . diff --git a/rocrate_validator/profiles/five-safes-crate/16_publishing_phase.ttl b/rocrate_validator/profiles/five-safes-crate/16_publishing_phase.ttl index 02b5b501f..ba4403eee 100644 --- a/rocrate_validator/profiles/five-safes-crate/16_publishing_phase.ttl +++ b/rocrate_validator/profiles/five-safes-crate/16_publishing_phase.ttl @@ -13,7 +13,11 @@ # limitations under the License. @prefix ro: <./> . +<<<<<<< HEAD @prefix ro-crate: . +======= +@prefix ro-crate: . +>>>>>>> ab465be7 (Add Five Safes Crate profile to upstream RO-Crate 1.2 base) @prefix five-safes-crate: . @prefix rdf: . @prefix schema: . diff --git a/rocrate_validator/profiles/five-safes-crate/1_requesting_agent.ttl b/rocrate_validator/profiles/five-safes-crate/1_requesting_agent.ttl index 0e70407f5..cc0848220 100644 --- a/rocrate_validator/profiles/five-safes-crate/1_requesting_agent.ttl +++ b/rocrate_validator/profiles/five-safes-crate/1_requesting_agent.ttl @@ -13,7 +13,11 @@ # limitations under the License. @prefix ro: <./> . +<<<<<<< HEAD @prefix ro-crate: . +======= +@prefix ro-crate: . +>>>>>>> ab465be7 (Add Five Safes Crate profile to upstream RO-Crate 1.2 base) @prefix five-safes-crate: . @prefix rdf: . @prefix schema: . diff --git a/rocrate_validator/profiles/five-safes-crate/1_responsible_project.ttl b/rocrate_validator/profiles/five-safes-crate/1_responsible_project.ttl index 305e7731f..9265e66e7 100644 --- a/rocrate_validator/profiles/five-safes-crate/1_responsible_project.ttl +++ b/rocrate_validator/profiles/five-safes-crate/1_responsible_project.ttl @@ -13,7 +13,11 @@ # limitations under the License. @prefix ro: <./> . +<<<<<<< HEAD @prefix ro-crate: . +======= +@prefix ro-crate: . +>>>>>>> ab465be7 (Add Five Safes Crate profile to upstream RO-Crate 1.2 base) @prefix five-safes-crate: . @prefix rdf: . @prefix schema: . diff --git a/rocrate_validator/profiles/five-safes-crate/1_root_data_entity.ttl b/rocrate_validator/profiles/five-safes-crate/1_root_data_entity.ttl index fe0516b4f..1d4425d92 100644 --- a/rocrate_validator/profiles/five-safes-crate/1_root_data_entity.ttl +++ b/rocrate_validator/profiles/five-safes-crate/1_root_data_entity.ttl @@ -13,7 +13,11 @@ # limitations under the License. @prefix ro: <./> . +<<<<<<< HEAD @prefix ro-crate: . +======= +@prefix ro-crate: . +>>>>>>> ab465be7 (Add Five Safes Crate profile to upstream RO-Crate 1.2 base) @prefix five-safes-crate: . @prefix rdf: . @prefix schema: . diff --git a/rocrate_validator/profiles/five-safes-crate/2_requesting_agent.ttl b/rocrate_validator/profiles/five-safes-crate/2_requesting_agent.ttl index 865c6da2b..72ca2a0b6 100644 --- a/rocrate_validator/profiles/five-safes-crate/2_requesting_agent.ttl +++ b/rocrate_validator/profiles/five-safes-crate/2_requesting_agent.ttl @@ -13,7 +13,11 @@ # limitations under the License. @prefix ro: <./> . +<<<<<<< HEAD @prefix ro-crate: . +======= +@prefix ro-crate: . +>>>>>>> ab465be7 (Add Five Safes Crate profile to upstream RO-Crate 1.2 base) @prefix five-safes-crate: . @prefix rdf: . @prefix schema: . diff --git a/rocrate_validator/profiles/five-safes-crate/3_timestamp_format.ttl b/rocrate_validator/profiles/five-safes-crate/3_timestamp_format.ttl index 9f6122220..0fbc9586c 100644 --- a/rocrate_validator/profiles/five-safes-crate/3_timestamp_format.ttl +++ b/rocrate_validator/profiles/five-safes-crate/3_timestamp_format.ttl @@ -13,7 +13,11 @@ # limitations under the License. @prefix ro: <./> . +<<<<<<< HEAD @prefix ro-crate: . +======= +@prefix ro-crate: . +>>>>>>> ab465be7 (Add Five Safes Crate profile to upstream RO-Crate 1.2 base) @prefix five-safes-crate: . @prefix rdf: . @prefix schema: . diff --git a/rocrate_validator/profiles/five-safes-crate/4_sign_off.ttl b/rocrate_validator/profiles/five-safes-crate/4_sign_off.ttl index 52abfa619..69db2bb5a 100644 --- a/rocrate_validator/profiles/five-safes-crate/4_sign_off.ttl +++ b/rocrate_validator/profiles/five-safes-crate/4_sign_off.ttl @@ -13,7 +13,11 @@ # limitations under the License. @prefix ro: <./> . +<<<<<<< HEAD @prefix ro-crate: . +======= +@prefix ro-crate: . +>>>>>>> ab465be7 (Add Five Safes Crate profile to upstream RO-Crate 1.2 base) @prefix five-safes-crate: . @prefix rdf: . @prefix schema: . @@ -190,7 +194,11 @@ five-safes-crate:SignOffPhaseProperties sh:description "Check if the Sign Off phase lists the workflow as an object" ; sh:select """ PREFIX schema: +<<<<<<< HEAD PREFIX rocrate: +======= + PREFIX rocrate: +>>>>>>> ab465be7 (Add Five Safes Crate profile to upstream RO-Crate 1.2 base) SELECT $this WHERE { ?root a schema:Dataset ; @@ -209,7 +217,11 @@ five-safes-crate:SignOffPhaseProperties sh:description "Check if the Sign Off phase lists the Responsible Project as an object" ; sh:select """ PREFIX schema: +<<<<<<< HEAD PREFIX rocrate: +======= + PREFIX rocrate: +>>>>>>> ab465be7 (Add Five Safes Crate profile to upstream RO-Crate 1.2 base) SELECT $this WHERE { ?root a schema:Dataset ; diff --git a/rocrate_validator/profiles/five-safes-crate/5_profile_conformance.ttl b/rocrate_validator/profiles/five-safes-crate/5_profile_conformance.ttl index e9428e60c..218465fac 100644 --- a/rocrate_validator/profiles/five-safes-crate/5_profile_conformance.ttl +++ b/rocrate_validator/profiles/five-safes-crate/5_profile_conformance.ttl @@ -13,7 +13,11 @@ # limitations under the License. @prefix ro: <./> . +<<<<<<< HEAD @prefix ro-crate: . +======= +@prefix ro-crate: . +>>>>>>> ab465be7 (Add Five Safes Crate profile to upstream RO-Crate 1.2 base) @prefix five-safes-crate: . @prefix rdf: . @prefix schema: . diff --git a/rocrate_validator/profiles/five-safes-crate/6_workflow_reference.ttl b/rocrate_validator/profiles/five-safes-crate/6_workflow_reference.ttl index 250b67da8..b8eedad9e 100644 --- a/rocrate_validator/profiles/five-safes-crate/6_workflow_reference.ttl +++ b/rocrate_validator/profiles/five-safes-crate/6_workflow_reference.ttl @@ -13,7 +13,11 @@ # limitations under the License. @prefix ro: <./> . +<<<<<<< HEAD @prefix ro-crate: . +======= +@prefix ro-crate: . +>>>>>>> ab465be7 (Add Five Safes Crate profile to upstream RO-Crate 1.2 base) @prefix five-safes-crate: . @prefix rdf: . @prefix schema: . diff --git a/rocrate_validator/profiles/five-safes-crate/7_requested_workflow_run.ttl b/rocrate_validator/profiles/five-safes-crate/7_requested_workflow_run.ttl index d74acf430..0e315135a 100644 --- a/rocrate_validator/profiles/five-safes-crate/7_requested_workflow_run.ttl +++ b/rocrate_validator/profiles/five-safes-crate/7_requested_workflow_run.ttl @@ -13,7 +13,11 @@ # limitations under the License. @prefix ro: <./> . +<<<<<<< HEAD @prefix ro-crate: . +======= +@prefix ro-crate: . +>>>>>>> ab465be7 (Add Five Safes Crate profile to upstream RO-Crate 1.2 base) @prefix five-safes-crate: . @prefix rdf: . @prefix schema: . diff --git a/rocrate_validator/profiles/five-safes-crate/8_disclosure_phase.ttl b/rocrate_validator/profiles/five-safes-crate/8_disclosure_phase.ttl index 30de9c265..5c874151d 100644 --- a/rocrate_validator/profiles/five-safes-crate/8_disclosure_phase.ttl +++ b/rocrate_validator/profiles/five-safes-crate/8_disclosure_phase.ttl @@ -13,7 +13,11 @@ # limitations under the License. @prefix ro: <./> . +<<<<<<< HEAD @prefix ro-crate: . +======= +@prefix ro-crate: . +>>>>>>> ab465be7 (Add Five Safes Crate profile to upstream RO-Crate 1.2 base) @prefix five-safes-crate: . @prefix rdf: . @prefix schema: . diff --git a/rocrate_validator/profiles/five-safes-crate/9_inputs.ttl b/rocrate_validator/profiles/five-safes-crate/9_inputs.ttl index 0a476d4a2..8667135ef 100644 --- a/rocrate_validator/profiles/five-safes-crate/9_inputs.ttl +++ b/rocrate_validator/profiles/five-safes-crate/9_inputs.ttl @@ -13,7 +13,11 @@ # limitations under the License. @prefix ro: <./> . +<<<<<<< HEAD @prefix ro-crate: . +======= +@prefix ro-crate: . +>>>>>>> ab465be7 (Add Five Safes Crate profile to upstream RO-Crate 1.2 base) @prefix five-safes-crate: . @prefix rdf: . @prefix schema: . diff --git a/rocrate_validator/profiles/five-safes-crate/ontology.ttl b/rocrate_validator/profiles/five-safes-crate/ontology.ttl index a7f291fac..8dfe56aa3 100644 --- a/rocrate_validator/profiles/five-safes-crate/ontology.ttl +++ b/rocrate_validator/profiles/five-safes-crate/ontology.ttl @@ -21,7 +21,11 @@ @prefix schema: . @prefix rocrate: . @prefix bioschemas: . +<<<<<<< HEAD @prefix ro-crate: . +======= +@prefix ro-crate: . +>>>>>>> ab465be7 (Add Five Safes Crate profile to upstream RO-Crate 1.2 base) @prefix isa-ro-crate: . rdf:type owl:Ontology ; diff --git a/rocrate_validator/profiles/five-safes-crate/profile.ttl b/rocrate_validator/profiles/five-safes-crate/profile.ttl index f144e01be..b8251296c 100644 --- a/rocrate_validator/profiles/five-safes-crate/profile.ttl +++ b/rocrate_validator/profiles/five-safes-crate/profile.ttl @@ -34,7 +34,11 @@ # prof:isProfileOf ; # This profile is a transitive profile of the RO-Crate Metadata Specification +<<<<<<< HEAD prof:isTransitiveProfileOf ; +======= + prof:isTransitiveProfileOf ; +>>>>>>> ab465be7 (Add Five Safes Crate profile to upstream RO-Crate 1.2 base) # TODO: resolve failures when these profiles are applied # , # ; diff --git a/tests/data/crates/valid/five-safes-crate-result/ro-crate-metadata.json b/tests/data/crates/valid/five-safes-crate-result/ro-crate-metadata.json index 324533139..8551d709d 100644 --- a/tests/data/crates/valid/five-safes-crate-result/ro-crate-metadata.json +++ b/tests/data/crates/valid/five-safes-crate-result/ro-crate-metadata.json @@ -393,6 +393,11 @@ "@id": "https://tre72.example.com/#crate-validator", "@type": "SoftwareApplication", "name": "RO-Crate validator at TRE72", +<<<<<<< HEAD +======= + "url": "https://tre72.example.com/#crate-validator", + "version": "1.0", +>>>>>>> ab465be7 (Add Five Safes Crate profile to upstream RO-Crate 1.2 base) "provider": { "@id": "https://tre72.example.com/" } diff --git a/tests/integration/profiles/five-safes-crate/test_valid_5src.py b/tests/integration/profiles/five-safes-crate/test_valid_5src.py index 6a7b0ca02..da0154a3f 100644 --- a/tests/integration/profiles/five-safes-crate/test_valid_5src.py +++ b/tests/integration/profiles/five-safes-crate/test_valid_5src.py @@ -18,7 +18,10 @@ from rocrate_validator import services from rocrate_validator.models import Severity +<<<<<<< HEAD from tests.conftest import SKIP_LOCAL_DATA_ENTITY_EXISTENCE_CHECK_IDENTIFIER +======= +>>>>>>> ab465be7 (Add Five Safes Crate profile to upstream RO-Crate 1.2 base) from tests.ro_crates import ValidROC from tests.shared import do_entity_test @@ -28,6 +31,7 @@ # Dynamically fetch the SKIP_WEB_RESOURCE_AVAILABILITY_IDENTIFIER # required as disable_inherited_profiles_reporting does not disable Python checks from # inherited profiles (https://github.com/crs4/rocrate-validator/issues/135) +<<<<<<< HEAD rocrate_profile = services.get_profile("ro-crate") if not rocrate_profile: raise RuntimeError("Unable to load the RO-Crate profile") @@ -37,6 +41,22 @@ assert ( check_local_data_entity_existence ), "Unable to find the requirement 'Web-based Data Entity: resource availability'" +======= +rocrate_profile = services.get_profile("ro-crate-1.2") +if not rocrate_profile: + raise RuntimeError("Unable to load the RO-Crate 1.2 profile") +check_local_data_entity_existence = rocrate_profile.get_requirement_check( + "Data Entity: REQUIRED resource availability" +) +assert check_local_data_entity_existence, "Unable to find the requirement 'Data Entity: REQUIRED resource availability'" +SKIP_LOCAL_DATA_ENTITY_EXISTENCE_CHECK_IDENTIFIER = check_local_data_entity_existence.identifier +check_local_data_entity_existence = rocrate_profile.get_requirement_check( + "Web-based Data Entity: REQUIRED resource availability" +) +assert ( + check_local_data_entity_existence +), "Unable to find the requirement 'Web-based Data Entity: REQUIRED resource availability'" +>>>>>>> ab465be7 (Add Five Safes Crate profile to upstream RO-Crate 1.2 base) SKIP_WEB_RESOURCE_AVAILABILITY_IDENTIFIER = check_local_data_entity_existence.identifier diff --git a/tests/ro_crates.py b/tests/ro_crates.py index 0bdcdfe9e..f91d34211 100644 --- a/tests/ro_crates.py +++ b/tests/ro_crates.py @@ -1004,8 +1004,12 @@ def propertyvalue_no_unitcode(self) -> Path: class Invalid5sROC: +<<<<<<< HEAD base_path = INVALID_CRATES_DATA_PATH / "five_safes_crate/" +======= + base_path = INVALID_CRATES_DATA_PATH / "five_safes_crate" +>>>>>>> ab465be7 (Add Five Safes Crate profile to upstream RO-Crate 1.2 base) @property def context_multiple_wrong_version(self) -> Path: diff --git a/tests/shared.py b/tests/shared.py index 7752d1d81..c06a3d066 100644 --- a/tests/shared.py +++ b/tests/shared.py @@ -40,7 +40,11 @@ PREFIX schema: PREFIX shp: PREFIX rdf: +<<<<<<< HEAD PREFIX rocrate: +======= +PREFIX rocrate: +>>>>>>> ab465be7 (Add Five Safes Crate profile to upstream RO-Crate 1.2 base) PREFIX dct: """ From 5dec21582d18aa78635198b4e60e589afc6d7894 Mon Sep 17 00:00:00 2001 From: EttoreM Date: Thu, 2 Jul 2026 15:40:49 +0100 Subject: [PATCH 2/6] Amended formatting --- .../five-safes-crate/test_5src_10_outputs.py | 6 ++-- .../test_5src_11_workflow_execution.py | 6 ++-- .../test_5src_13_validation_phase.py | 18 +++------- .../test_5src_14_workflow_retrieval_phase.py | 23 ++++-------- .../test_5src_15_metadata_file.py | 8 ++--- .../test_5src_16_publishing_phase.py | 9 ++--- .../test_5src_1_requesting_agent.py | 10 ++---- .../test_5src_1_responsible_project.py | 18 +++------- .../test_5src_1_root_data_entity_metadata.py | 6 ++-- .../test_5src_2_requesting_agent.py | 6 ++-- .../test_5src_4_signoff_phase.py | 36 ++++++------------- .../test_5src_5_profile_conformance.py | 22 ++++-------- .../test_5src_6_workflow_reference.py | 26 ++++---------- .../test_5src_7_requesting_workflow_run.py | 4 +-- .../test_5src_8_disclosure_phase.py | 22 ++++-------- .../five-safes-crate/test_5src_9_inputs.py | 6 ++-- .../five-safes-crate/test_valid_5src.py | 27 ++++---------- 17 files changed, 73 insertions(+), 180 deletions(-) diff --git a/tests/integration/profiles/five-safes-crate/test_5src_10_outputs.py b/tests/integration/profiles/five-safes-crate/test_5src_10_outputs.py index 1cbdbe6d0..15dcc2449 100644 --- a/tests/integration/profiles/five-safes-crate/test_5src_10_outputs.py +++ b/tests/integration/profiles/five-safes-crate/test_5src_10_outputs.py @@ -17,7 +17,7 @@ from rocrate_validator.models import Severity from tests.ro_crates import ValidROC -from tests.shared import do_entity_test, SPARQL_PREFIXES +from tests.shared import SPARQL_PREFIXES, do_entity_test # set up logging logger = logging.getLogger(__name__) @@ -87,9 +87,7 @@ def test_result_output_does_not_have_allowed_type(): requirement_severity=Severity.RECOMMENDED, expected_validation_result=False, expected_triggered_requirements=["Output"], - expected_triggered_issues=[ - "Result SHOULD have a `@type` among an allowed set of values." - ], + expected_triggered_issues=["Result SHOULD have a `@type` among an allowed set of values."], profile_identifier="five-safes-crate", rocrate_entity_mod_sparql=sparql, ) diff --git a/tests/integration/profiles/five-safes-crate/test_5src_11_workflow_execution.py b/tests/integration/profiles/five-safes-crate/test_5src_11_workflow_execution.py index a271978a8..9f54354d9 100644 --- a/tests/integration/profiles/five-safes-crate/test_5src_11_workflow_execution.py +++ b/tests/integration/profiles/five-safes-crate/test_5src_11_workflow_execution.py @@ -17,7 +17,7 @@ from rocrate_validator.models import Severity from tests.ro_crates import ValidROC -from tests.shared import do_entity_test, SPARQL_PREFIXES +from tests.shared import SPARQL_PREFIXES, do_entity_test # set up logging logger = logging.getLogger(__name__) @@ -267,9 +267,7 @@ def test_5src_workflow_object_has_no_end_time_if_ended(): requirement_severity=Severity.RECOMMENDED, expected_validation_result=False, expected_triggered_requirements=["WorkflowExecution"], - expected_triggered_issues=[ - "The workflow execution object SHOULD have an endTime property if it has ended." - ], + expected_triggered_issues=["The workflow execution object SHOULD have an endTime property if it has ended."], profile_identifier="five-safes-crate", rocrate_entity_mod_sparql=sparql, ) diff --git a/tests/integration/profiles/five-safes-crate/test_5src_13_validation_phase.py b/tests/integration/profiles/five-safes-crate/test_5src_13_validation_phase.py index be6f44906..c19e54663 100644 --- a/tests/integration/profiles/five-safes-crate/test_5src_13_validation_phase.py +++ b/tests/integration/profiles/five-safes-crate/test_5src_13_validation_phase.py @@ -17,7 +17,7 @@ from rocrate_validator.models import Severity from tests.ro_crates import ValidROC -from tests.shared import do_entity_test, SPARQL_PREFIXES +from tests.shared import SPARQL_PREFIXES, do_entity_test # set up logging logger = logging.getLogger(__name__) @@ -75,9 +75,7 @@ def test_5src_validation_check_name_not_a_string(): requirement_severity=Severity.REQUIRED, expected_validation_result=False, expected_triggered_requirements=["ValidationCheck"], - expected_triggered_issues=[ - "ValidationCheck MUST have a human readable name string." - ], + expected_triggered_issues=["ValidationCheck MUST have a human readable name string."], profile_identifier="five-safes-crate", rocrate_entity_mod_sparql=sparql, ) @@ -200,9 +198,7 @@ def test_5src_root_data_entity_does_not_mention_validation_check_entity(): requirement_severity=Severity.RECOMMENDED, expected_validation_result=False, expected_triggered_requirements=["RootDataEntity"], - expected_triggered_issues=[ - "RootDataEntity SHOULD mention a ValidationCheck object." - ], + expected_triggered_issues=["RootDataEntity SHOULD mention a ValidationCheck object."], profile_identifier="five-safes-crate", rocrate_entity_mod_sparql=sparql, ) @@ -229,9 +225,7 @@ def test_5src_validation_check_object_does_not_point_to_root_data_entity(): requirement_severity=Severity.RECOMMENDED, expected_validation_result=False, expected_triggered_requirements=["ValidationCheck"], - expected_triggered_issues=[ - "`ValidationCheck` --> `object` SHOULD point to the root of the RO-Crate" - ], + expected_triggered_issues=["`ValidationCheck` --> `object` SHOULD point to the root of the RO-Crate"], profile_identifier="five-safes-crate", rocrate_entity_mod_sparql=sparql, ) @@ -283,9 +277,7 @@ def test_5src_Validation_check_does_not_have_action_status_property(): requirement_severity=Severity.RECOMMENDED, expected_validation_result=False, expected_triggered_requirements=["ValidationCheck"], - expected_triggered_issues=[ - "ValidationCheck SHOULD have actionStatus property." - ], + expected_triggered_issues=["ValidationCheck SHOULD have actionStatus property."], profile_identifier="five-safes-crate", rocrate_entity_mod_sparql=sparql, ) diff --git a/tests/integration/profiles/five-safes-crate/test_5src_14_workflow_retrieval_phase.py b/tests/integration/profiles/five-safes-crate/test_5src_14_workflow_retrieval_phase.py index 52228408e..c7d92d0cd 100644 --- a/tests/integration/profiles/five-safes-crate/test_5src_14_workflow_retrieval_phase.py +++ b/tests/integration/profiles/five-safes-crate/test_5src_14_workflow_retrieval_phase.py @@ -17,7 +17,7 @@ from rocrate_validator.models import Severity from tests.ro_crates import ValidROC -from tests.shared import do_entity_test, SPARQL_PREFIXES +from tests.shared import SPARQL_PREFIXES, do_entity_test # set up logging logger = logging.getLogger(__name__) @@ -45,9 +45,7 @@ def test_5src_download_action_does_not_have_name(): requirement_severity=Severity.REQUIRED, expected_validation_result=False, expected_triggered_requirements=["DownloadAction"], - expected_triggered_issues=[ - "DownloadAction MUST have a human readable name string." - ], + expected_triggered_issues=["DownloadAction MUST have a human readable name string."], profile_identifier="five-safes-crate", rocrate_entity_mod_sparql=sparql, ) @@ -74,9 +72,7 @@ def test_5src_download_action_name_not_a_string(): requirement_severity=Severity.REQUIRED, expected_validation_result=False, expected_triggered_requirements=["DownloadAction"], - expected_triggered_issues=[ - "DownloadAction MUST have a human readable name string." - ], + expected_triggered_issues=["DownloadAction MUST have a human readable name string."], profile_identifier="five-safes-crate", rocrate_entity_mod_sparql=sparql, ) @@ -206,10 +202,7 @@ def test_5src_downloaded_workflow_distribution_is_not_the_same_as_download_actio expected_validation_result=False, expected_triggered_requirements=["Downloaded Workflow"], expected_triggered_issues=[ - ( - "DownloadedWorkflow --> `distribution` MUST reference " - "the same entity as `DownloadAction` --> `object`." - ) + ("DownloadedWorkflow --> `distribution` MUST reference the same entity as `DownloadAction` --> `object`.") ], profile_identifier="five-safes-crate", rocrate_entity_mod_sparql=sparql, @@ -295,9 +288,7 @@ def test_5src_root_data_entity_does_not_mention_download_action_entity(): requirement_severity=Severity.RECOMMENDED, expected_validation_result=False, expected_triggered_requirements=["RootDataEntity"], - expected_triggered_issues=[ - "RootDataEntity SHOULD mention DownloadAction if this exists." - ], + expected_triggered_issues=["RootDataEntity SHOULD mention DownloadAction if this exists."], profile_identifier="five-safes-crate", rocrate_entity_mod_sparql=sparql, ) @@ -352,9 +343,7 @@ def test_5src_download_action_does_not_have_action_status_property(): requirement_severity=Severity.RECOMMENDED, expected_validation_result=False, expected_triggered_requirements=["DownloadAction"], - expected_triggered_issues=[ - "`DownloadAction` SHOULD have `actionStatus` property." - ], + expected_triggered_issues=["`DownloadAction` SHOULD have `actionStatus` property."], profile_identifier="five-safes-crate", rocrate_entity_mod_sparql=sparql, ) diff --git a/tests/integration/profiles/five-safes-crate/test_5src_15_metadata_file.py b/tests/integration/profiles/five-safes-crate/test_5src_15_metadata_file.py index e94a76fa9..a166ed4aa 100644 --- a/tests/integration/profiles/five-safes-crate/test_5src_15_metadata_file.py +++ b/tests/integration/profiles/five-safes-crate/test_5src_15_metadata_file.py @@ -16,8 +16,8 @@ import logging from rocrate_validator.models import Severity -from tests.ro_crates import ValidROC, Invalid5sROC -from tests.shared import do_entity_test, SPARQL_PREFIXES +from tests.ro_crates import Invalid5sROC, ValidROC +from tests.shared import SPARQL_PREFIXES, do_entity_test # set up logging logger = logging.getLogger(__name__) @@ -47,9 +47,7 @@ def test_5src_conforms_to_old_version(): rocrate_path=ValidROC().five_safes_crate_request, requirement_severity=Severity.REQUIRED, expected_validation_result=False, - expected_triggered_requirements=[ - "RO-Crate conforms to 1.2 or later minor version" - ], + expected_triggered_requirements=["RO-Crate conforms to 1.2 or later minor version"], expected_triggered_issues=[ "The RO-Crate metadata file descriptor MUST have a `conformsTo` property with " "RO-Crate specification version 1.2 or later minor version" diff --git a/tests/integration/profiles/five-safes-crate/test_5src_16_publishing_phase.py b/tests/integration/profiles/five-safes-crate/test_5src_16_publishing_phase.py index 8149d1b24..485aeb026 100644 --- a/tests/integration/profiles/five-safes-crate/test_5src_16_publishing_phase.py +++ b/tests/integration/profiles/five-safes-crate/test_5src_16_publishing_phase.py @@ -17,7 +17,7 @@ from rocrate_validator.models import Severity from tests.ro_crates import ValidROC -from tests.shared import do_entity_test, SPARQL_PREFIXES +from tests.shared import SPARQL_PREFIXES, do_entity_test # set up logging logger = logging.getLogger(__name__) @@ -44,12 +44,9 @@ def test_5src_assess_action_not_referenced_from_rde(): rocrate_path=ValidROC().five_safes_crate_result, requirement_severity=Severity.REQUIRED, expected_validation_result=False, - expected_triggered_requirements=[ - "All AssessActions are mentioned from Root Data Entity" - ], + expected_triggered_requirements=["All AssessActions are mentioned from Root Data Entity"], expected_triggered_issues=[ - "All AssessAction entities in the crate MUST be referenced from " - "the Root Dataset via `mentions`." + "All AssessAction entities in the crate MUST be referenced from the Root Dataset via `mentions`." ], profile_identifier="five-safes-crate", rocrate_entity_mod_sparql=sparql, diff --git a/tests/integration/profiles/five-safes-crate/test_5src_1_requesting_agent.py b/tests/integration/profiles/five-safes-crate/test_5src_1_requesting_agent.py index 1ab9b4b37..84c1372a7 100644 --- a/tests/integration/profiles/five-safes-crate/test_5src_1_requesting_agent.py +++ b/tests/integration/profiles/five-safes-crate/test_5src_1_requesting_agent.py @@ -17,7 +17,7 @@ from rocrate_validator.models import Severity from tests.ro_crates import ValidROC -from tests.shared import do_entity_test, SPARQL_PREFIXES +from tests.shared import SPARQL_PREFIXES, do_entity_test # set up logging logger = logging.getLogger(__name__) @@ -54,9 +54,7 @@ def test_5src_agent_memberOf_not_project(): requirement_severity=Severity.REQUIRED, expected_validation_result=False, expected_triggered_requirements=["Requesting Agent"], - expected_triggered_issues=[ - "The 'memberOf' property of an agent MUST be of type Project." - ], + expected_triggered_issues=["The 'memberOf' property of an agent MUST be of type Project."], profile_identifier="five-safes-crate", rocrate_entity_mod_sparql=sparql, ) @@ -131,9 +129,7 @@ def test_5src_agent_memberOf_missing_warning(): requirement_severity=Severity.RECOMMENDED, expected_validation_result=False, # or True if warnings are not treated as failures expected_triggered_requirements=["Requesting Agent"], - expected_triggered_issues=[ - "The Requesting Agent SHOULD have a `memberOf` property." - ], + expected_triggered_issues=["The Requesting Agent SHOULD have a `memberOf` property."], profile_identifier="five-safes-crate", rocrate_entity_mod_sparql=sparql, ) diff --git a/tests/integration/profiles/five-safes-crate/test_5src_1_responsible_project.py b/tests/integration/profiles/five-safes-crate/test_5src_1_responsible_project.py index 1f5c9664b..96bda9e82 100644 --- a/tests/integration/profiles/five-safes-crate/test_5src_1_responsible_project.py +++ b/tests/integration/profiles/five-safes-crate/test_5src_1_responsible_project.py @@ -17,7 +17,7 @@ from rocrate_validator.models import Severity from tests.ro_crates import ValidROC -from tests.shared import do_entity_test, SPARQL_PREFIXES +from tests.shared import SPARQL_PREFIXES, do_entity_test # set up logging logger = logging.getLogger(__name__) @@ -56,9 +56,7 @@ def test_5src_responsible_project_funding_not_grant(): requirement_severity=Severity.REQUIRED, expected_validation_result=False, expected_triggered_requirements=["Responsible Project"], - expected_triggered_issues=[ - "The property 'funding' of the Responsible Project MUST be of type Grant." - ], + expected_triggered_issues=["The property 'funding' of the Responsible Project MUST be of type Grant."], profile_identifier="five-safes-crate", rocrate_entity_mod_sparql=sparql, ) @@ -136,9 +134,7 @@ def test_5src_responsible_project_member_and_agent_affiliation_no_intersection() rocrate_path=ValidROC().five_safes_crate_request, requirement_severity=Severity.RECOMMENDED, expected_validation_result=False, - expected_triggered_requirements=[ - "Organizations (members of Responsible Project)" - ], + expected_triggered_requirements=["Organizations (members of Responsible Project)"], expected_triggered_issues=[ ( "At least one of the organisations that are members of the responsible project SHOULD " @@ -178,9 +174,7 @@ def test_5src_responsible_project_missing_funding_property(): requirement_severity=Severity.OPTIONAL, expected_validation_result=False, expected_triggered_requirements=["Responsible Project"], - expected_triggered_issues=[ - "The Responsible Project does not have the property `funding`." - ], + expected_triggered_issues=["The Responsible Project does not have the property `funding`."], profile_identifier="five-safes-crate", rocrate_entity_mod_sparql=sparql, ) @@ -211,9 +205,7 @@ def test_5src_responsible_project_missing_member_property(): requirement_severity=Severity.OPTIONAL, expected_validation_result=False, expected_triggered_requirements=["Responsible Project"], - expected_triggered_issues=[ - "The Responsible Project does not have the property `member`." - ], + expected_triggered_issues=["The Responsible Project does not have the property `member`."], profile_identifier="five-safes-crate", rocrate_entity_mod_sparql=sparql, ) diff --git a/tests/integration/profiles/five-safes-crate/test_5src_1_root_data_entity_metadata.py b/tests/integration/profiles/five-safes-crate/test_5src_1_root_data_entity_metadata.py index 23c51832d..19e3f21fe 100644 --- a/tests/integration/profiles/five-safes-crate/test_5src_1_root_data_entity_metadata.py +++ b/tests/integration/profiles/five-safes-crate/test_5src_1_root_data_entity_metadata.py @@ -17,7 +17,7 @@ from rocrate_validator.models import Severity from tests.ro_crates import ValidROC -from tests.shared import do_entity_test, SPARQL_PREFIXES +from tests.shared import SPARQL_PREFIXES, do_entity_test # set up logging logger = logging.getLogger(__name__) @@ -47,9 +47,7 @@ def test_5src_root_data_entity_without_source_organization(): requirement_severity=Severity.REQUIRED, expected_validation_result=False, expected_triggered_requirements=["RootDataEntity"], - expected_triggered_issues=[ - """The Root Data Entity MUST have a `sourceOrganization` property.""" - ], + expected_triggered_issues=["""The Root Data Entity MUST have a `sourceOrganization` property."""], profile_identifier="five-safes-crate", rocrate_entity_mod_sparql=sparql, ) diff --git a/tests/integration/profiles/five-safes-crate/test_5src_2_requesting_agent.py b/tests/integration/profiles/five-safes-crate/test_5src_2_requesting_agent.py index 41a4279d1..7f496cdac 100644 --- a/tests/integration/profiles/five-safes-crate/test_5src_2_requesting_agent.py +++ b/tests/integration/profiles/five-safes-crate/test_5src_2_requesting_agent.py @@ -17,7 +17,7 @@ from rocrate_validator.models import Severity from tests.ro_crates import ValidROC -from tests.shared import do_entity_test, SPARQL_PREFIXES +from tests.shared import SPARQL_PREFIXES, do_entity_test # set up logging logger = logging.getLogger(__name__) @@ -50,9 +50,7 @@ def test_createaction_does_not_have_agent(): requirement_severity=Severity.REQUIRED, expected_validation_result=False, expected_triggered_requirements=["CreateAction"], - expected_triggered_issues=[ - "CreateAction MUST have at least one agent that is a contextual entity." - ], + expected_triggered_issues=["CreateAction MUST have at least one agent that is a contextual entity."], profile_identifier="five-safes-crate", rocrate_entity_mod_sparql=sparql, ) diff --git a/tests/integration/profiles/five-safes-crate/test_5src_4_signoff_phase.py b/tests/integration/profiles/five-safes-crate/test_5src_4_signoff_phase.py index a98c850bd..79d08229f 100644 --- a/tests/integration/profiles/five-safes-crate/test_5src_4_signoff_phase.py +++ b/tests/integration/profiles/five-safes-crate/test_5src_4_signoff_phase.py @@ -17,7 +17,7 @@ from rocrate_validator.models import Severity from tests.ro_crates import ValidROC -from tests.shared import do_entity_test, SPARQL_PREFIXES +from tests.shared import SPARQL_PREFIXES, do_entity_test # set up logging logger = logging.getLogger(__name__) @@ -48,9 +48,7 @@ def test_5src_no_signoff_phase(): requirement_severity=Severity.RECOMMENDED, expected_validation_result=False, expected_triggered_requirements=["SignOffPhase"], - expected_triggered_issues=[ - "There SHOULD be a Sign-Off Phase in the Final RO-Crate" - ], + expected_triggered_issues=["There SHOULD be a Sign-Off Phase in the Final RO-Crate"], profile_identifier="five-safes-crate", rocrate_entity_mod_sparql=sparql, ) @@ -79,9 +77,7 @@ def test_5src_signoff_phase_no_name(): requirement_severity=Severity.REQUIRED, expected_validation_result=False, expected_triggered_requirements=["SignOff"], - expected_triggered_issues=[ - "Sign Off phase MUST have a human-readable name string." - ], + expected_triggered_issues=["Sign Off phase MUST have a human-readable name string."], profile_identifier="five-safes-crate", rocrate_entity_mod_sparql=sparql, ) @@ -147,7 +143,7 @@ def test_5src_signoff_phase_wrong_action_status(): expected_triggered_requirements=["SignOffStatus"], expected_triggered_issues=[ "The value of actionStatus MUST be one of the allowed values:" - + " PotentialActionStatus; ActiveActionStatus; CompletedActionStatus; FailedActionStatus." + " PotentialActionStatus; ActiveActionStatus; CompletedActionStatus; FailedActionStatus." ], profile_identifier="five-safes-crate", rocrate_entity_mod_sparql=sparql, @@ -175,9 +171,7 @@ def test_5src_signoff_phase_not_mentioned(): requirement_severity=Severity.RECOMMENDED, expected_validation_result=False, expected_triggered_requirements=["SignOffPhase"], - expected_triggered_issues=[ - "The Root Data Entity SHOULD mention a Sign-Off Phase Object" - ], + expected_triggered_issues=["The Root Data Entity SHOULD mention a Sign-Off Phase Object"], profile_identifier="five-safes-crate", rocrate_entity_mod_sparql=sparql, ) @@ -206,9 +200,7 @@ def test_5src_signoff_phase_no_endtime(): requirement_severity=Severity.RECOMMENDED, expected_validation_result=False, expected_triggered_requirements=["SignOffPhaseEndTime"], - expected_triggered_issues=[ - "Sign Off object SHOULD have endTime property if action completed or failed." - ], + expected_triggered_issues=["Sign Off object SHOULD have endTime property if action completed or failed."], profile_identifier="five-safes-crate", rocrate_entity_mod_sparql=sparql, ) @@ -402,9 +394,7 @@ def test_5src_signoff_phase_no_instrument(): requirement_severity=Severity.RECOMMENDED, expected_validation_result=False, expected_triggered_requirements=["SignOffPhaseProperties"], - expected_triggered_issues=[ - "The Sign-Off Phase SHOULD have an TRE policy (instrument) with type CreativeWork" - ], + expected_triggered_issues=["The Sign-Off Phase SHOULD have an TRE policy (instrument) with type CreativeWork"], profile_identifier="five-safes-crate", rocrate_entity_mod_sparql=sparql, ) @@ -436,9 +426,7 @@ def test_5src_signoff_phase_instrument_not_iri(): requirement_severity=Severity.RECOMMENDED, expected_validation_result=False, expected_triggered_requirements=["SignOffPhaseProperties"], - expected_triggered_issues=[ - "The Sign-Off Phase SHOULD have an TRE policy (instrument) with type CreativeWork" - ], + expected_triggered_issues=["The Sign-Off Phase SHOULD have an TRE policy (instrument) with type CreativeWork"], profile_identifier="five-safes-crate", rocrate_entity_mod_sparql=sparql, ) @@ -468,9 +456,7 @@ def test_5src_signoff_phase_instrument_no_type(): requirement_severity=Severity.RECOMMENDED, expected_validation_result=False, expected_triggered_requirements=["SignOffPhaseProperties"], - expected_triggered_issues=[ - "The Sign-Off Phase SHOULD have an TRE policy (instrument) with type CreativeWork" - ], + expected_triggered_issues=["The Sign-Off Phase SHOULD have an TRE policy (instrument) with type CreativeWork"], profile_identifier="five-safes-crate", rocrate_entity_mod_sparql=sparql, ) @@ -534,9 +520,7 @@ def test_5src_signoff_phase_object_notworkflow(): requirement_severity=Severity.RECOMMENDED, expected_validation_result=False, expected_triggered_requirements=["SignOffPhaseProperties"], - expected_triggered_issues=[ - "The Sign-Off Phase SHOULD list the workflow (mainEntity) as an object" - ], + expected_triggered_issues=["The Sign-Off Phase SHOULD list the workflow (mainEntity) as an object"], profile_identifier="five-safes-crate", rocrate_entity_mod_sparql=sparql, ) diff --git a/tests/integration/profiles/five-safes-crate/test_5src_5_profile_conformance.py b/tests/integration/profiles/five-safes-crate/test_5src_5_profile_conformance.py index 313e794e4..8012a37b4 100644 --- a/tests/integration/profiles/five-safes-crate/test_5src_5_profile_conformance.py +++ b/tests/integration/profiles/five-safes-crate/test_5src_5_profile_conformance.py @@ -17,7 +17,7 @@ from rocrate_validator.models import Severity from tests.ro_crates import ValidROC -from tests.shared import do_entity_test, SPARQL_PREFIXES +from tests.shared import SPARQL_PREFIXES, do_entity_test # set up logging logger = logging.getLogger(__name__) @@ -52,9 +52,7 @@ def test_5src_root_data_entity_missing_conformsto_property(): requirement_severity=Severity.RECOMMENDED, expected_validation_result=False, expected_triggered_requirements=["RootDataEntity"], - expected_triggered_issues=[ - "Root Dataset SHOULD include `conformsTo` https://w3id.org/5s-crate/0.4" - ], + expected_triggered_issues=["Root Dataset SHOULD include `conformsTo` https://w3id.org/5s-crate/0.4"], profile_identifier="five-safes-crate", rocrate_entity_mod_sparql=sparql, ) @@ -86,9 +84,7 @@ def test_5src_root_data_entity_conforms_to_wrong_profile(): requirement_severity=Severity.RECOMMENDED, expected_validation_result=False, expected_triggered_requirements=["RootDataEntity"], - expected_triggered_issues=[ - "Root Dataset SHOULD include `conformsTo` https://w3id.org/5s-crate/0.4" - ], + expected_triggered_issues=["Root Dataset SHOULD include `conformsTo` https://w3id.org/5s-crate/0.4"], profile_identifier="five-safes-crate", rocrate_entity_mod_sparql=sparql, ) @@ -118,9 +114,7 @@ def test_5src_root_data_entity_has_publisher_but_not_date_published(): requirement_severity=Severity.RECOMMENDED, expected_validation_result=False, expected_triggered_requirements=["datePublished present on published crates"], - expected_triggered_issues=[ - "A crate SHOULD have a publishedDate if and only if it has a publisher." - ], + expected_triggered_issues=["A crate SHOULD have a publishedDate if and only if it has a publisher."], profile_identifier="five-safes-crate", rocrate_entity_mod_sparql=sparql, ) @@ -150,9 +144,7 @@ def test_5src_root_data_entity_has_date_published_but_not_publisher(): requirement_severity=Severity.RECOMMENDED, expected_validation_result=False, expected_triggered_requirements=["datePublished present on published crates"], - expected_triggered_issues=[ - "A crate SHOULD have a publishedDate if and only if it has a publisher." - ], + expected_triggered_issues=["A crate SHOULD have a publishedDate if and only if it has a publisher."], profile_identifier="five-safes-crate", rocrate_entity_mod_sparql=sparql, ) @@ -182,9 +174,7 @@ def test_5src_root_data_entity_has_publisher_but_not_license(): requirement_severity=Severity.RECOMMENDED, expected_validation_result=False, expected_triggered_requirements=["License present on published crates"], - expected_triggered_issues=[ - "Profile Conformance: Published crates SHOULD include a license." - ], + expected_triggered_issues=["Profile Conformance: Published crates SHOULD include a license."], profile_identifier="five-safes-crate", rocrate_entity_mod_sparql=sparql, ) diff --git a/tests/integration/profiles/five-safes-crate/test_5src_6_workflow_reference.py b/tests/integration/profiles/five-safes-crate/test_5src_6_workflow_reference.py index 1271adffd..2aacf26e3 100644 --- a/tests/integration/profiles/five-safes-crate/test_5src_6_workflow_reference.py +++ b/tests/integration/profiles/five-safes-crate/test_5src_6_workflow_reference.py @@ -17,7 +17,7 @@ from rocrate_validator.models import Severity from tests.ro_crates import ValidROC -from tests.shared import do_entity_test, SPARQL_PREFIXES +from tests.shared import SPARQL_PREFIXES, do_entity_test # set up logging logger = logging.getLogger(__name__) @@ -49,9 +49,7 @@ def test_5src_root_data_entity_two_main_entities(): requirement_severity=Severity.REQUIRED, expected_validation_result=False, expected_triggered_requirements=["RootDataEntity"], - expected_triggered_issues=[ - "The RootDataEntity MUST have exactly one mainEntity property that is an IRI." - ], + expected_triggered_issues=["The RootDataEntity MUST have exactly one mainEntity property that is an IRI."], profile_identifier="five-safes-crate", rocrate_entity_mod_sparql=sparql, ) @@ -78,9 +76,7 @@ def test_5src_root_data_entity_no_main_entity(): requirement_severity=Severity.REQUIRED, expected_validation_result=False, expected_triggered_requirements=["RootDataEntity"], - expected_triggered_issues=[ - "The RootDataEntity MUST have exactly one mainEntity property that is an IRI." - ], + expected_triggered_issues=["The RootDataEntity MUST have exactly one mainEntity property that is an IRI."], profile_identifier="five-safes-crate", rocrate_entity_mod_sparql=sparql, ) @@ -113,9 +109,7 @@ def test_5src_root_data_entity_main_entity_not_dataset_iri(): requirement_severity=Severity.REQUIRED, expected_validation_result=False, expected_triggered_requirements=["RootDataEntity"], - expected_triggered_issues=[ - "The mainEntity pointed to by the RootDataEntity MUST be of type Dataset" - ], + expected_triggered_issues=["The mainEntity pointed to by the RootDataEntity MUST be of type Dataset"], profile_identifier="five-safes-crate", rocrate_entity_mod_sparql=sparql, ) @@ -145,9 +139,7 @@ def test_5src_main_entity_conformsTo_absent(): requirement_severity=Severity.REQUIRED, expected_validation_result=False, expected_triggered_requirements=["mainEntity"], - expected_triggered_issues=[ - "mainEntity MUST have one and only one `conformsTo` property." - ], + expected_triggered_issues=["mainEntity MUST have one and only one `conformsTo` property."], profile_identifier="five-safes-crate", rocrate_entity_mod_sparql=sparql, ) @@ -178,9 +170,7 @@ def test_5src_main_entity_has_two_conformsto(): requirement_severity=Severity.REQUIRED, expected_validation_result=False, expected_triggered_requirements=["mainEntity"], - expected_triggered_issues=[ - "mainEntity MUST have one and only one `conformsTo` property." - ], + expected_triggered_issues=["mainEntity MUST have one and only one `conformsTo` property."], profile_identifier="five-safes-crate", rocrate_entity_mod_sparql=sparql, ) @@ -214,9 +204,7 @@ def test_5src_main_entity_conformsTo_invalid(): requirement_severity=Severity.REQUIRED, expected_validation_result=False, expected_triggered_requirements=["mainEntity"], - expected_triggered_issues=[ - "conformsTo IRI must start with https://w3id.org/workflowhub/workflow-ro-crate" - ], + expected_triggered_issues=["conformsTo IRI must start with https://w3id.org/workflowhub/workflow-ro-crate"], profile_identifier="five-safes-crate", rocrate_entity_mod_sparql=sparql, ) diff --git a/tests/integration/profiles/five-safes-crate/test_5src_7_requesting_workflow_run.py b/tests/integration/profiles/five-safes-crate/test_5src_7_requesting_workflow_run.py index b58147651..c2a82ba3e 100644 --- a/tests/integration/profiles/five-safes-crate/test_5src_7_requesting_workflow_run.py +++ b/tests/integration/profiles/five-safes-crate/test_5src_7_requesting_workflow_run.py @@ -17,7 +17,7 @@ from rocrate_validator.models import Severity from tests.ro_crates import ValidROC -from tests.shared import do_entity_test, SPARQL_PREFIXES +from tests.shared import SPARQL_PREFIXES, do_entity_test # set up logging logger = logging.getLogger(__name__) @@ -159,7 +159,7 @@ def test_createaction_object_does_not_reference_existing_entities(): expected_triggered_requirements=["WorkflowRunAction"], expected_triggered_issues=[ "In the `CreateAction` entity corresponding to the workflow run," - + " each `object` MUST reference an existing entity." + " each `object` MUST reference an existing entity." ], profile_identifier="five-safes-crate", rocrate_entity_mod_sparql=sparql, diff --git a/tests/integration/profiles/five-safes-crate/test_5src_8_disclosure_phase.py b/tests/integration/profiles/five-safes-crate/test_5src_8_disclosure_phase.py index b50710cc8..8113a5111 100644 --- a/tests/integration/profiles/five-safes-crate/test_5src_8_disclosure_phase.py +++ b/tests/integration/profiles/five-safes-crate/test_5src_8_disclosure_phase.py @@ -17,7 +17,7 @@ from rocrate_validator.models import Severity from tests.ro_crates import ValidROC -from tests.shared import do_entity_test, SPARQL_PREFIXES +from tests.shared import SPARQL_PREFIXES, do_entity_test # set up logging logger = logging.getLogger(__name__) @@ -46,9 +46,7 @@ def test_5src_disclosure_object_with_no_name(): requirement_severity=Severity.REQUIRED, expected_validation_result=False, expected_triggered_requirements=["DisclosureCheck"], - expected_triggered_issues=[ - "`DisclosureCheck` MUST have a name string of at least 10 characters." - ], + expected_triggered_issues=["`DisclosureCheck` MUST have a name string of at least 10 characters."], profile_identifier="five-safes-crate", rocrate_entity_mod_sparql=sparql, ) @@ -77,9 +75,7 @@ def test_5src_disclosure_object_with_name_not_string(): requirement_severity=Severity.REQUIRED, expected_validation_result=False, expected_triggered_requirements=["DisclosureCheck"], - expected_triggered_issues=[ - "`DisclosureCheck` MUST have a name string of at least 10 characters." - ], + expected_triggered_issues=["`DisclosureCheck` MUST have a name string of at least 10 characters."], profile_identifier="five-safes-crate", rocrate_entity_mod_sparql=sparql, ) @@ -108,9 +104,7 @@ def test_5src_disclosure_object_with_not_long_enough_name(): requirement_severity=Severity.REQUIRED, expected_validation_result=False, expected_triggered_requirements=["DisclosureCheck"], - expected_triggered_issues=[ - "`DisclosureCheck` MUST have a name string of at least 10 characters." - ], + expected_triggered_issues=["`DisclosureCheck` MUST have a name string of at least 10 characters."], profile_identifier="five-safes-crate", rocrate_entity_mod_sparql=sparql, ) @@ -264,9 +258,7 @@ def test_5src_disclosure_object_not_mentioned_by_root_data_entity(): requirement_severity=Severity.RECOMMENDED, expected_validation_result=False, expected_triggered_requirements=["RootDataEntity"], - expected_triggered_issues=[ - "`RootDataEntity` SHOULD mention a disclosure object." - ], + expected_triggered_issues=["`RootDataEntity` SHOULD mention a disclosure object."], profile_identifier="five-safes-crate", rocrate_entity_mod_sparql=sparql, ) @@ -291,9 +283,7 @@ def test_5src_disclosure_object_with_no_action_status(): requirement_severity=Severity.RECOMMENDED, expected_validation_result=False, expected_triggered_requirements=["DisclosureCheck"], - expected_triggered_issues=[ - "The `DisclosureCheck` SHOULD have `actionStatus` property." - ], + expected_triggered_issues=["The `DisclosureCheck` SHOULD have `actionStatus` property."], profile_identifier="five-safes-crate", rocrate_entity_mod_sparql=sparql, ) diff --git a/tests/integration/profiles/five-safes-crate/test_5src_9_inputs.py b/tests/integration/profiles/five-safes-crate/test_5src_9_inputs.py index e6517098d..eb8efa7ef 100644 --- a/tests/integration/profiles/five-safes-crate/test_5src_9_inputs.py +++ b/tests/integration/profiles/five-safes-crate/test_5src_9_inputs.py @@ -17,7 +17,7 @@ from rocrate_validator.models import Severity from tests.ro_crates import ValidROC -from tests.shared import do_entity_test, SPARQL_PREFIXES +from tests.shared import SPARQL_PREFIXES, do_entity_test # set up logging logger = logging.getLogger(__name__) @@ -56,9 +56,7 @@ def test_input_does_not_reference_formalparameter(): requirement_severity=Severity.RECOMMENDED, expected_validation_result=False, expected_triggered_requirements=["Input"], - expected_triggered_issues=[ - "Input SHOULD reference a FormalParameter using exampleOfWork" - ], + expected_triggered_issues=["Input SHOULD reference a FormalParameter using exampleOfWork"], profile_identifier="five-safes-crate", rocrate_entity_mod_sparql=sparql, ) diff --git a/tests/integration/profiles/five-safes-crate/test_valid_5src.py b/tests/integration/profiles/five-safes-crate/test_valid_5src.py index da0154a3f..e0d44a233 100644 --- a/tests/integration/profiles/five-safes-crate/test_valid_5src.py +++ b/tests/integration/profiles/five-safes-crate/test_valid_5src.py @@ -14,14 +14,11 @@ # limitations under the License. import logging + import pytest from rocrate_validator import services from rocrate_validator.models import Severity -<<<<<<< HEAD -from tests.conftest import SKIP_LOCAL_DATA_ENTITY_EXISTENCE_CHECK_IDENTIFIER -======= ->>>>>>> ab465be7 (Add Five Safes Crate profile to upstream RO-Crate 1.2 base) from tests.ro_crates import ValidROC from tests.shared import do_entity_test @@ -31,32 +28,22 @@ # Dynamically fetch the SKIP_WEB_RESOURCE_AVAILABILITY_IDENTIFIER # required as disable_inherited_profiles_reporting does not disable Python checks from # inherited profiles (https://github.com/crs4/rocrate-validator/issues/135) -<<<<<<< HEAD -rocrate_profile = services.get_profile("ro-crate") -if not rocrate_profile: - raise RuntimeError("Unable to load the RO-Crate profile") -check_local_data_entity_existence = rocrate_profile.get_requirement_check( - "Web-based Data Entity: resource availability" -) -assert ( - check_local_data_entity_existence -), "Unable to find the requirement 'Web-based Data Entity: resource availability'" -======= rocrate_profile = services.get_profile("ro-crate-1.2") if not rocrate_profile: raise RuntimeError("Unable to load the RO-Crate 1.2 profile") check_local_data_entity_existence = rocrate_profile.get_requirement_check( "Data Entity: REQUIRED resource availability" ) -assert check_local_data_entity_existence, "Unable to find the requirement 'Data Entity: REQUIRED resource availability'" +assert check_local_data_entity_existence, ( + "Unable to find the requirement 'Data Entity: REQUIRED resource availability'" +) SKIP_LOCAL_DATA_ENTITY_EXISTENCE_CHECK_IDENTIFIER = check_local_data_entity_existence.identifier check_local_data_entity_existence = rocrate_profile.get_requirement_check( "Web-based Data Entity: REQUIRED resource availability" ) -assert ( - check_local_data_entity_existence -), "Unable to find the requirement 'Web-based Data Entity: REQUIRED resource availability'" ->>>>>>> ab465be7 (Add Five Safes Crate profile to upstream RO-Crate 1.2 base) +assert check_local_data_entity_existence, ( + "Unable to find the requirement 'Web-based Data Entity: REQUIRED resource availability'" +) SKIP_WEB_RESOURCE_AVAILABILITY_IDENTIFIER = check_local_data_entity_existence.identifier From 9bddab21a61f6e5dba29bb9a2ecc2b2ea3dc64d0 Mon Sep 17 00:00:00 2001 From: EttoreM Date: Thu, 2 Jul 2026 15:49:08 +0100 Subject: [PATCH 3/6] More formatting fixes --- .../five-safes-crate/15_metadata_file.py | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/rocrate_validator/profiles/five-safes-crate/15_metadata_file.py b/rocrate_validator/profiles/five-safes-crate/15_metadata_file.py index b589d332f..f284bfe8a 100644 --- a/rocrate_validator/profiles/five-safes-crate/15_metadata_file.py +++ b/rocrate_validator/profiles/five-safes-crate/15_metadata_file.py @@ -36,20 +36,13 @@ def test_existence(self, context: ValidationContext) -> bool: try: json_dict = context.ro_crate.metadata.as_dict() context_value = json_dict["@context"] - pattern = re.compile( - r"https://w3id\.org/ro/crate/1\.[2-9](-DRAFT)?/context" - ) + pattern = re.compile(r"https://w3id\.org/ro/crate/1\.[2-9](-DRAFT)?/context") passed = True if isinstance(context_value, list): - if not any( - pattern.match(item) - for item in context_value - if isinstance(item, str) - ): - passed = False - else: - if not pattern.match(context_value): + if not any(pattern.match(item) for item in context_value if isinstance(item, str)): passed = False + elif not pattern.match(context_value): + passed = False if not passed: context.result.add_issue( "The RO-Crate metadata file MUST include the RO-Crate context " @@ -58,7 +51,7 @@ def test_existence(self, context: ValidationContext) -> bool: ) return passed - except Exception as e: + except Exception: if logger.isEnabledFor(logging.DEBUG): - logger.exception(e) + logger.exception("Unexpected error during RO-Crate context version check") return True From ee3ca750f95a6ba1f45a737552abab1861a09590 Mon Sep 17 00:00:00 2001 From: EttoreM Date: Fri, 17 Jul 2026 16:24:35 +0100 Subject: [PATCH 4/6] Remove leftover conflict markers after rebase --- .../five-safes-crate/0_workflow_run_inference.ttl | 4 ---- .../profiles/five-safes-crate/10_outputs.ttl | 4 ---- .../five-safes-crate/11_workflow_execution_phase.ttl | 12 ------------ .../profiles/five-safes-crate/12_check_phase.ttl | 4 ---- .../five-safes-crate/13_validation_phase.ttl | 4 ---- .../five-safes-crate/14_workflow_retrieval_phase.ttl | 4 ---- .../profiles/five-safes-crate/15_metadata_file.ttl | 4 ---- .../five-safes-crate/16_publishing_phase.ttl | 4 ---- .../profiles/five-safes-crate/1_requesting_agent.ttl | 4 ---- .../five-safes-crate/1_responsible_project.ttl | 4 ---- .../profiles/five-safes-crate/1_root_data_entity.ttl | 4 ---- .../profiles/five-safes-crate/2_requesting_agent.ttl | 4 ---- .../profiles/five-safes-crate/3_timestamp_format.ttl | 4 ---- .../profiles/five-safes-crate/4_sign_off.ttl | 12 ------------ .../five-safes-crate/5_profile_conformance.ttl | 4 ---- .../five-safes-crate/6_workflow_reference.ttl | 4 ---- .../five-safes-crate/7_requested_workflow_run.ttl | 4 ---- .../profiles/five-safes-crate/8_disclosure_phase.ttl | 4 ---- .../profiles/five-safes-crate/9_inputs.ttl | 4 ---- .../profiles/five-safes-crate/ontology.ttl | 4 ---- .../profiles/five-safes-crate/profile.ttl | 4 ---- .../five-safes-crate-result/ro-crate-metadata.json | 3 --- tests/ro_crates.py | 5 ----- tests/shared.py | 4 ---- 24 files changed, 112 deletions(-) diff --git a/rocrate_validator/profiles/five-safes-crate/0_workflow_run_inference.ttl b/rocrate_validator/profiles/five-safes-crate/0_workflow_run_inference.ttl index 8c82dd798..d496bd324 100644 --- a/rocrate_validator/profiles/five-safes-crate/0_workflow_run_inference.ttl +++ b/rocrate_validator/profiles/five-safes-crate/0_workflow_run_inference.ttl @@ -12,11 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -<<<<<<< HEAD -@prefix ro-crate: . -======= @prefix ro-crate: . ->>>>>>> ab465be7 (Add Five Safes Crate profile to upstream RO-Crate 1.2 base) @prefix rdf: . @prefix schema: . @prefix sh: . diff --git a/rocrate_validator/profiles/five-safes-crate/10_outputs.ttl b/rocrate_validator/profiles/five-safes-crate/10_outputs.ttl index 2ca83acd8..3e3dbb5e3 100644 --- a/rocrate_validator/profiles/five-safes-crate/10_outputs.ttl +++ b/rocrate_validator/profiles/five-safes-crate/10_outputs.ttl @@ -13,11 +13,7 @@ # limitations under the License. @prefix ro: <./> . -<<<<<<< HEAD -@prefix ro-crate: . -======= @prefix ro-crate: . ->>>>>>> ab465be7 (Add Five Safes Crate profile to upstream RO-Crate 1.2 base) @prefix five-safes-crate: . @prefix rdf: . @prefix schema: . diff --git a/rocrate_validator/profiles/five-safes-crate/11_workflow_execution_phase.ttl b/rocrate_validator/profiles/five-safes-crate/11_workflow_execution_phase.ttl index 259b203eb..c5b813e26 100644 --- a/rocrate_validator/profiles/five-safes-crate/11_workflow_execution_phase.ttl +++ b/rocrate_validator/profiles/five-safes-crate/11_workflow_execution_phase.ttl @@ -13,11 +13,7 @@ # limitations under the License. @prefix ro: <./> . -<<<<<<< HEAD -@prefix ro-crate: . -======= @prefix ro-crate: . ->>>>>>> ab465be7 (Add Five Safes Crate profile to upstream RO-Crate 1.2 base) @prefix five-safes-crate: . @prefix rdf: . @prefix schema: . @@ -79,11 +75,7 @@ five-safes-crate:WorkflowexecutionObjectHasEndTimeIfEnded a sh:SPARQLTarget ; sh:select """ PREFIX schema: -<<<<<<< HEAD - PREFIX rocrate: -======= PREFIX rocrate: ->>>>>>> ab465be7 (Add Five Safes Crate profile to upstream RO-Crate 1.2 base) SELECT ?this WHERE { @@ -123,11 +115,7 @@ five-safes-crate:WorkflowexecutionObjectHasStartTimeIfBegun a sh:SPARQLTarget ; sh:select """ PREFIX schema: -<<<<<<< HEAD - PREFIX rocrate: -======= PREFIX rocrate: ->>>>>>> ab465be7 (Add Five Safes Crate profile to upstream RO-Crate 1.2 base) SELECT ?this WHERE { diff --git a/rocrate_validator/profiles/five-safes-crate/12_check_phase.ttl b/rocrate_validator/profiles/five-safes-crate/12_check_phase.ttl index d9429e805..fc4d100f5 100644 --- a/rocrate_validator/profiles/five-safes-crate/12_check_phase.ttl +++ b/rocrate_validator/profiles/five-safes-crate/12_check_phase.ttl @@ -13,11 +13,7 @@ # limitations under the License. @prefix ro: <./> . -<<<<<<< HEAD -@prefix ro-crate: . -======= @prefix ro-crate: . ->>>>>>> ab465be7 (Add Five Safes Crate profile to upstream RO-Crate 1.2 base) @prefix five-safes-crate: . @prefix rdf: . @prefix schema: . diff --git a/rocrate_validator/profiles/five-safes-crate/13_validation_phase.ttl b/rocrate_validator/profiles/five-safes-crate/13_validation_phase.ttl index 42e96265f..e9d25d46b 100644 --- a/rocrate_validator/profiles/five-safes-crate/13_validation_phase.ttl +++ b/rocrate_validator/profiles/five-safes-crate/13_validation_phase.ttl @@ -13,11 +13,7 @@ # limitations under the License. @prefix ro: <./> . -<<<<<<< HEAD -@prefix ro-crate: . -======= @prefix ro-crate: . ->>>>>>> ab465be7 (Add Five Safes Crate profile to upstream RO-Crate 1.2 base) @prefix five-safes-crate: . @prefix rdf: . @prefix schema: . diff --git a/rocrate_validator/profiles/five-safes-crate/14_workflow_retrieval_phase.ttl b/rocrate_validator/profiles/five-safes-crate/14_workflow_retrieval_phase.ttl index cb43b706b..df7ad33e8 100644 --- a/rocrate_validator/profiles/five-safes-crate/14_workflow_retrieval_phase.ttl +++ b/rocrate_validator/profiles/five-safes-crate/14_workflow_retrieval_phase.ttl @@ -13,11 +13,7 @@ # limitations under the License. @prefix ro: <./> . -<<<<<<< HEAD -@prefix ro-crate: . -======= @prefix ro-crate: . ->>>>>>> ab465be7 (Add Five Safes Crate profile to upstream RO-Crate 1.2 base) @prefix five-safes-crate: . @prefix rdf: . @prefix schema: . diff --git a/rocrate_validator/profiles/five-safes-crate/15_metadata_file.ttl b/rocrate_validator/profiles/five-safes-crate/15_metadata_file.ttl index 5ede2e505..72f5e020e 100644 --- a/rocrate_validator/profiles/five-safes-crate/15_metadata_file.ttl +++ b/rocrate_validator/profiles/five-safes-crate/15_metadata_file.ttl @@ -12,11 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -<<<<<<< HEAD -@prefix ro-crate: . -======= @prefix ro-crate: . ->>>>>>> ab465be7 (Add Five Safes Crate profile to upstream RO-Crate 1.2 base) @prefix five-safes-crate: . @prefix rdf: . @prefix schema: . diff --git a/rocrate_validator/profiles/five-safes-crate/16_publishing_phase.ttl b/rocrate_validator/profiles/five-safes-crate/16_publishing_phase.ttl index ba4403eee..c56e67b72 100644 --- a/rocrate_validator/profiles/five-safes-crate/16_publishing_phase.ttl +++ b/rocrate_validator/profiles/five-safes-crate/16_publishing_phase.ttl @@ -13,11 +13,7 @@ # limitations under the License. @prefix ro: <./> . -<<<<<<< HEAD -@prefix ro-crate: . -======= @prefix ro-crate: . ->>>>>>> ab465be7 (Add Five Safes Crate profile to upstream RO-Crate 1.2 base) @prefix five-safes-crate: . @prefix rdf: . @prefix schema: . diff --git a/rocrate_validator/profiles/five-safes-crate/1_requesting_agent.ttl b/rocrate_validator/profiles/five-safes-crate/1_requesting_agent.ttl index cc0848220..812691666 100644 --- a/rocrate_validator/profiles/five-safes-crate/1_requesting_agent.ttl +++ b/rocrate_validator/profiles/five-safes-crate/1_requesting_agent.ttl @@ -13,11 +13,7 @@ # limitations under the License. @prefix ro: <./> . -<<<<<<< HEAD -@prefix ro-crate: . -======= @prefix ro-crate: . ->>>>>>> ab465be7 (Add Five Safes Crate profile to upstream RO-Crate 1.2 base) @prefix five-safes-crate: . @prefix rdf: . @prefix schema: . diff --git a/rocrate_validator/profiles/five-safes-crate/1_responsible_project.ttl b/rocrate_validator/profiles/five-safes-crate/1_responsible_project.ttl index 9265e66e7..7be332d23 100644 --- a/rocrate_validator/profiles/five-safes-crate/1_responsible_project.ttl +++ b/rocrate_validator/profiles/five-safes-crate/1_responsible_project.ttl @@ -13,11 +13,7 @@ # limitations under the License. @prefix ro: <./> . -<<<<<<< HEAD -@prefix ro-crate: . -======= @prefix ro-crate: . ->>>>>>> ab465be7 (Add Five Safes Crate profile to upstream RO-Crate 1.2 base) @prefix five-safes-crate: . @prefix rdf: . @prefix schema: . diff --git a/rocrate_validator/profiles/five-safes-crate/1_root_data_entity.ttl b/rocrate_validator/profiles/five-safes-crate/1_root_data_entity.ttl index 1d4425d92..b5481fd12 100644 --- a/rocrate_validator/profiles/five-safes-crate/1_root_data_entity.ttl +++ b/rocrate_validator/profiles/five-safes-crate/1_root_data_entity.ttl @@ -13,11 +13,7 @@ # limitations under the License. @prefix ro: <./> . -<<<<<<< HEAD -@prefix ro-crate: . -======= @prefix ro-crate: . ->>>>>>> ab465be7 (Add Five Safes Crate profile to upstream RO-Crate 1.2 base) @prefix five-safes-crate: . @prefix rdf: . @prefix schema: . diff --git a/rocrate_validator/profiles/five-safes-crate/2_requesting_agent.ttl b/rocrate_validator/profiles/five-safes-crate/2_requesting_agent.ttl index 72ca2a0b6..49e5ba3f1 100644 --- a/rocrate_validator/profiles/five-safes-crate/2_requesting_agent.ttl +++ b/rocrate_validator/profiles/five-safes-crate/2_requesting_agent.ttl @@ -13,11 +13,7 @@ # limitations under the License. @prefix ro: <./> . -<<<<<<< HEAD -@prefix ro-crate: . -======= @prefix ro-crate: . ->>>>>>> ab465be7 (Add Five Safes Crate profile to upstream RO-Crate 1.2 base) @prefix five-safes-crate: . @prefix rdf: . @prefix schema: . diff --git a/rocrate_validator/profiles/five-safes-crate/3_timestamp_format.ttl b/rocrate_validator/profiles/five-safes-crate/3_timestamp_format.ttl index 0fbc9586c..64055a033 100644 --- a/rocrate_validator/profiles/five-safes-crate/3_timestamp_format.ttl +++ b/rocrate_validator/profiles/five-safes-crate/3_timestamp_format.ttl @@ -13,11 +13,7 @@ # limitations under the License. @prefix ro: <./> . -<<<<<<< HEAD -@prefix ro-crate: . -======= @prefix ro-crate: . ->>>>>>> ab465be7 (Add Five Safes Crate profile to upstream RO-Crate 1.2 base) @prefix five-safes-crate: . @prefix rdf: . @prefix schema: . diff --git a/rocrate_validator/profiles/five-safes-crate/4_sign_off.ttl b/rocrate_validator/profiles/five-safes-crate/4_sign_off.ttl index 69db2bb5a..0c91901e4 100644 --- a/rocrate_validator/profiles/five-safes-crate/4_sign_off.ttl +++ b/rocrate_validator/profiles/five-safes-crate/4_sign_off.ttl @@ -13,11 +13,7 @@ # limitations under the License. @prefix ro: <./> . -<<<<<<< HEAD -@prefix ro-crate: . -======= @prefix ro-crate: . ->>>>>>> ab465be7 (Add Five Safes Crate profile to upstream RO-Crate 1.2 base) @prefix five-safes-crate: . @prefix rdf: . @prefix schema: . @@ -194,11 +190,7 @@ five-safes-crate:SignOffPhaseProperties sh:description "Check if the Sign Off phase lists the workflow as an object" ; sh:select """ PREFIX schema: -<<<<<<< HEAD - PREFIX rocrate: -======= PREFIX rocrate: ->>>>>>> ab465be7 (Add Five Safes Crate profile to upstream RO-Crate 1.2 base) SELECT $this WHERE { ?root a schema:Dataset ; @@ -217,11 +209,7 @@ five-safes-crate:SignOffPhaseProperties sh:description "Check if the Sign Off phase lists the Responsible Project as an object" ; sh:select """ PREFIX schema: -<<<<<<< HEAD - PREFIX rocrate: -======= PREFIX rocrate: ->>>>>>> ab465be7 (Add Five Safes Crate profile to upstream RO-Crate 1.2 base) SELECT $this WHERE { ?root a schema:Dataset ; diff --git a/rocrate_validator/profiles/five-safes-crate/5_profile_conformance.ttl b/rocrate_validator/profiles/five-safes-crate/5_profile_conformance.ttl index 218465fac..069d390ed 100644 --- a/rocrate_validator/profiles/five-safes-crate/5_profile_conformance.ttl +++ b/rocrate_validator/profiles/five-safes-crate/5_profile_conformance.ttl @@ -13,11 +13,7 @@ # limitations under the License. @prefix ro: <./> . -<<<<<<< HEAD -@prefix ro-crate: . -======= @prefix ro-crate: . ->>>>>>> ab465be7 (Add Five Safes Crate profile to upstream RO-Crate 1.2 base) @prefix five-safes-crate: . @prefix rdf: . @prefix schema: . diff --git a/rocrate_validator/profiles/five-safes-crate/6_workflow_reference.ttl b/rocrate_validator/profiles/five-safes-crate/6_workflow_reference.ttl index b8eedad9e..222f2bc9b 100644 --- a/rocrate_validator/profiles/five-safes-crate/6_workflow_reference.ttl +++ b/rocrate_validator/profiles/five-safes-crate/6_workflow_reference.ttl @@ -13,11 +13,7 @@ # limitations under the License. @prefix ro: <./> . -<<<<<<< HEAD -@prefix ro-crate: . -======= @prefix ro-crate: . ->>>>>>> ab465be7 (Add Five Safes Crate profile to upstream RO-Crate 1.2 base) @prefix five-safes-crate: . @prefix rdf: . @prefix schema: . diff --git a/rocrate_validator/profiles/five-safes-crate/7_requested_workflow_run.ttl b/rocrate_validator/profiles/five-safes-crate/7_requested_workflow_run.ttl index 0e315135a..9b66f1769 100644 --- a/rocrate_validator/profiles/five-safes-crate/7_requested_workflow_run.ttl +++ b/rocrate_validator/profiles/five-safes-crate/7_requested_workflow_run.ttl @@ -13,11 +13,7 @@ # limitations under the License. @prefix ro: <./> . -<<<<<<< HEAD -@prefix ro-crate: . -======= @prefix ro-crate: . ->>>>>>> ab465be7 (Add Five Safes Crate profile to upstream RO-Crate 1.2 base) @prefix five-safes-crate: . @prefix rdf: . @prefix schema: . diff --git a/rocrate_validator/profiles/five-safes-crate/8_disclosure_phase.ttl b/rocrate_validator/profiles/five-safes-crate/8_disclosure_phase.ttl index 5c874151d..61b785a43 100644 --- a/rocrate_validator/profiles/five-safes-crate/8_disclosure_phase.ttl +++ b/rocrate_validator/profiles/five-safes-crate/8_disclosure_phase.ttl @@ -13,11 +13,7 @@ # limitations under the License. @prefix ro: <./> . -<<<<<<< HEAD -@prefix ro-crate: . -======= @prefix ro-crate: . ->>>>>>> ab465be7 (Add Five Safes Crate profile to upstream RO-Crate 1.2 base) @prefix five-safes-crate: . @prefix rdf: . @prefix schema: . diff --git a/rocrate_validator/profiles/five-safes-crate/9_inputs.ttl b/rocrate_validator/profiles/five-safes-crate/9_inputs.ttl index 8667135ef..e0e83c940 100644 --- a/rocrate_validator/profiles/five-safes-crate/9_inputs.ttl +++ b/rocrate_validator/profiles/five-safes-crate/9_inputs.ttl @@ -13,11 +13,7 @@ # limitations under the License. @prefix ro: <./> . -<<<<<<< HEAD -@prefix ro-crate: . -======= @prefix ro-crate: . ->>>>>>> ab465be7 (Add Five Safes Crate profile to upstream RO-Crate 1.2 base) @prefix five-safes-crate: . @prefix rdf: . @prefix schema: . diff --git a/rocrate_validator/profiles/five-safes-crate/ontology.ttl b/rocrate_validator/profiles/five-safes-crate/ontology.ttl index 8dfe56aa3..d37dfd45e 100644 --- a/rocrate_validator/profiles/five-safes-crate/ontology.ttl +++ b/rocrate_validator/profiles/five-safes-crate/ontology.ttl @@ -21,11 +21,7 @@ @prefix schema: . @prefix rocrate: . @prefix bioschemas: . -<<<<<<< HEAD -@prefix ro-crate: . -======= @prefix ro-crate: . ->>>>>>> ab465be7 (Add Five Safes Crate profile to upstream RO-Crate 1.2 base) @prefix isa-ro-crate: . rdf:type owl:Ontology ; diff --git a/rocrate_validator/profiles/five-safes-crate/profile.ttl b/rocrate_validator/profiles/five-safes-crate/profile.ttl index b8251296c..28abe62c0 100644 --- a/rocrate_validator/profiles/five-safes-crate/profile.ttl +++ b/rocrate_validator/profiles/five-safes-crate/profile.ttl @@ -34,11 +34,7 @@ # prof:isProfileOf ; # This profile is a transitive profile of the RO-Crate Metadata Specification -<<<<<<< HEAD - prof:isTransitiveProfileOf ; -======= prof:isTransitiveProfileOf ; ->>>>>>> ab465be7 (Add Five Safes Crate profile to upstream RO-Crate 1.2 base) # TODO: resolve failures when these profiles are applied # , # ; diff --git a/tests/data/crates/valid/five-safes-crate-result/ro-crate-metadata.json b/tests/data/crates/valid/five-safes-crate-result/ro-crate-metadata.json index 8551d709d..2fa6838d2 100644 --- a/tests/data/crates/valid/five-safes-crate-result/ro-crate-metadata.json +++ b/tests/data/crates/valid/five-safes-crate-result/ro-crate-metadata.json @@ -393,11 +393,8 @@ "@id": "https://tre72.example.com/#crate-validator", "@type": "SoftwareApplication", "name": "RO-Crate validator at TRE72", -<<<<<<< HEAD -======= "url": "https://tre72.example.com/#crate-validator", "version": "1.0", ->>>>>>> ab465be7 (Add Five Safes Crate profile to upstream RO-Crate 1.2 base) "provider": { "@id": "https://tre72.example.com/" } diff --git a/tests/ro_crates.py b/tests/ro_crates.py index f91d34211..4a450c9d0 100644 --- a/tests/ro_crates.py +++ b/tests/ro_crates.py @@ -1004,12 +1004,7 @@ def propertyvalue_no_unitcode(self) -> Path: class Invalid5sROC: -<<<<<<< HEAD - - base_path = INVALID_CRATES_DATA_PATH / "five_safes_crate/" -======= base_path = INVALID_CRATES_DATA_PATH / "five_safes_crate" ->>>>>>> ab465be7 (Add Five Safes Crate profile to upstream RO-Crate 1.2 base) @property def context_multiple_wrong_version(self) -> Path: diff --git a/tests/shared.py b/tests/shared.py index c06a3d066..61c93be55 100644 --- a/tests/shared.py +++ b/tests/shared.py @@ -40,11 +40,7 @@ PREFIX schema: PREFIX shp: PREFIX rdf: -<<<<<<< HEAD -PREFIX rocrate: -======= PREFIX rocrate: ->>>>>>> ab465be7 (Add Five Safes Crate profile to upstream RO-Crate 1.2 base) PREFIX dct: """ From 8aafd74568ae326a8ffb1e24ccdbbe000ffc5343 Mon Sep 17 00:00:00 2001 From: EttoreM Date: Fri, 17 Jul 2026 17:29:57 +0100 Subject: [PATCH 5/6] Addressed Eli's comments --- .../profiles/five-safes-crate/test_valid_5src.py | 10 ++-------- tests/integration/profiles/test_metadata_only.py | 12 ++++-------- tests/shared.py | 6 ++---- 3 files changed, 8 insertions(+), 20 deletions(-) diff --git a/tests/integration/profiles/five-safes-crate/test_valid_5src.py b/tests/integration/profiles/five-safes-crate/test_valid_5src.py index e0d44a233..9e932f92c 100644 --- a/tests/integration/profiles/five-safes-crate/test_valid_5src.py +++ b/tests/integration/profiles/five-safes-crate/test_valid_5src.py @@ -26,17 +26,11 @@ logger.setLevel(logging.DEBUG) # Dynamically fetch the SKIP_WEB_RESOURCE_AVAILABILITY_IDENTIFIER -# required as disable_inherited_profiles_reporting does not disable Python checks from -# inherited profiles (https://github.com/crs4/rocrate-validator/issues/135) rocrate_profile = services.get_profile("ro-crate-1.2") if not rocrate_profile: raise RuntimeError("Unable to load the RO-Crate 1.2 profile") -check_local_data_entity_existence = rocrate_profile.get_requirement_check( - "Data Entity: REQUIRED resource availability" -) -assert check_local_data_entity_existence, ( - "Unable to find the requirement 'Data Entity: REQUIRED resource availability'" -) +check_local_data_entity_existence = rocrate_profile.get_requirement_check("Data Entity: REQUIRED resource availability") +assert check_local_data_entity_existence, "Unable to find the requirement 'Data Entity: REQUIRED resource availability'" SKIP_LOCAL_DATA_ENTITY_EXISTENCE_CHECK_IDENTIFIER = check_local_data_entity_existence.identifier check_local_data_entity_existence = rocrate_profile.get_requirement_check( "Web-based Data Entity: REQUIRED resource availability" diff --git a/tests/integration/profiles/test_metadata_only.py b/tests/integration/profiles/test_metadata_only.py index b1f4d2662..21f46faca 100644 --- a/tests/integration/profiles/test_metadata_only.py +++ b/tests/integration/profiles/test_metadata_only.py @@ -64,11 +64,9 @@ def test_valid_ro_crates_from_folder(valid_roc_path): [], profile_identifier=( # ro-crate-1.1 can't be used for Five Safes crates as they conform to 1.2 - "five-safes-crate" - if "five-safes-crate" in valid_roc_path.name - else DEFAULT_PROFILE_IDENTIFIER + "five-safes-crate" if "five-safes-crate" in valid_roc_path.name else DEFAULT_PROFILE_IDENTIFIER ), - metadata_only=True + metadata_only=True, ) @@ -90,10 +88,8 @@ def test_valid_ro_crates_from_metadata_dict(valid_roc_path): [], profile_identifier=( # ro-crate-1.1 can't be used for Five Safes crates as they conform to 1.2 - "five-safes-crate" - if "five-safes-crate" in valid_roc_path.name - else DEFAULT_PROFILE_IDENTIFIER + "five-safes-crate" if "five-safes-crate" in valid_roc_path.name else DEFAULT_PROFILE_IDENTIFIER ), metadata_dict=metadata_dict, - metadata_only=True + metadata_only=True, ) diff --git a/tests/shared.py b/tests/shared.py index 61c93be55..06585b9a7 100644 --- a/tests/shared.py +++ b/tests/shared.py @@ -40,7 +40,6 @@ PREFIX schema: PREFIX shp: PREFIX rdf: -PREFIX rocrate: PREFIX dct: """ @@ -95,12 +94,11 @@ def replace_uri_in_graph(graph, old_uri_str, new_uri_str): return g + def _uses_https_schema(graph: rdflib.Graph) -> bool: for s, p, o in graph.triples((None, None, None)): for term in (s, p, o): - if isinstance(term, rdflib.URIRef) and str(term).startswith( - "https://schema.org/" - ): + if isinstance(term, rdflib.URIRef) and str(term).startswith("https://schema.org/"): return True return False From e291b4e92b4abd686ae718cb7ca0af406eb0f516 Mon Sep 17 00:00:00 2001 From: EttoreM Date: Fri, 17 Jul 2026 20:59:45 +0100 Subject: [PATCH 6/6] Rileset 15 removed from SHACL shapes and python tests as per Eli' suggestion. --- .../five-safes-crate/15_metadata_file.py | 57 ------------- .../five-safes-crate/15_metadata_file.ttl | 53 ------------ .../test_5src_15_metadata_file.py | 85 ------------------- 3 files changed, 195 deletions(-) delete mode 100644 rocrate_validator/profiles/five-safes-crate/15_metadata_file.py delete mode 100644 rocrate_validator/profiles/five-safes-crate/15_metadata_file.ttl delete mode 100644 tests/integration/profiles/five-safes-crate/test_5src_15_metadata_file.py diff --git a/rocrate_validator/profiles/five-safes-crate/15_metadata_file.py b/rocrate_validator/profiles/five-safes-crate/15_metadata_file.py deleted file mode 100644 index f284bfe8a..000000000 --- a/rocrate_validator/profiles/five-safes-crate/15_metadata_file.py +++ /dev/null @@ -1,57 +0,0 @@ -# Copyright (c) 2024-2025 CRS4 -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import re - -import rocrate_validator.utils.log as logging -from rocrate_validator.models import Severity, ValidationContext -from rocrate_validator.requirements.python import PyFunctionCheck, check, requirement - -# set up logging -logger = logging.getLogger(__name__) - - -@requirement(name="RO-Crate context version") -class FileDescriptorContextVersion(PyFunctionCheck): - """The RO-Crate metadata file MUST include the RO-Crate context version 1.2 - (or later minor version) in `@context`""" - - @check(name="RO-Crate context version", severity=Severity.REQUIRED) - def test_existence(self, context: ValidationContext) -> bool: - """ - The RO-Crate metadata file MUST include the RO-Crate context version 1.2 - (or later minor version) in `@context` - """ - try: - json_dict = context.ro_crate.metadata.as_dict() - context_value = json_dict["@context"] - pattern = re.compile(r"https://w3id\.org/ro/crate/1\.[2-9](-DRAFT)?/context") - passed = True - if isinstance(context_value, list): - if not any(pattern.match(item) for item in context_value if isinstance(item, str)): - passed = False - elif not pattern.match(context_value): - passed = False - if not passed: - context.result.add_issue( - "The RO-Crate metadata file MUST include the RO-Crate context " - "version 1.2 (or later minor version) in `@context`", - self, - ) - return passed - - except Exception: - if logger.isEnabledFor(logging.DEBUG): - logger.exception("Unexpected error during RO-Crate context version check") - return True diff --git a/rocrate_validator/profiles/five-safes-crate/15_metadata_file.ttl b/rocrate_validator/profiles/five-safes-crate/15_metadata_file.ttl deleted file mode 100644 index 72f5e020e..000000000 --- a/rocrate_validator/profiles/five-safes-crate/15_metadata_file.ttl +++ /dev/null @@ -1,53 +0,0 @@ -# Copyright (c) 2025 eScience Lab, The University of Manchester -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -@prefix ro-crate: . -@prefix five-safes-crate: . -@prefix rdf: . -@prefix schema: . -@prefix purl: . -@prefix sh: . -@prefix validator: . -@prefix xsd: . -@prefix dct: . - - - -#=== MUST shapes ===# - -five-safes-crate:MetadataFileDescriptorProperties a sh:NodeShape ; - sh:name "RO-Crate conforms to 1.2 or later minor version" ; - sh:description """The RO-Crate metadata file descriptor MUST have a `conformsTo` property with RO-Crate specification version 1.2 or later minor version"""; - sh:targetClass ro-crate:ROCrateMetadataFileDescriptor ; - sh:property [ - a sh:PropertyShape ; - sh:name "RO-Crate conforms to 1.2 or later minor version" ; - sh:description "The RO-Crate metadata file descriptor MUST have a `conformsTo` property with RO-Crate specification version 1.2 or later minor version" ; - sh:minCount 1 ; - sh:nodeKind sh:IRI ; - sh:path dct:conformsTo ; - sh:pattern "https://w3id\\.org/ro/crate/(1\\.[2-9](-DRAFT)?)" ; - sh:severity sh:Violation; - sh:message "The RO-Crate metadata file descriptor MUST have a `conformsTo` property with RO-Crate specification version 1.2 or later minor version" ; - ] . - -ro-crate:conformsToROCrateSpec sh:deactivated true . - - -#=== SHOULD shapes ===# -# (none) - - -#=== MAY shapes ===# -# (none) \ No newline at end of file diff --git a/tests/integration/profiles/five-safes-crate/test_5src_15_metadata_file.py b/tests/integration/profiles/five-safes-crate/test_5src_15_metadata_file.py deleted file mode 100644 index a166ed4aa..000000000 --- a/tests/integration/profiles/five-safes-crate/test_5src_15_metadata_file.py +++ /dev/null @@ -1,85 +0,0 @@ -# Copyright (c) 2024-2025 CRS4 -# Copyright (c) 2025-2026 eScience Lab, The University of Manchester -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import logging - -from rocrate_validator.models import Severity -from tests.ro_crates import Invalid5sROC, ValidROC -from tests.shared import SPARQL_PREFIXES, do_entity_test - -# set up logging -logger = logging.getLogger(__name__) - - -# ----- MUST fails tests - - -def test_5src_conforms_to_old_version(): - sparql = ( - SPARQL_PREFIXES - + """ - DELETE { - ?this dct:conformsTo ?version . - } - INSERT { - ?this dct:conformsTo . - } - WHERE { - ?this dct:conformsTo ?version ; - schema:about <./> . - } - """ - ) - - do_entity_test( - rocrate_path=ValidROC().five_safes_crate_request, - requirement_severity=Severity.REQUIRED, - expected_validation_result=False, - expected_triggered_requirements=["RO-Crate conforms to 1.2 or later minor version"], - expected_triggered_issues=[ - "The RO-Crate metadata file descriptor MUST have a `conformsTo` property with " - "RO-Crate specification version 1.2 or later minor version" - ], - profile_identifier="five-safes-crate", - rocrate_entity_mod_sparql=sparql, - ) - - -def test_5src_context_single_wrong_version(): - do_entity_test( - rocrate_path=Invalid5sROC().context_single_wrong_version, - requirement_severity=Severity.REQUIRED, - expected_validation_result=False, - expected_triggered_requirements=["RO-Crate context version"], - expected_triggered_issues=[ - "The RO-Crate metadata file MUST include the RO-Crate context version 1.2 " - "(or later minor version) in `@context`" - ], - profile_identifier="five-safes-crate", - ) - - -def test_5src_context_multiple_wrong_version(): - do_entity_test( - rocrate_path=Invalid5sROC().context_multiple_wrong_version, - requirement_severity=Severity.REQUIRED, - expected_validation_result=False, - expected_triggered_requirements=["RO-Crate context version"], - expected_triggered_issues=[ - "The RO-Crate metadata file MUST include the RO-Crate context version 1.2 " - "(or later minor version) in `@context`" - ], - profile_identifier="five-safes-crate", - )