From f3a7734c292a5d97e56b417723501e9ccde57f72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucas=20Rod=C3=A9s-Guirao?= Date: Thu, 9 May 2024 20:47:36 +0200 Subject: [PATCH] avoid notebook creation (#2633) --- apps/wizard/etl_steps/express.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/apps/wizard/etl_steps/express.py b/apps/wizard/etl_steps/express.py index 179cc3f82b5..2b102d3ddab 100644 --- a/apps/wizard/etl_steps/express.py +++ b/apps/wizard/etl_steps/express.py @@ -360,6 +360,12 @@ def export_metadata() -> None: st.success(f"Metadata exported to `{output_path}`.") +def remove_notebook(dataset_dir): + notebook_path = dataset_dir / "playground.ipynb" + if notebook_path.is_file(): + os.remove(notebook_path) + + ######################################################### # MAIN ################################################## ######################################################### @@ -533,6 +539,7 @@ def export_metadata() -> None: "channel": "meadow", } ) + remove_notebook(DATASET_DIR) ####################### # GARDEN ############## @@ -567,6 +574,7 @@ def export_metadata() -> None: "channel": "garden", } ) + remove_notebook(DATASET_DIR) ####################### # GRAPHER ############# @@ -581,8 +589,11 @@ def export_metadata() -> None: "channel": "grapher", } ) + remove_notebook(DATASET_DIR) - # Add to DAG + ####################### + # DAG ################# + ####################### dag_path = DAG_DIR / form.dag_file if form.add_to_dag: dag_content = add_to_dag(