Skip to content

Commit f1e9201

Browse files
committed
update PrettyTables
1 parent 9a20a71 commit f1e9201

2 files changed

Lines changed: 6 additions & 5 deletions

File tree

Project.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "RankChoiceVoting"
22
uuid = "ab51d771-9e38-4464-b0a7-bec5bf4029bc"
33
authors = ["itsdfish"]
4-
version = "0.1.2"
4+
version = "0.1.3"
55

66
[deps]
77
Combinatorics = "861a8166-3701-5b0c-9a16-15d98fcdc6aa"
@@ -16,7 +16,7 @@ StatsBase = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91"
1616
Combinatorics = "1"
1717
Distributions = "0.25"
1818
OrderedCollections = "1.4.0"
19-
PrettyTables = "2.0.0"
19+
PrettyTables = "3.0.0"
2020
SafeTestsets = "0.0.1, 0.1"
2121
StatsBase = "0.33,0.34.0"
2222
julia = "1"

src/common.jl

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -174,10 +174,11 @@ function Base.show(io::IO, ::MIME"text/plain", model::Ranks)
174174
return pretty_table(
175175
io,
176176
values;
177-
title = model_name,
177+
#title = model_name,
178+
column_labels = ["Counts", "Ranks"],
178179
compact_printing = false,
179-
header = ["Counts", "Ranks"],
180-
row_label_alignment = :l,
180+
row_label_column_alignment = :l,
181+
formatters = [fmt__printf("%5.2f", [2,])],
181182
alignment = :l
182183
)
183184
end

0 commit comments

Comments
 (0)