@@ -15,7 +15,7 @@ def excel_runner(
1515 xlsx_filepath ,
1616 static_inputs : dict [str , list ],
1717 dynamic_inputs : dict [str , dict [str , float ]],
18- save_conditions : dict [str , callable ],
18+ success_conditions : dict [str , callable ],
1919 static_identifier_keys : Optional [list [str ]] = None ,
2020 result_labels : Optional [dict [str , str ]] = None ,
2121 save_dir : Optional [str ] = None ,
@@ -40,9 +40,9 @@ def excel_runner(
4040 label to describe the iteration, e.g. the name of the design element.
4141 The values are dictionaries keyed by cell references with single values which will
4242 populate the workbook for every static iteration.
43- 'save_conditions ': a dictionary keyed by cell references whose values are unary callables
43+ 'success_conditions ': a dictionary keyed by cell references whose values are unary callables
4444 which return a bool when passed the value retrieved from the workbook at the cell
45- reference during each iteration. If all callables in the 'save_conditions ' dict
45+ reference during each iteration. If all callables in the 'success_conditions ' dict
4646 return True, then that iteration of the workbook will be saved to disk. Use the
4747 create_condition_check() function in this module to quickly create such callables.
4848 'static_identifier_keys': The keys in 'static_inputs', which are not cell references,
@@ -105,7 +105,7 @@ def excel_runner(
105105 calculated_results = execute_workbook (
106106 xlsx_filepath ,
107107 cells_to_change = cells_to_change ,
108- cells_to_retrieve = list (save_conditions .keys ()),
108+ cells_to_retrieve = list (success_conditions .keys ()),
109109 sheet_idx = sheet_idx
110110 )
111111 if isinstance (result_labels , dict ):
@@ -116,7 +116,7 @@ def excel_runner(
116116 failed_results .update ({design_tag : labeled_results })
117117
118118 save_condition_acc = []
119- for result_cell_id , save_condition in save_conditions .items ():
119+ for result_cell_id , save_condition in success_conditions .items ():
120120 calculated_result = calculated_results [result_cell_id ]
121121 save_condition_acc .append (save_condition (calculated_result ))
122122 variations_progress .update (variations_task , advance = 1 )
@@ -133,7 +133,7 @@ def excel_runner(
133133 _ = execute_workbook (
134134 xlsx_filepath ,
135135 cells_to_change = cells_to_change ,
136- cells_to_retrieve = list (save_conditions .keys ()),
136+ cells_to_retrieve = list (success_conditions .keys ()),
137137 new_filepath = f"{ str (save_dir )} /{ new_filename } " ,
138138 sheet_idx = sheet_idx ,
139139 )
0 commit comments