mapbox / mapbox/mapboxgl-jupyter

Propagate errors from Mapbox GL JS

Open
#62 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Refactoring
Dominant language
Python
Stars
681
Forks
137
PR merge metrics
No merged PRs in 30d

Description

# Problem

The Mapbox GL JS library has tons of built-in error checking for tokens, styles, and sources. In order to provide relevant and useful error messages to a user creating a visualization, we'd have to re-create many error checks in the Python `mapboxgl` library.

# Proposal

Propagate errors that affect the visualization (invalid token, invalid Mapbox style sheet, missing source, etc) and throw them from the python `mapboxgl` code execution. We wouldn't want to propagate all types of errors - only ones that prevent a valid data visualization layer from being drawn on the map, or from the map being initialized.

Reference PR by @EtienneDesticourt - https://github.com/mapbox/mapboxgl-jupyter/pull/59#issuecomment-371403399

@perrygeo @sgillies, any thoughts on this approach?

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

Review the Python mapboxgl execution path and the referenced Mapbox GL JS behavior in PR #59. Determine which token, style, source, and initialization failures should reach the Python caller; done means visualization-blocking errors are propagated while unrelated errors are not.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, jupyter, python
Domain
data-visualization, frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.