Skip to content

Commit 4a4d76b

Browse files
committed
update notebook support
1 parent 82f50f7 commit 4a4d76b

File tree

7 files changed

+35
-474
lines changed

7 files changed

+35
-474
lines changed

README.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ repositories {
8181
}
8282

8383
dependencies {
84-
implementation("com.github.breandan:kotlingrad:0.4.1")
84+
implementation("com.github.breandan:kotlingrad:0.4.2")
8585
}
8686
```
8787

@@ -99,7 +99,7 @@ dependencies {
9999
<dependency>
100100
<groupId>com.github.breandan</groupId>
101101
<artifactId>kotlingrad</artifactId>
102-
<version>0.4.1</version>
102+
<version>0.4.2</version>
103103
</dependency>
104104
</project>
105105
```
@@ -109,7 +109,8 @@ dependencies {
109109
To access Kotlin∇'s notebook support, use the following line magic:
110110

111111
```
112-
%use @https://raw.githubusercontent.com/breandan/kotlingrad/master/core/kotlingrad.json
112+
@file:Repository("https://jitpack.io")
113+
@file:DependsOn("com.github.breandan:kotlingrad:0.4.2")
113114
```
114115

115116
For more information, explore the [tutorial](samples/notebooks/hello_kotlingrad.ipynb).

build.gradle.kts

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ allprojects {
2626
}
2727

2828
group = "com.github.breandan"
29-
version = "0.4.1"
29+
version = "0.4.2"
3030

3131
apply(plugin = "org.jetbrains.kotlin.jvm")
3232

core/build.gradle.kts

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ plugins {
44
`maven-publish`
55
id("shipshape")
66
idea
7-
kotlin("jupyter.api") version "0.8.3.255"
7+
kotlin("jupyter.api") version "0.8.3.268"
88
}
99

1010
// TODO: Maybe move this into the plugin somehow?

core/kotlingrad.json

-45
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,20 @@
11
package edu.umontreal.kotlingrad.api
22

3-
//import org.jetbrains.kotlinx.jupyter.api.annotations.JupyterLibrary
4-
//import org.jetbrains.kotlinx.jupyter.api.*
5-
//import org.jetbrains.kotlinx.jupyter.api.libraries.*
6-
//
7-
//@JupyterLibrary
8-
//class Integration: JupyterIntegration() {
9-
// override fun Builder.onLoaded() {
10-
// listOf(
11-
// "edu.umontreal.kotlingrad.api.*",
12-
//// "edu.mcgill.kaliningraph.*"
13-
// ).forEach { import(it) }
14-
//
15-
//// render<Fun<*>> { HTML(it.render().toString()) }
16-
//
17-
// // https://github.com/Kotlin/kotlin-jupyter/blob/master/docs/libraries.md#integration-using-kotlin-api
18-
// // https://github.com/nikitinas/dataframe/blob/master/src/main/kotlin/org/jetbrains/dataframe/jupyter/Integration.kt
19-
// // https://github.com/mipt-npm/visionforge/blob/dev/demo/jupyter-playground/src/main/kotlin/hep/dataforge/playground/VisionForgePlayGroundForJupyter.kt
20-
// }
21-
//}
3+
import org.jetbrains.kotlinx.jupyter.api.annotations.JupyterLibrary
4+
import org.jetbrains.kotlinx.jupyter.api.*
5+
import org.jetbrains.kotlinx.jupyter.api.libraries.*
6+
7+
@JupyterLibrary
8+
class Integration: JupyterIntegration() {
9+
override fun Builder.onLoaded() {
10+
listOf(
11+
"edu.umontreal.kotlingrad.api.*",
12+
).forEach { import(it) }
13+
14+
render<Fun<*>> { HTML(it.render().toString()) }
15+
16+
// https://github.com/Kotlin/kotlin-jupyter/blob/master/docs/libraries.md#integration-using-kotlin-api
17+
// https://github.com/nikitinas/dataframe/blob/master/src/main/kotlin/org/jetbrains/dataframe/jupyter/Integration.kt
18+
// https://github.com/mipt-npm/visionforge/blob/dev/demo/jupyter-playground/src/main/kotlin/hep/dataforge/playground/VisionForgePlayGroundForJupyter.kt
19+
}
20+
}

kaliningraph

0 commit comments

Comments
 (0)