kotlin-jupyter-kernel 0.12.0.217__py3-none-any.whl → 0.12.0.322__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. kotlin_jupyter_kernel-0.12.0.322.dist-info/METADATA +722 -0
  2. {kotlin_jupyter_kernel-0.12.0.217.dist-info → kotlin_jupyter_kernel-0.12.0.322.dist-info}/RECORD +41 -43
  3. {kotlin_jupyter_kernel-0.12.0.217.dist-info → kotlin_jupyter_kernel-0.12.0.322.dist-info}/WHEEL +1 -1
  4. run_kotlin_kernel/config/jar_args.json +4 -3
  5. run_kotlin_kernel/jars/api-0.12.0-322.jar +0 -0
  6. run_kotlin_kernel/jars/{kotlin-jupyter-kernel-0.12.0-217-all.jar → kotlin-jupyter-kernel-0.12.0-322-all.jar} +0 -0
  7. run_kotlin_kernel/jars/{lib-0.12.0-217.jar → lib-0.12.0-322.jar} +0 -0
  8. run_kotlin_kernel/jars/slf4j-api-2.0.12.jar +0 -0
  9. run_kotlin_kernel/libraries/2p-kt.json +2 -2
  10. run_kotlin_kernel/libraries/biokotlin.json +1 -1
  11. run_kotlin_kernel/libraries/commit_sha +1 -1
  12. run_kotlin_kernel/libraries/coroutines.json +1 -1
  13. run_kotlin_kernel/libraries/dataframe.json +1 -1
  14. run_kotlin_kernel/libraries/datetime.json +1 -1
  15. run_kotlin_kernel/libraries/deeplearning4j-cuda.json +1 -1
  16. run_kotlin_kernel/libraries/deeplearning4j.json +1 -1
  17. run_kotlin_kernel/libraries/develocity-api-kotlin.json +1 -1
  18. run_kotlin_kernel/libraries/exposed.json +1 -1
  19. run_kotlin_kernel/libraries/fuel.json +1 -1
  20. run_kotlin_kernel/libraries/gradle-enterprise-api-kotlin.json +1 -1
  21. run_kotlin_kernel/libraries/intellij-sdk.json +14 -0
  22. run_kotlin_kernel/libraries/kalasim.json +1 -1
  23. run_kotlin_kernel/libraries/kaliningraph.json +5 -1
  24. run_kotlin_kernel/libraries/kandy-echarts.json +1 -1
  25. run_kotlin_kernel/libraries/kandy.json +2 -2
  26. run_kotlin_kernel/libraries/kravis.json +1 -1
  27. run_kotlin_kernel/libraries/ksl.json +48 -0
  28. run_kotlin_kernel/libraries/ktor-client.json +1 -1
  29. run_kotlin_kernel/libraries/lets-plot-gt.json +1 -1
  30. run_kotlin_kernel/libraries/lets-plot.json +4 -3
  31. run_kotlin_kernel/libraries/serialization.json +1 -1
  32. run_kotlin_kernel/libraries/smile.json +1 -1
  33. run_kotlin_kernel/libraries/webtau.json +1 -1
  34. kotlin_jupyter_kernel-0.12.0.217.dist-info/METADATA +0 -515
  35. run_kotlin_kernel/jars/api-0.12.0-217.jar +0 -0
  36. run_kotlin_kernel/libraries/CODE_OF_CONDUCT.md +0 -3
  37. run_kotlin_kernel/libraries/LICENSE +0 -202
  38. run_kotlin_kernel/libraries/README.md +0 -8
  39. run_kotlin_kernel/libraries/kotlin-statistics.json +0 -14
  40. run_kotlin_kernel/libraries/krangl.json +0 -11
  41. {kotlin_jupyter_kernel-0.12.0.217.data → kotlin_jupyter_kernel-0.12.0.322.data}/data/share/jupyter/kernels/kotlin/kernel.css +0 -0
  42. {kotlin_jupyter_kernel-0.12.0.217.data → kotlin_jupyter_kernel-0.12.0.322.data}/data/share/jupyter/kernels/kotlin/kernel.js +0 -0
  43. {kotlin_jupyter_kernel-0.12.0.217.data → kotlin_jupyter_kernel-0.12.0.322.data}/data/share/jupyter/kernels/kotlin/kernel.json +0 -0
  44. {kotlin_jupyter_kernel-0.12.0.217.data → kotlin_jupyter_kernel-0.12.0.322.data}/data/share/jupyter/kernels/kotlin/logo-16x16.png +0 -0
  45. {kotlin_jupyter_kernel-0.12.0.217.data → kotlin_jupyter_kernel-0.12.0.322.data}/data/share/jupyter/kernels/kotlin/logo-64x64.png +0 -0
  46. {kotlin_jupyter_kernel-0.12.0.217.data → kotlin_jupyter_kernel-0.12.0.322.data}/data/share/jupyter/kernels/kotlin/wavyline-orange.gif +0 -0
  47. {kotlin_jupyter_kernel-0.12.0.217.data → kotlin_jupyter_kernel-0.12.0.322.data}/data/share/jupyter/kernels/kotlin/wavyline-red.gif +0 -0
  48. {kotlin_jupyter_kernel-0.12.0.217.dist-info → kotlin_jupyter_kernel-0.12.0.322.dist-info}/top_level.txt +0 -0
