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

Added BokehRenderer.app method to create bokeh apps in scripts and notebooks #1283

Merged
merged 4 commits into from
Apr 12, 2017

Conversation

philippjfr
Copy link
Member

Adds convenience method to create bokeh Apps from any holoviews object. In a script it simply returns the doc but when used with notebook option creates an Application instance which is displayed and returned.

@jlstevens
Copy link
Contributor

Great!

All it needs is an example script in plotting/bokeh/examples/apps/apps and maybe a script and notebook in holoviews-contrib.

@philippjfr
Copy link
Member Author

All it needs is an example script in plotting/bokeh/examples/apps/apps

I'll just change the existing examples to use this.

@jlstevens
Copy link
Contributor

I'll just change the existing examples to use this.

Makes sense.

@philippjfr
Copy link
Member Author

Updated the examples, ready to merge once tests pass.

@@ -33,6 +33,9 @@

Store.renderers['bokeh'] = BokehRenderer.instance()

if len(Store.renderers) == 1:
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not check that the one available renderer is 'bokeh'?

Copy link
Member Author

Choose a reason for hiding this comment

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

Guess I could but defining that renderer is literally the line above so it has to be bokeh.

Copy link
Member Author

Choose a reason for hiding this comment

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

Is your suggestion this?

if list(Store.renderers.keys()) == ['bokeh']

Copy link
Contributor

Choose a reason for hiding this comment

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

I suppose that's fine.

Copy link
Contributor

Choose a reason for hiding this comment

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

You last post appeared before my reply. Either way is fine.

Copy link
Contributor

Choose a reason for hiding this comment

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

In that case, I would mention that in a script-level docstring at the top of the file. Same for the crossfilter app. It only needs to be one line explaining what these examples are supposed to show.

@jlstevens
Copy link
Contributor

Thanks for fixing the examples/apps/app nesting. I notice player.py was renamed but not changed..was that your intention?

@philippjfr
Copy link
Member Author

Yes, player does not use BokehRenderer.app it's an example of creating a custom bokeh layout with custom widgets.

@jlstevens
Copy link
Contributor

Looks good. Merging.

@jlstevens jlstevens merged commit 5a50e7f into master Apr 12, 2017
@philippjfr philippjfr deleted the bokeh_apps branch April 19, 2017 21:38
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants