Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-hvplot for openSUSE:Factory checked in at 2023-06-11 19:54:27 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-hvplot (Old) and /work/SRC/openSUSE:Factory/.python-hvplot.new.15902 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-hvplot" Sun Jun 11 19:54:27 2023 rev:14 rq:1091745 version:0.8.4 Changes: -------- --- /work/SRC/openSUSE:Factory/python-hvplot/python-hvplot.changes 2023-04-05 21:35:48.090618615 +0200 +++ /work/SRC/openSUSE:Factory/.python-hvplot.new.15902/python-hvplot.changes 2023-06-11 19:57:18.503893536 +0200 @@ -1,0 +2,14 @@ +Thu Jun 8 12:26:27 UTC 2023 - Ben Greiner <c...@bnavigator.de> + +- Update to 0.8.4 + * Fix .interactive layout compatibility with Bokeh 3 (1076) + * Fix usage with intake (1052) + * Fix deprecated usage of Param 2.0 (1064) + * Fix projection when xlim/ylim provided (1053) + * Fix interpretation of positional arg with geopandas, now used + as color (1056) + * Fix import error messages for geo dependencies (1054) + * Fix usage of hover for geometries - make it less likely to fail + (1055) + +------------------------------------------------------------------- Old: ---- hvplot-0.8.3.tar.gz New: ---- hvplot-0.8.4.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-hvplot.spec ++++++ --- /var/tmp/diff_new_pack.tduzqL/_old 2023-06-11 19:57:19.555899880 +0200 +++ /var/tmp/diff_new_pack.tduzqL/_new 2023-06-11 19:57:19.559899904 +0200 @@ -17,7 +17,7 @@ Name: python-hvplot -Version: 0.8.3 +Version: 0.8.4 Release: 0 Summary: High-level plotting API for the PyData ecosystem built on HoloViews License: BSD-3-Clause @@ -27,13 +27,12 @@ # Test data. Bump the commit whenever you bump this version Source1: https://github.com/pydata/xarray-data/archive/7d8290e0be9d2a8f4b4381641f20a97db6eaea3d.tar.gz#/xarray-data.tar.gz Source100: python-hvplot-rpmlintrc -BuildRequires: %{python_module param >= 1.6.1} +BuildRequires: %{python_module param >= 1.9} BuildRequires: %{python_module pyct >= 0.4.4} BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros -# https://github.com/holoviz/hvplot/issues/970 -Requires: (python-bokeh >= 1.0.0 with python-bokeh < 2.5) +Requires: python-bokeh >= 1.0.0 Requires: python-colorcet >= 2 Requires: python-holoviews >= 1.11.0 Requires: python-numpy >= 1.15 @@ -66,9 +65,10 @@ BuildArch: noarch # SECTION test requirements BuildRequires: %{python_module Pillow} -BuildRequires: %{python_module bokeh >= 1.0.0 with %python-bokeh < 2.5} +BuildRequires: %{python_module bokeh >= 1.0.0} BuildRequires: %{python_module colorcet >= 2} BuildRequires: %{python_module dask} +BuildRequires: %{python_module datashader} BuildRequires: %{python_module holoviews >= 1.11.0} BuildRequires: %{python_module ipywidgets} BuildRequires: %{python_module networkx} @@ -84,8 +84,7 @@ BuildRequires: %{python_module scipy} BuildRequires: %{python_module selenium} BuildRequires: %{python_module streamz >= 0.3.0} -BuildRequires: %{python_module xarray if %python-base >= 3.9} -BuildRequires: %{python_module datashader if (%python-base >= 3.9 with %python-base < 3.11)} +BuildRequires: %{python_module xarray} # /SECTION %python_subpackages ++++++ hvplot-0.8.3.tar.gz -> hvplot-0.8.4.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hvplot-0.8.3/PKG-INFO new/hvplot-0.8.4/PKG-INFO --- old/hvplot-0.8.3/PKG-INFO 2023-03-17 12:17:18.000000000 +0100 +++ new/hvplot-0.8.4/PKG-INFO 2023-06-05 20:43:58.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: hvplot -Version: 0.8.3 +Version: 0.8.4 Summary: A high-level plotting API for the PyData ecosystem built on HoloViews. Home-page: https://hvplot.pyviz.org Author: Philipp Rudiger diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hvplot-0.8.3/hvplot/.version new/hvplot-0.8.4/hvplot/.version --- old/hvplot-0.8.3/hvplot/.version 2023-03-17 12:17:17.000000000 +0100 +++ new/hvplot-0.8.4/hvplot/.version 2023-06-05 20:43:58.000000000 +0200 @@ -1 +1 @@ -{"git_describe": "v0.8.3-0-gfe39eff", "version_string": "0.8.3"} \ No newline at end of file +{"git_describe": "v0.8.4-0-gd336e11", "version_string": "0.8.4"} \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hvplot-0.8.3/hvplot/converter.py new/hvplot-0.8.4/hvplot/converter.py --- old/hvplot-0.8.3/hvplot/converter.py 2023-03-17 12:10:46.000000000 +0100 +++ new/hvplot-0.8.4/hvplot/converter.py 2023-06-05 20:38:12.000000000 +0200 @@ -230,6 +230,9 @@ Whether to project the data before plotting (adds initial overhead but avoids projecting data when plot is dynamically updated). + projection (default=None): str or Cartopy CRS + Coordinate reference system of the plot specified as Cartopy + CRS object or class name. tiles (default=False): Whether to overlay the plot on a tile source. Tiles sources can be selected by name or a tiles object or class can be passed, @@ -255,7 +258,8 @@ ] _geo_options = [ - 'geo', 'crs', 'features', 'project', 'coastline', 'tiles' + 'geo', 'crs', 'features', 'project', 'coastline', 'tiles', + 'projection', 'global_extents' ] _axis_options = [ @@ -393,7 +397,7 @@ ) self.dynamic = dynamic - self.geo = any([geo, crs, global_extent, projection, project, coastline, features]) + self.geo = any([geo, crs, global_extent, projection, project, coastline, features, tiles]) self.crs = self._process_crs(data, crs) if self.geo else None self.project = project self.coastline = coastline @@ -412,7 +416,7 @@ 'install -c pyviz geoviews') if self.geo: if self.kind not in self._geo_types: - param.main.warning( + param.main.param.warning( "geo option cannot be used with kind=%r plot " "type. Geographic plots are only supported for " "following plot types: %r" % (self.kind, self._geo_types)) @@ -434,13 +438,20 @@ "Projection must be defined as cartopy CRS or " "one of the following CRS string:\n {}".format(all_crs)) - proj_crs = projection or ccrs.GOOGLE_MERCATOR - if self.crs != proj_crs: + projection = projection or (ccrs.GOOGLE_MERCATOR if tiles else self.crs) + if tiles and projection != ccrs.GOOGLE_MERCATOR: + raise ValueError( + "Tiles can only be used with output projection of " + "`cartopy.crs.GOOGLE_MERCATOR`. To get rid of this error " + "remove `projection=` or `tiles=`" + ) + + if self.crs != projection: px0, py0, px1, py1 = ccrs.GOOGLE_MERCATOR.boundary.bounds x0, x1 = xlim or (px0, px1) y0, y1 = ylim or (py0, py1) extents = (x0, y0, x1, y1) - x0, y0, x1, y1 = project_extents(extents, self.crs, proj_crs) + x0, y0, x1, y1 = project_extents(extents, self.crs, projection) if xlim: xlim = (x0, x1) if ylim: @@ -606,7 +617,7 @@ if debug: kwds = dict(x=self.x, y=self.y, by=self.by, kind=self.kind, groupby=self.groupby, grid=self.grid) - param.main.warning('Plotting {kind} plot with parameters x: {x}, ' + param.main.param.warning('Plotting {kind} plot with parameters x: {x}, ' 'y: {y}, by: {by}, groupby: {groupby}, row/col: {grid}'.format(**kwds)) def _process_symmetric(self, symmetric, clim, check_symmetric_max): @@ -706,6 +717,10 @@ kind = 'polygons' elif geom_type in ('LineString', 'LineRing', 'Line'): kind = 'paths' + # if only one arg is provided, treat it like color + if x is not None and y is None: + kwds['color'] = kwds.pop('color', kwds.pop('c', x)) + x = None elif isinstance(data, pd.DataFrame): datatype = 'pandas' self.data = data @@ -2232,9 +2247,12 @@ for opts_ in [cur_opts, compat_opts]: if 'color' in opts_ and opts_['color'] in vdims: opts_['color'] = hv.dim(opts_['color']) + # if there is nothing to put in hover, turn it off + if 'tools' in opts_ and kind in ["polygons", "paths"] and not vdims: + opts_["tools"] = [t for t in opts_["tools"] if t != "hover"] if self.geo: params['crs'] = self.crs if self.by: - obj = Dataset(data).to(element, kdims, vdims, self.by, **params) + obj = Dataset(data, self.by+kdims, vdims).to(element, kdims, vdims, self.by, **params) if self.subplots: obj = obj.layout(sort=False) else: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hvplot-0.8.3/hvplot/interactive.py new/hvplot-0.8.4/hvplot/interactive.py --- old/hvplot-0.8.3/hvplot/interactive.py 2023-03-17 12:10:46.000000000 +0100 +++ new/hvplot-0.8.4/hvplot/interactive.py 2023-06-05 20:38:12.000000000 +0200 @@ -112,7 +112,7 @@ from .converter import HoloViewsConverter from .util import ( - _flatten, is_tabular, is_xarray, is_xarray_dataarray, + _flatten, bokeh3, is_tabular, is_xarray, is_xarray_dataarray, _convert_col_names_to_str, ) @@ -709,6 +709,11 @@ to the center and widget location specified in the interactive call. """ + if bokeh3: + return self._layout_bk3(**kwargs) + return self._layout_bk2(**kwargs) + + def _layout_bk2(self, **kwargs): widget_box = self.widgets() panel = self.output() loc = self._loc @@ -751,6 +756,49 @@ components = [Column(panel, widgets)] return Row(*components, **kwargs) + def _layout_bk3(self, **kwargs): + widget_box = self.widgets() + panel = self.output() + loc = self._loc + center = self._center + alignments = { + 'left': (Row, ('start', 'center'), True), + 'right': (Row, ('end', 'center'), False), + 'top': (Column, ('center', 'start'), True), + 'bottom': (Column, ('center', 'end'), False), + 'top_left': (Column, 'start', True), + 'top_right': (Column, ('end', 'start'), True), + 'bottom_left': (Column, ('start', 'end'), False), + 'bottom_right': (Column, 'end', False), + 'left_top': (Row, 'start', True), + 'left_bottom': (Row, ('start', 'end'), True), + 'right_top': (Row, ('end', 'start'), False), + 'right_bottom': (Row, 'end', False) + } + layout, align, widget_first = alignments[loc] + widget_box.align = align + if not len(widget_box): + if center: + components = [HSpacer(), panel, HSpacer()] + else: + components = [panel] + return Row(*components, **kwargs) + + items = (widget_box, panel) if widget_first else (panel, widget_box) + sizing_mode = kwargs.get('sizing_mode') + if not center: + if layout is Row: + components = list(items) + else: + components = [layout(*items, sizing_mode=sizing_mode)] + elif layout is Column: + components = [HSpacer(), layout(*items, sizing_mode=sizing_mode), HSpacer()] + elif loc.startswith('left'): + components = [widget_box, HSpacer(), panel, HSpacer()] + else: + components = [HSpacer(), panel, HSpacer(), widget_box] + return Row(*components, **kwargs) + def holoviews(self): """ Returns a HoloViews object to render the output of this diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hvplot-0.8.3/hvplot/plotting/core.py new/hvplot-0.8.4/hvplot/plotting/core.py --- old/hvplot-0.8.3/hvplot/plotting/core.py 2023-03-17 12:10:46.000000000 +0100 +++ new/hvplot-0.8.4/hvplot/plotting/core.py 2023-06-05 20:38:12.000000000 +0200 @@ -113,7 +113,7 @@ if name in plots: plot_opts = plots[name] if "kind" in plot_opts and name in HoloViewsConverter._kind_mapping: - param.main.warning( + param.main.param.warning( "Custom options for existing plot types should not " "declare the 'kind' argument. The .%s plot method " "was unexpectedly customized with kind=%r." % (plot_opts["kind"], name) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hvplot-0.8.3/hvplot/tests/testgeo.py new/hvplot-0.8.4/hvplot/tests/testgeo.py --- old/hvplot-0.8.3/hvplot/tests/testgeo.py 2023-03-17 12:10:46.000000000 +0100 +++ new/hvplot-0.8.4/hvplot/tests/testgeo.py 2023-06-05 20:38:12.000000000 +0200 @@ -7,7 +7,6 @@ import numpy as np import pandas as pd import holoviews as hv -import pytest from hvplot.util import proj_to_cartopy @@ -107,6 +106,11 @@ with self.assertRaisesRegex(ValueError, "Projection must be defined"): self.da.hvplot.image('x', 'y', projection='foo') + def test_plot_with_projection_raises_an_error_when_tiles_set(self): + da = self.da.copy() + with self.assertRaisesRegex(ValueError, "Tiles can only be used with output projection"): + da.hvplot.image('x', 'y', crs=self.crs, projection='Robinson', tiles=True) + class TestGeoAnnotation(TestCase): @@ -261,6 +265,13 @@ assert points.kdims == ['x', 'y'] assert points.vdims == ['index'] + def test_points_hover_cols_positional_arg_sets_color(self): + points = self.cities.hvplot('name') + assert points.kdims == ['x', 'y'] + assert points.vdims == ['name'] + opts = hv.Store.lookup_options('bokeh', points, 'style').kwargs + assert opts['color'] == 'name' + def test_points_hover_cols_with_c_set_to_name(self): points = self.cities.hvplot(c='name') assert points.kdims == ['x', 'y'] @@ -268,16 +279,26 @@ opts = hv.Store.lookup_options('bokeh', points, 'style').kwargs assert opts['color'] == 'name' - @pytest.mark.xfail def test_points_hover_cols_with_by_set_to_name(self): points = self.cities.hvplot(by='name') - assert points.kdims == ['x', 'y'] - assert points.vdims == ['name'] + assert isinstance(points, hv.core.overlay.NdOverlay) + assert points.kdims == ['name'] + assert points.vdims == [] + for element in points.values(): + assert element.kdims == ['x', 'y'] + assert element.vdims == [] + + def test_points_project_xlim_and_ylim(self): + points = self.cities.hvplot(geo=True, xlim=(-10, 10), ylim=(-20, -10)) + opts = hv.Store.lookup_options('bokeh', points, 'plot').options + assert opts['xlim'] == (-10, 10) + assert opts['ylim'] == (-20, -10) - @pytest.mark.xfail( - reason='Waiting for upstream fix https://github.com/holoviz/holoviews/pull/5325', - raises=KeyError, - ) def test_polygons_by_subplots(self): polygons = self.polygons.hvplot(geo=True, by="name", subplots=True) assert isinstance(polygons, hv.core.layout.NdLayout) + + def test_polygons_turns_off_hover_when_there_are_no_fields_to_include(self): + polygons = self.polygons.hvplot(geo=True) + opts = hv.Store.lookup_options('bokeh', polygons, 'plot').kwargs + assert 'hover' not in opts.get('tools') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hvplot-0.8.3/hvplot/tests/testinteractive.py new/hvplot-0.8.4/hvplot/tests/testinteractive.py --- old/hvplot-0.8.3/hvplot/tests/testinteractive.py 2023-03-17 12:10:46.000000000 +0100 +++ new/hvplot-0.8.4/hvplot/tests/testinteractive.py 2023-06-05 20:38:12.000000000 +0200 @@ -14,6 +14,10 @@ from hvplot import bind from hvplot.interactive import Interactive from hvplot.xarray import XArrayInteractive +from hvplot.util import bokeh3 + +is_bokeh2 = pytest.mark.skipif(bokeh3, reason="requires bokeh 2.x") +is_bokeh3 = pytest.mark.skipif(not bokeh3, reason="requires bokeh 3.x") @pytest.fixture(scope='module') @@ -665,7 +669,7 @@ def test_interactive_pandas_frame_bind_operator_out_widgets(df): - select = pn.widgets.Select(default='A', options=list(df.columns)) + select = pn.widgets.Select(value='A', options=list(df.columns)) def sel_col(col): return df[col] @@ -1247,6 +1251,7 @@ assert layout.width == 200 +@is_bokeh2 def test_interactive_pandas_layout_default_with_widgets(df): w = pn.widgets.IntSlider(value=2, start=1, end=5) dfi = Interactive(df) @@ -1270,6 +1275,27 @@ assert isinstance(layout[0][0][1], pn.layout.HSpacer) +@is_bokeh3 +def test_interactive_pandas_layout_default_with_widgets_bk3(df): + w = pn.widgets.IntSlider(value=2, start=1, end=5) + dfi = Interactive(df) + dfi = dfi.head(w) + + assert dfi._center is False + assert dfi._loc == 'top_left' + + layout = dfi.layout() + + assert isinstance(layout, pn.Row) + assert len(layout) == 1 + assert isinstance(layout[0], pn.Column) + assert len(layout[0]) == 2 + assert isinstance(layout[0][0], pn.Column) + assert isinstance(layout[0][1], pn.pane.PaneBase) + assert len(layout[0][0]) == 1 + assert isinstance(layout[0][0][0], pn.widgets.IntSlider) + +@is_bokeh2 def test_interactive_pandas_layout_center_with_widgets(df): w = pn.widgets.IntSlider(value=2, start=1, end=5) dfi = df.interactive(center=True) @@ -1298,6 +1324,7 @@ assert isinstance(layout[1][1][2], pn.layout.HSpacer) +@is_bokeh2 def test_interactive_pandas_layout_loc_with_widgets(df): w = pn.widgets.IntSlider(value=2, start=1, end=5) dfi = df.interactive(loc='top_right') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hvplot-0.8.3/hvplot/util.py new/hvplot-0.8.4/hvplot/util.py --- old/hvplot-0.8.3/hvplot/util.py 2023-03-17 12:10:46.000000000 +0100 +++ new/hvplot-0.8.4/hvplot/util.py 2023-06-05 20:38:12.000000000 +0200 @@ -10,6 +10,7 @@ from packaging.version import Version from types import FunctionType +import bokeh import numpy as np import pandas as pd import param @@ -21,6 +22,8 @@ panel_available = False hv_version = Version(hv.__version__) +bokeh_version = Version(bokeh.__version__) +bokeh3 = bokeh_version >= Version("3.0") def with_hv_extension(func, extension='bokeh', logo=False): @@ -228,12 +231,21 @@ 3. cartopy.crs.CRS instance 4. None defaults to crs.PlateCaree """ + missing = [] try: import cartopy.crs as ccrs + except ImportError: + missing.append('cartopy') + try: import geoviews as gv # noqa + except ImportError: + missing.append('geoviews') + try: import pyproj except ImportError: - raise ImportError('Geographic projection support requires geoviews, pyproj and cartopy.') + missing.append('pyproj') + if missing: + raise ImportError(f'Geographic projection support requires: {", ".join(missing)}.') if crs is None: return ccrs.PlateCarree() @@ -320,7 +332,7 @@ return isinstance(data, (dd.DataFrame, dd.Series)) def is_intake(data): - if not check_library(data, 'intake'): + if "intake" not in sys.modules: return False from intake.source.base import DataSource return isinstance(data, DataSource) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hvplot-0.8.3/hvplot.egg-info/PKG-INFO new/hvplot-0.8.4/hvplot.egg-info/PKG-INFO --- old/hvplot-0.8.3/hvplot.egg-info/PKG-INFO 2023-03-17 12:17:18.000000000 +0100 +++ new/hvplot-0.8.4/hvplot.egg-info/PKG-INFO 2023-06-05 20:43:58.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: hvplot -Version: 0.8.3 +Version: 0.8.4 Summary: A high-level plotting API for the PyData ecosystem built on HoloViews. Home-page: https://hvplot.pyviz.org Author: Philipp Rudiger diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hvplot-0.8.3/hvplot.egg-info/requires.txt new/hvplot-0.8.4/hvplot.egg-info/requires.txt --- old/hvplot-0.8.3/hvplot.egg-info/requires.txt 2023-03-17 12:17:18.000000000 +0100 +++ new/hvplot-0.8.4/hvplot.egg-info/requires.txt 2023-06-05 20:43:58.000000000 +0200 @@ -22,7 +22,7 @@ ipykernel<6.18.0 ipywidgets matplotlib -nbsite>=0.7.2rc2 +nbsite>=0.8.0rc33 nbval networkx>=2.6.3 notebook>=5.4 @@ -36,7 +36,6 @@ pooch>=1.6.0 pre-commit pyct>=0.4.4 -pydata-sphinx-theme<0.10 pyepsg pygraphviz pyproj @@ -53,8 +52,6 @@ selenium>=3.141.0 setuptools>=30.3.0 spatialpandas>=0.4.3 -sphinx-copybutton -sphinx-design streamz>=0.3.0 xarray xarray>=0.18.2 @@ -97,10 +94,7 @@ numba>=0.51.0 datashader>=0.6.5 spatialpandas>=0.4.3 -nbsite>=0.7.2rc2 -pydata-sphinx-theme<0.10 -sphinx-copybutton -sphinx-design +nbsite>=0.8.0rc33 [examples] geoviews>=1.9.0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hvplot-0.8.3/setup.py new/hvplot-0.8.4/setup.py --- old/hvplot-0.8.3/setup.py 2023-03-17 12:10:46.000000000 +0100 +++ new/hvplot-0.8.4/setup.py 2023-06-05 20:38:12.000000000 +0200 @@ -109,10 +109,7 @@ # Additional packages required to build the docs extras_require['doc'] = extras_require['examples'] + [ - 'nbsite >=0.7.2rc2', - 'pydata-sphinx-theme <0.10', - 'sphinx-copybutton', - 'sphinx-design', + 'nbsite >=0.8.0rc33', ] # until pyproject.toml/equivalent is widely supported (setup_requires