Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Commit

Permalink
Merge pull request #133 from telamonian/upgrades-for-jlab-2.0
Browse files Browse the repository at this point in the history
Upgrades for jlab 2.0
  • Loading branch information
saulshanabrook authored Apr 7, 2020
2 parents e3a6c57 + 00c4e68 commit eed4734
Show file tree
Hide file tree
Showing 31 changed files with 148 additions and 123 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
with:
node-version: "10.x"
- run: python -m pip install --upgrade pip
- run: pip install jupyterlab
- run: pip install --pre jupyterlab
- run: jlpm
- run: jlpm run lint:check
test:
Expand All @@ -26,7 +26,7 @@ jobs:
with:
node-version: "10.x"
- run: python -m pip install --upgrade pip
- run: pip install jupyterlab
- run: pip install --pre jupyterlab
- run: jlpm run build
- run: jlpm run registry &>/dev/null &
- run: jlpm run registry:init
Expand Down
2 changes: 1 addition & 1 deletion etc/eslint/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const config = {
parser: '@typescript-eslint/parser',
parserOptions: {
tsconfigRootDir: resolve(__dirname, '..', '..'),
project: 'tsconfig.json',
project: './packages/**/tsconfig.json',
ecmaFeatures: {
jsx: true
},
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"registry": "verdaccio",
"registry:init": "jlpm run registry:adduser && jlpm run registry:register",
"registry:adduser": "node ./scripts/registry.adduser.js",
"registry:register": "env NPM_USER=foo NPM_PASS=bar [email protected] NPM_REGISTRY=http://localhost:4873 NPM_SCOPE=@jupyterlab npm-cli-login && lerna exec --scope @jupyterlab/dataregistry-csvviewer-extension --scope @jupyterlab/dataregistry-registry-extension -- npm publish --registry http://localhost:4873",
"registry:register": "env NPM_USER=foo NPM_PASS=bar [email protected] NPM_REGISTRY=http://localhost:4873 NPM_SCOPE=@jupyterlab npm-cli-login && lerna exec --scope @jupyterlab/dataregistry --scope @jupyterlab/dataregistry-extension --scope @jupyterlab/dataregistry-csvviewer-extension --scope @jupyterlab/dataregistry-registry-extension -- npm publish --registry http://localhost:4873",
"test": "env JEST_PUPPETEER_CONFIG=./etc/jest/jest-puppeteer.config.js jest --runInBand --config ./etc/jest/jest.config.js",
"test:debug": "env HEADLESS=false SLOWMO=true jlpm test",
"uninstall:extensions": "jupyter labextension uninstall --all --no-build",
Expand All @@ -50,8 +50,8 @@
"@types/jest": "^24.0.19",
"@types/jest-environment-puppeteer": "^4.3.1",
"@types/puppeteer": "^1.20.2",
"@typescript-eslint/eslint-plugin": "^1.13.0",
"@typescript-eslint/parser": "^1.13.0",
"@typescript-eslint/eslint-plugin": "^2.11.0",
"@typescript-eslint/parser": "^2.11.0",
"eslint": "^6.1.0",
"eslint-config-prettier": "^6.0.0",
"eslint-plugin-prettier": "^3.1.1",
Expand Down
20 changes: 10 additions & 10 deletions packages/dataregistry-csvviewer-extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@
"bugs": {
"url": "https://github.com/jupyterlab/jupyterlab-data-explorer/issues"
},
"repository": {
"type": "git",
"url": "https://github.com/jupyterlab/jupyterlab-data-explorer.git"
},
"license": "BSD-3-Clause",
"author": "Project Jupyter",
"files": [
Expand All @@ -21,10 +25,6 @@
"directories": {
"lib": "./lib"
},
"repository": {
"type": "git",
"url": "https://github.com/jupyterlab/jupyterlab-data-explorer.git"
},
"scripts": {
"build": "tsc --build",
"clean": "rimraf lib tsconfig.tsbuildinfo",
Expand All @@ -34,15 +34,15 @@
"watch": "tsc --build --watch --listEmittedFiles"
},
"dependencies": {
"@jupyterlab/application": "^1.0.0",
"@jupyterlab/csvviewer": "^1.0.0",
"@jupyterlab/dataregistry": "^3.0.0",
"@jupyterlab/application": "^2.0.0-alpha.4",
"@jupyterlab/csvviewer": "^2.0.0-alpha.4",
"@jupyterlab/dataregistry": "^4.0.0",
"@jupyterlab/dataregistry-registry-extension": "^1.0.0",
"@phosphor/datagrid": "^0.1.10",
"@phosphor/messaging": "^1.2.3",
"@lumino/datagrid": "^0.3.0",
"@lumino/messaging": "^1.3.0",
"@lumino/widgets": "^1.9.0",
"rxjs": "^6.5.2"
},
"devDependencies": {},
"publishConfig": {
"access": "public"
},
Expand Down
20 changes: 15 additions & 5 deletions packages/dataregistry-csvviewer-extension/src/data_grid.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,13 @@
*/

import { Observable, Subscription } from 'rxjs';
import { DataGrid } from '@phosphor/datagrid';
import { Message } from '@phosphor/messaging';
import {
BasicKeyHandler,
BasicMouseHandler,
BasicSelectionModel,
DataGrid
} from '@lumino/datagrid';
import { Message } from '@lumino/messaging';
import { DSVModel } from '@jupyterlab/csvviewer';

/**
Expand Down Expand Up @@ -48,13 +53,18 @@ class CSVDataGrid extends DataGrid {
* @param data - CSV data
*/
function onData(data: string) {
if (self.model) {
(self.model as DSVModel).dispose();
if (self.dataModel) {
(self.dataModel as DSVModel).dispose();
}
self.model = new DSVModel({
self.dataModel = new DSVModel({
data: data,
delimiter: ','
});
self.keyHandler = new BasicKeyHandler();
self.mouseHandler = new BasicMouseHandler();
self.selectionModel = new BasicSelectionModel({
dataModel: self.dataModel
});
}
}

Expand Down
2 changes: 1 addition & 1 deletion packages/dataregistry-csvviewer-extension/src/datatypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/

import { DataTypeNoArgs, DataTypeStringArg } from '@jupyterlab/dataregistry';
import { Widget } from '@phosphor/widgets';
import { Widget } from '@lumino/widgets';
import { Observable } from 'rxjs';

// TODO: refactor
Expand Down
6 changes: 3 additions & 3 deletions packages/dataregistry-csvviewer-extension/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"extends": "../../tsconfig.json",
"extends": "../../tsconfigbase",
"compilerOptions": {
"outDir": "./lib",
"rootDir": "./src",
"skipLibCheck": true,
"sourceRoot": "./@jupyterlab/dataregistry-csvviewer-extension/src",
"types": ["node"]
},
"include": ["src/*"],
"exclude": ["node_modules"],
"include": ["src/**/*"],
"references": [
{
"path": "../dataregistry"
Expand Down
46 changes: 25 additions & 21 deletions packages/dataregistry-extension/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@jupyterlab/dataregistry-extension",
"version": "3.0.0",
"version": "4.0.0",
"description": "Datasets as first class entities in Juptyerlab.",
"keywords": [
"jupyter",
Expand All @@ -11,6 +11,10 @@
"bugs": {
"url": "https://github.com/jupyterlab/jupyterlab-data-explorer/issues"
},
"repository": {
"type": "git",
"url": "https://github.com/jupyterlab/jupyterlab-data-explorer.git"
},
"license": "BSD-3-Clause",
"author": "Project Jupyter",
"files": [
Expand All @@ -23,10 +27,6 @@
"directories": {
"lib": "./lib"
},
"repository": {
"type": "git",
"url": "https://github.com/jupyterlab/jupyterlab-data-explorer.git"
},
"scripts": {
"build": "tsc --build && jlpm run generateSchema",
"clean": "rimraf lib tsconfig.tsbuildinfo",
Expand All @@ -37,28 +37,32 @@
"watch": "tsc --build --watch --listEmittedFiles"
},
"dependencies": {
"@jupyterlab/application": "^1.0.0",
"@jupyterlab/apputils": "^1.0.0",
"@jupyterlab/coreutils": "^3.0.0",
"@jupyterlab/csvviewer": "^1.0.0",
"@jupyterlab/dataregistry": "^3.0.0",
"@jupyterlab/application": "^2.0.0-alpha.4",
"@jupyterlab/apputils": "^2.0.0-alpha.4",
"@jupyterlab/cells": "^2.0.0-alpha.4",
"@jupyterlab/dataregistry": "^4.0.0",
"@jupyterlab/dataregistry-registry-extension": "^1.0.0",
"@jupyterlab/docmanager": "^1.0.0",
"@jupyterlab/docregistry": "^1.0.4",
"@jupyterlab/filebrowser": "^1.0.0",
"@jupyterlab/notebook": "^1.0.0",
"@jupyterlab/rendermime": "^1.0.0",
"@jupyterlab/docmanager": "^2.0.0-alpha.4",
"@jupyterlab/docregistry": "^2.0.0-alpha.4",
"@jupyterlab/filebrowser": "^2.0.0-alpha.4",
"@jupyterlab/notebook": "^2.0.0-alpha.4",
"@jupyterlab/observables": "^3.0.0-alpha.4",
"@jupyterlab/outputarea": "^2.0.0-alpha.4",
"@jupyterlab/rendermime": "^2.0.0-alpha.4",
"@jupyterlab/services": "^5.0.0-alpha.4",
"@lumino/algorithm": "^1.2.0",
"@lumino/coreutils": "^1.3.1",
"@lumino/signaling": "^1.3.0",
"@lumino/widgets": "^1.9.0",
"@nteract/data-explorer": "7.0.1",
"@phosphor/datagrid": "^0.1.10",
"@phosphor/messaging": "^1.2.3",
"@phosphor/widgets": "^1.8.0",
"ajv": "^6.10.2",
"js-yaml": "^3.13.1",
"path": "0.12.7",
"react": "^16.8.4",
"path": "~0.12.7",
"react": "~16.8.4",
"react-inspector": "^3.0.0",
"rxjs": "^6.5.2",
"styled-components": "^4.3.2"
"styled-components": "^4.3.2",
"typestyle": "^2.0.1"
},
"devDependencies": {
"@types/js-yaml": "^3.12.1",
Expand Down
4 changes: 2 additions & 2 deletions packages/dataregistry-extension/src/active.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ import {
} from '@jupyterlab/dataregistry';
import { IRegistry } from '@jupyterlab/dataregistry-registry-extension';
import { IDocumentManager } from '@jupyterlab/docmanager';
import { Token } from '@phosphor/coreutils';
import { Widget } from '@phosphor/widgets';
import { Token } from '@lumino/coreutils';
import { Widget } from '@lumino/widgets';
import { BehaviorSubject } from 'rxjs';
import { map } from 'rxjs/operators';
import { hasURL_ } from './widgets';
Expand Down
4 changes: 2 additions & 2 deletions packages/dataregistry-extension/src/browser.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* Distributed under the terms of the 3-Clause BSD License.
*/

import * as React from 'react';
import React from 'react';
import {
ILayoutRestorer,
JupyterFrontEnd,
Expand All @@ -20,7 +20,7 @@ import {
URL_
} from '@jupyterlab/dataregistry';
import { IRegistry } from '@jupyterlab/dataregistry-registry-extension';
import { Widget } from '@phosphor/widgets';
import { Widget } from '@lumino/widgets';
import { widgetDataType, reactDataType } from './widgets';
import { IActiveDataset } from '.';
import { PhosphorWidget } from './utils';
Expand Down
4 changes: 2 additions & 2 deletions packages/dataregistry-extension/src/datatypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import { DataTypeNoArgs, DataTypeStringArg } from '@jupyterlab/dataregistry';
import { INotebookModel } from '@jupyterlab/notebook';
import { DocumentRegistry, Context } from '@jupyterlab/docregistry';
import { Widget } from '@phosphor/widgets';
import { Widget } from '@lumino/widgets';
import { Observable } from 'rxjs';

/**
Expand Down Expand Up @@ -67,7 +67,7 @@ interface Datasets {
const datatypes = {
csv: new DataTypeNoArgs<Observable<string>>('text/csv'),
datagrid: new DataTypeNoArgs<Observable<string>>(
'application/x.phosphor.datagrid'
'application/x.lumino.datagrid'
),
datasetsFile: new DataTypeNoArgs<Observable<Datasets>>(
'application/x.jupyterlab.datasets-file'
Expand Down
7 changes: 3 additions & 4 deletions packages/dataregistry-extension/src/debugger.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,17 @@ import {
JupyterFrontEndPlugin,
ILayoutRestorer
} from '@jupyterlab/application';

import { Inspector } from 'react-inspector';
import {
ReactWidget,
ICommandPalette,
MainAreaWidget,
WidgetTracker
} from '@jupyterlab/apputils';

import * as React from 'react';
import { IRegistry } from '@jupyterlab/dataregistry-registry-extension';
import { Registry, CachedObservable } from '@jupyterlab/dataregistry';
import { IRegistry } from '@jupyterlab/dataregistry-registry-extension';
import React from 'react';

import { UseBehaviorSubject } from './utils';

const id = '@jupyterlab/dataregistry-extension:data-debugger';
Expand Down
6 changes: 3 additions & 3 deletions packages/dataregistry-extension/src/explorer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
* Distributed under the terms of the 3-Clause BSD License.
*/

import * as React from 'react';
import React from 'react';
import { Observable, of, combineLatest } from 'rxjs';
import { map } from 'rxjs/operators';
import { classes } from 'typestyle';
import { Token } from '@phosphor/coreutils';
import { Widget } from '@phosphor/widgets';
import { Token } from '@lumino/coreutils';
import { Widget } from '@lumino/widgets';
import { ReactWidget } from '@jupyterlab/apputils';
import {
JupyterFrontEnd,
Expand Down
10 changes: 5 additions & 5 deletions packages/dataregistry-extension/src/file.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
* Instead have structured URL converters?
*/

import Ajv from 'ajv';
import yaml from 'js-yaml';
import {
JupyterFrontEnd,
JupyterFrontEndPlugin
Expand All @@ -29,15 +31,13 @@ import {
resolveDataType,
textDataType
} from '@jupyterlab/dataregistry';
import { Observable, of } from 'rxjs';
import { IRegistry } from '@jupyterlab/dataregistry-registry-extension';
import { Observable, of } from 'rxjs';
import { map } from 'rxjs/operators';
import * as yaml from 'js-yaml';
import { snippedDataType } from './snippets';
import * as Ajv from 'ajv';
import { labelDataType } from './explorer';

const datasetSchema = require('./datasets-file.schema.json');
import { labelDataType } from './explorer';
import { snippedDataType } from './snippets';

const ajv = new Ajv();
const validate = ajv.compile(datasetSchema);
Expand Down
2 changes: 1 addition & 1 deletion packages/dataregistry-extension/src/files.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {
URLDataType
} from '@jupyterlab/dataregistry';
import { IFileBrowserFactory } from '@jupyterlab/filebrowser';
import * as React from 'react';
import React from 'react';
import { IRegistry } from '@jupyterlab/dataregistry-registry-extension';
import { UseObservable } from './utils';
import { reactDataType } from './widgets';
Expand Down
2 changes: 1 addition & 1 deletion packages/dataregistry-extension/src/notebooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import {
import { IOutputModel } from '@jupyterlab/rendermime';
import { IRegistry } from '@jupyterlab/dataregistry-registry-extension';
import { NotebookPanel } from '@jupyterlab/notebook';
import { ReadonlyJSONObject, ReadonlyJSONValue } from '@phosphor/coreutils';
import { ReadonlyJSONObject, ReadonlyJSONValue } from '@lumino/coreutils';
import { combineLatest, defer, Observable, of, from } from 'rxjs';
import { map, switchMap, filter } from 'rxjs/operators';
import { notebookContextDataType } from './documents';
Expand Down
2 changes: 1 addition & 1 deletion packages/dataregistry-extension/src/observables.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import { Observable } from 'rxjs';
import { IObservableList, IObservableString } from '@jupyterlab/observables';
import { toArray } from '@phosphor/algorithm';
import { toArray } from '@lumino/algorithm';
import { IOutputAreaModel } from '@jupyterlab/outputarea';
import { IOutputModel } from '@jupyterlab/rendermime';

Expand Down
4 changes: 2 additions & 2 deletions packages/dataregistry-extension/src/rendermime.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ import { IActiveDataset } from './active';
import { IRenderMimeRegistry, IRenderMime } from '@jupyterlab/rendermime';
import { ReactWidget } from '@jupyterlab/apputils';
import { IRegistry } from '@jupyterlab/dataregistry-registry-extension';
import * as React from 'react';
import React from 'react';
import { OutputArea } from '@jupyterlab/outputarea';
import { PanelLayout, Panel } from '@phosphor/widgets';
import { PanelLayout, Panel } from '@lumino/widgets';
import { CodeCell } from '@jupyterlab/cells';
import { Notebook, NotebookPanel } from '@jupyterlab/notebook';
import { DatasetCompononent } from './explorer';
Expand Down
3 changes: 1 addition & 2 deletions packages/dataregistry-extension/src/tableData.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ import {
} from '@jupyterlab/dataregistry';

import NteractDataExplorer, { Props } from '@nteract/data-explorer';
import * as React from 'react';
import 'react-table/react-table.css';
import React from 'react';
import { IRegistry } from '@jupyterlab/dataregistry-registry-extension';
import { reactDataType } from './widgets';
import { Observable } from 'rxjs';
Expand Down
Loading

0 comments on commit eed4734

Please sign in to comment.