Closed
Description
Currently to use DFLib with Jupyter, you need to do this at the minimum:
%maven org.dflib:dflib-jupyter:1.0.0-M22
import org.dflib.jupyter.*;
import org.dflib.*;
DFLibJupyter.init(getKernelInstance());
Would be great if only the first line above was needed, and connection to the kernel and default imports were added behind the scenes. After all, Jupyter is all about quick prototyping and experimentation.
So maybe we can support ServiceLoader
(aka META-INF/services/xyz.MyLoader
) "plugin" mechanism to allow dependencies to initialize themselves.
Other considerations
- Is there a similar mechanism in Jupyter Python to make sure we don't reinvent the wheel?
- We should be careful here. People already complain that adding the default hardcoded imports is too opinionated (is it possible to limit which java packages require no import statements? SpencerPark/IJava#156) . So likely we'll also need a new
JJ_
variable that turns off the auto-loading behavior. This also presents an opportunity to implement the currently-hardcoded imports via auto-loading that can be optionally turned off - This competes with JJAVA_STARTUP_SCRIPT and JJAVA_STARTUP_SCRIPTS_PATH functionality, however I think the solution here is better - it allows to bootstrap things per-library, not per environment (and ultimately avoid custom configuration)
Metadata
Metadata
Assignees
Labels
No labels