Skip to content

Add plot width and height support for Bokeh 2.3.0#7297

Merged
jrbourbeau merged 1 commit intodask:masterfrom
jrbourbeau:bokeh-plot-compat
Mar 2, 2021
Merged

Add plot width and height support for Bokeh 2.3.0#7297
jrbourbeau merged 1 commit intodask:masterfrom
jrbourbeau:bokeh-plot-compat

Conversation

@jrbourbeau
Copy link
Member

This PR ensures that user's who specify plot_width= and plot_height= keyword arguments in our diagnostic utilities aren't ignored when using bokeh==2.3.0 (xref #7292 (comment))

Additionally, I think we should try to eliminate the need for validating bokeh keyword arguments provided by users with _get_figure_keywords. Passing invalid keywords to bokeh and having bokeh raise the error seems like it might be less error prone. I gave this an initial attempt but there's some additional logic we'll need to implement to handle label_size=. In any event, the changes here seem like a reasonable first step and will get our CI passing again.

cc @quasiben @bryevdv

Closes #7292

@bryevdv
Copy link
Contributor

bryevdv commented Mar 1, 2021

@jrbourbeau

This seems fine but I would also like to understand what the motivation for this is:

defaults.update((k, v) for (k, v) in kwargs.items() if k in _get_figure_keywords())

Ultimately the pro-active property checking of _get_figure_keywords is what tripped things up in this case, IIUC. Generally speaking this is not something we would encourage normally, so I'd be interested to see if we can offer alternatives that satisfy your intentions here.

@jrbourbeau
Copy link
Member Author

Thanks for taking a look @bryevdv. From what I can tell the introduction of keyword argument validation with _get_figure_keywords stems from wanting to plot multiple profilers using dask/diagnostics/profile_visualize.py::visualize, which have similar but not exactly the same signatures for their corresponding plot_* utilities in dask/diagnostics/profile_visualize.py (e.g. plot_cache). That's all to say, I think this is an issue on the Dask side of things and not the bokeh side.

I'm going to merge this PR as it's a good step forward and will help resolve CI build failures. Though I agree revisiting this, and trying to eliminate the need for _get_figure_keywords, is something we should do

@jrbourbeau jrbourbeau merged commit 61b578f into dask:master Mar 2, 2021
@jrbourbeau jrbourbeau deleted the bokeh-plot-compat branch March 2, 2021 03:28
dcherian added a commit to dcherian/dask that referenced this pull request Mar 8, 2021
* upstream/master: (43 commits)
  bump version to 2021.03.0
  Bump minimum version of distributed (dask#7328)
  Fix `percentiles_summary` with `dask_cudf` (dask#7325)
  Temporarily revert recent Array.__setitem__ updates (dask#7326)
  Blockwise.clone (dask#7312)
  NEP-35 duck array update (dask#7321)
  Don't allow setting `.name` for array (dask#7222)
  Use nearest interpolation for creating percentiles of integer input (dask#7305)
  Test `exp` with CuPy arrays (dask#7322)
  Check that computed chunks have right size and dtype (dask#7277)
  pytest.mark.flaky (dask#7319)
  Contributing docs: add note to pull the latest git tags before pip installing Dask (dask#7308)
  Support for Python 3.9 (dask#7289)
  Add broadcast-based merge implementation (dask#7143)
  Add split_every to graph_manipulation (dask#7282)
  Typo in optimize docs (dask#7306)
  dask.graph_manipulation support for xarray.Dataset (dask#7276)
  Add plot width and height support for Bokeh 2.3.0 (dask#7297)
  Add numpy functions tri, triu_indices, triu_indices_from, tril_indices, tril_indices_from (dask#6997)
  Remove "cleanup" task in dataframe on-disk shuffle. The partd directory (dask#7260)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bokeh 2.3 ignores plot_width

2 participants