posit-dev / great-tables

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

Update `GT.save()` #454

Closed jrycw closed 2 months ago

jrycw commented 2 months ago

Related issues: #391, #440

This PR aims to refine GT.save() in three areas:

  1. Use Path().suffix to check the file extension.
  2. Unpack window_size directly instead of using indexing.
  3. Add an encoding parameter, defaulting to utf-8 for writing temporary files.

I'm not entirely sure if utf-8 is the ideal fix for all users, but I believe it's the best default for most. Let's start with utf-8 and adjust over time if needed.

jrycw commented 2 months ago

I'm curious why codecov bot isn't running for this PR?

rich-iannone commented 2 months ago

I'm curious why codecov bot isn't running for this PR?

I looked into our project configuration in the codecov site and saw nothing that requires attention. This might be a rare miss from codecov (maybe due to services being down). I'll see if this can be reported to them however.