diff --git a/docs_tofupilot/api_v1/assembly_test_with_voltage_sampling.py b/docs_tofupilot/api_v1/assembly_test_with_voltage_sampling.py index 337ebf3..3ba6708 100644 --- a/docs_tofupilot/api_v1/assembly_test_with_voltage_sampling.py +++ b/docs_tofupilot/api_v1/assembly_test_with_voltage_sampling.py @@ -15,8 +15,15 @@ def simulate_test_result(passed_prob): def esr_test(): passed = simulate_test_result(0.98) value_measured = ( - round(random.uniform(5, 10), 2) if passed else round(random.uniform(15, 20), 2) - ) + round( + random.uniform( + 5, + 10), + 2) if passed else round( + random.uniform( + 15, + 20), + 2)) return passed, value_measured, "mΩ", 5, 15 @@ -33,8 +40,15 @@ def cell_voltage_test(): def ir_test(): passed = simulate_test_result(0.98) value_measured = ( - round(random.uniform(5, 10), 2) if passed else round(random.uniform(15, 20), 2) - ) + round( + random.uniform( + 5, + 10), + 2) if passed else round( + random.uniform( + 15, + 20), + 2)) return passed, value_measured, "mΩ", 5, 15 @@ -162,16 +176,30 @@ def voltage_sampling_test(): def internal_resistance(): passed = simulate_test_result(0.98) value_measured = ( - round(random.uniform(5, 10), 2) if passed else round(random.uniform(15, 20), 2) - ) + round( + random.uniform( + 5, + 10), + 2) if passed else round( + random.uniform( + 15, + 20), + 2)) return passed, value_measured, "mΩ", 5, 15 def thermal_runaway_detection(): passed = simulate_test_result(0.98) value_measured = ( - round(random.uniform(55, 65), 2) if passed else round(random.uniform(66, 70), 2) - ) + round( + random.uniform( + 55, + 65), + 2) if passed else round( + random.uniform( + 66, + 70), + 2)) return passed, value_measured, "°C", 55, 65 @@ -188,8 +216,15 @@ def state_of_health(): def state_of_charge(): passed = simulate_test_result(0.98) value_measured = ( - round(random.uniform(40, 60), 1) if passed else round(random.uniform(25, 35), 1) - ) + round( + random.uniform( + 40, + 60), + 1) if passed else round( + random.uniform( + 25, + 35), + 1)) return passed, value_measured, "%", 40, 60 @@ -292,9 +327,12 @@ def execute_procedures(end): revision_pcb = "B" revision_assembly = "B" static_segment = "4J" - random_digits_cell = "".join([str(random.randint(0, 9)) for _ in range(5)]) - random_digits_pcb = "".join([str(random.randint(0, 9)) for _ in range(5)]) - random_digits_assembly = "".join([str(random.randint(0, 9)) for _ in range(5)]) + random_digits_cell = "".join( + [str(random.randint(0, 9)) for _ in range(5)]) + random_digits_pcb = "".join( + [str(random.randint(0, 9)) for _ in range(5)]) + random_digits_assembly = "".join( + [str(random.randint(0, 9)) for _ in range(5)]) serial_number_cell = ( f"{part_number_cell}{revision_cell}{static_segment}{random_digits_cell}" ) @@ -351,7 +389,10 @@ def execute_procedures(end): # Execute Assembly Tests with voltage sampling tests_assembly = [ (battery_connection, timedelta(seconds=0.1)), - (voltage_sampling_test, timedelta(seconds=10)), # New multi-dimensional test + ( + voltage_sampling_test, + timedelta(seconds=10), + ), # New multi-dimensional test (internal_resistance, timedelta(seconds=1)), (thermal_runaway_detection, timedelta(seconds=2)), (state_of_health, timedelta(seconds=2)),