Skip to content

[codex] Support bqplot 0.12 and 0.13 WebGL paths#186

Merged
astrofrog merged 6 commits intoglue-viz:mainfrom
maartenbreddels:codex/support-bqplot-012-013
May 7, 2026
Merged

[codex] Support bqplot 0.12 and 0.13 WebGL paths#186
astrofrog merged 6 commits intoglue-viz:mainfrom
maartenbreddels:codex/support-bqplot-012-013

Conversation

@maartenbreddels
Copy link
Copy Markdown
Collaborator

This PR keeps bqplot-image-gl usable with both bqplot 0.12 and bqplot 0.13.

bqplot 0.13 moved the shared WebGL figure setup out of bqplot and into bqplot-gl. bqplot-image-gl still used the older bqplot 0.12 WebGL API directly, so it could render with 0.12 but failed against 0.13 unless the new renderer hooks were initialized separately.

The frontend now detects the available figure API at runtime. For bqplot 0.12, it calls the existing createWebGLRenderer/update_gl path and keeps using render_gl. For bqplot 0.13, it dynamically loads bqplot-gl, calls its exported initializeBqplotFigure helper, registers the image mark with the shared WebGL mark list, and exposes renderGL as the 0.13 render entry point. The scale helpers also bridge snake_case and camelCase APIs so the same frontend code works across the two bqplot lines.

Packaging changes:

  • constrain bqplot to >=0.12,<0.14
  • add a bqplot13 extra requiring bqplot-gl>=0.1.1
  • keep bqplot-gl optional so bqplot 0.12 users do not need to install it

This depends on bqplot/bqplot-gl#29 for the bqplot 0.13 path. That PR exports initializeBqplotFigure and includes shader files in the bqplot-gl npm package.

Validation performed locally with Solara using --no-open:

  • bqplot 0.12.47 environment: installed bqplot-image-gl without bqplot-gl, enabled bqplot and bqplot-image-gl nbextensions, loaded the image-gl smoke app, and confirmed the WebGL image rendered through the legacy bqplot renderer.
  • bqplot 0.13.0 environment before bqplot-gl: installed bqplot-image-gl without bqplot-gl, enabled bqplot/bqscales/bqplot-image-gl nbextensions, loaded the smoke app, and confirmed the expected failure: the browser requested bqplot-gl and view creation failed.
  • bqplot 0.13.0 environment after bqplot-gl branch: installed bqplot-gl from maartenbreddels/bqplot-gl@codex/export-webgl-figure-init, enabled bqplot-gl, restarted Solara, reloaded the same smoke app, and confirmed the WebGL image rendered cleanly.
  • node --check js/lib/imagegl.js && node --check js/lib/index.js
  • npx webpack --mode=development

@codecov
Copy link
Copy Markdown

codecov Bot commented May 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 39.81%. Comparing base (fa968f8) to head (3ab3742).
⚠️ Report is 17 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #186   +/-   ##
=======================================
  Coverage   39.81%   39.81%           
=======================================
  Files           8        8           
  Lines         211      211           
=======================================
  Hits           84       84           
  Misses        127      127           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@maartenbreddels maartenbreddels force-pushed the codex/support-bqplot-012-013 branch from 608c1a0 to 981efa2 Compare May 6, 2026 19:53
@maartenbreddels maartenbreddels force-pushed the codex/support-bqplot-012-013 branch from 981efa2 to 3ab3742 Compare May 7, 2026 09:26
@astrofrog astrofrog merged commit 88feeff into glue-viz:main May 7, 2026
21 checks passed
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.

2 participants