plotly / plotly/plotly.py

Declare `kaleido` as an optional dependency

Open
#4,699 3 comments 5 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature infrastructure P3
Dominant language
Python
Stars
18.8k
Forks
2.8k
Avg merge
16h 26m
Merged PRs (30d)
21

Description

When calling write_image on a figure, it is required that kaleido is installed in the active environment. It would be great if this dependency were declared in pyproject.toml as an optional group.

For example, here is the approach taken in pyvista:

https://github.com/pyvista/pyvista/blob/e1401a34cbd281bbe74bce8dccbb78b85ab36dc4/pyproject.toml#L40-L59

This would improve ergonomics for packages that depend on plotly, since kaleido is (from their perspective) an implementation detail. Such a package could then depend on plotly[io], for example.

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 in pyproject.toml and compare its optional dependency configuration with the linked PyVista example. Declare kaleido in an optional group so packages can depend on plotly[io], then verify that the dependency metadata exposes that extra correctly.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
build-system
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.