Skip to content

JupyterLab 2 support #38

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Apr 16, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6,638 changes: 2,848 additions & 3,790 deletions package-lock.json

Large diffs are not rendered by default.

39 changes: 20 additions & 19 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@jupyter-widgets/jupyterlab-sidecar",
"version": "0.4.0",
"version": "0.5.0",
"description": "A sidecar output widget for JupyterLab",
"keywords": [
"jupyter",
Expand Down Expand Up @@ -38,31 +38,32 @@
"watch:lib": "tsc"
},
"dependencies": {
"@jupyter-widgets/base": "^2.0.1",
"@jupyter-widgets/jupyterlab-manager": "^1.0.0",
"@jupyterlab/application": "^1.0.0"
"@jupyter-widgets/base": "^3.0.0",
"@jupyter-widgets/jupyterlab-manager": "^2.0.0",
"@jupyterlab/application": "^2.0.0",
"@lumino/coreutils": "^1.4.2"
},
"devDependencies": {
"@types/expect.js": "^0.3.29",
"@types/mocha": "^2.2.41",
"@types/node": "^8.0.17",
"@types/mocha": "^7.0.2",
"@types/node": "^13.9.2",
"expect.js": "^0.3.1",
"fs-extra": "^4.0.2",
"fs-extra": "^8.1.0",
"json-loader": "^0.5.7",
"karma": "^1.7.0",
"karma-chrome-launcher": "^2.2.0",
"karma-firefox-launcher": "^1.0.1",
"karma": "^4.4.1",
"karma-chrome-launcher": "^3.1.0",
"karma-firefox-launcher": "^1.3.0",
"karma-ie-launcher": "^1.0.0",
"karma-mocha": "^1.3.0",
"karma-mocha-reporter": "^2.2.3",
"karma-typescript": "^3.0.5",
"mkdirp": "^0.5.1",
"mocha": "^3.5.0",
"npm-run-all": "^4.1.1",
"rimraf": "^2.6.2",
"source-map-loader": "^0.2.1",
"ts-loader": "^2.3.2",
"typescript": "~3.5.2"
"karma-mocha-reporter": "^2.2.5",
"karma-typescript": "^5.0.0",
"mkdirp": "^1.0.3",
"mocha": "^7.1.1",
"npm-run-all": "^4.1.5",
"rimraf": "^3.0.2",
"source-map-loader": "^0.2.4",
"ts-loader": "^6.2.1",
"typescript": "^3.8.3"
},
"jupyterlab": {
"extension": "lib/plugin"
Expand Down
2 changes: 1 addition & 1 deletion src/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {

import {
UUID
} from '@phosphor/coreutils';
} from '@lumino/coreutils';

import {
IJupyterWidgetRegistry
Expand Down
2 changes: 1 addition & 1 deletion src/widget.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class SidecarModel extends OutputModel {

initialize(attributes: any, options: any) {
super.initialize(attributes, options);
this.widget_manager.display_model(undefined, this, {});
this.widget_manager.display_model(undefined as any, this, {});
}

static serializers : any = {
Expand Down
14 changes: 7 additions & 7 deletions tests/src/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,24 @@ import {
} from './utils.spec';

import {
ExampleModel, ExampleView
SidecarModel
} from '../../src/'


describe('Example', () => {
describe('Sidecar', () => {

describe('ExampleModel', () => {
describe('SidecarModel', () => {

it('should be createable', () => {
let model = createTestModel(ExampleModel);
expect(model).to.be.an(ExampleModel);
let model = createTestModel(SidecarModel);
expect(model).to.be.an(SidecarModel);
expect(model.get('value')).to.be('Hello World');
});

it('should be createable with a value', () => {
let state = { value: 'Foo Bar!' }
let model = createTestModel(ExampleModel, state);
expect(model).to.be.an(ExampleModel);
let model = createTestModel(SidecarModel, state);
expect(model).to.be.an(SidecarModel);
expect(model.get('value')).to.be('Foo Bar!');
});

Expand Down
2 changes: 1 addition & 1 deletion tests/src/utils.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class MockComm {
on_msg(fn: Function | null) {
this._on_msg = fn;
}
_process_msg(msg: services.KernelMessage.ICommMsg) {
_process_msg(msg: services.KernelMessage.ICommMsgMsg) {
if (this._on_msg) {
return this._on_msg(msg);
} else {
Expand Down
1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"compilerOptions": {
"declaration": true,
"esModuleInterop": true,
"noImplicitAny": true,
"noEmitOnError": true,
"noUnusedLocals": true,
Expand Down