-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* 🔝 bump `@jupyterlite/pyodide-` deps * 🔌 apply default lite plugin settings
- Loading branch information
1 parent
6c86dfc
commit ada3353
Showing
10 changed files
with
108 additions
and
119 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
'thebe-react': minor | ||
'thebe-lite': minor | ||
'demo-simple': minor | ||
--- | ||
|
||
Clients no longer have to explicitly supply `litePluginSettings` unless they explicitly want to override them. This simplifies upgrades as clients should just bump packages, and the correct plugin settings for the bundled pyodide kernel will be applied by default. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'thebe-lite': minor | ||
--- | ||
|
||
Upgrading `@jupyterlite/pyodide-kernel-extension` to fix ipywidget disconnect issues. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,18 +19,6 @@ | |
} | ||
} | ||
</script> | ||
<script id="jupyter-config-data" type="application/json"> | ||
{ | ||
"litePluginSettings": { | ||
"@jupyterlite/pyodide-kernel-extension:kernel": { | ||
"pipliteUrls": ["https://unpkg.com/@jupyterlite/[email protected]/pypi/all.json"], | ||
"pipliteWheelUrl": "https://unpkg.com/@jupyterlite/[email protected]/pypi/piplite-0.4.2-py3-none-any.whl" | ||
} | ||
}, | ||
"enableMemoryStorage": true, | ||
"settingsStorageDrivers": ["memoryStorageDriver"] | ||
} | ||
</script> | ||
<!-- this following is the thebe entrypoint script --> | ||
<script src="thebe-lite.min.js"></script> | ||
<script src="index.js"></script> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,18 +11,6 @@ | |
useBinder: false | ||
} | ||
</script> | ||
<script id="jupyter-config-data" type="application/json"> | ||
{ | ||
"litePluginSettings": { | ||
"@jupyterlite/pyodide-kernel-extension:kernel": { | ||
"pipliteUrls": ["https://unpkg.com/@jupyterlite/[email protected]/pypi/all.json"], | ||
"pipliteWheelUrl": "https://unpkg.com/@jupyterlite/[email protected]/pypi/piplite-0.4.2-py3-none-any.whl" | ||
} | ||
}, | ||
"enableMemoryStorage": true, | ||
"settingsStorageDrivers": ["memoryStorageDriver"] | ||
} | ||
</script> | ||
<link | ||
rel="stylesheet" | ||
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,18 +11,6 @@ | |
useBinder: false | ||
} | ||
</script> | ||
<script id="jupyter-config-data" type="application/json"> | ||
{ | ||
"litePluginSettings": { | ||
"@jupyterlite/pyodide-kernel-extension:kernel": { | ||
"pipliteUrls": ["https://unpkg.com/@jupyterlite/[email protected]/pypi/all.json"], | ||
"pipliteWheelUrl": "https://unpkg.com/@jupyterlite/[email protected]/pypi/piplite-0.4.2-py3-none-any.whl" | ||
} | ||
}, | ||
"enableMemoryStorage": true, | ||
"settingsStorageDrivers": ["memoryStorageDriver"] | ||
} | ||
</script> | ||
<link | ||
rel="stylesheet" | ||
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,9 +44,29 @@ export async function startJupyterLiteServer(config?: LiteServerConfig): Promise | |
* Do not rely on a configuration being on the document body, accept configuration via arguments | ||
* and set options on the page config directly | ||
*/ | ||
if (config?.litePluginSettings) { | ||
PageConfig.setOption('litePluginSettings', JSON.stringify(config.litePluginSettings)); | ||
} | ||
const defaultLiteConfig = { | ||
litePluginSettings: { | ||
'@jupyterlite/pyodide-kernel-extension:kernel': { | ||
pipliteUrls: ['https://unpkg.com/@jupyterlite/[email protected]/pypi/all.json'], | ||
pipliteWheelUrl: | ||
'https://unpkg.com/@jupyterlite/[email protected]/pypi/piplite-0.4.7-py3-none-any.whl', | ||
}, | ||
}, | ||
enableMemoryStorage: true, | ||
settingsStorageDrivers: ['memoryStorageDriver'], | ||
}; | ||
PageConfig.setOption( | ||
'litePluginSettings', | ||
JSON.stringify({ ...defaultLiteConfig.litePluginSettings, ...config?.litePluginSettings }), | ||
); | ||
PageConfig.setOption( | ||
'enableMemoryStorage', | ||
JSON.stringify(config?.enableMemoryStorage ?? defaultLiteConfig.enableMemoryStorage), | ||
); | ||
PageConfig.setOption( | ||
'settingsStorageDrivers', | ||
JSON.stringify(config?.settingsStorageDrivers ?? defaultLiteConfig.settingsStorageDrivers), | ||
); | ||
|
||
/** | ||
* Seems like there are 4 different extensions we may want to handle | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -92,16 +92,7 @@ export function ThebeServerProvider({ | |
setConnecting(true); | ||
if (customConnectFn) customConnectFn(server); | ||
else if (useBinder) server.connectToServerViaBinder(customRepoProviders); | ||
else if (useJupyterLite) | ||
server.connectToJupyterLiteServer({ | ||
litePluginSettings: { | ||
'@jupyterlite/pyodide-kernel-extension:kernel': { | ||
pipliteUrls: ['https://unpkg.com/@jupyterlite/[email protected]/pypi/all.json'], | ||
pipliteWheelUrl: | ||
'https://unpkg.com/@jupyterlite/[email protected]/pypi/piplite-0.4.2-py3-none-any.whl', | ||
}, | ||
}, | ||
}); | ||
else if (useJupyterLite) server.connectToJupyterLiteServer(); | ||
else server.connectToJupyterServer(); | ||
|
||
server.ready.then( | ||
|