posit-dev / great-tables

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

Enhance test coverage for column selection #325

Closed jrycw closed 2 months ago

jrycw commented 2 months ago

Related to #35.

This PR aims to enhance test coverage for cols_move, cols_move_to_start, cols_move_to_end, and cols_hide functions in both Pandas and Polars.

Meanwhile, given the substantial reliance on column selection within the fmt_* functions, should we conduct thorough tests for them using Polars selectors, or are we satisfied with the current state?

codecov-commenter commented 2 months ago

Codecov Report

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

Project coverage is 83.43%. Comparing base (aa14ccf) to head (e1256f4).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #325 +/- ## ========================================== + Coverage 82.87% 83.43% +0.55% ========================================== Files 41 41 Lines 4287 4287 ========================================== + Hits 3553 3577 +24 + Misses 734 710 -24 ```

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

machow commented 2 months ago

Meanwhile, given the substantial reliance on column selection within the fmt_* functions, should we conduct thorough tests for them using Polars selectors, or are we satisfied with the current state?

It seems okay to lean on the tests of fmt(), which the fmt_*() functions should end up calling (and handles the column selection).

https://github.com/posit-dev/great-tables/blob/main/tests/test_formats.py#L74

machow commented 2 months ago

Thanks so much for making sure things are covered! @rich-iannone do you want to merge?