Skip to content

Add Jupyter Enterprise Gateway (JEG) compatibility #411

Open

Description

@Relm-Arrowny

BlueAPISession works perfectly in local terminals and local Jupyter servers. However, running it via Jupyter Enterprise Gateway breaks two things:

  1. Plotting: plot() currently attempts to open a standalone Matplotlib desktop window, which fails when run remotely. We need it to render inside the browser using Jupyter widgets.
  2. Storage: The container is wipe ~/.sm-bluesky/ and the %storedatabase on restart.

Goals

Acceptance criteria : What journeys should the user be able to complete to consider your feature done
Be as specific as you can, check them off once they work. Add more if you find more requirements during development. Issue should only be considered done after all of them are checked

  • A user can initialize a BlueAPISession inside a Jupyter Enterprise Gateway (JEG) notebook without errors.
  • A user's session cache and scan data cache persist across JEG kernel restarts (e.g., by utilizing persistent volume claims or a shared network directory instead of the home directory).
  • A user can call plot() from their remote JEG notebook and successfully view and interact with the live Matplotlib window natively within their browser via Jupyter widgets.
  • A user can successfully toggle checkbuttons and radio buttons on the plot from within the notebook interface without the interface freezing or breaking.

Tasks

base on the goals, deduce the tasks required. check them off once they're done

  • Add an environment variable override (e.g., SM_BLUESKY_CACHE_DIR) to _get_cache_path() in blueapi_session.py to allow cluster to redirect caching to persistent storage instead of ~/.sm-bluesky/
  • Update documentation to guide JEG users on how to persist their cache and %store variables using PVCs or shared network drive.
  • Refactor InteractivePlotWindow to support the %matplotlib widget (ipympl) backend for in-browser rendering.
  • [ ]

Related Resources

any images/gifs, mockups/wireframes that would aid the development should be listed here
MockUp : link to mockup
Coda doc: link to coda
Additional context
Add any other context or screenshots about the feature request here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions