First all, I would like to apologize. When I started to develop PrettyTables.jl I thought it will be a very small project just to replicate the functionality in this website. However, it became much bigger, with three back-ends, highlighting options, formatters, etc. Because of this, I made very bad decisions in the past that I need to correct now. Unfortunately, these corrections will lead to breaking changes in the next release.
Thus, I would like to ask if people that are using this package can help me to test the version that is in
master, providing me feedback of what can be improved in the API.
So, let’s see the first breaking change so far.
I decided to change the behavior of
hlines keyword in text back-end. In the past, this was used to draw horizontal lines in the table body. However, there was a demand to add an option to remove the first and last lines of the table. I did this by adding a field to the structure that handles the table format (
TextFormat). So, it turns out that many people were creating new structures just to remove those lines. This is bad… Now,
hlines can be used to remove those lines and the previous behavior was transferred to
body_hlines. In the end, we can now easily do things like:
julia> using PrettyTables julia> using Statistics julia> data = [ 100 200 300 400 235 452 332 201 433 29 123 223 ]; julia> pretty_table([data mean(data, dims = 2)], ["Experiment 1" "Experiment 2" "Experiment 3" "Experiment 4" "Mean" "[Unit]" "[Unit]" "[Unit]" "[Unit]" "[Unit]"], row_names = ["Set A", "Set B", "Set C"], hlines = [:header], vlines = [1,5], header_crayon = crayon"bold yellow", row_name_crayon = crayon"bold green", highlighters = Highlighter( (data,i,j)->j == 5, foreground = :blue, bold = true))
I will appreciate if someone can take a look at the keywords
vlines of the Text back-end, and provide me some tips if this is a good API. This will help to reduce the number of breaking changes in the future until we reach the 1.0 milestone