Skip to content

Commit

Permalink
options for kernel name
Browse files Browse the repository at this point in the history
  • Loading branch information
Simcornelis committed Aug 28, 2024
1 parent 673fcdf commit 0c86b1a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions npf/types/notebook/notebook.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def prepare_notebook_export(datasets: List[tuple], all_results_df: pd.DataFrame,
cell.source = cell_template.render(variables)

if options.execute_nb:
exec_and_export_nb(nb, path)
exec_and_export_nb(nb, path, options)
else:
export_nb(nb, path)

Expand All @@ -107,7 +107,7 @@ def export_nb(nb, path: str):
print("Notebook exported to", path)


def exec_and_export_nb(nb, path: str):
def exec_and_export_nb(nb, path: str, options):
try:
ep = ExecutePreprocessor(timeout=TIMEOUT, kernel_name=options.nb_kernel)
start_time = time.time()
Expand Down Expand Up @@ -145,7 +145,7 @@ def update_notebook(path: str, new_data: str, options):
print("No cell with the 'data' tag found in the notebook.")

if options.execute_nb:
exec_and_export_nb(nb, path)
exec_and_export_nb(nb, path, options)


def has_tag(cell, tag: str) -> bool:
Expand Down

0 comments on commit 0c86b1a

Please sign in to comment.