From b3369b86a13987aa221e18351ce3204822cca02e Mon Sep 17 00:00:00 2001 From: furniturewalatkNIH <137434977+furniturewalatkNIH@users.noreply.github.com> Date: Thu, 5 Dec 2024 03:26:24 +0000 Subject: [PATCH] More debug w/o executing --- testing/test_notebooks.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/testing/test_notebooks.py b/testing/test_notebooks.py index 86bfe06..4a950be 100644 --- a/testing/test_notebooks.py +++ b/testing/test_notebooks.py @@ -24,8 +24,16 @@ def test_notebook_execution(notebook_path): with open(notebook_path) as f: nb = nbformat.read(f, as_version=4) - ep = ExecutePreprocessor(timeout=600, kernel_name='python3') # Inject parameters into the notebook via metadata nb.metadata["parameters"] = parameters - ep.preprocess(nb, {'metadata': {'path': './'}}) + + # Check if metadata is updated correctly + print("Injected Metadata:", nb.metadata.get('parameters')) + + for idx, cell in enumerate(nb.cells): + print(f"Cell {idx} Type: {cell['cell_type']}") + print(cell['source'][:100]) # Print the first 100 characters of the cell source + + #ep = ExecutePreprocessor(timeout=600, kernel_name='python3') + #ep.preprocess(nb, {'metadata': {'path': './'}})