From e7927e880e84c00ee2fd561fe8b865f1031d16e4 Mon Sep 17 00:00:00 2001 From: Tony Xiang Date: Sun, 8 Dec 2024 18:59:52 +0100 Subject: [PATCH 1/2] more reproducible Signed-off-by: Tony Xiang --- .../state_estimation/middle-without-power-sensor/input.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/data/state_estimation/middle-without-power-sensor/input.json b/tests/data/state_estimation/middle-without-power-sensor/input.json index 60c774719..6790adc6c 100644 --- a/tests/data/state_estimation/middle-without-power-sensor/input.json +++ b/tests/data/state_estimation/middle-without-power-sensor/input.json @@ -20,7 +20,8 @@ {"id": 4, "node": 1, "status": 1, "type": 0, "p_specified": 9, "q_specified": 0} ], "sym_power_sensor": [ - {"id": 5, "measured_object": 3, "measured_terminal_type": 2, "power_sigma": 1, "p_measured": 10, "q_measured": 0} + {"id": 5, "measured_object": 3, "measured_terminal_type": 2, "power_sigma": 1, "p_measured": 10, "q_measured": 0}, + {"id": 9, "measured_object": 8, "measured_terminal_type": 0, "power_sigma": 1, "p_measured": 0, "q_measured": 0} ], "sym_voltage_sensor": [ {"id": 6, "measured_object": 0, "u_sigma": 1, "u_measured": 10} From 6c74e2621f32d9afce3c5ffd8f6e06980163775f Mon Sep 17 00:00:00 2001 From: Martijn Govers Date: Mon, 9 Dec 2024 08:15:17 +0100 Subject: [PATCH 2/2] fix compatibility mypy numpy==2.2.0 Signed-off-by: Martijn Govers --- tests/unit/validation/test_input_validation.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/tests/unit/validation/test_input_validation.py b/tests/unit/validation/test_input_validation.py index eab6d2ceb..aef0061b5 100644 --- a/tests/unit/validation/test_input_validation.py +++ b/tests/unit/validation/test_input_validation.py @@ -238,12 +238,14 @@ def original_data() -> dict[ComponentType, np.ndarray]: asym_voltage_sensor = initialize_array(DatasetType.input, ComponentType.asym_voltage_sensor, 4) asym_voltage_sensor["id"] = [7, 8, 9, 10] asym_voltage_sensor["measured_object"] = [2, 3, 1, 200] - asym_voltage_sensor["u_measured"] = [ - [10.5e3, 10.4e3, 10.6e3], - [np.nan, np.nan, np.nan], - [0, 0, 0], - [-1e4, 1e4, 1e4], - ] + asym_voltage_sensor["u_measured"] = np.array( + [ + [10.5e3, 10.4e3, 10.6e3], + [np.nan, np.nan, np.nan], + [0, 0, 0], + [-1e4, 1e4, 1e4], + ] + ) asym_voltage_sensor["u_sigma"] = [1.0, np.nan, 0.0, -1.0] sym_power_sensor = initialize_array(DatasetType.input, ComponentType.sym_power_sensor, 4)