Skip to content

Commit

Permalink
update JupyterLite deployment and docs
Browse files Browse the repository at this point in the history
  • Loading branch information
DenisaCG committed Aug 14, 2024
1 parent 15ffb61 commit 527ca63
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 44 deletions.
9 changes: 4 additions & 5 deletions docs/build-environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@ dependencies:
- mamba
- myst-parser
- pydata-sphinx-theme
- python=3.9
- python
- pip:
- jupyterlab-blockly
# Remove all pinning when we support jupyterlab v4 in jupyterlab-blockly
- jupyterlite-core===0.1.3
- jupyterlite-sphinx===0.9.3
- jupyterlite-xeus===0.1.8
- jupyterlite-core
- jupyterlite-sphinx
- jupyterlite-xeus
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
author = 'Denisa Checiu'

# The full version, including alpha/beta/rc tags
release = '0.1.0'
release = '0.3.0'


# -- General configuration ---------------------------------------------------
Expand Down
39 changes: 1 addition & 38 deletions docs/other_extensions.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,43 +111,6 @@ const plugin: JupyterFrontEndPlugin<void> = {
**NOTE** : `BlocklyNiryo` is defined in `niryo-one-python-generators.ts`.


## Include patches
Currently, for the extension to work, you will need to include the following patch from the JupyterLab-Blockly extension (make sure it is placed in a file named `@jupyterlab+codeeditor+3.4.3.patch`, inside the `patches` folder):

```
// patches/@jupyterlab+codeeditor+3.4.3.patch
diff --git a/node_modules/@jupyterlab/codeeditor/lib/editor.d.ts b/node_modules/@jupyterlab/codeeditor/lib/editor.d.ts
index ffe8d1f..d63b2f8 100644
--- a/node_modules/@jupyterlab/codeeditor/lib/editor.d.ts
+++ b/node_modules/@jupyterlab/codeeditor/lib/editor.d.ts
@@ -44,7 +44,7 @@ export declare namespace CodeEditor {
/**
* An interface describing editor state coordinates.
*/
- interface ICoordinate extends JSONObject, ClientRect {
+ interface ICoordinate extends JSONObject {
}
/**
* A range.
```

You will also need to modify the `MANIFEST.in` file:
```
recursive-include patches *.patch
```
the `package.json` file:
```
"scripts": {
...
"postinstall": "patch-package"
}
````
and, finally, add `patch-package` as a dependency:
```
jlpm add patch-package
```
## Additional configurations

You will need to request the `jupyterlab-blockly` package as a dependency of your extension, in order to ensure it is installed and available to provide the token `IBlocklyRegistry`. To do this, you need to add the following line to your `setup.py` file.
Expand All @@ -157,7 +120,7 @@ You will need to request the `jupyterlab-blockly` package as a dependency of you

setup_args = dict(
...
install_requires=['jupyterlab-blockly>=0.1.1,<0.2']
install_requires=['jupyterlab-blockly>=0.3.0,<0.4']
...
)
```
Expand Down

0 comments on commit 527ca63

Please sign in to comment.