From e3f8978051ea9fa080492f102a4ce630032380d7 Mon Sep 17 00:00:00 2001 From: Alexander Nozik Date: Wed, 17 Mar 2021 08:57:54 +0300 Subject: [PATCH] Fix entry point names --- build.gradle.kts | 7 ++-- examples/src/main/kotlin/plots3d/scatter3d.kt | 18 ++++++++++ examples/src/main/kotlin/plots3d/surface3d.kt | 35 +++++++++++++++++++ fx-demo/build.gradle.kts | 2 +- plotlykt-script/build.gradle.kts | 2 +- settings.gradle.kts | 4 +-- 6 files changed, 61 insertions(+), 7 deletions(-) create mode 100644 examples/src/main/kotlin/plots3d/scatter3d.kt create mode 100644 examples/src/main/kotlin/plots3d/surface3d.kt diff --git a/build.gradle.kts b/build.gradle.kts index cce49760..3e5628dc 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -4,7 +4,7 @@ plugins { id("ru.mipt.npm.gradle.project") } -val dataforgeVersion by extra("0.4.0-dev-1") +val dataforgeVersion by extra("0.4.0-dev-2") allprojects { group = "space.kscience" @@ -25,8 +25,9 @@ apiValidation { } ksciencePublish{ - githubProject = "plotly.kt" - spaceRepo = "https://maven.pkg.jetbrains.space/mipt-npm/p/sci/maven" + github("plotly.kt") + space() + sonatype() } readme { diff --git a/examples/src/main/kotlin/plots3d/scatter3d.kt b/examples/src/main/kotlin/plots3d/scatter3d.kt new file mode 100644 index 00000000..13cbaafc --- /dev/null +++ b/examples/src/main/kotlin/plots3d/scatter3d.kt @@ -0,0 +1,18 @@ +package plots3d + +import space.kscience.dataforge.meta.set +import space.kscience.plotly.Plotly +import space.kscience.plotly.makeFile +import space.kscience.plotly.trace + +fun main() { + val plot = Plotly.plot { + trace { + set("type","scatter3d") + x(1,2,3) + y(1,2,3) + z(1,2,3) + } + } + plot.makeFile() +} \ No newline at end of file diff --git a/examples/src/main/kotlin/plots3d/surface3d.kt b/examples/src/main/kotlin/plots3d/surface3d.kt new file mode 100644 index 00000000..c2f09b79 --- /dev/null +++ b/examples/src/main/kotlin/plots3d/surface3d.kt @@ -0,0 +1,35 @@ +package plots3d + +import space.kscience.dataforge.meta.set +import space.kscience.dataforge.values.asValue +import space.kscience.plotly.Plotly +import space.kscience.plotly.makeFile +import space.kscience.plotly.trace + +private fun l(vararg numbers: Number) = numbers.map { it.asValue() }.asValue() + +fun main() { + val plot = Plotly.plot { + trace { + z.value = listOf( + l(8.83, 8.89, 8.81, 8.87, 8.9, 8.87), + l(8.89, 8.94, 8.85, 8.94, 8.96, 8.92), + l(8.84, 8.9, 8.82, 8.92, 8.93, 8.91), + l(8.79, 8.85, 8.79, 8.9, 8.94, 8.92), + l(8.79, 8.88, 8.81, 8.9, 8.95, 8.92), + l(8.8, 8.82, 8.78, 8.91, 8.94, 8.92), + l(8.75, 8.78, 8.77, 8.91, 8.95, 8.92), + l(8.8, 8.8, 8.77, 8.91, 8.95, 8.94), + l(8.74, 8.81, 8.76, 8.93, 8.98, 8.99), + l(8.89, 8.99, 8.92, 9.1, 9.13, 9.11), + l(8.97, 8.97, 8.91, 9.09, 9.11, 9.11), + l(9.04, 9.08, 9.05, 9.25, 9.28, 9.27), + l(9, 9.01, 9, 9.2, 9.23, 9.2), + l(8.99, 8.99, 8.98, 9.18, 9.2, 9.19), + l(8.93, 8.97, 8.97, 9.18, 9.2, 9.18) + ).asValue() + set("type", "surface") + } + } + plot.makeFile() +} \ No newline at end of file diff --git a/fx-demo/build.gradle.kts b/fx-demo/build.gradle.kts index 0ec5fa7c..41f93259 100644 --- a/fx-demo/build.gradle.kts +++ b/fx-demo/build.gradle.kts @@ -26,7 +26,7 @@ javafx{ } application { - mainClassName = "kscience.plotly.fx.PlotlyFXAppKt" + mainClassName = "space.kscience.plotly.fx.PlotlyFXAppKt" } val compileKotlin: KotlinCompile by tasks diff --git a/plotlykt-script/build.gradle.kts b/plotlykt-script/build.gradle.kts index 16a451d4..e3a29986 100644 --- a/plotlykt-script/build.gradle.kts +++ b/plotlykt-script/build.gradle.kts @@ -25,5 +25,5 @@ dependencies { } application{ - mainClassName = "kscience.plotly.script.CliKt" + mainClassName = "space.kscience.plotly.script.CliKt" } \ No newline at end of file diff --git a/settings.gradle.kts b/settings.gradle.kts index 04f17cd6..9c809f9c 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -1,6 +1,6 @@ pluginManagement { val kotlinVersion = "1.4.31" - val toolsVersion = "0.8.4" + val toolsVersion = "0.9.1" repositories { maven("https://repo.kotlin.link") @@ -17,7 +17,7 @@ pluginManagement { id("ru.mipt.npm.gradle.jvm") version toolsVersion id("ru.mipt.npm.gradle.js") version toolsVersion id("ru.mipt.npm.gradle.publish") version toolsVersion - kotlin("jupyter.api") version "0.8.3.236" + kotlin("jupyter.api") version "0.8.3.281" kotlin("jvm") version kotlinVersion kotlin("js") version kotlinVersion kotlin("multiplatform") version kotlinVersion