From f08c9abe75762aa39c38724b106ed282c5cf6d48 Mon Sep 17 00:00:00 2001 From: Geary-Layne Date: Fri, 15 Mar 2024 13:59:14 -0600 Subject: [PATCH 1/2] updated eventPort metadata schema --- .../idsse_common/idsse/common/schema/risk_results.json | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/python/idsse_common/idsse/common/schema/risk_results.json b/python/idsse_common/idsse/common/schema/risk_results.json index a3b83471..26fcfc5e 100644 --- a/python/idsse_common/idsse/common/schema/risk_results.json +++ b/python/idsse_common/idsse/common/schema/risk_results.json @@ -75,12 +75,7 @@ "description": "Mechanism for storing the a contiguous state (when the criteria is met or not met", "type": "object", "properties": { - "criteriaMet": { - "oneOf" : [ - {"type": "boolean"}, - {"type": "string", "enum": ["true", "false"]} - ] - }, + "empirical": {"type": "string", "enum": ["HIT", "MISS", "PROXIMAL"]}, "startDt": {"$ref": "timing.json#/TimeString"}, "endDt": {"$ref": "timing.json#/TimeString"}, "durationInMin": {"type": "integer"}, @@ -90,7 +85,7 @@ "maxAt": {"$ref": "timing.json#/TimeString"} }, "required": [ - "criteriaMet", + "empirical", "startDt", "endDt", "durationInMin", From 43c4069b26d53ac55d9f2158d022be6289fb6407 Mon Sep 17 00:00:00 2001 From: Geary-Layne Date: Fri, 15 Mar 2024 14:02:56 -0600 Subject: [PATCH 2/2] updated test for new eventPort (criteriaMet replaced with empirical) --- python/idsse_common/test/test_validate_event_port_schema.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/idsse_common/test/test_validate_event_port_schema.py b/python/idsse_common/test/test_validate_event_port_schema.py index 117dcd96..4fc2e052 100644 --- a/python/idsse_common/test/test_validate_event_port_schema.py +++ b/python/idsse_common/test/test_validate_event_port_schema.py @@ -159,7 +159,7 @@ def simple_event_port_message() -> dict: "startDt": "2022-11-12T00:00:00.000Z", "endDt": "2022-11-12T00:00:00.000Z", "maxAt": "2022-11-12T00:00:00.000Z", - "criteriaMet": "true" + "empirical": "HIT" } ] }, @@ -175,7 +175,7 @@ def simple_event_port_message() -> dict: "startDt": "2022-11-12T00:00:00.000Z", "endDt": "2022-11-12T00:00:00.000Z", "maxAt": "2022-11-12T00:00:00.000Z", - "criteriaMet": "true" + "empirical": "HIT" } ] }