Skip to content

Commit c38ed09

Browse files
authored
Merge pull request #2973 from jasongrout/jlab3
Update for JupyterLab 3
2 parents bed7b2c + cb9cabc commit c38ed09

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+2661
-1215
lines changed

.github/workflows/build.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: Build jupyterlab_widgets
2+
3+
on:
4+
push:
5+
branches: master
6+
pull_request:
7+
branches: '*'
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v1
15+
- name: Install node
16+
uses: actions/setup-node@v1
17+
with:
18+
node-version: '12.x'
19+
- name: Install Python
20+
uses: actions/setup-python@v1
21+
with:
22+
python-version: '3.8'
23+
architecture: 'x64'
24+
- name: Cache pip on Linux
25+
uses: actions/cache@v1
26+
if: startsWith(runner.os, 'Linux')
27+
with:
28+
path: ~/.cache/pip
29+
key: ${{ runner.os }}-pip-${{ matrix.python }}-${{ hashFiles('**/requirements.txt') }}
30+
restore-keys: |
31+
${{ runner.os }}-pip-${{ matrix.python }}
32+
33+
- name: Get yarn cache directory path
34+
id: yarn-cache-dir-path
35+
run: echo "::set-output name=dir::$(yarn cache dir)"
36+
- name: Cache yarn
37+
uses: actions/cache@v1
38+
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
39+
with:
40+
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
41+
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
42+
restore-keys: |
43+
${{ runner.os }}-yarn-
44+
- name: Install dependencies
45+
run: |
46+
python -m pip install --pre jupyterlab==3.0.0b7
47+
python -m pip install jupyter_packaging
48+
- name: Build the extension
49+
run: |
50+
pip install .
51+
jlpm install
52+
jlpm run build
53+
cd jupyterlab_widgets
54+
pwd
55+
pip install -e .
56+
jupyter labextension develop . --overwrite
57+
jupyter labextension list
58+
59+
python -m jupyterlab.browser_check

.travis.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ language: python
33
dist: xenial
44
python:
55
- 2.7
6-
- 3.4
7-
- 3.5
86
- 3.6
97
- 3.7
108
- 3.8

docs/source/dev_release.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ conda deactivate
1010
conda remove --all -y -n releasewidgets
1111
rm -rf ipywidgets
1212
13-
conda create -c conda-forge --override-channels -y -n releasewidgets notebook nodejs twine
13+
conda create -c conda-forge --override-channels -y -n releasewidgets jupyter_packaging notebook nodejs twine
1414
conda activate releasewidgets
1515
1616
git clone git@github.com:jupyter-widgets/ipywidgets.git

examples/web1/webpack.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ module.exports = {
1010
},
1111
module: {
1212
rules: [
13-
{ test: /\.css$/, loader: "style-loader!css-loader" },
13+
{ test: /\.css$/, use: ['style-loader', 'css-loader']},
1414
// jquery-ui loads some images
1515
{ test: /\.(jpg|png|gif)$/, use: 'file-loader' },
1616
]

examples/web2/webpack.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ module.exports = {
1010
},
1111
module: {
1212
rules: [
13-
{ test: /\.css$/, loader: "style-loader!css-loader" },
13+
{ test: /\.css$/, use: ['style-loader', 'css-loader']},
1414
{ test: /\.py$/, loader: "raw-loader" },
1515
// jquery-ui loads some images
1616
{ test: /\.(jpg|png|gif)$/, use: 'file-loader' },

examples/web3/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"@jupyter-widgets/base": "^3.0.0",
1919
"@jupyter-widgets/controls": "^2.0.0",
2020
"@jupyter-widgets/html-manager": "^0.19.0",
21-
"@jupyterlab/services": "^5.0.0-rc.0",
21+
"@jupyterlab/services": "^6.0.0-beta.7",
2222
"@lumino/widgets": "^1.3.0",
2323
"codemirror": "^5.48.0",
2424
"font-awesome": "^4.7.0",

examples/web4/webpack.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ module.exports = {
1010
},
1111
module: {
1212
rules: [
13-
{ test: /\.css$/, loader: "style-loader!css-loader" },
13+
{ test: /\.css$/, use: ['style-loader', 'css-loader']},
1414
// jquery-ui loads some images
1515
{ test: /\.(jpg|png|gif)$/, use: 'file-loader' },
1616
// required to load font-awesome
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"cookiecutter": {
3+
"author_name": "Jupyter Development Team",
4+
"python_name": "jupyterlab_widgets",
5+
"labextension_name": "@jupyter-widgets/jupyterlab-manager",
6+
"project_short_description": "A JupyterLab extension.",
7+
"has_server_extension": "n",
8+
"has_binder": "n",
9+
"repository": "https://github.com/jupyter-widgets/ipywidgets",
10+
"_template": "https://github.com/jupyterlab/extension-cookiecutter-ts"
11+
}
12+
}

jupyterlab_widgets/.eslintignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
node_modules
2+
dist
3+
coverage
4+
**/*.d.ts
5+
tests

jupyterlab_widgets/.eslintrc.js

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
module.exports = {
2+
extends: [
3+
'eslint:recommended',
4+
'plugin:@typescript-eslint/eslint-recommended',
5+
'plugin:@typescript-eslint/recommended',
6+
'plugin:prettier/recommended'
7+
],
8+
parser: '@typescript-eslint/parser',
9+
parserOptions: {
10+
project: 'tsconfig.json',
11+
sourceType: 'module'
12+
},
13+
plugins: ['@typescript-eslint'],
14+
rules: {
15+
'@typescript-eslint/interface-name-prefix': [
16+
'error',
17+
{ prefixWithI: 'always' }
18+
],
19+
'@typescript-eslint/no-unused-vars': ['warn', { args: 'none' }],
20+
'@typescript-eslint/no-explicit-any': 'off',
21+
'@typescript-eslint/no-namespace': 'off',
22+
'@typescript-eslint/no-use-before-define': 'off',
23+
'@typescript-eslint/quotes': [
24+
'error',
25+
'single',
26+
{ avoidEscape: true, allowTemplateLiterals: false }
27+
],
28+
curly: ['error', 'all'],
29+
eqeqeq: 'error',
30+
'prefer-arrow-callback': 'error'
31+
}
32+
};

0 commit comments

Comments
 (0)