Gathering detailed insights and metrics for jp-kernel
Gathering detailed insights and metrics for jp-kernel
Gathering detailed insights and metrics for jp-kernel
Gathering detailed insights and metrics for jp-kernel
npm install jp-kernel
Module System
Unable to determine the module system for this package.
Min. Node Version
Typescript Support
Node Version
NPM Version
22 Stars
53 Commits
14 Forks
3 Watching
3 Branches
3 Contributors
Updated on 14 Nov 2024
JavaScript (100%)
Cumulative downloads
Total Downloads
Last day
18.7%
89
Compared to previous day
Last week
-12.7%
516
Compared to previous week
Last month
13.5%
2,318
Compared to previous month
Last year
-23.3%
25,095
Compared to previous year
jp-kernel
is an npm module for implementing a
Jupyter kernel
that interacts with a Node.js session.
jp-kernel
is a spin-off library from
IJavascript, a Javascript kernel for
the Jupyter notebook. It is currently used to implement
the following kernels:
Version 2.0.0 require Node.js v6 or above so that we can use jmp@2
.
Version 1.3.0 (unpublished) use jmp@2
if compatible with the version of Node.js.
Version 1.2.0 implements message clear_output
.
Version 1.1.0 ensures metadata is defined in display_data
messages.
Version 1.0.0 (stable API) handles flag --hide-execution-result
.
Version 0.1.5 handles input_request
and input_reply
messages.
Version 0.1.4 handles display_data
and update_display_data
messages.
Version 0.1.0 depends on jmp@0.7.2
, and jmp@0.7.2
depends on zeromq
(which provides prebuilt bindings to the ZMQ library and is now maintained by
the zeromq organisation).
Version 0.0.1 is the initial release based on IJavascript v5.0.13.
The latest stable release is published on
npm
and can be installed by
running:
1npm install jp-kernel
The master branch in the github repository provides the latest development version and can be installed by:
1git clone https://github.com/n-riesco/jp-kernel.git 2cd jp-kernel 3npm install
The source code documentation generated using JSDoc can be found here.
For real examples of usage, see the source documentation for:
First of all, thank you for taking the time to contribute. Please, read CONTRIBUTING.md and use the issue tracker for any contributions: support requests, bug reports, enhancement requests, pull requests, ...
The jp-kernel
API in the initial release v0.0.1 came into existence by a
process of evolution. I want to take the opportunity that distributing
jp-kernel
as a package offers to design a new API. Below is a preview of what
I have in mind:
1class Kernel { 2 constructor(config) { 3 this.config = config; 4 5 this.executionCount = 0; 6 7 this.session = new Session({ 8 cwd: this.config.cwd, 9 parser: this.config.parser, 10 transpile: this.config.transpile, 11 }); 12 13 this._init(); 14 } 15 16 _init(initCB) {} 17 interrupt(interruptCB) {} 18 destroy(destroyCB) {} 19 restart(restartCB) {} 20 21 _onShellMessage(message) {} 22 _onControlMessage(message) {} 23 _onIOPubMessage(message) {} 24 _onHBMessage(message) {} 25}
1class KernelV4 extends Kernel { 2 onStdout(data) {} 3 onStderr(data) {} 4 onShell_xxx(request) {} 5}
1class KernelV5 extends Kernel { 2 onStdout(data) {} 3 onStderr(data) {} 4 onShell_xxx(request) {} 5}
1class Config { 2 constructor(kernelConfig) { 3 this.hideUndefined = kernelConfig.hideUndefined; 4 this.initSession = kernelConfig.initSession; 5 this.initScripts = kernelConfig.initScripts; 6 this.kernelInfoReply = kernelConfig.kernelInfoReply; 7 this.protocolVersion = kernelConfig.protocolVersion; 8 9 this.connection = kernelConfig.connection; 10 this.parser = kernelConfig.parser; 11 } 12}
1class Connection {
2 constructor(connectionConfig) {
3 this.config = connectionConfig;
4 this.socket = {
5 control: new jmp.Socket("router", scheme, key),
6 shell: new jmp.Socket("router", scheme, key),
7 iopub: new jmp.Socket("pub", scheme, key),
8 hb: zmq.createSocket("rep"),
9 };
10 }
11
12 connect(listeners) {}
13 disconnect() {}
14}
1class Parser{ 2 constructor() { 3 throw new Error("Cannot construct an abstract class"); 4 } 5 6 getIdentifier(code, position) { 7 throw new Error("Not implemented"); 8 } 9 10 validate(code) { 11 throw new Error("Not implemented"); 12 } 13}
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
Found 1/28 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2024-11-18
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More