Hot on the heels of the last version, we are pleased to announce the release of Bokeh 0.12.9!
This update includes the following important new features:
This release also contains several bugfixes and docs additions. For full details, see the CHANGELOG and Release Notes. Additionally, examples for each release are uploaded to CDN. Click here to download.
If you are using
Anaconda, Bokeh can most easily be installed
by executing the command
conda install -c bokeh bokeh . Otherwise, use
pip install bokeh.
First a quick note. You may have noticed that this announcement is not for 0.12.8 as expected. Last night, about 10 minutes after the release build finished, a showstopper issue was discovered. A "re-release" was attempted but was not possible. So here we are, early, at 0.12.9!
This problem was caught by the extremely astute and eager user @Pierretherenard. I very much appreciate their help late last night to resolve things, and also want stress: if you are an active Bokeh user, please always help us test by installing and trying out dev builds and release candidates. The more eyes there are on things, the more likely issues can be caught earlier, and that is better for everyone.
Now on to the fun bits!
In case you missed it, the first ever JupyterCon was recently held in New York. One of the big topics of discussion there was JupyerLab, which is the next generation of the Jupyter UI. JupyterLab is a robust and extensible framework that includes a new Notebook component, built from the ground up.
Luke Canavan added support for embedding Bokeh
content in JupyterLab notebooks by creating a new
jupyterlab_bokeh extension. You can install the extension by running
jupyter labextension install jupyterlab_bokeh
From your command line.
Here's a screen cap of Bokeh+JLab in action:
The extension supports standalone plots and embedded Bokeh server applications.
Updating plots via
bokeh.io.push_notebook is not yet supported in
JupyterLab, but will be soon. You can follow progress towards getting this
feature working at issue
The Bokeh protocol has iterated and improved over the years. In the beginning, Bokeh's approach was simply to "JSON all the things". This was OK to start but quickly ran into performance issues when dealing with things like RGBA image data. Last year a Base64 encoding option was added for arrays, which offered a significant improvement. But the eventual goal has always been to offer a pure binary transport option for arrays when possible. I am happy to say that this long standing planned feature has been implemented.
Below are two examples that would have been out of reach before this release:
The left example is a 1024x1024 RGBA image with a slider to scrub the value of its green channel interactively. The right example is a 512x512 scalar image (colormapped in browser) that is blurred using Numba code in response to the slider. In case you were wondering, a fast, interactive image processing web app is about twenty five lines of pure python:
image = scipy.misc.ascent().astype(np.int32)[::-1, :] w, h = image.shape source = ColumnDataSource(data=dict(image=[image])) p = figure(x_range=(0, w), y_range=(0, h)) p.image('image', x=0, y=0, dw=w, dh=h, palette=gray(256), source=source) @njit def blur(outimage, image, amt): for i in range(amt, w-amt): for j in range(amt, h-amt): px = 0. for iw in range(-amt//2, amt//2): for jh in range(-amt//2, amt//2): px += image[i+iw, j+jh] outimage[i, j] = px/(amt*amt) def update(attr, old, new): out = image.copy() blur(out, image, 2*new + 1) source.data.update(image=[out]) slider = Slider(title="Blur Factor", start=0, end=10, value=0) slider.on_change('value', update) curdoc().add_root(column(p, slider))
In order to make some improvements for the long term, a few small, immediate breaking changes were unavoidable. It is not expected they will affect many users, but please consult the Release Notes carefully.
As of this Release, Python 3.4 support is no longer maintained under test. Python 2.7 and 3.5+ are the officially supported versions. It is very likely that Bokeh will continue to function as expected with Python 3.4 but we no longer run the continuous testing suite against it.
Lastly, a very loud warning has been added to
session.loop_until_closed. It was
never the intention that using
bokeh.client to run application code outside a
Bokeh server be considered a "real" way to do anything. However, mentioning this on the
mailing list and Stack Overflow has not been sufficiently discouraging. The new warning
outlines the many drawbacks of using
bokeh.client in this way.
To drive the point home all
plotting/server examples will be removed from GitHub after this release.
The only "must-do" task left for 1.0 is to port BokehJS to TypeScript. Once that is complete, we will immediately plan 1.0 to be the next release. There are some additional "nice-to-have" tasks that may go into 1.0, if time and resources permit:
In order to avoid the overhead and risk of "big releases", we plan to have more, smaller releases until 1.0 is ready.
As we get closer to a Bokeh 1.0 release, I'd like to thank the 250 total contributors who have helped make Bokeh such an amazing project. As always, for technical questions or assistance, please post to the Bokeh Mailing List and the General Chat Channel. Or, if you're interested in helping out, drop by the Dev Chat Channel!
Bryan Van de Ven