Skip to content

Deprecate kaleido #319

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 7, 2025
Merged

Deprecate kaleido #319

merged 2 commits into from
Jul 7, 2025

Conversation

andrei-ng
Copy link
Collaborator

@andrei-ng andrei-ng commented Jul 1, 2025

The latest release of Kaleido in https://github.com/plotly/Kaleido is now a purely Python app that drives Chrome via the DevTools Protocol (CDP) based on Chorepgrapher. This doesn't fit with the rationale of this Rust crate.

This PR introudces a different approach based on a similar phylosophy as Choreographer, by driving browsers using WebDriver. This PR introduces similar methods as the ones in the plotly_kaleido crate to export static images using either geckodriver + Firefox or chromedriver + Chrome/Chromium.

This new pacakge can also be used standalone, outside the plotly.rs usecase, to export Plotly plots from JSON values to static images.

Note that EPS is no longer supported (and in fact it either never worked with Kaleido since long ago or it always required a token for export as EPS and PDF are not open plotly features)

@andrei-ng andrei-ng force-pushed the deprecate-kaleido branch 30 times, most recently from 971ae11 to 8bf7da9 Compare July 2, 2025 11:53
@andrei-ng andrei-ng force-pushed the deprecate-kaleido branch 14 times, most recently from 8755be0 to 0a46de0 Compare July 7, 2025 15:41
@andrei-ng andrei-ng marked this pull request as ready for review July 7, 2025 16:07
@andrei-ng andrei-ng force-pushed the deprecate-kaleido branch 8 times, most recently from 7306ae3 to 1373e12 Compare July 7, 2025 20:27
andrei-ng added 2 commits July 7, 2025 22:30
Add static export functionality using WebDriver to control a host
browser.
 - allow user to reuse the exporter object but also keep the old style
   Kaleido API
 - allow user to set browser capabilities via setter
 - allow user to configure html2pdf timeout
 - use data uri for CDN case and file for offline case when generating the html for static image export
     - there are size restrictions when using data-uri , webdriver cannot load large data-uri
       files, so for offline mode, default to using html returned by to_file
 - use build.rs to download webdriver chromedriver/geckodriver
 - contains documentation and add example for plotly_static
 - include an example on how to use static export for json data

 - refactored usage of imageformat between packages: plotly,
   plotly_kaleido, plotly_static

 - the new static export is included in the plotly crate as default and kaleido is marked as
   deprecated using deprecation warnings
 - added custom CI setup for Windows as Windows GitHub Action with Chrome setup is unique
 - expand ci with Firefox + Ubuntu for plotly_static
 - add ci step for publishing plotly_static

Signed-off-by: Andrei Gherghescu <[email protected]>
Signed-off-by: Andrei Gherghescu <[email protected]>
@andrei-ng andrei-ng force-pushed the deprecate-kaleido branch from 1373e12 to cddff80 Compare July 7, 2025 20:43
@andrei-ng andrei-ng merged commit 228631d into main Jul 7, 2025
31 of 32 checks passed
@andrei-ng andrei-ng deleted the deprecate-kaleido branch July 7, 2025 20:52
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.

1 participant