File tree Expand file tree Collapse file tree 3 files changed +36
-1
lines changed
Expand file tree Collapse file tree 3 files changed +36
-1
lines changed Original file line number Diff line number Diff line change 11---
2- chart_key : raw_optical_density
2+ chart_key : optical_density
33data_source : od_readings # SQL table
44title : Optical density
55mqtt_topic : [od_reading/od1, od_reading/od2]
Original file line number Diff line number Diff line change 1+ ---
2+ chart_key : raw_optical_density
3+ data_source : raw_od_readings # SQL table
4+ title : Raw optical density (uncalibrated)
5+ mqtt_topic : [od_reading/raw_od1, od_reading/raw_od2]
6+ source : app
7+ payload_key : od
8+ y_axis_label : Reading
9+ interpolation : stepAfter
10+ lookback : parseFloat(config['ui.overview.settings']['raw_od_lookback_hours'])
11+ fixed_decimals : 3
12+ y_axis_domain : [0.001, 0.05] # good default for near 0 OD, but will break out after growth.
13+ down_sample : true
Original file line number Diff line number Diff line change @@ -1446,6 +1446,28 @@ def get_experiment(experiment: str) -> ResponseReturnValue:
14461446## CONFIG CONTROL
14471447
14481448
1449+ @api .route ("/unit/<pioreactor_unit>/configuration" , methods = ["GET" ])
1450+ def get_configuration_for_pioreactor_unit (pioreactor_unit : str ) -> ResponseReturnValue :
1451+ """get configuration for a pioreactor unit"""
1452+ try :
1453+ if is_testing_env ():
1454+ global_config_path = Path (env ["DOT_PIOREACTOR" ]) / "config.dev.ini"
1455+ else :
1456+ global_config_path = Path (env ["DOT_PIOREACTOR" ]) / "config.ini"
1457+
1458+ specific_config_path = Path (env ["DOT_PIOREACTOR" ]) / f"config_{ pioreactor_unit } .ini"
1459+
1460+ config_files = [global_config_path , specific_config_path ]
1461+ config = configparser .ConfigParser (strict = False )
1462+ config .read (config_files )
1463+
1464+ return {section : dict (config [section ]) for section in config .sections ()}
1465+
1466+ except Exception as e :
1467+ publish_to_error_log (str (e ), "get_configuration_for_pioreactor_unit" )
1468+ abort (400 )
1469+
1470+
14491471@api .route ("/configs/<filename>" , methods = ["GET" ])
14501472def get_config (filename : str ) -> ResponseReturnValue :
14511473 """get a specific config.ini file in the .pioreactor folder"""
You can’t perform that action at this time.
0 commit comments