From 9bf07ff39ecb2dc6885648cc84c3b164d2643f63 Mon Sep 17 00:00:00 2001 From: Dan Jones <danjon@noc.ac.uk> Date: Thu, 1 Feb 2024 17:40:04 +0000 Subject: [PATCH] lint: run black --- formats/alert.py | 10 +++++----- formats/platform_status.py | 8 +++----- tests/fixtures/schemas.py | 20 +++++++++----------- 3 files changed, 17 insertions(+), 21 deletions(-) diff --git a/formats/alert.py b/formats/alert.py index 3c13fe8..33fdfa8 100644 --- a/formats/alert.py +++ b/formats/alert.py @@ -10,7 +10,7 @@ alert_schema = { "example": "alert", "enum": ["alert"], }, - "code": { # changed from alert_ID because reasons + "code": { # changed from alert_ID because reasons "type": "integer", "description": "Alert code", "example": 345, @@ -26,10 +26,10 @@ alert_schema = { "description": "Timestamp for onboard platform status message", "example": "2022-12-21T00:00:00Z", }, - "subsystem": { # changed from suggested "source" could be device / subsystem or something + "subsystem": { # changed from suggested "source" could be device / subsystem or something "type": "string", "description": "System that generated the alert", - "example": "Onboard Fault Monitor", + "example": "Onboard Fault Monitor", }, "summary": { "type": "string", @@ -39,8 +39,8 @@ alert_schema = { "details": { "type": "string", "description": "Detailed reason for the alert ", - "example": "Discrepancy between rudder and actuator positions" + - " : Rudder Pos=10.31°, Steering Actuator Pos=28.65°, Discrepancy=18.33°", + "example": "Discrepancy between rudder and actuator positions" + + " : Rudder Pos=10.31°, Steering Actuator Pos=28.65°, Discrepancy=18.33°", }, "severity": { "type": "string", diff --git a/formats/platform_status.py b/formats/platform_status.py index cc91a54..c0c5691 100644 --- a/formats/platform_status.py +++ b/formats/platform_status.py @@ -170,9 +170,8 @@ platform_status_schema = { "description": "Battery remaining % provided by respective C2", "example": 80.2, }, - # Battery power (kw / float) - "battery_output": { # changed from battery_power + "battery_output": { # changed from battery_power "type": "number", "format": "float", "description": "Battery output in kW", @@ -180,7 +179,7 @@ platform_status_schema = { }, # Bunkers remaining capacity (litres, float) # Bunkers percentage full (percentage, float) - # battery_remaining_capacity is % full if we want both these fields + # battery_remaining_capacity is % full if we want both these fields # these names are going to cause confusion "fuel_remaining_capacity": { "type": "number", @@ -198,11 +197,10 @@ platform_status_schema = { "endurance": { "type": "number", "format": "float", - "description": "Estimate of hours of operation remaining " + "description": "Estimate of hours of operation remaining " + "based on present output or performance", "example": 7.4, }, - "sensor_config": sensor_schema, }, "required": [ diff --git a/tests/fixtures/schemas.py b/tests/fixtures/schemas.py index 6d36598..33f724e 100644 --- a/tests/fixtures/schemas.py +++ b/tests/fixtures/schemas.py @@ -592,9 +592,8 @@ platform_status_schema = { "description": "Battery remaining % provided by respective C2", "example": 80.2, }, - # Battery power (kw / float) - "battery_output": { # changed from battery_power + "battery_output": { # changed from battery_power "type": "number", "format": "float", "description": "Battery output in kW", @@ -602,7 +601,7 @@ platform_status_schema = { }, # Bunkers remaining capacity (litres, float) # Bunkers percentage full (percentage, float) - # battery_remaining_capacity is % full if we want both these fields + # battery_remaining_capacity is % full if we want both these fields # these names are going to cause confusion "fuel_remaining_capacity": { "type": "number", @@ -620,11 +619,10 @@ platform_status_schema = { "endurance": { "type": "number", "format": "float", - "description": "Estimate of hours of operation remaining " + "description": "Estimate of hours of operation remaining " + "based on present output or performance", "example": 7.4, }, - "sensor_config": sensor_schema, }, "required": [ @@ -646,7 +644,7 @@ alert_schema = { "example": "alert", "enum": ["alert"], }, - "code": { # changed from alert_ID because reasons + "code": { # changed from alert_ID because reasons "type": "integer", "description": "Alert code", "example": 345, @@ -662,10 +660,10 @@ alert_schema = { "description": "Timestamp for onboard platform status message", "example": "2022-12-21T00:00:00Z", }, - "subsystem": { # changed from suggested "source" could be device / subsystem or something + "subsystem": { # changed from suggested "source" could be device / subsystem or something "type": "string", "description": "System that generated the alert", - "example": "Onboard Fault Monitor", + "example": "Onboard Fault Monitor", }, "summary": { "type": "string", @@ -675,8 +673,8 @@ alert_schema = { "details": { "type": "string", "description": "Detailed reason for the alert ", - "example": "Discrepancy between rudder and actuator positions" + - " : Rudder Pos=10.31°, Steering Actuator Pos=28.65°, Discrepancy=18.33°", + "example": "Discrepancy between rudder and actuator positions" + + " : Rudder Pos=10.31°, Steering Actuator Pos=28.65°, Discrepancy=18.33°", }, "severity": { "type": "string", @@ -691,4 +689,4 @@ alert_schema = { "code", "severity", ], -} \ No newline at end of file +} -- GitLab