Skip to content

Conversation

oliver-sanders
Copy link
Member

@oliver-sanders oliver-sanders commented Mar 10, 2025

Training day exercise: Write a Jupyter Lab plugin

How it works:

  • The user is presented an "Open in Jupyter Lab" button in cylc-ui.
  • When pressed, cylc-ui sends a REST request to the URL lab-bridge/open/
  • When this request is received, cylc-uiserver logs an "event" with Jupyter Events.
  • This event is bubbled up to all components (incl, Lab).
  • A Jupyter Lab extension listens for this event and opens files when it receives one.

Components:

Check List

  • I have read CONTRIBUTING.md and added my name as a Code Contributor.
  • Contains logically grouped changes (else tidy your branch by rebase).
  • Does not contain off-topic changes (use other PRs for other changes).
  • Applied any dependency changes to both setup.cfg (and conda-environment.yml if present).
  • Tests are included (or explain why tests are not needed).
  • Changelog entry included if this is a change that can affect users
  • Cylc-Doc pull request opened if required at cylc/cylc-doc/pull/XXXX.
  • If this is a bug fix, PR should be raised against the relevant ?.?.x branch.

* Add a new Jupyter Event schema for this event.
* Add a new endpoint. The event is created server side.
* Works with https://github.com/oliver-sanders/cylc-jupyterlab-extension
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

JupyterServer: opening content in other extensions
1 participant