Skip to content

fix(pydeck): register_library uses resourceUri - #10759

Merged
chrisgervang merged 3 commits into
masterfrom
chr/pydeck-register-library-fix
Oct 1, 2026
Merged

chrisgervang merged 3 commits into
masterfrom
chr/pydeck-register-library-fix

Conversation

@chrisgervang

@chrisgervang chrisgervang commented Sep 29, 2026 •

Copy link
Copy Markdown
Collaborator

Settings.register_library(name, uri) appends {"libraryName": name, "uri": uri}, but addCustomLibraries in @deck.gl/jupyter-widget destructures {libraryName, resourceUri}. It then calls loadScript(undefined), so a library registered this way never loads and no error is shown. Setting pydeck.settings.custom_libraries directly with resourceUri works, and to_html and the Jupyter widget both pass that list through unchanged.

Change List

  • Settings.register_library: emit resourceUri instead of uri, add docstring
  • Settings docstring: fix resouceUri typo
  • Unit test for register_library covering to_html and widget output
  • CHANGELOG entry

pytest tests/test_settings.py passes; the new test fails on master.


Note

Low Risk
Small API-shape bugfix in settings registration with tests and docs; no auth or data-handling impact.

Overview
Fixes Settings.register_library so registered custom deck.gl bundles actually load in the pydeck frontend.

Previously it appended uri, while @deck.gl/jupyter-widget’s addCustomLibraries expects resourceUri, so script loading failed silently. Entries now use resourceUri, matching manual custom_libraries assignment and what to_html / the Jupyter widget pass through.

Also adds a register_library docstring, corrects the resouceUri typo in the Settings docstring, adds a unit test for the dict shape and HTML/widget output, and documents the fix in the changelog.

Reviewed by Cursor Bugbot for commit 86cf561. Bugbot is set up for automated code reviews on this repo. Configure here.

@coveralls

coveralls commented Sep 29, 2026 •

Copy link
Copy Markdown

Coverage Status

coverage: 82.524% (+0.01%) from 82.51% — chr/pydeck-register-library-fix into master

Settings.register_library appended {libraryName, uri}, but the
@deck.gl/jupyter-widget loader reads {libraryName, resourceUri}, so
libraries registered this way were never loaded.
@chrisgervang
chrisgervang force-pushed the chr/pydeck-register-library-fix branch from c3cb613 to 6a23357 Compare September 29, 2026 04:52
@chrisgervang
chrisgervang marked this pull request as ready for review September 29, 2026 05:00
@greptile-apps

greptile-apps Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 5/5

[Medium risk] Fixes library registration to use correct key name.

The PR appears safe to merge; no outstanding finding or new issue was identified.

Summary

The PR changes Settings.register_library to write resourceUri, matching the key expected by the JavaScript custom-library loader.

  • Corrects the settings documentation and adds a changelog entry.
  • Adds a test for the registered library shape and its HTML and widget output.
Diagram
%%{init: {'theme': 'neutral'}}%%
flowchart LR
  A["register_library(name, uri)"] --> B["custom_libraries: resourceUri"]
  B --> C["HTML or Jupyter output"]
  C --> D["JavaScript library loader"]
Loading

Reviews (3) · Last reviewed commit: "Merge branch 'master' into chr/pydeck-re..."

@chrisgervang
chrisgervang merged commit 74164db into master Oct 1, 2026
8 checks passed
@chrisgervang
chrisgervang deleted the chr/pydeck-register-library-fix branch October 1, 2026 22:11
@chrisgervang chrisgervang modified the milestones: v9.4, pydeck 0.9.4 Oct 4, 2026
@chrisgervang chrisgervang mentioned this pull request Oct 7, 2026
53 of 66 tasks
chrisgervang added a commit that referenced this pull request Oct 22, 2026
* fix(pydeck): register_library uses resourceUri

Settings.register_library appended {libraryName, uri}, but the
@deck.gl/jupyter-widget loader reads {libraryName, resourceUri}, so
libraries registered this way were never loaded.

* docs(pydeck): changelog entry for the register_library fix

(cherry picked from commit 74164db)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants