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

Improved BokehRenderer.app API #1444

Merged
merged 3 commits into from
May 16, 2017
Merged

Improved BokehRenderer.app API #1444

merged 3 commits into from
May 16, 2017

Conversation

philippjfr
Copy link
Member

The BokehRenderer.app method now has three ways of working:

  1. By default it just returns a document with plot attached to it, this can be used in a script to deploy it with bokeh serve.

  2. When using the show option it will create an Application instance, if the notebook extension has been loaded it will start a server and display it inline.

  3. When using the show option when the notebook extension has not been loaded or if the new_window option is supplied it will create the app and open it in a new window. This may be used from an IPython terminal or within the notebook.

Suggestions for improving the naming of the show and new_window arguments or other suggestions for improving the API welcome.

@jlstevens
Copy link
Contributor

Bothshow and new_window seem fine to me. I think the original suggestion was for a plot utility but a get_plot bothmethod on the renderer also seems fine. The only naming suggestion I have is to maybe call it plot_instance to make it clear it isn't the plotting class...

@philippjfr
Copy link
Member Author

philippjfr commented May 16, 2017

I think the original suggestion was for a plot utility but a get_plot bothmethod on the renderer also seems fine.

That's a separate suggestion I haven't implemented yet, renderer.get_plot is a general method on the baseclass which does returns the holoviews plotting class, it will likely be used by the plot utility.

@jlstevens
Copy link
Contributor

In that case the names plot_class and plot_instance would make that clearer.

@jlstevens
Copy link
Contributor

Ok, I got confused as get_plot is not a new method (I got mislead by the diff). The new API and names seem reasonable so I'll merge now.

@jlstevens jlstevens merged commit fc86317 into master May 16, 2017
@philippjfr philippjfr deleted the bokeh_app_api branch May 25, 2017 11:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants