You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+52-11Lines changed: 52 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -50,21 +50,62 @@ jupyter labextension list
50
50
51
51
Note: You will need NodeJS to build the extension package.
52
52
53
+
Use any Python environment and dependency manager you like, for example [uv](https://docs.astral.sh/uv/getting-started/installation/):
54
+
55
+
```shell
56
+
curl -LsSf https://astral.sh/uv/install.sh | sh
57
+
```
58
+
59
+
Create a Python environment in the project directory:
60
+
61
+
```shell
62
+
uv venv --python 3.12 --managed-python
63
+
```
64
+
65
+
Activate the Python environment:
66
+
67
+
```shell
68
+
source .venv/bin/activate
69
+
```
70
+
71
+
Install `jupyterlab`. The extension package itself doesn’t depend on `jupyterlab`, you just need `jupyterlab` in the environment where you will be testing the extension.
72
+
73
+
```shell
74
+
uv pip install jupyterlab
75
+
```
76
+
77
+
Install the extension package in editable mode. It installs the package’s dependencies, too:
78
+
79
+
```shell
80
+
uv pip install --editable . --verbose
81
+
```
82
+
83
+
Link your development version of the extension with JupyterLab:
84
+
85
+
```shell
86
+
jupyter labextension develop . --overwrite
87
+
```
88
+
89
+
Enable the extension in Jupyter Server:
90
+
91
+
```shell
92
+
jupyter server extension enable jupyterlab_deepnote
93
+
```
94
+
95
+
Rebuild the extension’s Typescript source after making changes:
96
+
97
+
```shell
98
+
jlpm run watch
99
+
```
100
+
53
101
The `jlpm` command is JupyterLab's pinned version of
54
102
[yarn](https://yarnpkg.com/) that is installed with JupyterLab. You may use
55
103
`yarn` or `npm` in lieu of `jlpm` below.
56
104
57
-
```bash
58
-
# Clone the repo to your local environment
59
-
# Change directory to the jupyterlab_deepnote directory
60
-
# Install package in development mode
61
-
pip install -e ".[test]"
62
-
# Link your development version of the extension with JupyterLab
63
-
jupyter labextension develop . --overwrite
64
-
# Server extension must be manually installed in develop mode
65
-
jupyter server extension enable jupyterlab_deepnote
66
-
# Rebuild extension Typescript source after making changes
67
-
jlpm build
105
+
In a separate terminal, run `jupyter lab` with the `--config` option to register our custom file contents manager for the `.deepnote` extension. The `--debug` option lets you see HTTP requests in the logs, which is helpful for debugging.
You can watch the source directory and run JupyterLab at the same time in different terminals to watch for changes in the extension's source and automatically rebuild the extension.
0 commit comments