Skip to content

Commit 1b9b6a3

Browse files
committed
update prettytables to v3.0
1 parent 552793a commit 1b9b6a3

File tree

3 files changed

+10
-9
lines changed

3 files changed

+10
-9
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "CTModels"
22
uuid = "34c4fa32-2049-4079-8329-de33c2a22e2d"
33
authors = ["Olivier Cots <olivier.cots@toulouse-inp.fr>"]
4-
version = "0.6.3"
4+
version = "0.6.4"
55

66
[deps]
77
CTBase = "54762871-cc72-4466-b8e8-f6c8b58076cd"

src/print.jl

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -251,13 +251,13 @@ function Base.show(io::IO, ::MIME"text/plain", ocp::Model)
251251
println("")
252252
h1 = TextHighlighter((data, i, j) -> data[i, j] == "X", crayon"bold red")
253253
h2 = TextHighlighter((data, i, j) -> data[i, j] == "V", crayon"bold green")
254+
style = TextTableStyle(first_line_column_label = crayon"yellow bold")
254255
pretty_table(
255256
io,
256257
data;
257-
header=header,
258-
header_crayon=crayon"yellow",
259-
crop=:none,
260-
highlighters=(h1, h2),
258+
column_labels=header,
259+
style= style,
260+
highlighters=[h1, h2],
261261
alignment=:c,
262262
compact_printing=true,
263263
)
@@ -538,13 +538,13 @@ function Base.show(io::IO, ::MIME"text/plain", ocp::PreModel)
538538
println("")
539539
h1 = TextHighlighter((data, i, j) -> data[i, j] == "X", crayon"bold red")
540540
h2 = TextHighlighter((data, i, j) -> data[i, j] == "V", crayon"bold green")
541+
style = TextTableStyle(first_line_column_label = crayon"yellow bold")
541542
pretty_table(
542543
io,
543544
data;
544-
header=header,
545-
header_crayon=crayon"yellow",
546-
crop=:none,
547-
highlighters=(h1, h2),
545+
column_labels=header,
546+
style= style,
547+
highlighters=[h1, h2],
548548
alignment=:c,
549549
compact_printing=true,
550550
)

test/extras/print_model.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
using Revise
12
using Pkg
23
Pkg.activate(".")
34

0 commit comments

Comments
 (0)