39
39
from pioreactor .whoami import is_testing_env
40
40
41
41
42
-
43
42
def green (string ):
44
43
return style (string , fg = "green" )
45
44
@@ -102,12 +101,14 @@ def get_metadata_from_user() -> tuple[pt.OD600, pt.OD600, pt.mL, pt.PdAngle, pt.
102
101
)
103
102
104
103
while minimum_od600 >= initial_od600 :
105
- minimum_od600 = prompt (
106
- "The minimum OD600 measurement must be less than the initial OD600 culture measurement" ,
107
- type = click .FloatRange (min = 0 , max = initial_od600 , clamp = False ),
104
+ minimum_od600 = cast (
105
+ pt .OD600 ,
106
+ prompt (
107
+ "The minimum OD600 measurement must be less than the initial OD600 culture measurement" ,
108
+ type = click .FloatRange (min = 0 , max = initial_od600 , clamp = False ),
109
+ ),
108
110
)
109
111
110
- assert isinstance (minimum_od600 , )
111
112
if minimum_od600 == 0 :
112
113
minimum_od600 = 0.01
113
114
@@ -130,8 +131,7 @@ def get_metadata_from_user() -> tuple[pt.OD600, pt.OD600, pt.mL, pt.PdAngle, pt.
130
131
# technically it's not required? we just need a specific PD channel to calibrate from.
131
132
132
133
ref_channel = config ["od_config.photodiode_channel_reverse" ]["REF" ]
133
- signal_channel = "1" if ref_channel == "2" else "2"
134
- #assert isinstance(signal_channel, pt.PdChannel)
134
+ signal_channel = cast (pt .PdChannel , "1" if ref_channel == "2" else "2" )
135
135
136
136
confirm (
137
137
green (
@@ -140,8 +140,7 @@ def get_metadata_from_user() -> tuple[pt.OD600, pt.OD600, pt.mL, pt.PdAngle, pt.
140
140
abort = True ,
141
141
default = True ,
142
142
)
143
- angle = config ["od_config.photodiode_channel" ][signal_channel ]
144
- #assert isinstance(angle, pt.PdAngle)
143
+ angle = cast (pt .PdAngle , config ["od_config.photodiode_channel" ][signal_channel ])
145
144
return initial_od600 , minimum_od600 , dilution_amount , angle , signal_channel
146
145
147
146
@@ -460,7 +459,7 @@ def save_results(
460
459
return data_blob
461
460
462
461
463
- def get_data_from_data_file (data_file : str ) -> tuple [str , str , list [float ], list [float ]]:
462
+ def get_data_from_data_file (data_file : str ) -> tuple [pt . PdChannel , pt . PdAngle , list [float ], list [float ]]:
464
463
import json
465
464
466
465
click .echo (f"Pulling data from { data_file } ..." )
0 commit comments