Annotation driven dependency declaration for Kotlin kernel
- Dominant language
- Jupyter Notebook
- Stars
- 2.9k
- Forks
- 383
- PR merge metrics
- No merged PRs in 30d
Description
Using magic commands are common in a jupyter context, but illicit according to kotlin (and I guess java) language spec. So exporting e.g. kts scripts from a notebook, could strip all magics, which will loose all dependencies declarations. Or it could keep them, but the result would be non-compilable.
An annotation-driven configuration would be beneficial, because it's compatible with the kotlin language specs.
```
// To use a custom maven repository you can declare it with
@file:MavenRepository("imagej-releases","http://maven.imagej.net/content/repositories/releases" )
@file:DependsOnMaven("net.clearvolume:cleargl:2.0.1")
```
For example details see https://github.com/holgerbrandl/kscript#annotation-driven-script-configuration
Such an approach is implemented in the other kotlin kernel
https://github.com/ligee/kotlin-jupyter
and for scripting in
https://github.com/holgerbrandl/kscript
Clearly, having different annotations to declare dependencies across different types of scripting tooling won't give any benefits to the user, but there's a KEEP https://github.com/Kotlin/KEEP/issues/75 trying to unify these annotations. Maybe beakerx could implement the proposal once it's ready? (fyi @ligee)
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.