Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Param 2 and HoloViews 1.18 compatibility #1164

Merged
merged 5 commits into from
Oct 6, 2023
Merged
Show file tree
Hide file tree
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
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")
Copy link
Member Author

Choose a reason for hiding this comment

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

Just wanted a rc version high enough.

rc should be removed at some point



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