posit-dev / great-tables

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

Fix error from incorrectly passing nanoplot options to args in `_generate_nanoplot()` #258

Closed rich-iannone closed 3 months ago

rich-iannone commented 3 months ago

In a previous PR, a call to _generate_nanoplot() was simplified to use ** to pass through args:

https://github.com/posit-dev/great-tables/blob/cd618a4111b0f5206e412b522e2c50c06b2c9e8d/great_tables/_formats.py#L3832

However, the argument names in three cases don't match. These are:

The solution here is to expand the shorter arg names to their longer counterparts. This doesn't break the GT API since the longer names are what the user has access to within nanoplot_options().

With this change, examples in https://posit-dev.github.io/great-tables/blog/introduction-0.4.0/ should no longer be broken.

codecov-commenter commented 3 months ago

Codecov Report

Attention: Patch coverage is 82.35294% with 3 lines in your changes are missing coverage. Please review.

Project coverage is 75.26%. Comparing base (cd618a4) to head (ff69cb5).

Files Patch % Lines
great_tables/_utils_nanoplots.py 82.35% 3 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #258 +/- ## ======================================= Coverage 75.26% 75.26% ======================================= Files 41 41 Lines 4180 4180 ======================================= Hits 3146 3146 Misses 1034 1034 ```

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