From 308ed309ed1f0f7bd2c1c0d0f9fcd2498090a326 Mon Sep 17 00:00:00 2001 From: Andrew Huang Date: Wed, 28 Aug 2024 15:50:45 -0700 Subject: [PATCH 1/3] pin polars version --- envs/py3.10-tests.yaml | 1 + envs/py3.11-tests.yaml | 1 + envs/py3.12-tests.yaml | 1 + envs/py3.9-tests.yaml | 1 + pyproject.toml | 2 +- 5 files changed, 5 insertions(+), 1 deletion(-) diff --git a/envs/py3.10-tests.yaml b/envs/py3.10-tests.yaml index 370f32502..ad45cfab4 100644 --- a/envs/py3.10-tests.yaml +++ b/envs/py3.10-tests.yaml @@ -48,6 +48,7 @@ dependencies: - pillow>=8.2.0 - plotly - polars + - polars<1.6.0 - pooch - pooch>=1.6.0 - pre-commit diff --git a/envs/py3.11-tests.yaml b/envs/py3.11-tests.yaml index 79b2343b2..51edd9f0d 100644 --- a/envs/py3.11-tests.yaml +++ b/envs/py3.11-tests.yaml @@ -48,6 +48,7 @@ dependencies: - pillow>=8.2.0 - plotly - polars + - polars<1.6.0 - pooch - pooch>=1.6.0 - pre-commit diff --git a/envs/py3.12-tests.yaml b/envs/py3.12-tests.yaml index 40aed245c..3dbc360a6 100644 --- a/envs/py3.12-tests.yaml +++ b/envs/py3.12-tests.yaml @@ -48,6 +48,7 @@ dependencies: - pillow>=8.2.0 - plotly - polars + - polars<1.6.0 - pooch - pooch>=1.6.0 - pre-commit diff --git a/envs/py3.9-tests.yaml b/envs/py3.9-tests.yaml index bd89d3556..efbd9dc32 100644 --- a/envs/py3.9-tests.yaml +++ b/envs/py3.9-tests.yaml @@ -47,6 +47,7 @@ dependencies: - pillow>=8.2.0 - plotly - polars + - polars<1.6.0 - pooch - pooch>=1.6.0 - pre-commit diff --git a/pyproject.toml b/pyproject.toml index 1afe673f5..da775d381 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -76,7 +76,7 @@ tests = [ "hvplot[fugue-sql]", # end fugue "ibis-framework[duckdb]", # ibis-duckdb on conda - "polars", + "polars<1.6.0", ] # In 0.9 fugue added the sql extra but didn't add a fugue-sql package, removing the sql deps from fugue # Adding them manually here From 8c9c60c977cc5598c786b1d805038fb7d9d64ef6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20H=C3=B8xbro=20Hansen?= Date: Thu, 29 Aug 2024 07:25:02 +0200 Subject: [PATCH 2/3] Unpin polars --- envs/py3.10-tests.yaml | 1 - envs/py3.11-tests.yaml | 1 - envs/py3.12-tests.yaml | 1 - envs/py3.9-tests.yaml | 1 - pyproject.toml | 2 +- 5 files changed, 1 insertion(+), 5 deletions(-) diff --git a/envs/py3.10-tests.yaml b/envs/py3.10-tests.yaml index ad45cfab4..370f32502 100644 --- a/envs/py3.10-tests.yaml +++ b/envs/py3.10-tests.yaml @@ -48,7 +48,6 @@ dependencies: - pillow>=8.2.0 - plotly - polars - - polars<1.6.0 - pooch - pooch>=1.6.0 - pre-commit diff --git a/envs/py3.11-tests.yaml b/envs/py3.11-tests.yaml index 51edd9f0d..79b2343b2 100644 --- a/envs/py3.11-tests.yaml +++ b/envs/py3.11-tests.yaml @@ -48,7 +48,6 @@ dependencies: - pillow>=8.2.0 - plotly - polars - - polars<1.6.0 - pooch - pooch>=1.6.0 - pre-commit diff --git a/envs/py3.12-tests.yaml b/envs/py3.12-tests.yaml index 3dbc360a6..40aed245c 100644 --- a/envs/py3.12-tests.yaml +++ b/envs/py3.12-tests.yaml @@ -48,7 +48,6 @@ dependencies: - pillow>=8.2.0 - plotly - polars - - polars<1.6.0 - pooch - pooch>=1.6.0 - pre-commit diff --git a/envs/py3.9-tests.yaml b/envs/py3.9-tests.yaml index efbd9dc32..bd89d3556 100644 --- a/envs/py3.9-tests.yaml +++ b/envs/py3.9-tests.yaml @@ -47,7 +47,6 @@ dependencies: - pillow>=8.2.0 - plotly - polars - - polars<1.6.0 - pooch - pooch>=1.6.0 - pre-commit diff --git a/pyproject.toml b/pyproject.toml index da775d381..1afe673f5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -76,7 +76,7 @@ tests = [ "hvplot[fugue-sql]", # end fugue "ibis-framework[duckdb]", # ibis-duckdb on conda - "polars<1.6.0", + "polars", ] # In 0.9 fugue added the sql extra but didn't add a fugue-sql package, removing the sql deps from fugue # Adding them manually here From 1424f782ec5876fe397f76b22c5f457c4f5701c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20H=C3=B8xbro=20Hansen?= Date: Thu, 29 Aug 2024 07:27:10 +0200 Subject: [PATCH 3/3] Remove polars.plot tests --- hvplot/tests/plotting/testcore.py | 13 ------------- hvplot/tests/testplotting.py | 12 ------------ 2 files changed, 25 deletions(-) diff --git a/hvplot/tests/plotting/testcore.py b/hvplot/tests/plotting/testcore.py index dcadbabab..3e5986d54 100644 --- a/hvplot/tests/plotting/testcore.py +++ b/hvplot/tests/plotting/testcore.py @@ -1,6 +1,3 @@ -from packaging.version import Version -from unittest import SkipTest - import numpy as np import pandas as pd import hvplot.pandas # noqa @@ -96,13 +93,3 @@ def test_series_polars(kind): ser = pl.Series(values=np.random.rand(10), name='A') assert isinstance(ser, pl.Series) ser.hvplot(kind=kind) - - -@pytest.mark.skipif(skip_polar, reason='polars not installed') -@series_kinds -def test_series_polars_downstream(kind): - if Version(pl.__version__) < Version('0.20.3'): - raise SkipTest('plot namespace in Polars introduced in 0.20.3') - ser = pl.Series(values=np.random.rand(10), name='A') - assert isinstance(ser, pl.Series) - ser.plot(kind=kind) diff --git a/hvplot/tests/testplotting.py b/hvplot/tests/testplotting.py index 567257f41..e7c747e0b 100644 --- a/hvplot/tests/testplotting.py +++ b/hvplot/tests/testplotting.py @@ -4,15 +4,11 @@ from unittest import TestCase -import holoviews as hv import pandas as pd -import pytest from parameterized import parameterized from hvplot.converter import HoloViewsConverter -from hvplot.plotting import plot -from hvplot.tests.util import makeDataFrame no_args = ['line', 'area', 'hist', 'box', 'kde', 'density', 'bar', 'barh'] x_y = ['scatter', 'hexbin'] @@ -54,11 +50,3 @@ def test_pandas_dataframe_plot_does_not_implement_pie(self): class TestPandasHvplotPlotting(TestPandasHoloviewsPlotting): def setUp(self): pd.options.plotting.backend = 'hvplot' - - -def test_plot_supports_polars(): - pl = pytest.importorskip('polars') - dfp = pl.DataFrame(makeDataFrame()) - out = plot(dfp, 'line') - assert isinstance(out, hv.NdOverlay) - assert out.keys() == dfp.columns