@@ -458,7 +458,7 @@ def shutdown_unit(pioreactor_unit: str) -> DelayedResponseReturnValue:
458458
459459
460460@api_bp .route ("/units/<pioreactor_unit>/system/utc_clock" , methods = ["GET" ])
461- def get_clocktime (pioreactor_unit : str ) -> DelayedResponseReturnValue :
461+ def get_unit_utc_clock (pioreactor_unit : str ) -> DelayedResponseReturnValue :
462462 if pioreactor_unit == UNIVERSAL_IDENTIFIER :
463463 task = broadcast_get_across_cluster ("/unit_api/system/utc_clock" )
464464 else :
@@ -467,7 +467,7 @@ def get_clocktime(pioreactor_unit: str) -> DelayedResponseReturnValue:
467467
468468
469469@api_bp .route ("/system/utc_clock" , methods = ["POST" ])
470- def set_clocktime () -> DelayedResponseReturnValue :
470+ def set_system_utc_clock () -> DelayedResponseReturnValue :
471471 # first update the leader:
472472 task1 = tasks .multicast_post (
473473 "/unit_api/system/utc_clock" , [get_leader_hostname ()], json = request .get_json ()
@@ -1451,7 +1451,7 @@ def get_all_estimators(pioreactor_unit: str) -> DelayedResponseReturnValue:
14511451
14521452
14531453@api_bp .route ("/workers/<pioreactor_unit>/zipped_calibrations" , methods = ["GET" ])
1454- def get_all_calibrations_as_yamls (pioreactor_unit : str ) -> ResponseReturnValue :
1454+ def get_zipped_calibrations (pioreactor_unit : str ) -> ResponseReturnValue :
14551455 if pioreactor_unit == UNIVERSAL_IDENTIFIER :
14561456 task = broadcast_get_across_workers ("/unit_api/zipped_calibrations" , return_raw = True )
14571457 else :
@@ -1501,7 +1501,7 @@ def get_all_calibrations_as_yamls(pioreactor_unit: str) -> ResponseReturnValue:
15011501
15021502
15031503@api_bp .route ("/units/<pioreactor_unit>/zipped_dot_pioreactor" , methods = ["GET" ])
1504- def get_entire_dot_pioreactor (pioreactor_unit : str ) -> ResponseReturnValue :
1504+ def get_zipped_dot_pioreactor (pioreactor_unit : str ) -> ResponseReturnValue :
15051505 """Download a ZIP of ~/.pioreactor from one or all workers.
15061506
15071507 - For a specific worker, fetch raw bytes from its unit_api and proxy as a download.
@@ -2038,7 +2038,7 @@ def get_app_versions(pioreactor_unit: str) -> DelayedResponseReturnValue:
20382038
20392039
20402040@api_bp .route ("/system/upload" , methods = ["POST" ])
2041- def upload () -> ResponseReturnValue :
2041+ def upload_system_file () -> ResponseReturnValue :
20422042 if (Path (os .environ ["DOT_PIOREACTOR" ]) / "DISALLOW_UI_UPLOADS" ).is_file ():
20432043 abort_with (403 , "No UI uploads allowed" )
20442044
@@ -2076,7 +2076,7 @@ def upload() -> ResponseReturnValue:
20762076
20772077
20782078@api_bp .route ("/automations/descriptors/<automation_type>" , methods = ["GET" ])
2079- def get_automation_contrib (automation_type : str ) -> ResponseReturnValue :
2079+ def get_automation_descriptors (automation_type : str ) -> ResponseReturnValue :
20802080 # security to prevent possibly reading arbitrary file
20812081 if automation_type not in {"temperature" , "dosing" , "led" }:
20822082 abort_with (
@@ -2099,17 +2099,17 @@ def get_automation_contrib(automation_type: str) -> ResponseReturnValue:
20992099 decoded_yaml = yaml_decode (file .read_bytes (), type = structs .AutomationDescriptor )
21002100 parsed_yaml [decoded_yaml .automation_name ] = decoded_yaml
21012101 except (ValidationError , DecodeError ) as e :
2102- publish_to_error_log (f"Yaml error in { Path (file ).name } : { e } " , "get_automation_contrib " )
2102+ publish_to_error_log (f"Yaml error in { Path (file ).name } : { e } " , "get_automation_descriptors " )
21032103
21042104 return attach_cache_control (jsonify (list (parsed_yaml .values ())))
21052105
21062106 except Exception as e :
2107- publish_to_error_log (str (e ), "get_automation_contrib " )
2107+ publish_to_error_log (str (e ), "get_automation_descriptors " )
21082108 abort_with (400 , str (e ))
21092109
21102110
21112111@api_bp .route ("/jobs/descriptors" , methods = ["GET" ])
2112- def get_job_contrib () -> ResponseReturnValue :
2112+ def get_job_descriptors () -> ResponseReturnValue :
21132113 try :
21142114 job_path_builtins = Path (os .environ ["DOT_PIOREACTOR" ]) / "ui" / "jobs"
21152115 job_path_plugins = Path (os .environ ["DOT_PIOREACTOR" ]) / "plugins" / "ui" / "jobs"
@@ -2123,17 +2123,17 @@ def get_job_contrib() -> ResponseReturnValue:
21232123 decoded_yaml = yaml_decode (file .read_bytes (), type = structs .BackgroundJobDescriptor )
21242124 parsed_yaml [decoded_yaml .job_name ] = decoded_yaml
21252125 except (ValidationError , DecodeError ) as e :
2126- publish_to_error_log (f"Yaml error in { Path (file ).name } : { e } " , "get_job_contrib " )
2126+ publish_to_error_log (f"Yaml error in { Path (file ).name } : { e } " , "get_job_descriptors " )
21272127
21282128 return attach_cache_control (jsonify (list (parsed_yaml .values ())))
21292129
21302130 except Exception as e :
2131- publish_to_error_log (str (e ), "get_job_contrib " )
2131+ publish_to_error_log (str (e ), "get_job_descriptors " )
21322132 abort_with (400 , str (e ))
21332133
21342134
21352135@api_bp .route ("/charts/descriptors" , methods = ["GET" ])
2136- def get_charts_contrib () -> ResponseReturnValue :
2136+ def get_chart_descriptors () -> ResponseReturnValue :
21372137 try :
21382138 chart_path_builtins = Path (os .environ ["DOT_PIOREACTOR" ]) / "ui" / "charts"
21392139 chart_path_plugins = Path (os .environ ["DOT_PIOREACTOR" ]) / "plugins" / "ui" / "charts"
@@ -2146,12 +2146,12 @@ def get_charts_contrib() -> ResponseReturnValue:
21462146 decoded_yaml = yaml_decode (file .read_bytes (), type = structs .ChartDescriptor )
21472147 parsed_yaml [decoded_yaml .chart_key ] = decoded_yaml
21482148 except (ValidationError , DecodeError ) as e :
2149- publish_to_error_log (f"Yaml error in { Path (file ).name } : { e } " , "get_charts_contrib " )
2149+ publish_to_error_log (f"Yaml error in { Path (file ).name } : { e } " , "get_chart_descriptors " )
21502150
21512151 return attach_cache_control (jsonify (list (parsed_yaml .values ())))
21522152
21532153 except Exception as e :
2154- publish_to_error_log (str (e ), "get_charts_contrib " )
2154+ publish_to_error_log (str (e ), "get_chart_descriptors " )
21552155 abort_with (400 , str (e ))
21562156
21572157
@@ -2193,7 +2193,7 @@ def get_exportable_datasets() -> ResponseReturnValue:
21932193
21942194
21952195@api_bp .route ("/datasets/exportable/<target_dataset>/preview" , methods = ["GET" ])
2196- def preview_exportable_datasets (target_dataset ) -> ResponseReturnValue :
2196+ def preview_exportable_dataset (target_dataset : str ) -> ResponseReturnValue :
21972197 builtins = sorted ((Path (os .environ ["DOT_PIOREACTOR" ]) / "exportable_datasets" ).glob ("*.y*ml" ))
21982198 plugins = sorted ((Path (os .environ ["DOT_PIOREACTOR" ]) / "plugins" / "exportable_datasets" ).glob ("*.y*ml" ))
21992199
@@ -2217,7 +2217,7 @@ def preview_exportable_datasets(target_dataset) -> ResponseReturnValue:
22172217
22182218
22192219@api_bp .route ("/datasets/exportable/export" , methods = ["POST" ])
2220- def export_datasets () -> ResponseReturnValue :
2220+ def export_exportable_datasets () -> ResponseReturnValue :
22212221 body = request .get_json ()
22222222
22232223 dataset_names : list [str ] = body ["datasets" ]
@@ -2718,7 +2718,7 @@ def update_config_file(filename: str) -> ResponseReturnValue:
27182718
27192719
27202720@api_bp .route ("/config/files/<filename>/history" , methods = ["GET" ])
2721- def get_historical_config_for (filename : str ) -> ResponseReturnValue :
2721+ def get_config_file_history (filename : str ) -> ResponseReturnValue :
27222722 configs_for_filename = query_app_db (
27232723 "SELECT filename, timestamp, data FROM config_files_histories WHERE filename=? ORDER BY timestamp DESC" ,
27242724 (filename ,),
0 commit comments