holoviz / holoviews

With Holoviews, your data visualizes itself.
https://holoviews.org
BSD 3-Clause "New" or "Revised" License
2.69k stars 403 forks source link

Test failures for `=holoviews-1.15.3` #5592

Open TheChymera opened 1 year ago

TheChymera commented 1 year ago

Hi, I'm updating the Gentoo package for your software, and trying to enable the tests to hopefully make it more reliable. This is the full [build log]() including the tests, failures, and tracebacks. This part (holoviews/tests/plotting/matplotlib/test_boxwhisker.py::TestMPLBoxWhiskerPlot::test_boxwhisker_simple_overlay Fatal Python error: Aborted) seems the most concerning, as it outright breaks the test suite. But there are others:

Looking at one of the failures manually via the cloned repo:

[deco]~/src/holoviews ❱ pytest -vvs holoviews/tests/test_annotators.py::Test_annotate::test_annotate_overlay
=========================================================== test session starts ============================================================
platform linux -- Python 3.10.9, pytest-7.2.0, pluggy-1.0.0 -- /usr/bin/python3.10
cachedir: .pytest_cache
rootdir: /home/chymera/src/holoviews, configfile: pyproject.toml
plugins: pkgcore-0.12.18, mock-3.10.0, anyio-3.6.1, timeout-2.1.0, cython-0.2.0, asdf-2.8.3, doctestplus-0.11.2
collected 1 item

holoviews/tests/test_annotators.py::Test_annotate::test_annotate_overlay FAILED

================================================================= FAILURES =================================================================
___________________________________________________ Test_annotate.test_annotate_overlay ____________________________________________________

self = <holoviews.tests.test_annotators.Test_annotate testMethod=test_annotate_overlay>

    def test_annotate_overlay(self):
>       layout = annotate(EsriStreet() * Points([]), annotations=['Label'])

holoviews/tests/test_annotators.py:28:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib/python3.10/site-packages/param/parameterized.py:3658: in __new__
    return inst.__call__(*args,**params)
holoviews/annotators.py:142: in __call__
    self.annotator = annotator_type(element, **params)
holoviews/annotators.py:228: in __init__
    self.plot = DynamicMap(self._get_plot)
holoviews/core/spaces.py:785: in __init__
    valid, invalid = Stream._process_streams(streams)
holoviews/streams.py:218: in _process_streams
    s = ParamMethod(s)
holoviews/streams.py:839: in __init__
    super().__init__(parameterized, parameters, watch, **params)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <[AttributeError("'ParamMethod' object has no attribute '_rename'") raised in repr()] ParamMethod object at 0x7f33c61c0a60>
parameterized = PointAnnotator(Points, annotations=['Label'])
parameters = [<param.ClassSelector object at 0x7f33c62865c0>, <param.ClassSelector object at 0x7f33c6286520>, <param.Dict object at 0x7f33c6286660>]
watch = True, watch_only = True, params = {}

    def __init__(self, parameterized=None, parameters=None, watch=True, watch_only=False, **params):
        if util.param_version < Version('1.8.0') and watch:
>           raise RuntimeError('Params stream requires param version >= 1.8.0, '
                               'to support watching parameters.')
E           RuntimeError: Params stream requires param version >= 1.8.0, to support watching parameters.

holoviews/streams.py:685: RuntimeError
========================================================= short test summary info ==========================================================
FAILED holoviews/tests/test_annotators.py::Test_annotate::test_annotate_overlay - RuntimeError: Params stream requires param version >= 1.8.0, to support watching parameters.
============================================================ 1 failed in 1.37s =============================================================

It seems it's complaining about the param version, which is 1.14.2 on the system:

[deco]~ ❱ eix -e panel
[?] dev-python/panel [1]
     Available versions:  (~)0.11.0 {PYTHON_TARGETS="python3_8 python3_9"}
     Installed versions:  0.14.2(12:35:31 15/01/23)(PYTHON_TARGETS="python3_10")
     Homepage:            https://panel.holoviz.org
     Description:         High-level app and dashboarding solution for Python

[1] "science" /home/chymera/src/sci

However, this might be related to the fact that the version is not correctly annotated in the GitHub tarball, which we need to use for param:

[deco]~ ❱ python -c "import param; print(param.__version__)"
0.0.0+g897687f71-gitarchive
bnavigator commented 1 year ago
  1. eix says 0.14.2 which is < 1.8.0 The newest available version would be 1.12.3
  2. If your rationale in https://github.com/holoviz/param/issues/678 is valid, you need to enforce your installer to use a correct version. See https://github.com/holoviz/param/blob/main/param/version.py#L38-L80
TheChymera commented 1 year ago

Oh, apologies, I missed that, I thought it was requiring 0.1.8. Looks like we're distributing some seriously old versions of param. Let me go ahead and fix that first.