Current state and the future of PrettyTables.jl

Ronis_BR
Wed, 21 Aug 2024 14:18:22 +0000
Package Announcements

Hi!

I started writing PrettyTables.jl six years ago. My idea was to make a very simple package to print some tabular data just like we have in ASCII Table Generator – Quickly format ASCII table. Great for source code comments and markdown!

Time passed, and PrettyTables.jl became much larger than I anticipated. We now have four back ends (text, HTML, latex, and markdown) and a huge set of features.

PrettyTables.jl has being very stable so far! I cannot remember the last issue about an actual bug (and not feature request). However, the code is a mess very difficult to understand and with questionable decisions. For example, the back ends do not share that much code, leading to duplications everywhere. I think this is avoiding contributions from the community.

Hence, I decided to use this stability to focus on a full rewrite of the package. Previously, I tried to make a system so adaptable that it would be possible to add many columns as the user wants to print information. After all these years, we are still using two additional columns (number and labels) and no feature request for more data.

I was reading the amazing analysis in the R’s gt package documentation on tables: https://gt.rstudio.com, and I decided to use the same approach with some tuning. Hence, PrettyTables.jl v3 will be based on R’s gt package, including the some names (notice that I am not a native speaker and many keyword names I used was pretty bad , pun intended). Hopefully, this new design will allow me to add more back ends much easier and feature that were long missing (like merging header cells).

I will also remove many features that I have not seen any package using to let the code base more simple and maintainable. Thus, I need some feedback about what I cannot remove and also patience because v3 will be completely breaking. It will be a bumpy ride

(@bkamins) As a starting point, all features DataFrames.jl is using will continue working exactly the same with only API changes. My idea is to provide the same output we have today for the feature set used by DataFrames.jl.

145 posts - 34 participants