holoviz / panel

Panel: The powerful data exploration & web app framework for Python
https://panel.holoviz.org
BSD 3-Clause "New" or "Revised" License
4.8k stars 519 forks source link

enh: Support polars in `pn.cache` #7472

Closed hoxbro closed 2 weeks ago

hoxbro commented 2 weeks ago

Resolves https://github.com/holoviz/panel/issues/7467

I need to add a test.

import polars as pl
from panel.io.cache import _polars_hash

df = pl.DataFrame({"column1": [1, 2, 3], "column2": ["a", "b", "c"]})

_polars_hash(df), _polars_hash(df.lazy()), _polars_hash(df["column1"])

image

codecov[bot] commented 2 weeks ago

Codecov Report

Attention: Patch coverage is 93.22034% with 4 lines in your changes missing coverage. Please review.

Project coverage is 82.32%. Comparing base (c06f779) to head (9cbf808). Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
panel/io/cache.py 90.24% 4 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #7472 +/- ## ========================================== + Coverage 82.30% 82.32% +0.02% ========================================== Files 338 338 Lines 50819 50889 +70 ========================================== + Hits 41825 41896 +71 + Misses 8994 8993 -1 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.