From a49a4f1a7f5ede88dee8a171a035476cd4e9371c Mon Sep 17 00:00:00 2001 From: Alexander Nozik Date: Thu, 20 Jul 2023 09:13:24 +0300 Subject: [PATCH] add plotly imports --- demo/playground/notebooks/common-demo.ipynb | 65 ++++++++++++------- .../kotlin/JupyterCommonIntegration.kt | 3 + 2 files changed, 44 insertions(+), 24 deletions(-) diff --git a/demo/playground/notebooks/common-demo.ipynb b/demo/playground/notebooks/common-demo.ipynb index 165acf2d..2e4b6110 100644 --- a/demo/playground/notebooks/common-demo.ipynb +++ b/demo/playground/notebooks/common-demo.ipynb @@ -2,59 +2,76 @@ "cells": [ { "cell_type": "code", - "execution_count": null, - "outputs": [], - "source": [ - "//SessionOptions.resolveMpp = true" - ], + "execution_count": 2, "metadata": { - "collapsed": false - } - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, + "ExecuteTime": { + "end_time": "2023-07-20T06:12:13.305060400Z", + "start_time": "2023-07-20T06:12:13.011273800Z" + } + }, "outputs": [], "source": [ "@file:Repository(\"*mavenLocal\")\n", "@file:Repository(\"https://repo.kotlin.link\")\n", "@file:Repository(\"https://maven.pkg.jetbrains.space/spc/p/sci/dev\")\n", - "@file:DependsOn(\"space.kscience:visionforge-jupyter-common-jvm:0.3.0-dev-11\")\n", - "//@file:DependsOn(\"io.ktor:ktor-server-cio-jvm:2.3.0\")\n", - "//@file:DependsOn(\"io.ktor:ktor-server-websockets-jvm:2.3.0\")\n", - "//@file:DependsOn(\"io.ktor:ktor-server-cors-jvm:2.3.0\")" + "@file:DependsOn(\"space.kscience:visionforge-jupyter-common-jvm:0.3.0-dev-11\")" ] }, { "cell_type": "code", - "execution_count": null, + "execution_count": 3, "metadata": { "collapsed": false, "jupyter": { "outputs_hidden": false + }, + "ExecuteTime": { + "end_time": "2023-07-20T06:12:19.603077Z", + "start_time": "2023-07-20T06:12:19.419504300Z" } }, - "outputs": [], + "outputs": [ + { + "data": { + "text/html": "

Starting VisionForge server on http://localhost:7777

\n" + }, + "execution_count": 3, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ "vf.startServer()" ] }, { "cell_type": "code", - "execution_count": null, + "execution_count": 4, "metadata": { "collapsed": false, "jupyter": { "outputs_hidden": false + }, + "ExecuteTime": { + "end_time": "2023-07-20T06:12:21.490069100Z", + "start_time": "2023-07-20T06:12:20.694188600Z" } }, - "outputs": [], + "outputs": [ + { + "data": { + "text/html": "
\n

AAA

\n
\n \n
\n
\n \n
\n
\n\n" + }, + "execution_count": 4, + "metadata": { + "text/html": { + "isolated": true + } + }, + "output_type": "execute_result" + } + ], "source": [ - "import space.kscience.visionforge.plotly.plotly\n", - "import space.kscience.plotly.*\n", - "import space.kscience.plotly.models.*\n", - "\n", "vf.page {\n", " h1 { +\"AAA\" }\n", " vision {\n", diff --git a/visionforge-jupyter/visionforge-jupyter-common/src/jvmMain/kotlin/JupyterCommonIntegration.kt b/visionforge-jupyter/visionforge-jupyter-common/src/jvmMain/kotlin/JupyterCommonIntegration.kt index 6bca7036..54f2e266 100644 --- a/visionforge-jupyter/visionforge-jupyter-common/src/jvmMain/kotlin/JupyterCommonIntegration.kt +++ b/visionforge-jupyter/visionforge-jupyter-common/src/jvmMain/kotlin/JupyterCommonIntegration.kt @@ -33,6 +33,9 @@ public class JupyterCommonIntegration : VisionForgeIntegration(CONTEXT.visionMan "space.kscience.visionforge.solid.*", "space.kscience.tables.*", "space.kscience.dataforge.meta.*", + "space.kscience.plotly.*", + "space.kscience.plotly.models.*", + "space.kscience.visionforge.plotly.plotly" ) render { gdmlModel ->