Skip to content
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

don't override plotlyServerURL if one is set in iplot/plot #1615

Merged

Conversation

michaelbabyn
Copy link
Contributor

This resolves #1609.

I tested this out locally using so that first example mentioned in the issue which didn't set the base url for the edit in chart studio button before the change does after.

import plotly.offline as py
import plotly.graph_objs as go
py.init_notebook_mode()

py.iplot([go.Scatter(y=[2,3,4])], config=dict(showSendToCloud = True, plotlyServerURL='https://myserver.com'))

if one isn't specified in the config dict passed to iplot/plot
@@ -161,7 +161,8 @@ def _get_jconfig(config):

plotly_platform_url = plotly.tools.get_config_plotly_server_url()

clean_config['plotlyServerURL'] = plotly_platform_url
if not clean_config.get('plotlyServerURL'):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we want clean_config.get('plotlyServerURL', None) in case config doesn't include 'plotlyServerURL' at all.

Copy link
Contributor

@jonmmease jonmmease left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix @michaelbabyn, one comment above.

@jonmmease
Copy link
Contributor

Great, thanks @michaelbabyn!

@jonmmease jonmmease merged commit dc11111 into master Jun 15, 2019
cs48a pushed a commit to cs48a/plotly.py that referenced this pull request Jul 21, 2019
* only set plotlyServerURL using the plotly_domain in the .config file
if one isn't specified in the config dict passed to iplot/plot
* make it clear that the default in clean_config.get is None
@nicolaskruchten nicolaskruchten deleted the check-config-passed-to-iplot-before-updating-plotlyServerURL branch June 19, 2020 16:12
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.

plotlyServerURL config option overridden by plotly_domain from ~/.plotly/.config
2 participants