Skip to content

Commit

Permalink
Param 2 and HoloViews 1.18 compatibility (#1164)
Browse files Browse the repository at this point in the history
  • Loading branch information
hoxbro authored Oct 6, 2023
1 parent bf34dd1 commit 69d19a2
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 2 deletions.
14 changes: 14 additions & 0 deletions examples/conftest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import holoviews as hv

from packaging.version import Version


collect_ignore_glob = []


# 2023-10: https://github.com/holoviz/hvplot/pull/1164
if Version(hv.__version__) == Version("1.18.0a4"):
collect_ignore_glob += [
"reference/xarray/contourf.ipynb",
"user_guide/Geographic_Data.ipynb",
]
7 changes: 5 additions & 2 deletions hvplot/tests/testinteractive.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from hvplot import bind
from hvplot.interactive import Interactive
from hvplot.xarray import XArrayInteractive
from hvplot.util import bokeh3
from hvplot.util import bokeh3, param2

is_bokeh2 = pytest.mark.skipif(bokeh3, reason="requires bokeh 2.x")
is_bokeh3 = pytest.mark.skipif(not bokeh3, reason="requires bokeh 3.x")
Expand Down Expand Up @@ -1382,7 +1382,10 @@ def test_interactive_pandas_series_widget_value(series):
assert isinstance(si._current, pd.DataFrame)
pd.testing.assert_series_equal(si._current.A, series + w.value)
assert si._obj is series
assert "dim('*').pd+<param.Number object" in repr(si._transform)
if param2:
assert "dim('*').pd+<param.parameters.Number object" in repr(si._transform)
else:
assert "dim('*').pd+<param.Number object" in repr(si._transform)
assert si._depth == 2
assert si._method is None

Expand Down
1 change: 1 addition & 0 deletions hvplot/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
hv_version = Version(hv.__version__)
bokeh_version = Version(bokeh.__version__)
bokeh3 = bokeh_version >= Version("3.0")
param2 = Version(param.__version__) >= Version("2.0rc4")


def with_hv_extension(func, extension='bokeh', logo=False):
Expand Down

0 comments on commit 69d19a2

Please sign in to comment.