Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork2.7k
Exposeplotly.io.get_chrome()
#5282
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
The path to the directory where Chrome should be installed. | ||
If None, the default download path will be used. | ||
""" | ||
ifnotkaleido_available()orkaleido_major()<1: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
why a confirmation? (not arguing, just think it's very unlikely someone would call the function by accident)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Do you mean the one on line 837? I agree it's unlikely to be called by accident, but I mainly put it there so users could confirm that the install path makes sense.
In any case, the confirmation only appears when using the command-lineplotly_get_chrome
command, not when calling theplotly.io.get_chrome()
function within a script.
4cd70ad
intomainUh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Closes#5272
Expose
plotly.io.get_chrome()
as a function which can be called from within a Python script.get_chrome()
accepts one optional argument,path
, which is the location to download Chrome to; if not supplied, the default location defined bychoreographer
will be used.This PR also slightly refactors
get_chrome()
into two functions:get_chrome()
, which is intended to be called directly in code, andplotly_get_chrome()
, which is a CLI wrapper forget_chrome()
and intended to be called via theplotly_get_chrome
command from the command line.On this branch, running the following code should work: