diff --git a/code_setup.ipynb b/code_setup.ipynb deleted file mode 100644 index 06c347e..0000000 --- a/code_setup.ipynb +++ /dev/null @@ -1,157 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "from aiida import load_profile\n", - "\n", - "load_profile();" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# AiiDAlab Code Setup\n", - "\n", - "This page provides an interface for creating AiiDA codes on local or remote machines." - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "vscode": { - "languageId": "html" - } - }, - "outputs": [], - "source": [ - "%%html\n", - "\n", - "" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Create new code" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import ipywidgets as ipw\n", - "from aiidalab_widgets_base.computational_resources import _ResourceSetupBaseWidget\n", - "from aiidalab_widgets_base.utils import StatusHTML\n", - "\n", - "setup_message = StatusHTML(clear_after=15)\n", - "\n", - "widget = _ResourceSetupBaseWidget()\n", - "ipw.dlink(\n", - " (widget, \"message\"),\n", - " (setup_message, \"message\"),\n", - ")\n", - "\n", - "ipw.VBox(\n", - " children=[\n", - " widget,\n", - " setup_message,\n", - " ]\n", - ")" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Available codes" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "from home.code_setup import create_paginated_table, fetch_code_data\n", - "\n", - "output = ipw.Output()\n", - "\n", - "\n", - "def render():\n", - " data = fetch_code_data()\n", - " paginated_table = create_paginated_table(data)\n", - " output.clear_output()\n", - " with output:\n", - " display(paginated_table)\n", - "\n", - "\n", - "display(output)\n", - "render()" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "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", - ")" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "base", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.9.13" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -}