visgl / visgl/deck.gl

[Feat] [pydeck] Allow overriding CDN URLs

Open
#9,374 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature
Dominant language
TypeScript
Stars
14.6k
Forks
2.3k
Avg merge
2d 9h
Merged PRs (30d)
42

Description

Target Use Case

By default, pydeck references the JSDelivr Content Delivery Network in its URL to download embed the @deck.gl/jupyter-widget Javascript package which includes all required deck.gl packages.

  • Default URLs are specified here.
  • Uses semantic version specification here

There may be cases where clients may not wish to use a different CDN with pydeck (e.g. need different terms of use, service level agreements, etc.).

Proposal

pydeck.Deck itself need to be built to allow overriding the URLs by including a cdn_urls dictionary with the JS package names (@deck.gl/jupyter-widget) and (@deck.gl/jwidget) as keys. This would easily allow for more URLs in the future. This dictionary could then be propagated to the logic in cdn_picker here to
override both bundle URLs if required.

If the cdn_urls kwarg is not provided or any of its keys are missing, it can default to the current behavior.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with pydeck/io/html.py for the default CDN URLs and cdn_picker logic, then inspect pydeck/frontend_semver.py and the Deck API. Trace how the proposed cdn_urls dictionary could reach both bundle URLs, preserving current defaults when values are absent. Done means callers can override either URL without changing default behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, python
Domain
data-visualization, frontend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.