Skip to content

Commit e99edcb

Browse files
authored
Merge pull request #155 from jahn96/jupyterlab_update
Jupyterlab 3.0 update
2 parents 4bf6ae5 + 14e2983 commit e99edcb

Some content is hidden

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

48 files changed

+4397
-1711
lines changed

.eslintignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@ node_modules
22
dist
33
coverage
44
**/*.d.ts
5-
tests
5+
tests
6+
_temp_extension

.eslintrc.js

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,25 @@ module.exports = {
66
'plugin:prettier/recommended',
77
'plugin:react/recommended'
88
],
9+
settings: {
10+
react: {
11+
createClass: "createReactClass", // Regex for Component Factory to use,
12+
// default to "createReactClass"
13+
pragma: "React", // Pragma to use, default to "React"
14+
fragment: "Fragment", // Fragment to use (may be a property of <pragma>), default to "Fragment"
15+
version: "detect", // React version. "detect" automatically picks the version you have installed.
16+
// You can also use `16.0`, `16.3`, etc, if you want to override the detected value.
17+
// default to latest and warns if missing
18+
// It will default to "detect" in the future
19+
flowVersion: "0.53" // Flow version
20+
}
21+
},
922
parser: '@typescript-eslint/parser',
1023
parserOptions: {
1124
project: 'tsconfig.json',
1225
sourceType: 'module'
1326
},
14-
plugins: ['@typescript-eslint'],
27+
plugins: ['@typescript-eslint', 'react'],
1528
rules: {
1629
'@typescript-eslint/interface-name-prefix': [
1730
'error',
@@ -31,5 +44,6 @@ module.exports = {
3144
curly: ['error', 'all'],
3245
eqeqeq: 'error',
3346
'prefer-arrow-callback': 'error'
34-
}
47+
},
48+
ignorePatterns: ['.eslintrc.js']
3549
};

.github/workflows/build.yml

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -10,24 +10,24 @@ jobs:
1010
build:
1111
runs-on: ubuntu-latest
1212
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.7'
23-
architecture: 'x64'
24-
- name: Install dependencies
25-
run: python -m pip install jupyterlab
26-
- name: Build the extension
27-
run: |
28-
jlpm
29-
jlpm run eslint:check
13+
- name: Checkout
14+
uses: actions/checkout@v2
15+
- name: Install node
16+
uses: actions/setup-node@v1
17+
with:
18+
node-version: '10.x'
19+
- name: Install Python
20+
uses: actions/setup-python@v2
21+
with:
22+
python-version: '3.7'
23+
architecture: 'x64'
24+
- name: Install dependencies
25+
run: python -m pip install jupyterlab
26+
- name: Build the extension
27+
run: |
28+
jlpm
29+
jlpm run eslint:check
30+
python -m pip install .
3031
31-
jupyter labextension install .
32-
33-
python -m jupyterlab.browser_check
32+
jupyter labextension list 2>&1 | grep -ie "jupyterlab-code-snippets.*OK"
33+
python -m jupyterlab.browser_check

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ for the frontend extension.
1717

1818
## Requirements
1919

20-
- JupyterLab >= 2.2
20+
- JupyterLab >= 3.0
2121

2222
## Install
2323

_temp_extension/.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

_temp_extension/.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+
};
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Build
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@v2
15+
- name: Install node
16+
uses: actions/setup-node@v1
17+
with:
18+
node-version: '10.x'
19+
- name: Install Python
20+
uses: actions/setup-python@v2
21+
with:
22+
python-version: '3.7'
23+
architecture: 'x64'
24+
- name: Install dependencies
25+
run: python -m pip install jupyterlab
26+
- name: Build the extension
27+
run: |
28+
jlpm
29+
jlpm run eslint:check
30+
python -m pip install .
31+
32+
jupyter labextension list 2>&1 | grep -ie "jupyterlab-code-snippets.*OK"
33+
python -m jupyterlab.browser_check

_temp_extension/.gitignore

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
*.bundle.*
2+
lib/
3+
node_modules/
4+
*.egg-info/
5+
.ipynb_checkpoints
6+
*.tsbuildinfo
7+
code_snippet/labextension
8+
9+
# Created by https://www.gitignore.io/api/python
10+
# Edit at https://www.gitignore.io/?templates=python
11+
12+
### Python ###
13+
# Byte-compiled / optimized / DLL files
14+
__pycache__/
15+
*.py[cod]
16+
*$py.class
17+
18+
# C extensions
19+
*.so
20+
21+
# Distribution / packaging
22+
.Python
23+
build/
24+
develop-eggs/
25+
dist/
26+
downloads/
27+
eggs/
28+
.eggs/
29+
lib/
30+
lib64/
31+
parts/
32+
sdist/
33+
var/
34+
wheels/
35+
pip-wheel-metadata/
36+
share/python-wheels/
37+
.installed.cfg
38+
*.egg
39+
MANIFEST
40+
41+
# PyInstaller
42+
# Usually these files are written by a python script from a template
43+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
44+
*.manifest
45+
*.spec
46+
47+
# Installer logs
48+
pip-log.txt
49+
pip-delete-this-directory.txt
50+
51+
# Unit test / coverage reports
52+
htmlcov/
53+
.tox/
54+
.nox/
55+
.coverage
56+
.coverage.*
57+
.cache
58+
nosetests.xml
59+
coverage.xml
60+
*.cover
61+
.hypothesis/
62+
.pytest_cache/
63+
64+
# Translations
65+
*.mo
66+
*.pot
67+
68+
# Scrapy stuff:
69+
.scrapy
70+
71+
# Sphinx documentation
72+
docs/_build/
73+
74+
# PyBuilder
75+
target/
76+
77+
# pyenv
78+
.python-version
79+
80+
# celery beat schedule file
81+
celerybeat-schedule
82+
83+
# SageMath parsed files
84+
*.sage.py
85+
86+
# Spyder project settings
87+
.spyderproject
88+
.spyproject
89+
90+
# Rope project settings
91+
.ropeproject
92+
93+
# Mr Developer
94+
.mr.developer.cfg
95+
.project
96+
.pydevproject
97+
98+
# mkdocs documentation
99+
/site
100+
101+
# mypy
102+
.mypy_cache/
103+
.dmypy.json
104+
dmypy.json
105+
106+
# Pyre type checker
107+
.pyre/
108+
109+
# End of https://www.gitignore.io/api/python
110+
111+
# OSX files
112+
.DS_Store

_temp_extension/.prettierignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
node_modules
2+
**/node_modules
3+
**/lib
4+
**/package.json

