Skip to content
This repository has been archived by the owner on Jan 26, 2022. It is now read-only.

Update to JupyterLab 1.1 #35

Merged
merged 1 commit into from
Sep 2, 2019
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
20 changes: 10 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,15 @@
"watch": "tsc -b --watch"
},
"dependencies": {
"@jupyterlab/application": "^1.1.0-alpha.1",
"@jupyterlab/apputils": "^1.1.0-alpha.1",
"@jupyterlab/codeeditor": "^1.1.0-alpha.1",
"@jupyterlab/console": "^1.1.0-alpha.1",
"@jupyterlab/coreutils": "^3.1.0-alpha.1",
"@jupyterlab/fileeditor": "^1.1.0-alpha.1",
"@jupyterlab/launcher": "^1.1.0-alpha.1",
"@jupyterlab/notebook": "^1.1.0-alpha.1",
"@jupyterlab/services": "^4.1.0-alpha.1",
"@jupyterlab/application": "^1.1.0",
"@jupyterlab/apputils": "^1.1.0",
"@jupyterlab/codeeditor": "^1.1.0",
"@jupyterlab/console": "^1.1.0",
"@jupyterlab/coreutils": "^3.1.0",
"@jupyterlab/fileeditor": "^1.1.0",
"@jupyterlab/launcher": "^1.1.0",
"@jupyterlab/notebook": "^1.1.0",
"@jupyterlab/services": "^4.1.0",
"@phosphor/algorithm": "^1.2.0",
"@phosphor/coreutils": "^1.3.1",
"@phosphor/disposable": "^1.2.0",
Expand All @@ -57,7 +57,7 @@
"devDependencies": {
"@babel/core": "^7.5.5",
"@babel/preset-env": "^7.5.5",
"@jupyterlab/testutils": "^1.1.0-alpha.1",
"@jupyterlab/testutils": "^1.1.0",
"@types/chai": "^4.1.3",
"@types/jest": "^24.0.17",
"chai": "^4.2.0",
Expand Down
42 changes: 18 additions & 24 deletions tests/run-test.py
Original file line number Diff line number Diff line change
@@ -1,36 +1,30 @@
# Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.

import json
import os
from os.path import join as pjoin

from jupyter_core import paths
from jupyterlab.tests.test_app import run_jest, JestApp
from jupyterlab.tests.test_app import JestApp

HERE = os.path.realpath(os.path.dirname(__file__))


def _install_xpython_kernel():
# Mimics: https://github.com/jupyterlab/jupyterlab/blob/cd2fb6ac3ecfae2bb4bcab84797932e625e9bb2f/jupyterlab/tests/test_app.py#L80-L95
kernel_json = {
'argv': [
'xpython',
'-f', '{connection_file}'
],
'display_name': "xpython",
'language': 'python'
}
kernel_dir = pjoin(paths.jupyter_data_dir(), 'kernels', 'xpython')
os.makedirs(kernel_dir)
with open(pjoin(kernel_dir, 'kernel.json'), 'w') as f:
f.write(json.dumps(kernel_json))


if __name__ == '__main__':
def run(jest_dir):
jest_app = JestApp.instance()
jest_app.jest_dir = jest_dir
jest_app.initialize()
jest_app.install_kernel(
kernel_name='xpython',
kernel_spec={
'argv': [
'xpython',
'-f', '{connection_file}'
],
'display_name': 'xpython',
'language': 'python'
}
)
jest_app.start()

# install the kernel spec for xeus-python
_install_xpython_kernel()

run_jest(HERE)
if __name__ == '__main__':
run(HERE)