Skip to content

Commit dfa8db8

Browse files
committed
Brand new axtract file
1 parent b24f399 commit dfa8db8

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/axiomatic/axtract.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -229,20 +229,20 @@ def _add_used_vars_to_results(api_results, api_requirements):
229229
############################################################################################################
230230

231231

232-
def _find_symbol(name):
233-
matching_keys = [key for key, value in VARIABLES.items() if name in value["name"]]
232+
def _find_symbol(name, variables):
233+
matching_keys = [key for key, value in variables.items() if name in value["name"]]
234234

235235
if not matching_keys:
236236
matching_keys.append("unknown")
237237

238238
return matching_keys[0]
239239

240240

241-
def requirements_from_table(results):
241+
def requirements_from_table(results, variables):
242242
requirements = []
243243

244244
for key, value in results["values"].items():
245-
latex_symbol = _find_symbol(key)
245+
latex_symbol = _find_symbol(key, variables)
246246

247247
name = key
248248
numerical_value = value["Value"]
@@ -261,7 +261,7 @@ def requirements_from_table(results):
261261
return requirements
262262

263263

264-
def interactive_table():
264+
def interactive_table(variables):
265265
"""
266266
Creates an interactive table with a dropdown for selecting options.
267267
@@ -272,7 +272,7 @@ def interactive_table():
272272
Returns:
273273
dict: A dictionary containing user inputs for the selected rows.
274274
"""
275-
variable_dict = VARIABLES
275+
variable_dict = variables
276276
preset_options_dict = OPTION_LIST
277277
variable_names = [details["name"] for details in variable_dict.values()]
278278

0 commit comments

Comments
 (0)