@@ -1,515 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: kotlin-jupyter-kernel
3
- Version: 0.12.0.217
4
- Summary: Kotlin kernel for Jupyter notebooks
5
- Home-page: https://github.com/Kotlin/kotlin-jupyter
6
- Author: JetBrains
7
- License: Apache 2.0
8
- Platform: UNKNOWN
9
- Classifier: Framework :: Jupyter
10
- Classifier: Development Status :: 4 - Beta
11
- Classifier: Programming Language :: Kotlin
12
- Classifier: License :: OSI Approved :: Apache Software License
13
- Classifier: Intended Audience :: Science/Research
14
- Classifier: Operating System :: OS Independent
15
- Classifier: Topic :: Software Development :: Interpreters
16
- Description-Content-Type: text/markdown
17
-
18
- [![JetBrains official project](https://jb.gg/badges/official.svg)](https://confluence.jetbrains.com/display/ALL/JetBrains+on+GitHub)
19
- [![Kotlin beta stability](https://img.shields.io/badge/project-beta-kotlin.svg?colorA=555555&colorB=AC29EC&label=&logo=kotlin&logoColor=ffffff&logoWidth=10)](https://kotlinlang.org/docs/components-stability.html)
20
- [![PyPI](https://img.shields.io/pypi/v/kotlin-jupyter-kernel?label=PyPi)](https://pypi.org/project/kotlin-jupyter-kernel/)
21
- [![Anaconda](https://anaconda.org/jetbrains/kotlin-jupyter-kernel/badges/version.svg)](https://anaconda.org/jetbrains/kotlin-jupyter-kernel)
22
- [![Gradle plugin](https://img.shields.io/maven-metadata/v/https/plugins.gradle.org/m2/org/jetbrains/kotlin/kotlin-jupyter-api-gradle-plugin/maven-metadata.xml.svg?label=Gradle+plugin)](https://plugins.gradle.org/plugin/org.jetbrains.kotlin.jupyter.api)
23
- [![Maven Central](https://img.shields.io/maven-central/v/org.jetbrains.kotlinx/kotlin-jupyter-kernel?color=blue&label=Maven%20artifacts)](https://search.maven.org/search?q=kotlin-jupyter)
24
- [![GitHub](https://img.shields.io/github/license/Kotlin/kotlin-jupyter)](https://www.apache.org/licenses/LICENSE-2.0)
25
- [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/kotlin/kotlin-jupyter/master?filepath=samples)
26
-
27
- # Kotlin Kernel for IPython/Jupyter
28
-
29
- [Kotlin](https://kotlinlang.org/) (1.9.23) [kernel](https://docs.jupyter.org/en/latest/projects/kernels.html) for [Jupyter](https://jupyter.org).
30
-
31
- The kernel is a powerful engine designed to enhance your Kotlin REPL experience. It offers support for executing code cells,
32
- providing basic code completion, and analyzing errors. With the Kotlin kernel, you gain access to a range of features,
33
- including an API for handling outputs, retrieving information from previously executed code snippets,
34
- executing generic Kotlin code effortlessly, seamless integration with libraries, and more.
35
-
36
- ![Screenshot in Jupyter](images/kotlin_notebook_screenshot.png)
37
-
38
- Beta version. Tested with Jupyter Notebook, Jupyter Lab, and Jupyter Console
39
- on Windows, Ubuntu Linux, and macOS. The minimal supported versions of clients are given in the table below:
40
-
41
- | Client | Version |
42
- |:-----------------|:--------|
43
- | Jupyter Lab | 1.2.6 |
44
- | Jupyter Notebook | 6.0.3 |
45
- | Jupyter Console | 6.1.0 |
46
-
47
- To start using the Kotlin kernel for Jupyter, take a look at the [introductory guide](https://github.com/cheptsov/kotlin-jupyter-demo/blob/master/index.ipynb).
48
-
49
- Example notebooks can be found in the [samples](../samples) folder.
50
-
51
- Try samples online: [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/kotlin/kotlin-jupyter/master?filepath=samples)
52
-
53
- ## Contents
54
-
55
- <!-- Start Document Outline -->
56
-
57
- * [Installation](#installation)
58
- * [Kotlin Notebook plugin](#kotlin-notebook-plugin)
59
- * [Conda](#conda)
60
- * [Pip](#pip)
61
- * [From sources](#from-sources)
62
- * [Troubleshooting](#troubleshooting)
63
- * [Updating](#updating)
64
- * [Kotlin Notebook](#kotlin-notebook)
65
- * [Datalore](#datalore)
66
- * [Conda](#conda-1)
67
- * [Pip](#pip-1)
68
- * [Usage](#usage)
69
- * [Kotlin Notebook](#kotlin-notebook-1)
70
- * [Other clients](#other-clients)
71
- * [Creating Kernels](#creating-kernels)
72
- * [Supported functionality](#supported-functionality)
73
- * [REPL commands](#repl-commands)
74
- * [Dependencies resolving](#dependencies-resolving)
75
- * [Default repositories](#default-repositories)
76
- * [Line Magics](#line-magics)
77
- * [Supported Libraries](#supported-libraries)
78
- * [List of supported libraries:](#list-of-supported-libraries)
79
- * [Rich output](#rich-output)
80
- * [Rendering](#rendering)
81
- * [Renderers](#renderers)
82
- * [DisplayResult and Renderable](#displayresult-and-renderable)
83
- * [Text rendering](#text-rendering)
84
- * [Throwables rendering](#throwables-rendering)
85
- * [Common rendering semantics](#common-rendering-semantics)
86
- * [Autocompletion](#autocompletion)
87
- * [Error analysis](#error-analysis)
88
- * [Debugging](#debugging)
89
- * [Adding new libraries](#adding-new-libraries)
90
- * [Documentation](#documentation)
91
- * [Contributing](#contributing)
92
-
93
- <!-- End Document Outline -->
94
-
95
- ## Installation
96
-
97
- There are several ways to use the kernel:
98
-
99
- ### Kotlin Notebook plugin
100
-
101
- Simply download and use the latest version of the [Kotlin Notebook plugin](https://plugins.jetbrains.com/plugin/16340-kotlin-notebook) from the Marketplace.
102
- The Kotlin kernel is embedded in it.
103
-
104
- Check out the [blog post](https://blog.jetbrains.com/kotlin/2023/07/introducing-kotlin-notebook/) for a quick introduction to Kotlin Notebook.
105
-
106
- ### Conda
107
-
108
- If you have `conda` installed, run the following command to install the stable package version:
109
-
110
- `conda install -c jetbrains kotlin-jupyter-kernel` ([package home](https://anaconda.org/jetbrains/kotlin-jupyter-kernel))
111
-
112
- To install the conda package from the dev channel:
113
-
114
- `conda install -c jetbrains-dev kotlin-jupyter-kernel` ([package home](https://anaconda.org/jetbrains-dev/kotlin-jupyter-kernel))
115
-
116
- Uninstall: `conda remove kotlin-jupyter-kernel`
117
-
118
- ### Pip
119
-
120
- You can also install this package using `pip`:
121
-
122
- Stable:
123
- `pip install kotlin-jupyter-kernel` ([package home](https://pypi.org/project/kotlin-jupyter-kernel/))
124
-
125
- Dev:
126
- `pip install -i https://test.pypi.org/simple/ kotlin-jupyter-kernel` ([package home](https://test.pypi.org/project/kotlin-jupyter-kernel/))
127
-
128
- Uninstall: `pip uninstall kotlin-jupyter-kernel`
129
-
130
- ### From sources
131
-
132
- To install the kernel from sources, clone the repository and run the following command in the root folder:
133
-
134
- `./gradlew install`
135
-
136
- Default installation path is `~/.ipython/kernels/kotlin/`.
137
- To install to some other location use option `-PinstallPath=`, but note that Jupyter
138
- looks for the kernel specs files only in predefined places. For more detailed info
139
- see [Jupyter docs](https://jupyter-client.readthedocs.io/en/stable/kernels.html#kernel-specs).
140
-
141
- Uninstall: `./gradlew uninstall`
142
-
143
- ### Troubleshooting
144
-
145
- There could be a problem with kernel spec detection because of different
146
- python environments and installation modes. If you are using pip or conda
147
- to install the package, try running post-install fixup script:
148
- ```bash
149
- python -m kotlin_kernel fix-kernelspec-location
150
- ```
151
-
152
- This script replaces kernel specs to the "user" path where they are always detected.
153
- Don't forget to re-run this script on the kernel update.
154
-
155
- ## Updating
156
-
157
- To update the Kotlin kernel, follow the instructions below based on your installation method:
158
-
159
- ### Kotlin Notebook
160
-
161
- If you are using the Kotlin Notebook plugin, update it to the latest version
162
- within the IDE or manually download and install the latest plugin version
163
- from the [Marketplace](https://plugins.jetbrains.com/plugin/16340-kotlin-notebook).
164
-
165
- ### Datalore
166
-
167
- To update the kernel in Datalore, simply add an `environment.yml` to the Notebook files containing:
168
- ```yaml
169
- datalore-env-format-version: "0.2"
170
- datalore-package-manager: "pip"
171
- datalore-base-env: "default"
172
- dependencies:
173
- - pip:
174
- - kotlin-jupyter-kernel=={VERSION}
175
- ```
176
- where `{VERSION}` should be replaced by the latest PyPi version of the Kotlin Jupyter kernel, such as `0.11.0.198`.
177
- Stop and restart the machine afterwards.
178
-
179
- ### Conda
180
-
181
- If you have `conda` installed, just run the following command to update the stable package version:
182
-
183
- `conda update -c jetbrains kotlin-jupyter-kernel`
184
-
185
- To update the conda package from the dev channel:
186
-
187
- `conda update -c jetbrains-dev kotlin-jupyter-kernel`
188
-
189
- If you want to change to a specific version of the kernel, take the `install` command from above and add `={VERSION}` to `kotlin-jupyter-kernel` where `{VERSION}` should be replaced by the latest PyPi version of the Kotlin Jupyter kernel, such as `0.11.0.198`.
190
-
191
- For example, for the stable version:
192
-
193
- `conda install -c jetbrains kotlin-jupyter-kernel={VERSION}`
194
-
195
- ### Pip
196
-
197
- To update the kernel using Pip, simply run:
198
-
199
- Stable:
200
- `pip install kotlin-jupyter-kernel --upgrade`
201
-
202
- Dev:
203
- `pip install -i https://test.pypi.org/simple/ kotlin-jupyter-kernel --upgrade`
204
-
205
- If you want to change to a specific version of the kernel, take the `install` command from above and add `=={VERSION}` to `kotlin-jupyter-kernel` where `{VERSION}` should be replaced by the latest PyPi version of the Kotlin Jupyter kernel, such as `0.11.0.198`.
206
-
207
- For example, for the stable version:
208
-
209
- `pip install kotlin-jupyter-kernel=={VERSION} --ignore-installed`
210
-
211
- ## Usage
212
-
213
- ### Kotlin Notebook
214
-
215
- Within IDEA with installed Kotlin Notebook plugin, just open a notebook, and you're good to go.
216
-
217
- ### Other clients
218
-
219
- Run one of the following commands in console:
220
-
221
- - `jupyter console --kernel=kotlin`
222
- - `jupyter notebook`
223
- - `jupyter lab`
224
-
225
- To start using `kotlin` kernel inside Jupyter Notebook or JupyterLab create a new notebook with `kotlin` kernel.
226
-
227
- The default kernel will use the JDK pointed to by the environment variable `KOTLIN_JUPYTER_JAVA_HOME`,
228
- or `JAVA_HOME` if the first is not set.
229
-
230
- JVM arguments will be set from the environment variable `KOTLIN_JUPYTER_JAVA_OPTS` or `JAVA_OPTS` if the first is not set.
231
- Additionally, arguments from `KOTLIN_JUPYTER_JAVA_OPTS_EXTRA` will be added.
232
- Arguments are parsed using [`shlex.split`](https://docs.python.org/3/library/shlex.html).
233
-
234
- ### Creating Kernels
235
-
236
- To create a kernel for a specific JDK, JVM arguments, and environment variables, you can use the `add-kernel` script:
237
- ```bash
238
- python -m kotlin_kernel add-kernel [--name name] [--jdk jdk_home_dir] [--set-jvm-args] [--jvm-arg arg]* [--env KEY VALUE]* [--force]
239
- ```
240
- The command uses `argparse`, so `--help`, `@argfile` (you will need to escape the `@` in powershell), and `--opt=value` are all supported. `--jvm-arg=arg` in particular
241
- is needed when passing JVM arguments that start with `-`.
242
-
243
- If `jdk` not specified, `name` is required. If `name` is not specified but `jdk` is the name will be
244
- `JDK $vendor $version` detected from the JDK. Regardless, the actual name of the kernel will be `Kotlin ($name)`,
245
- and the directory will be `kotlin_$name` with the spaces in `name` replaced by underscores
246
- (so make sure it's compatible with your file system).
247
-
248
- JVM arguments are joined with a `' '`, so multiple JVM arguments in the same argument are supported.
249
- The arguments will be added to existing ones (see above section) unless `--set-jvm-args` is present, in which case they
250
- will be set to `KOTLIN_JUPYTER_JAVA_OPTS`. Note that both adding and setting work fine alongside `KOTLIN_JUPYTER_JAVA_OPTS_EXTRA`.
251
-
252
- While jupyter kernel environment variable substitutions are supported in `env`, note that if the used environment
253
- variable doesn't exist, nothing will be replaced.
254
-
255
- An example:
256
- ```bash
257
- python -m kotlin_kernel add-kernel --name "JDK 15 Big 2 GPU" --jdk ~/.jdks/openjdk-15.0.2 --jvm-arg=-Xmx8G --env CUDA_VISIBLE_DEVICES 0,1
258
- ```
259
-
260
- ## Supported functionality
261
-
262
- ### REPL commands
263
-
264
- The following REPL commands are supported:
265
- - `:help` - display help
266
- - `:classpath` - show current classpath
267
- - `:vars` - get visible variables values
268
-
269
- ### Dependencies resolving
270
-
271
- It is possible to add dynamic dependencies to the notebook using the following annotations:
272
- - `@file:DependsOn(<coordinates>)` - adds artifacts to classpath. Supports absolute and relative paths to class
273
- directories or jars, ivy and maven artifacts represented by the colon separated string
274
- - `@file:Repository(<absolute-path>)` - adds a directory for relative path resolution or ivy/maven repository.
275
- To specify Maven local, use `@file:Repository("*mavenLocal")`.
276
-
277
- Alternative way to do the same is using Gradle-like syntax:
278
-
279
- ```kotlin
280
- USE {
281
- repositories {
282
- maven {
283
- url = "https://my.secret.repo/maven/"
284
- credentials {
285
- username = USER
286
- password = TOKEN
287
- }
288
- }
289
- }
290
-
291
- dependencies {
292
- val ktorVersion = "2.0.3"
293
-
294
- implementation("my.secret:artifact:1.0-beta")
295
- implementation("io.ktor:ktor-client-core:$ktorVersion")
296
- implementation("io.ktor:ktor-client-apache:$ktorVersion")
297
- }
298
- }
299
- ```
300
-
301
- The same syntax can be used in [integrations creating](libraries.md).
302
-
303
- Note that dependencies in remote repositories are resolved via Maven resolver.
304
- Caches are stored in `~/.m2/repository` folder by default. Sometimes, due to network
305
- issues or running several artifacts resolutions in parallel, caches may get corrupted.
306
- If you have some troubles with artifacts resolution, please remove caches, restart kernel
307
- and try again.
308
-
309
- ### Default repositories
310
-
311
- The following maven repositories are included by default:
312
- - [Maven Central](https://repo.maven.apache.org/maven2)
313
- - [JitPack](https://jitpack.io/)
314
-
315
- ### Line Magics
316
-
317
- The following line magics are supported:
318
- - `%use` - injects code for supported libraries: artifact resolution, default imports, initialization code, type renderers. Usage example: `%use klaxon(5.5), lets-plot`
319
- - `%trackClasspath` - logs any changes of current classpath. Useful for debugging artifact resolution failures. Usage example: `%trackClasspath [on|off]`
320
- - `%trackExecution` - logs pieces of code that are going to be executed. Useful for debugging of libraries support. Usage example: `%trackExecution [all|generated|off]`
321
- - `%useLatestDescriptors` - use latest versions of library descriptors available. By default, bundled descriptors are used. Note that default behavior is preferred: latest descriptors versions might be not supported by current version of kernel. So if you care about stability of the notebook, avoid using this line magic. Usage example: `%useLatestDescriptors [on|off]`
322
- - `%output` - output capturing settings. Usage example: `%output --max-cell-size=1000 --no-stdout --max-time=100 --max-buffer=400`
323
- - `%logLevel` - set logging level. Usage example: `%logLevel [off|error|warn|info|debug]`
324
-
325
- See detailed info about line magics [here](magics.md).
326
-
327
- ### Supported Libraries
328
-
329
- When a library is included with `%use` keyword, the following functionality is added to the notebook:
330
- - repositories to search for library artifacts
331
- - artifact dependencies
332
- - default imports
333
- - library initialization code
334
- - renderers for special types, e.g. charts and data frames
335
-
336
- This behavior is defined by `json` library descriptor. Descriptors for all supported libraries can be found in [libraries](https://github.com/Kotlin/kotlin-jupyter-libraries) repository.
337
- A library descriptor may provide a set of properties with default values that can be overridden when library is included.
338
- The major use case for library properties is to specify a particular version of library. If descriptor has only one property, it can be
339
- defined without naming:
340
- ```
341
- %use krangl(0.10)
342
- ```
343
- If library descriptor defines more than one property, property names should be used:
344
- ```
345
- %use spark(scala=2.11.10, spark=2.4.2)
346
- ```
347
- Several libraries can be included in single `%use` statement, separated by `,`:
348
- ```
349
- %use lets-plot, krangl, mysql(8.0.15)
350
- ```
351
- You can also specify the source of library descriptor. By default, it's taken from the [libraries repository](https://github.com/Kotlin/kotlin-jupyter-libraries). If you want to try descriptor from another revision, use the following syntax:
352
- ```
353
- // Specify some git tag from this repository
354
- %use lets-plot@0.8.2.5
355
- // Specify commit sha, with more verbose syntax
356
- %use lets-plot@ref[24a040fe22335648885b106e2f4ddd63b4d49469]
357
- // Specify git ref along with library arguments
358
- %use krangl@dev(0.10)
359
- ```
360
- Note that using descriptor from specific revision is better than using `%useLatestDescriptors`.
361
-
362
- Other options are resolving library descriptor from a local file or from remote URL:
363
- ```
364
- // Load library from file
365
- %use mylib@file[/home/user/lib.json]
366
- // Load library from file: kernel will guess it's a file actually
367
- %use @/home/user/libs/lib.json
368
- // Or use another approach: specify a directory and file name without
369
- // extension (it should be JSON in such case) before it
370
- %use lib@/home/user/libs
371
- // Load library descriptor from a remote URL
372
- %use herlib@url[https://site.com/lib.json]
373
- // If your URL responds with 200(OK), you may skip `url[]` part:
374
- %use @https://site.com/lib.json
375
- // You may omit library name for file and URL resolution:
376
- %use @file[lib.json]
377
- ```
378
-
379
- #### List of supported libraries:
380
- - [2p-kt](https://github.com/gciatto/kt-math) - Kotlin Multi-Platform ecosystem for symbolic AI
381
- - [biokotlin](https://github.com/maize-genetics/BioKotlin) - BioKotlin aims to be a high-performance bioinformatics library that brings the power and speed of compiled programming languages to scripting and big data environments.
382
- - [combinatoricskt](https://github.com/shiguruikai/combinatoricskt) - A combinatorics library for Kotlin
383
- - [coroutines](https://github.com/Kotlin/kotlinx.coroutines) - Asynchronous programming and reactive streams support
384
- - [dataframe](https://github.com/Kotlin/dataframe) - Kotlin framework for structured data processing
385
- - [datetime](https://github.com/Kotlin/kotlinx-datetime) - Kotlin date/time library
386
- - [deeplearning4j](https://github.com/eclipse/deeplearning4j) - Deep learning library for the JVM
387
- - [deeplearning4j-cuda](https://github.com/eclipse/deeplearning4j) - Deep learning library for the JVM (CUDA support)
388
- - default - Default imports: dataframe and Kandy libraries
389
- - [develocity-api-kotlin](https://github.com/gabrielfeo/develocity-api-kotlin) - A library to use the Develocity API in Kotlin scripts or projects
390
- - [exposed](https://github.com/JetBrains/Exposed) - Kotlin SQL framework
391
- - [fuel](https://github.com/kittinunf/fuel) - HTTP networking library
392
- - [gradle-enterprise-api-kotlin](https://github.com/gabrielfeo/gradle-enterprise-api-kotlin) - [Deprecated: use develocity-api-kotlin] A library to use the Gradle Enterprise API in Kotlin scripts or projects
393
- - [gral](https://github.com/eseifert/gral) - Java library for displaying plots
394
- - [jdsp](https://github.com/psambit9791/jDSP) - Java library for signal processing
395
- - [jupyter-js](https://github.com/yidafu/kotlin-jupyter-js) - Experimental `%javascript`/`%typescript`/`%jsx` line magic support
396
- - [kalasim](https://www.kalasim.org) - Discrete event simulator
397
- - [kaliningraph](https://github.com/breandan/kaliningraph) - Graph library with a DSL for constructing graphs and visualizing the behavior of graph algorithms
398
- - [kandy](https://github.com/Kotlin/kandy) - Kotlin plotting DSL for Lets-Plot
399
- - [kandy-echarts](https://github.com/Kotlin/kandy) - Kotlin plotting DSL for Apache ECharts
400
- - [khttp](https://github.com/jkcclemens/khttp) - HTTP networking library
401
- - [klaxon](https://github.com/cbeust/klaxon) - JSON parser for Kotlin
402
- - [kmath](https://github.com/mipt-npm/kmath) - Experimental Kotlin algebra-based mathematical library
403
- - [kotlin-dl](https://github.com/Kotlin/kotlindl) - KotlinDL library which provides Keras-like API for deep learning
404
- - [kotlin-statistics](https://github.com/thomasnield/kotlin-statistics) - Idiomatic statistical operators for Kotlin
405
- - [krangl](https://github.com/holgerbrandl/krangl) - Kotlin DSL for data wrangling
406
- - [kraphviz](https://github.com/nidi3/graphviz-java) - Graphviz wrapper for JVM
407
- - [kravis](https://github.com/holgerbrandl/kravis) - Kotlin grammar for data visualization
408
- - [kt-math](https://github.com/gciatto/kt-math) - Kotlin multi-platform port of java.math.*
409
- - [ktor-client](https://github.com/Kotlin/kotlin-jupyter-http-util) - Asynchronous HTTP client
410
- - [lets-plot](https://github.com/JetBrains/lets-plot-kotlin) - Kotlin API for Lets-Plot: multiplatform plotting library based on Grammar of Graphics
411
- - [lets-plot-gt](https://github.com/JetBrains/lets-plot-kotlin) - Lets-Plot visualisation for GeoTools toolkit
412
- - [lib-ext](https://github.com/Kotlin/kotlin-jupyter) - Extended functionality for Jupyter kernel
413
- - [londogard-nlp-toolkit](https://github.com/londogard/londogard-nlp-toolkit) - A Natural Language Processing (NLP) toolkit for Kotlin on the JVM
414
- - [multik](https://github.com/Kotlin/multik) - Multidimensional array library for Kotlin
415
- - [mysql](https://github.com/mysql/mysql-connector-j) - MySql JDBC Connector
416
- - [openai](https://openai.com/blog/chatgpt) - OpenAI API for Jupyter Notebooks
417
- - [plotly](https://github.com/mipt-npm/plotly.kt) - [beta] Plotly.kt jupyter integration for static plots.
418
- - [plotly-server](https://github.com/mipt-npm/plotly.kt) - [beta] Plotly.kt jupyter integration for dynamic plots.
419
- - [rdkit](https://www.rdkit.org/) - Open-Source Cheminformatics Software
420
- - [reflection](https://kotlinlang.org/docs/reflection.html) - Imports for Kotlin Reflection
421
- - [roboquant](https://roboquant.org) - Algorithmic trading platform written in Kotlin
422
- - [serialization](https://github.com/Kotlin/kotlin-jupyter-http-util) - Deserialize JSON content using kotlinx.serialization and automatically generate classes for it
423
- - [smile](https://github.com/haifengl/smile) - Statistical Machine Intelligence and Learning Engine
424
- - [spark](https://github.com/JetBrains/kotlin-spark-api) - Kotlin API for Apache Spark: unified analytics engine for large-scale data processing
425
- - [spark-streaming](https://github.com/JetBrains/kotlin-spark-api) - Kotlin API for Apache Spark Streaming: scalable, high-throughput, fault-tolerant stream processing of live data streams
426
- - [webtau](https://github.com/testingisdocumenting/webtau) - WebTau end-to-end testing across layers
427
-
428
- ### Rich output
429
-
430
- By default, the return values from REPL statements are displayed in the text form. To use richer representations, e.g.
431
- to display graphics or html, it is possible to send MIME-encoded result to the client using the `MIME` helper function:
432
- ```kotlin
433
- fun MIME(vararg mimeToData: Pair<String, String>): MimeTypedResult
434
- ```
435
- E.g.:
436
- ```kotlin
437
- MIME("text/html" to "<p>Some <em>HTML</em></p>", "text/plain" to "No HTML for text clients")
438
-
439
- ```
440
- HTML outputs can also be rendered with `HTML` helper function:
441
- ```kotlin
442
- fun HTML(text: String): MimeTypedResult
443
- ```
444
-
445
- ### Rendering
446
-
447
- Rendering is a procedure of transforming of the value to the form that is appropriate for displaying in Jupyter client. Kernel supports several features that allow you to render values.
448
-
449
- #### Renderers
450
-
451
- Renderers can transform a value into another value. Library can define one or several renderers. Rendering with renderers is controlled via `RenderersProcessor`. You can access it via `notebook`. Renderers are applied until at least one renderer can be applied.
452
-
453
- #### DisplayResult and Renderable
454
-
455
- If object implements `DisplayResult` or `Renderable`, it will be rendered to output `JsonObject` via its own corresponding method.
456
-
457
- #### Text rendering
458
-
459
- Text renderers render objects to strings. Library can define one or several text renderers. Rendering with text renderers is controlled via `TextRenderersProcessor`. You can access it via `notebook`. Text renderers are applied until at least one renderer returns non-null string for a passed argument. This kind of renderers can be easily composed with each other. I.e. text renderer for iterables can render its elements with text renderers processor recursively.
460
-
461
- #### Throwables rendering
462
-
463
- Throwable renderers do the same thing as renderers do, but only for results of the cells that were not
464
- successfully executed, and some exception was generated.
465
-
466
- #### Common rendering semantics
467
-
468
- Successfully evaluated value is firstly transformed with RenderersProcessor. Resulting value is checked. If it's Renderable or DisplayResult, it is transformed into output JSON using `toJson()` method. If it's Unit, the cell won't have result at all. Otherwise, value is passed to `TextRenderersProcessor`. It tries to render the value to string using defined text renderers having in mind their priority. If all the renderers returned null, value is transformed to string using `toString()`. Resulting string is wrapped to `text/plain` MIME JSON.
469
-
470
- If the cell execution finished unsuccessfully and exception was generated, then the first applicable throwable renderer
471
- will be chosen for this exception, and exception will be passed to this renderer's `render()` method. Returned value
472
- will be displayed. If no applicable throwable renderer was found, exception message and stacktrace will be printed
473
- to stderr.
474
-
475
- ### Autocompletion
476
-
477
- Press `TAB` to get the list of suggested items for completion. In Jupyter Notebook, you don't need to press `TAB`,
478
- completion is requested automatically. Completion works for all globally defined symbols and for local symbols
479
- which were loaded into notebook during cells evaluation.
480
-
481
- ### Error analysis
482
-
483
- If you use Jupyter Notebook as Jupyter client, you will also see that compilation errors and warnings are underlined in
484
- red and in yellow correspondingly. This is achieved by kernel-level extension of Jupyter notebook which sends
485
- error-analysis requests to kernel and renders their results. If you hover the cursor over underlined text, you will get
486
- an error message which can help you to fix the error.
487
-
488
- ## Debugging
489
-
490
- 1. Run `./gradlew installDebug`. Debugger port is selected automatically.
491
- Default port is 1044, consequent ports will be used if it's in use. If you want an exact port, specify `-PdebugPort=<port>` Gradle option.
492
- 2. Run `jupyter notebook`, open the desired notebook.
493
- 3. Attach a remote debugger to JVM with corresponding port (debug port number will be printed in terminal on kernel startup).
494
-
495
- ## Adding new libraries
496
-
497
- Read [this article](libraries.md) if you want to support new `JVM` library in the kernel.
498
-
499
- ## Documentation
500
-
501
- There is a [site](https://ileasile.github.io/kotlin-jupyter-docs) with rendered KDoc comments from the codebase.
502
- If you are a library author you may be interested in `api` module
503
- (see [adding new libraries](#adding-new-libraries)). There is also a `lib` module which contains entities
504
- available from the Notebook cells and `shared-compiler` module which may be used for Jupyter REPL integration
505
- into standalone application or IDEA plugin.
506
-
507
- ## Contributing
508
-
509
- We welcome contributions to further enhance our project! If you come across any issues or have feature requests, please don't hesitate to [file an issue](https://github.com/Kotlin/kotlin-jupyter/issues).
510
-
511
- For issues specifically related to the Kotlin Notebook plugin, kindly utilize [another tracker](https://youtrack.jetbrains.com/issues/KTNB).
512
-
513
- Pull requests are highly appreciated! When submitting a pull request, please ensure that it corresponds to an existing issue. If you are planning a substantial change, we recommend discussing it with a [project maintainer](https://github.com/ileasile). You can reach out to me through [email](mailto:ilya.muradyan@jetbrains.com), [Kotlin Slack](https://kotlinlang.slack.com/archives/C05333T208Y), or [Telegram](https://t.me/ileasile). We look forward to your contributions!
514
-
515
-
Binary file
@@ -1,3 +0,0 @@
1
- ## Code of Conduct
2
-
3
- This project and the corresponding community is governed by the [JetBrains Open Source and Community Code of Conduct](https://confluence.jetbrains.com/display/ALL/JetBrains+Open+Source+and+Community+Code+of+Conduct). Please make sure you read it.