From 7ab3d8be1b06f97f6bc005e86321eb89c6932281 Mon Sep 17 00:00:00 2001 From: khalid Date: Sat, 28 Mar 2026 17:37:27 +0000 Subject: [PATCH 1/4] fix: add conditional statement to pulse coolantInformation --- ukaea-schema/facility/hive/pulse.schema.json | 23 +++++++++++++++----- 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/ukaea-schema/facility/hive/pulse.schema.json b/ukaea-schema/facility/hive/pulse.schema.json index e72025e..bc1555c 100644 --- a/ukaea-schema/facility/hive/pulse.schema.json +++ b/ukaea-schema/facility/hive/pulse.schema.json @@ -118,12 +118,23 @@ } }, "required": [ - "sampleCooling", - "coolantType", - "targetCoolantFlow", - "targetCoolantTemperature", - "measuredCoolantFlow" - ] + "sampleCooling" + ], + "if": { + "properties": { + "sampleCooling": { + "const": "yes" + } + } + }, + "then": { + "required": [ + "coolantType", + "targetCoolantFlow", + "targetCoolantTemperature", + "measuredCoolantFlow" + ] + } }, "comment": { "type": "string" From 5179c83c263f68ccc70eb6f6dfab0d444d2aaa41 Mon Sep 17 00:00:00 2001 From: khalid Date: Wed, 1 Apr 2026 09:41:00 +0100 Subject: [PATCH 2/4] fix: example files --- ukaea-schema/examples/equipment/camera.json | 20 +++++++------------ .../examples/equipment/flowmeter.json | 19 +++++++++--------- .../examples/equipment/pyrometer.json | 7 +------ ukaea-schema/examples/hive/experiment.json | 5 +---- ukaea-schema/examples/hive/pulse.json | 14 ++++++------- 5 files changed, 25 insertions(+), 40 deletions(-) diff --git a/ukaea-schema/examples/equipment/camera.json b/ukaea-schema/examples/equipment/camera.json index b7f8bce..b47320e 100644 --- a/ukaea-schema/examples/equipment/camera.json +++ b/ukaea-schema/examples/equipment/camera.json @@ -1,16 +1,10 @@ { - "deviceInformation": { - "make": "Canon", - "model": "EOS R5", - "serialNumber": "123456789", - "resolution": { - "x": 8192, - "y": 5464 - } - }, - "captureSettings": { - "imageAcquisitionRate": 120, - "imageNoise": 0.85, - "imageScale": 0.05 + "make": "Canon", + "model": "EOS R5", + "serialNumber": "123456789", + "assetId": "C-0932", + "resolution": { + "x": 8192, + "y": 5464 } } \ No newline at end of file diff --git a/ukaea-schema/examples/equipment/flowmeter.json b/ukaea-schema/examples/equipment/flowmeter.json index 384559e..7121111 100644 --- a/ukaea-schema/examples/equipment/flowmeter.json +++ b/ukaea-schema/examples/equipment/flowmeter.json @@ -1,12 +1,11 @@ { - "deviceInformation": { - "make": "Nixon", - "model": "NT13", - "serialNumber": "2942701", - "flowRange": { - "minimum": 8, - "maximum": 80 - }, - "flowmeterType": "Turbine" - } + "make": "Nixon", + "model": "NT13", + "serialNumber": "2942701", + "assetId": "F-0989", + "flowRange": { + "minimum": 8, + "maximum": 80 + }, + "flowmeterType": "Turbine" } diff --git a/ukaea-schema/examples/equipment/pyrometer.json b/ukaea-schema/examples/equipment/pyrometer.json index 124ffcd..2d2950d 100644 --- a/ukaea-schema/examples/equipment/pyrometer.json +++ b/ukaea-schema/examples/equipment/pyrometer.json @@ -1,8 +1,8 @@ { - "deviceInformation": { "make": "SensorTherm", "model": "M322", "serialNumber": "10319", + "assetId": "P-89789", "temperatureRange": { "minimum": 350, "maximum": 1300 @@ -11,9 +11,4 @@ "minimum": 1.45, "maximum": 1.65 } - }, - "deviceSettings": { - "emissivity": 0.45, - "framerate": 5 - } } diff --git a/ukaea-schema/examples/hive/experiment.json b/ukaea-schema/examples/hive/experiment.json index beda75a..9f00060 100644 --- a/ukaea-schema/examples/hive/experiment.json +++ b/ukaea-schema/examples/hive/experiment.json @@ -1,6 +1,4 @@ { - "campaignId": "4c7e8d7-6291-4a9f-9c27-0f8339c5f0a7", - "campaignTitle": "", "experimentNumber": "07cf92f4-5e1b-4fc3-96d1-6e6e527c3b39", "experimentTitle": "", "leadInvestigator": { @@ -18,7 +16,6 @@ }, "startDate": "2023-09-05T10:00:00Z", "endDate": "2023-09-05T16:00:00Z", - "heatingType": "Induction", - "sampleCooling": true, + "schemaVersion": "0.0.1", "description": "this is the description" } diff --git a/ukaea-schema/examples/hive/pulse.json b/ukaea-schema/examples/hive/pulse.json index 24b47e6..c4c306c 100644 --- a/ukaea-schema/examples/hive/pulse.json +++ b/ukaea-schema/examples/hive/pulse.json @@ -1,12 +1,7 @@ { - "pulseNumber": "0023", - "pulseStart": "2025-03-06T10:33:00.000Z", "sampleNumber": "0011", - "pulseDuration": 120, - "dataCaptureStart": "2025-03-04T03:00:00.000Z", "experimentNumber": "0098", "configurationId": "a64870d1-4b12-4a7b-b7d6-3010f5e0f958", - "pulseEnd": "2025-03-06T10:38:00.000Z", "operator1": { "firstName": "Bob", "lastName": "Smith", @@ -20,16 +15,21 @@ "comment": "This is a test comment", "pulseQuality": "Success", "heatingInformation": { + "heatingType": "Induction", "currentType": "AC", "inputPower": 500, "inputCurrent": 100, - "inputVoltage": 5000 + "inputVoltage": 5000, + "outputCurrent": 8978 }, "coolantInformation": { + "sampleCooling": "yes", "coolantType": "Demineralised Water", "targetCoolantFlow": 19.3, - "targetCoolantTemperature": 22.3 + "targetCoolantTemperature": 22.3, + "measuredCoolantFlow": 14.3 }, + "schemaVersion": "0.0.1", "diagnostics": [ [ "CA-002", From 78e7e56dca1a6d1d9af400c1a5087fe6c953d78a Mon Sep 17 00:00:00 2001 From: khalid Date: Wed, 1 Apr 2026 09:52:37 +0100 Subject: [PATCH 3/4] fix: remove comment from pulse schema required --- ukaea-schema/facility/hive/pulse.schema.json | 1 - 1 file changed, 1 deletion(-) diff --git a/ukaea-schema/facility/hive/pulse.schema.json b/ukaea-schema/facility/hive/pulse.schema.json index bc1555c..2a6c4c3 100644 --- a/ukaea-schema/facility/hive/pulse.schema.json +++ b/ukaea-schema/facility/hive/pulse.schema.json @@ -172,7 +172,6 @@ "operator2", "heatingInformation", "coolantInformation", - "comment", "pulseQuality", "experimentNumber", "configurationId", From 2203442f2a8d0bb9d15354f4f27cb1dc35cb7687 Mon Sep 17 00:00:00 2001 From: khalid Date: Wed, 8 Apr 2026 16:40:06 +0100 Subject: [PATCH 4/4] fix: remove comment and pulseQuality from pulse schema --- ukaea-schema/facility/hive/pulse.schema.json | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/ukaea-schema/facility/hive/pulse.schema.json b/ukaea-schema/facility/hive/pulse.schema.json index 2a6c4c3..0c25472 100644 --- a/ukaea-schema/facility/hive/pulse.schema.json +++ b/ukaea-schema/facility/hive/pulse.schema.json @@ -136,15 +136,6 @@ ] } }, - "comment": { - "type": "string" - }, - "pulseQuality": { - "enum": [ - "Success", - "Fail" - ] - }, "experimentNumber": { "type": "integer" }, @@ -172,7 +163,6 @@ "operator2", "heatingInformation", "coolantInformation", - "pulseQuality", "experimentNumber", "configurationId", "diagnostics",