Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document the command to launch JupyterLab and watch for changes to the backend code for server extensions #274

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion server-extension/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ example before diving into this one.
- [Packaging the Extension](#packaging-the-extension)
- [Python Package Manager](#python-package-manager)
- [JupyterLab Extension Manager](#jupyterlab-extension-manager)
- [Development](#development)
- [Installing the Package](#installing-the-package)

## The template folder structure
Expand Down Expand Up @@ -565,7 +566,7 @@ done using [hatch](https://hatch.pypa.io/) builder with some additional plugins:
- [hatch-jupyter-builder](https://github.com/jupyterlab/hatch-jupyter-builder/): Builder plugin to build Jupyter JavaScript assets as part of the Python package.
Its configuration is done in `pyproject.toml`:

```
```toml
# pyproject.toml

[build-system]
Expand Down Expand Up @@ -758,6 +759,18 @@ And that server extension is available through `pip`:

For more information on the `discovery` metadata, please refer to the [documentation](https://jupyterlab.readthedocs.io/en/stable/extension/extension_dev.html#ext-author-companion-packages).

## Development

While developing your server extension, you can run JupyterLab and enable server reloading using the following command:

```bash
jupyter lab --autoreload --no-browser
```

This way, every time there is a change to the backend (server) code, JupyterLab is automatically relaunched, picking up the most recent changes.

The `--no-browser` flag is optional, but it helps prevent a new browser tab from opening each time JupyterLab is launched.

## Installing the Package

With the packaging described above, installing the extension is done in one command once the package is published on pypi.org:
Expand Down
Loading