_temp_extension/.prettierrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"singleQuote": true
3+
}

_temp_extension/LICENSE

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
BSD 3-Clause License
2+
3+
Copyright (c) 2020, Jay Ahn, Kiran Pinnipati All rights reserved.
4+
5+
Redistribution and use in source and binary forms, with or without
6+
modification, are permitted provided that the following conditions are met:
7+
8+
* Redistributions of source code must retain the above copyright notice, this
9+
list of conditions and the following disclaimer.
10+
11+
* Redistributions in binary form must reproduce the above copyright notice,
12+
this list of conditions and the following disclaimer in the documentation
13+
and/or other materials provided with the distribution.
14+
15+
* Neither the name of the copyright holder nor the names of its
16+
contributors may be used to endorse or promote products derived from
17+
this software without specific prior written permission.
18+
19+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
23+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
25+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
26+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
27+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

_temp_extension/MANIFEST.in

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
include LICENSE
2+
include README.md
3+
include pyproject.toml
4+
include jupyter-config/code_snippet.json
5+
6+
include package.json
7+
include install.json
8+
include ts*.json
9+
include yarn.lock
10+
11+
graft code_snippet/labextension
12+
13+
# Javascript files
14+
graft src
15+
graft style
16+
prune **/node_modules
17+
prune lib
18+
19+
# Patterns to exclude from any directory
20+
global-exclude *~
21+
global-exclude *.pyc
22+
global-exclude *.pyo
23+
global-exclude .git
24+
global-exclude .ipynb_checkpoints

0 commit comments

Comments
 (0)