Skip to content
This repository has been archived by the owner on Oct 26, 2019. It is now read-only.

Update to Bokeh latest (0.12.3) and fix test plot #299

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions etc/notebooks/test/test_plotting_libs.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@
},
"outputs": [],
"source": [
"!pip install bokeh==0.11.1"
"!pip install bokeh==0.12.3"
]
},
{
Expand Down Expand Up @@ -251,8 +251,9 @@
"outputs": [],
"source": [
"import bokeh\n",
"from bokeh.io import output_notebook, push_notebook, show\n",
"from bokeh.models import ColumnDataSource\n",
"from bokeh.plotting import figure, show, output_notebook"
"from bokeh.plotting import figure"
]
},
{
Expand Down Expand Up @@ -324,7 +325,7 @@
"source = ColumnDataSource(data=dict(x=x, y=y))\n",
"\n",
"p = figure(title=\"Bokeh example\", plot_height=300, plot_width=600)\n",
"p.line(x, y, color=\"#2222aa\", line_width=3, source=source, name=\"foo\")"
"p.line('x', 'y', color=\"#2222aa\", line_width=3, source=source, name=\"foo\")"
]
},
{
Expand Down Expand Up @@ -357,7 +358,7 @@
" elif f == \"cos\": func = np.cos\n",
" elif f == \"tan\": func = np.tan\n",
" source.data['y'] = A * func(w * x + phi)\n",
" source.push_notebook()"
" push_notebook(handle=handle)"
]
},
{
Expand Down Expand Up @@ -385,7 +386,7 @@
},
"outputs": [],
"source": [
"show(p)"
"handle = show(p, notebook_handle=True)"
Copy link
Collaborator

Choose a reason for hiding this comment

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

I pulled down the code and ran as follows:

make clean
make dev-install kernel-gateway-image examples
make dev

Now I'm getting this error in the browser console when running this dashboard:

TypeError : show() got an unexpected keyword argument 'notebook_handle' 

TypeErrorTraceback (most recent call last)
<ipython-input-10-b378e9357e15> in <module>()
----> 1 handle = show(p, notebook_handle=True)

TypeError: show() got an unexpected keyword argument 'notebook_handle'

Copy link
Author

Choose a reason for hiding this comment

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

Hmm, I only see that error with Bokeh 0.11.1. Did you update to Bokeh 0.12.3 in your environment?

Copy link
Member

Choose a reason for hiding this comment

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

I'll give this another test on my end today.

Copy link
Member

Choose a reason for hiding this comment

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

I do not see the error mentioned above with the new notebook. The intiial bokeh plot appears. However, the ipywidgets associated with it have no effect on its output.

]
},
{
Expand Down Expand Up @@ -413,7 +414,7 @@
},
"outputs": [],
"source": [
"from IPython.html.widgets import interact\n",
"from ipywidgets import interact\n",
"_ = interact(update, f=[\"sin\", \"cos\", \"tan\"], w=(0,100), A=(1,10), phi=(0, 10, 0.1))"
]
},
Expand Down Expand Up @@ -622,7 +623,7 @@
"views": []
}
},
"version": "1.1.2"
"version": "1.2.0"
}
},
"nbformat": 4,
Expand Down