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

Conversation

Projects
None yet
2 participants
@philippjfr
Copy link
Contributor

philippjfr commented May 16, 2017

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

This comment has been minimized.

Copy link
Contributor

jlstevens commented May 16, 2017

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

This comment has been minimized.

Copy link
Contributor 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

This comment has been minimized.

Copy link
Contributor

jlstevens commented May 16, 2017

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

@jlstevens

This comment has been minimized.

Copy link
Contributor

jlstevens commented May 16, 2017

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

4 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
coverage/coveralls Coverage decreased (-0.05%) to 78.688%
Details
s3-reference-data-cache Tests passing no test data changes required.
Details

@philippjfr philippjfr deleted the bokeh_app_api branch May 25, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.