From 3d061cda0b0c57d188707dc81f3985293570a372 Mon Sep 17 00:00:00 2001 From: lucasrodes Date: Thu, 9 May 2024 19:58:43 +0200 Subject: [PATCH] avoid notebook creation --- 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(