posit-dev / great-tables

Make awesome display tables using Python.
https://posit-dev.github.io/great-tables/
MIT License
1.42k stars 48 forks source link

fix: better error for list data fmt_nanoplot #356

Closed marcozzxx810 closed 1 month ago

marcozzxx810 commented 1 month ago

Summary

add a type check for data column, so that only scalar value is passed.

will add a pytest but want to make sure this is expected.

Related GitHub Issues and PRs

Checklist

machow commented 1 month ago

Hey, thanks for taking this up! It seems like the challenge in #331 might be:

I wonder if just validating that plot_type is in the list of plot_type options would be enough to resolve the issue? I'm happy to take it up, or if you want to take a swing at it, I'm happy to review!

marcozzxx810 commented 1 month ago

Hi @machow , thank you for the guidelines. I think it is clear for me now.

I will change it and add a testcase for it

marcozzxx810 commented 1 month ago

Hi @machow, I have updated the code but CI Test seems to failed in main as well.

It will be great that if you can let me know how to resolve.

rich-iannone commented 1 month ago

I can reproduce this on my system after upgrading Polars to version 0.20.28.

codecov-commenter commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 85.91%. Comparing base (e3649d2) to head (2bbbd1a).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #356 +/- ## ======================================= Coverage 85.90% 85.91% ======================================= Files 41 41 Lines 4328 4330 +2 ======================================= + Hits 3718 3720 +2 Misses 610 610 ```

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