Commit 16f89c2c authored by Jeremy Tuloup's avatar Jeremy Tuloup
Browse files

First steps towards an improved Pyodide kernel

parent 4dacbe03
......@@ -36,6 +36,14 @@ jobs:
${{ env.CACHE_EPOCH }}-yarn-packages-${{ hashFiles('yarn.lock') }}
restore-keys: |
${{ env.CACHE_EPOCH }}-yarn-packages-
- name: Install Python
uses: actions/setup-python@v2
with:
python-version: '3.9'
architecture: 'x64'
- name: Install Python dependencies
run: |
python -m pip install build
- name: Install
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: |
......
......@@ -13,7 +13,7 @@ require('./build/style.js');
const serverMods = [
import('@jupyterlite/javascript-kernel-extension'),
import('@jupyterlite/p5-kernel-extension'),
import('@jupyterlite/pyodide-kernel-extension'),
import('@jupyterlite/pyolite-kernel-extension'),
import('@jupyterlite/server-extension')
];
......
......@@ -20,7 +20,7 @@
"@jupyterlite/iframe-extension": "^0.1.0",
"@jupyterlite/javascript-kernel-extension": "^0.1.0",
"@jupyterlite/p5-kernel-extension": "^0.1.0",
"@jupyterlite/pyodide-kernel-extension": "^0.1.0",
"@jupyterlite/pyolite-kernel-extension": "^0.1.0",
"@jupyterlite/server-extension": "^0.1.0",
"@jupyterlite/theme-extension": "^0.1.0",
"@jupyterlab-classic/application": "^0.1.10",
......
......@@ -54,7 +54,7 @@ const mimeExtensions = [
const mods = [
import('@jupyterlite/javascript-kernel-extension'),
import('@jupyterlite/p5-kernel-extension'),
import('@jupyterlite/pyodide-kernel-extension'),
import('@jupyterlite/pyolite-kernel-extension'),
import('@jupyterlite/server-extension')
];
......
......@@ -19,7 +19,7 @@
"@jupyterlite/iframe-extension": "^0.1.0",
"@jupyterlite/javascript-kernel-extension": "^0.1.0",
"@jupyterlite/p5-kernel-extension": "^0.1.0",
"@jupyterlite/pyodide-kernel-extension": "^0.1.0",
"@jupyterlite/pyolite-kernel-extension": "^0.1.0",
"@jupyterlite/application-extension": "^0.1.0",
"@jupyterlite/server-extension": "^0.1.0",
"@jupyterlite/theme-extension": "^0.1.0",
......
......@@ -63,7 +63,9 @@ module.exports = [
entry: ['whatwg-fetch', './index.js'],
output: {
path: path.resolve(buildDir),
filename: 'bundle.js'
filename: 'bundle.js',
// to generate valid wheel names
assetModuleFilename: '[name][ext][query]'
},
bail: true,
devtool: 'source-map',
......@@ -106,6 +108,10 @@ module.exports = [
loader: 'raw-loader'
}
},
{
test: /\.whl/,
type: 'asset/resource'
},
{
resourceQuery: /raw/,
type: 'asset/source'
......
......@@ -18,7 +18,8 @@
},
"scripts": {
"bootstrap": "yarn && yarn clean && yarn build && yarn lint && yarn test",
"build": "yarn build:lib && yarn build:app",
"build": "yarn build:python && yarn build:lib && yarn build:app",
"build:python": "lerna run build:python",
"build:lib": "lerna run build --scope @jupyterlite/metapackage",
"build:app": "lerna run build --stream --parallel --scope \"@jupyterlite/app-classic\" --scope \"@jupyterlite/app-lab\"",
"build:prod": "lerna run build:prod",
......
......@@ -30,8 +30,8 @@
"@jupyterlite/kernel": "file:../kernel",
"@jupyterlite/p5-kernel": "file:../p5-kernel",
"@jupyterlite/p5-kernel-extension": "file:../p5-kernel-extension",
"@jupyterlite/pyodide-kernel": "file:../pyodide-kernel",
"@jupyterlite/pyodide-kernel-extension": "file:../pyodide-kernel-extension",
"@jupyterlite/pyolite-kernel": "file:../pyolite-kernel",
"@jupyterlite/pyolite-kernel-extension": "file:../pyolite-kernel-extension",
"@jupyterlite/server": "file:../server-extension",
"@jupyterlite/session": "file:../session",
"@jupyterlite/settings": "file:../settings",
......
......@@ -8,8 +8,8 @@ import '@jupyterlite/javascript-kernel';
import '@jupyterlite/kernel';
import '@jupyterlite/p5-kernel';
import '@jupyterlite/p5-kernel-extension';
import '@jupyterlite/pyodide-kernel-extension';
import '@jupyterlite/pyodide-kernel';
import '@jupyterlite/pyolite-kernel-extension';
import '@jupyterlite/pyolite-kernel';
import '@jupyterlite/server';
import '@jupyterlite/server-extension';
import '@jupyterlite/session';
......
......@@ -16,8 +16,8 @@
{ "path": "../kernel" },
{ "path": "../p5-kernel" },
{ "path": "../p5-kernel-extension" },
{ "path": "../pyodide-kernel" },
{ "path": "../pyodide-kernel-extension" },
{ "path": "../pyolite-kernel" },
{ "path": "../pyolite-kernel-extension" },
{ "path": "../server-extension" },
{ "path": "../session" },
{ "path": "../settings" },
......
{
"name": "@jupyterlite/pyodide-kernel-extension",
"name": "@jupyterlite/pyolite-kernel-extension",
"version": "0.1.0",
"description": "JupyterLite - Pyodide Kernel Extension",
"description": "JupyterLite - Pyolite Kernel Extension",
"homepage": "https://github.com/jtpio/jupyterlite",
"bugs": {
"url": "https://github.com/jtpio/jupyterlite/issues"
......@@ -40,7 +40,7 @@
"dependencies": {
"@jupyterlab/coreutils": "^5.0.0",
"@jupyterlite/kernel": "^0.1.0",
"@jupyterlite/pyodide-kernel": "^0.1.0",
"@jupyterlite/pyolite-kernel": "^0.1.0",
"@jupyterlite/server": "^0.1.0"
},
"devDependencies": {
......
......@@ -7,7 +7,7 @@ import { JupyterLiteServer, JupyterLiteServerPlugin } from '@jupyterlite/server'
import { IKernel, IKernelSpecs } from '@jupyterlite/kernel';
import { PyodideKernel } from '@jupyterlite/pyodide-kernel';
import { PyoliteKernel } from '@jupyterlite/pyolite-kernel';
/**
* The default CDN fallback for Pyodide
......@@ -18,7 +18,7 @@ const PYODIDE_CDN_URL = 'https://pyodide-cdn2.iodide.io/v0.17.0a2/full/pyodide.j
* A plugin to register the Pyodide kernel.
*/
const kernel: JupyterLiteServerPlugin<void> = {
id: '@jupyterlite/pyodide-kernel-extension:kernel',
id: '@jupyterlite/pyolite-kernel-extension:kernel',
autoStart: true,
requires: [IKernelSpecs],
activate: (app: JupyterLiteServer, kernelspecs: IKernelSpecs) => {
......@@ -30,13 +30,13 @@ const kernel: JupyterLiteServerPlugin<void> = {
kernelspecs.register({
spec: {
name: 'python',
display_name: 'Pyodide',
display_name: 'Pyolite',
language: 'python',
argv: [],
spec: {
argv: [],
env: {},
display_name: 'Pyodide',
display_name: 'Pyolite',
language: 'python',
interrupt_mode: 'message',
metadata: {}
......@@ -47,7 +47,7 @@ const kernel: JupyterLiteServerPlugin<void> = {
}
},
create: async (options: IKernel.IOptions): Promise<IKernel> => {
return new PyodideKernel({
return new PyoliteKernel({
...options,
pyodideUrl
});
......
......@@ -10,7 +10,7 @@
"path": "../kernel"
},
{
"path": "../pyodide-kernel"
"path": "../pyolite-kernel"
},
{
"path": "../server"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment