twosigma / twosigma/beakerx

Annotation driven dependency declaration for Kotlin kernel

Open
#6,981 4 comments 1 reaction 0 assignees View on GitHub
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.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.