Update jupyter integration

This commit is contained in:
Alexander Nozik 2023-11-08 21:01:42 +03:00
parent 0c128bce36
commit fe98a836f8
4 changed files with 13 additions and 11 deletions

View File

@ -13,7 +13,7 @@ val xodusVersion by extra("2.0.1")
allprojects { allprojects {
group = "space.kscience" group = "space.kscience"
version = "0.3.0-dev-1" version = "0.3.0-dev-2"
repositories{ repositories{
maven("https://maven.pkg.jetbrains.space/spc/p/sci/dev") maven("https://maven.pkg.jetbrains.space/spc/p/sci/dev")
} }

View File

@ -1,5 +1,6 @@
plugins { plugins {
id("space.kscience.gradle.mpp") id("space.kscience.gradle.mpp")
`maven-publish`
} }
val visionforgeVersion: String by rootProject.extra val visionforgeVersion: String by rootProject.extra
@ -8,7 +9,7 @@ kscience {
fullStack("js/controls-jupyter.js") fullStack("js/controls-jupyter.js")
useKtor() useKtor()
useContextReceivers() useContextReceivers()
jupyterLibrary() jupyterLibrary("space.kscience.controls.jupyter.ControlsJupyter")
dependencies { dependencies {
implementation(projects.controlsVision) implementation(projects.controlsVision)
implementation("space.kscience:visionforge-jupyter:$visionforgeVersion") implementation("space.kscience:visionforge-jupyter:$visionforgeVersion")

View File

@ -1,3 +1,5 @@
package space.kscience.controls.jupyter
import org.jetbrains.kotlinx.jupyter.api.declare import org.jetbrains.kotlinx.jupyter.api.declare
import org.jetbrains.kotlinx.jupyter.api.libraries.resources import org.jetbrains.kotlinx.jupyter.api.libraries.resources
import space.kscience.controls.manager.ClockManager import space.kscience.controls.manager.ClockManager
@ -5,13 +7,11 @@ import space.kscience.controls.manager.DeviceManager
import space.kscience.dataforge.context.Context import space.kscience.dataforge.context.Context
import space.kscience.dataforge.misc.DFExperimental import space.kscience.dataforge.misc.DFExperimental
import space.kscience.plotly.Plot import space.kscience.plotly.Plot
import space.kscience.tables.Table
import space.kscience.visionforge.jupyter.VisionForge import space.kscience.visionforge.jupyter.VisionForge
import space.kscience.visionforge.jupyter.VisionForgeIntegration import space.kscience.visionforge.jupyter.VisionForgeIntegration
import space.kscience.visionforge.markup.MarkupPlugin import space.kscience.visionforge.markup.MarkupPlugin
import space.kscience.visionforge.plotly.PlotlyPlugin import space.kscience.visionforge.plotly.PlotlyPlugin
import space.kscience.visionforge.plotly.asVision import space.kscience.visionforge.plotly.asVision
import space.kscience.visionforge.tables.toVision
import space.kscience.visionforge.visionManager import space.kscience.visionforge.visionManager
@ -34,7 +34,7 @@ public class ControlsJupyter : VisionForgeIntegration(CONTEXT.visionManager) {
"kotlin.time.*", "kotlin.time.*",
"kotlin.time.Duration.Companion.milliseconds", "kotlin.time.Duration.Companion.milliseconds",
"kotlin.time.Duration.Companion.seconds", "kotlin.time.Duration.Companion.seconds",
"space.kscience.tables.*", // "space.kscience.tables.*",
"space.kscience.dataforge.meta.*", "space.kscience.dataforge.meta.*",
"space.kscience.dataforge.context.*", "space.kscience.dataforge.context.*",
"space.kscience.plotly.*", "space.kscience.plotly.*",
@ -46,11 +46,11 @@ public class ControlsJupyter : VisionForgeIntegration(CONTEXT.visionManager) {
"space.kscience.controls.spec.*" "space.kscience.controls.spec.*"
) )
render<Table<*>> { table -> // render<Table<*>> { table ->
vf.produceHtml { // vf.produceHtml {
vision { table.toVision() } // vision { table.toVision() }
} // }
} // }
render<Plot> { plot -> render<Plot> { plot ->
vf.produceHtml { vf.produceHtml {

View File

@ -18,7 +18,8 @@ kscience {
api(projects.controlsConstructor) api(projects.controlsConstructor)
api("space.kscience:visionforge-plotly:$visionforgeVersion") api("space.kscience:visionforge-plotly:$visionforgeVersion")
api("space.kscience:visionforge-markdown:$visionforgeVersion") api("space.kscience:visionforge-markdown:$visionforgeVersion")
api("space.kscience:visionforge-tables:$visionforgeVersion") // api("space.kscience:tables-kt:0.2.1")
// api("space.kscience:visionforge-tables:$visionforgeVersion")
} }
jvmMain{ jvmMain{