Skip to content

Commit

Permalink
Remove resize tool from bokeh plots
Browse files Browse the repository at this point in the history
This was removed in 0.12.7 and now results in warnings
  • Loading branch information
mrocklin committed Sep 18, 2017
1 parent 95f0f66 commit 8b3a52c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
6 changes: 3 additions & 3 deletions dask/diagnostics/profile_visualize.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ def plot_tasks(results, dsk, palette='Viridis', label_size=60, **kwargs):
tz = import_required('toolz', _TOOLZ_MISSING_MSG)

defaults = dict(title="Profile Results",
tools="hover,save,reset,resize,xwheel_zoom,xpan",
tools="hover,save,reset,xwheel_zoom,xpan",
plot_width=800, plot_height=300)
defaults.update((k, v) for (k, v) in kwargs.items() if k in
_get_figure_keywords())
Expand Down Expand Up @@ -316,7 +316,7 @@ def plot_resources(results, palette='Viridis', **kwargs):
from bokeh.models import LinearAxis, Range1d

defaults = dict(title="Profile Results",
tools="save,reset,resize,xwheel_zoom,xpan",
tools="save,reset,xwheel_zoom,xpan",
plot_width=800, plot_height=300)
defaults.update((k, v) for (k, v) in kwargs.items() if k in
_get_figure_keywords())
Expand Down Expand Up @@ -373,7 +373,7 @@ def plot_cache(results, dsk, start_time, metric_name, palette='Viridis',
tz = import_required('toolz', _TOOLZ_MISSING_MSG)

defaults = dict(title="Profile Results",
tools="hover,save,reset,resize,wheel_zoom,xpan",
tools="hover,save,reset,wheel_zoom,xpan",
plot_width=800, plot_height=300)
defaults.update((k, v) for (k, v) in kwargs.items() if k in
_get_figure_keywords())
Expand Down
16 changes: 13 additions & 3 deletions dask/diagnostics/tests/test_profiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,10 @@ def test_profiler_plot():
assert check_title(p, "Not the default")
# Test empty, checking for errors
prof.clear()
prof.visualize(show=False, save=False)
with pytest.warns(None) as record:
prof.visualize(show=False, save=False)

assert len(record) == 0


@pytest.mark.skipif("not bokeh")
Expand All @@ -244,7 +247,11 @@ def test_resource_profiler_plot():
assert check_title(p, "Not the default")
# Test empty, checking for errors
rprof.clear()
rprof.visualize(show=False, save=False)

with pytest.warns(None) as record:
rprof.visualize(show=False, save=False)

assert len(record) == 0


@pytest.mark.skipif("not bokeh")
Expand All @@ -264,7 +271,10 @@ def test_cache_profiler_plot():
assert p.axis[1].axis_label == 'Cache Size (non-standard)'
# Test empty, checking for errors
cprof.clear()
cprof.visualize(show=False, save=False)
with pytest.warns(None) as record:
cprof.visualize(show=False, save=False)

assert len(record) == 0


@pytest.mark.skipif("not bokeh")
Expand Down

0 comments on commit 8b3a52c

Please sign in to comment.