Skip to content

Commit aaa0d90

Browse files
don't bail on zero variance
1 parent 0216f5c commit aaa0d90

File tree

3 files changed

+2
-12
lines changed

3 files changed

+2
-12
lines changed

core/pioreactor/background_jobs/growth_rate_calculating.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -242,9 +242,6 @@ def get_precomputed_values(
242242
self.logger.error(
243243
"OD variance is zero - this suggests that the OD sensor is not working properly, or a calibration is wrong."
244244
)
245-
raise ValueError(
246-
"OD variance is zero - this suggests that the OD sensor is not working properly, or a calibration is wrong."
247-
)
248245

249246
if not self.ignore_cache:
250247
od_blank = self.get_od_blank_from_cache()

core/tests/test_growth_rate_calculating.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -190,16 +190,10 @@ def test_restart(self) -> None:
190190
config, [("od_config.photodiode_channel", "1", "90"), ("od_config.photodiode_channel", "2", "90")]
191191
):
192192
with local_persistent_storage("od_normalization_mean") as cache:
193-
cache[experiment] = json.dumps({1: 1, 2: 1})
193+
cache[experiment] = json.dumps({"1": 1.15, "2": 0.93})
194194

195195
with local_persistent_storage("od_normalization_variance") as cache:
196-
cache[experiment] = json.dumps({1: 1, 2: 1})
197-
198-
with local_persistent_storage("od_normalization_mean") as cache:
199-
cache[experiment] = '{"1": 1.15, "2": 0.93}'
200-
201-
with local_persistent_storage("od_normalization_variance") as cache:
202-
cache[experiment] = '{"1": 1, "2": 1}'
196+
cache[experiment] = json.dumps({"1": 1, "2": 1})
203197

204198
od_stream, dosing_stream = create_od_stream_from_mqtt(
205199
unit, experiment

web/pioreactorui/api.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1771,7 +1771,6 @@ def delete_experiment(experiment: str) -> ResponseReturnValue:
17711771
return {"status": "success"}, 200
17721772
else:
17731773
abort(404, f"Experiment {experiment} not found")
1774-
pass
17751774

17761775

17771776
@api.route("/experiments/latest", methods=["GET"])

0 commit comments

Comments
 (0)