Skip to content

Commit 1ecd5cd

Browse files
authored
Merge pull request #47 from vidartf/cleanup
Cleanup
2 parents 8b873ef + bf711cc commit 1ecd5cd

File tree

7 files changed

+20
-14
lines changed

7 files changed

+20
-14
lines changed

.travis.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
language: python
2+
dist: xenial
3+
services:
4+
- xvfb
25
python:
3-
- 3.6
6+
- 3.7
47
sudo: false
58
addons:
69
apt_packages:
@@ -21,8 +24,6 @@ install:
2124
before_script:
2225
- |
2326
export CHROME_BIN=chromium-browser
24-
export DISPLAY=:99.0
25-
sh -e /etc/init.d/xvfb start
2627
script:
2728
- py.test
2829
- npm test
@@ -35,6 +36,8 @@ script:
3536
- pip uninstall -y ipywidgettestwidgets
3637
- pip install .
3738
- jupyter nbextension enable --py --sys-prefix ipywidgettestwidgets
39+
# Validate nbextension (enable does not use exit code):
40+
- python -c "from notebook.nbextensions import validate_nbextension; import sys; sys.exit(validate_nbextension('ipywidgettestwidgets/extension') or 0)"
3841
- pip install jupyterlab
3942
# Make sure our lab extension was installed.
4043
- jupyter labextension list

{{cookiecutter.github_project_name}}/.travis.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
language: python
22
python:
3+
- 3.7
34
- 3.6
45
- 3.5
5-
- 3.4
66
sudo: false
7+
dist: xenial
8+
services:
9+
- xvfb
710
addons:
811
apt_packages:
912
- pandoc
@@ -45,8 +48,6 @@ before_script:
4548
- |
4649
if [[ $GROUP == js ]]; then
4750
export CHROME_BIN=chromium-browser
48-
export DISPLAY=:99.0
49-
sh -e /etc/init.d/xvfb start
5051
fi
5152
git config --global user.email [email protected]
5253
git config --global user.name "Travis CI"

{{cookiecutter.github_project_name}}/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@
9090
],
9191
extras_require = {
9292
'test': [
93-
'pytest',
93+
'pytest>=3.6',
9494
'pytest-cov',
9595
'nbval',
9696
],

{{cookiecutter.github_project_name}}/src/extension.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@
88
// Some static assets may be required by the custom widget javascript. The base
99
// url for the notebook is not known at build time and is therefore computed
1010
// dynamically.
11-
(window as any).__webpack_public_path__ = document.querySelector('body')!.getAttribute('data-base-url') + 'nbextensions/{{ cookiecutter.npm_package_name }}';
11+
(window as any).__webpack_public_path__ = document.querySelector('body')!.getAttribute('data-base-url') + 'nbextensions/{{ cookiecutter.python_package_name }}';
1212

1313
export * from './index';

{{cookiecutter.github_project_name}}/tsconfig.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,10 @@
1313
"skipLibCheck": true,
1414
"sourceMap": true,
1515
"strict": true,
16-
"target": "es2015",
17-
"types": ["node"]
16+
"target": "es2015"
1817
},
19-
"include": ["src/*"]
18+
"include": [
19+
"src/**/*.ts",
20+
"src/**/*.tsx",
21+
]
2022
}

{{cookiecutter.github_project_name}}/{{cookiecutter.python_package_name}}/nbextension/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ def _jupyter_nbextension_paths():
88
return [{
99
'section': 'notebook',
1010
'src': 'nbextension/static',
11-
'dest': '{{ cookiecutter.npm_package_name }}',
12-
'require': '{{ cookiecutter.npm_package_name }}/extension'
11+
'dest': '{{ cookiecutter.python_package_name }}',
12+
'require': '{{ cookiecutter.python_package_name }}/extension'
1313
}]

{{cookiecutter.github_project_name}}/{{cookiecutter.python_package_name}}/nbextension/static/extension.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ define(function() {
66
window['requirejs'].config({
77
map: {
88
'*': {
9-
'{{ cookiecutter.npm_package_name }}': 'nbextensions/{{ cookiecutter.npm_package_name }}/index',
9+
'{{ cookiecutter.npm_package_name }}': 'nbextensions/{{ cookiecutter.python_package_name }}/index',
1010
},
1111
}
1212
});

0 commit comments

Comments
 (0)