From 8fd2256e8096e77360459ae296ab17ac63b6ae34 Mon Sep 17 00:00:00 2001 From: Edan Bainglass Date: Fri, 13 Dec 2024 09:10:36 +0000 Subject: [PATCH] Simplify new code setup observation --- code_setup.ipynb | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/code_setup.ipynb b/code_setup.ipynb index 1d7947a..06c347e 100644 --- a/code_setup.ipynb +++ b/code_setup.ipynb @@ -17,8 +17,7 @@ "source": [ "# AiiDAlab Code Setup\n", "\n", - "This page provides an interface for creating AiiDA `Code` references to executable on \n", - "an AiiDA `Computer` node." + "This page provides an interface for creating AiiDA codes on local or remote machines." ] }, { @@ -122,7 +121,15 @@ "metadata": {}, "outputs": [], "source": [ - "widget.quick_setup_button.on_click(lambda _: render())" + "def on_code_setup_message_change(change):\n", + " if \"created\" in change[\"new\"]:\n", + " render()\n", + "\n", + "\n", + "widget.aiida_code_setup.observe(\n", + " on_code_setup_message_change,\n", + " \"message\",\n", + ")" ] } ],