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: CONTRIBUTING.md
+14-53Lines changed: 14 additions & 53 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -151,64 +151,23 @@ $ ./bin/test-local
151
151
152
152
## Development Workflow for Deepnote maintainers
153
153
154
-
### Using in Deepnote Projects
154
+
### Local Toolkit Development with Webapp
155
155
156
-
When you push a commit, a new version of `deepnote/jupyter-for-local` is built with your commit hash (shortened!). Use it in projects by updating `common.yml`:
156
+
To develop toolkit changes against a local webapp with hot-reload:
This will start a container with Deepnote Toolkit mounted inside and expose all required ports. If you change code that runs in the kernel (e.g. you updated the DataFrame formatter), you only need to restart the kernel from Deepnote's UI. If you update code that starts Jupyter itself, you need to restart the container. And if you add or modify dependencies you need to rebuild the image.
197
-
198
-
Now, you need to modify `common.yml` in the Deepnote app. First, replace `jupyter` service with noop image:
2. Setup `DEEPNOTE_TOOLKIT_SOURCE_PATH` env variable pointing to folder with toolkit source. This can go either in`.zshrc` (or similar file for your shell) or set per shell session with `export DEEPNOTE_TOOLKIT_SOURCE_PATH=...`. If not set, webapp will try to resolve it to `../deepnote-toolkit` relative to webapp root folder.
204
164
205
-
And change `JUPYTER_HOST` variable of executor to point to host machine:
165
+
3. In the webapp repository, run:
166
+
```bash
167
+
pnpm dev:app:local-toolkit
168
+
```
206
169
207
-
```yml
208
-
executor:
209
-
environment:
210
-
JUPYTER_HOST: host.docker.internal
211
-
```
170
+
This mounts your toolkit source into the container and installs it in editable mode. Toolkit module code changes are reflected after kernel restart (use "Restart kernel" action in the webapp).
212
171
213
172
### Review Applications
214
173
@@ -229,6 +188,8 @@ We use Docker to ensure reproducible environments due to Jupyter libraries' bina
229
188
230
189
- `jupyter-for-local.Dockerfile`: Creates development environment with Jupyter integration, used for local development from docker-compose used in main monorepo.
231
190
191
+
- `jupyter-for-local-hotreload.Dockerfile`: Creates development environment which expectes toolkit source to be mounted at `/toolkit`. Used for development in main monorepo.
0 commit comments