forked from JetBrains/lets-plot-kotlin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jupyter_kotlin_kernel.txt
74 lines (49 loc) · 2.4 KB
/
jupyter_kotlin_kernel.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
Install:
--------
pip install kotlin-jupyter-kernel
Install dev:
------------
pip install -i https://test.pypi.org/simple/ kotlin-jupyter-kernel
Build and install Kernel from sources:
--------------------------------------
Github: https://github.com/Kotlin/kotlin-jupyter
./gradlew install
If built successfully it will install the kernel to: ~/.ipython/kernels/kotlin
Normally the kernel is installed to conda env.
--------
After installing kotlin kernel the "bundled" library descriptors are located in
a) After installing via "pip install":
/opt/anaconda3/envs/<env name>/lib/python3.7/site-packages/run_kotlin_kernel/libraries/
b) After installing from local sources via "./gradlew install":
~/.jupyter_kotlin/cache/libraries/
Note: If the %useLatestDescriptors "line magic" is included in Jupyter notebook,
then Kotlin kernel will pull the latest repository version of descriptors and
store them in this location:
~/.jupyter_kotlin/cache/
--------
Lets-Plot descriptor:
lets-plot.json (and lets-plot-gt.json)
- edit descriptor: to conduct local experiments.
- remove descriptor: force the kernel to pull current published version of descriptor from 'master' at https://github.com/Kotlin/kotlin-jupyter.
--------
In notebook
:classpath - shows all resolved jars.
%useLatestDescriptors - will force Kotlin Kernel to pull and apply the latest repository version of all library descriptors.
Descriptors location:
~/.jupyter_kotlin/cache
Otherwise, Kotlin Kernel uses 'bundled' descriptors installed to:
/opt/anaconda3/envs/<env name>/lib/python3.7/site-packages/run_kotlin_kernel/libraries
--------
Conducting experiments with Kotlin Kernel locally.
- Publish artifacts to the local dev-repo:
$ ./gradlew publishLetsPlotKotlinKernelPublicationToMavenLocalRepository
$ ./gradlew publishLetsPlotKotlinGeoToolsPublicationToMavenLocalRepository
It will publish "lets-plot-kotlin-api-kernel-<version>" artifact to the "<project root>/.maven-publish-dev-repo/" folder.
- edit "lets-plot.json" (see info above about its location):
- add Maven Local repository:
"repositories": [
"file://<path to the project root>/.maven-publish-dev-repo"
],
- configure the artifact version.
Note: when editing descriptor in "~/.jupyter_kotlin/cache" always check that you are using the latest descriptor.
The kernel can download a newer descriptor at any moment.