Skip to content

Commit 3220d90

Browse files
authored
Merge pull request #194 from control-toolbox/compat
Update compat
2 parents 45e075b + aebbb6d commit 3220d90

File tree

5 files changed

+33
-4
lines changed

5 files changed

+33
-4
lines changed

Project.toml

Lines changed: 2 additions & 2 deletions
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"
@@ -29,7 +29,7 @@ CTModelsPlots = "Plots"
2929
CTBase = "0.16"
3030
DocStringExtensions = "0.9"
3131
Interpolations = "0.16"
32-
JLD2 = "0.5"
32+
JLD2 = "0.6"
3333
JSON3 = "1"
3434
LinearAlgebra = "1"
3535
MLStyle = "0.4"

docs/Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
66

77
[compat]
88
Documenter = "1"
9-
JLD2 = "0.5"
9+
JLD2 = "0.6"
1010
JSON3 = "1"
1111
Plots = "1"
1212
julia = "1.10"

src/print.jl

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,7 @@ function Base.show(io::IO, ::MIME"text/plain", ocp::Model)
249249
__is_objective_set(ocp) ? "V" : "X",
250250
)
251251
println("")
252+
#### PrettyTables v2
252253
h1 = Highlighter((data, i, j) -> data[i, j] == "X"; bold=true, foreground=:red)
253254
h2 = Highlighter((data, i, j) -> data[i, j] == "V"; bold=true, foreground=:green)
254255
pretty_table(
@@ -262,6 +263,19 @@ function Base.show(io::IO, ::MIME"text/plain", ocp::Model)
262263
alignment=:c,
263264
compact_printing=true,
264265
)
266+
#### PrettyTables v3
267+
# h1 = TextHighlighter((data, i, j) -> data[i, j] == "X", crayon"bold red")
268+
# h2 = TextHighlighter((data, i, j) -> data[i, j] == "V", crayon"bold green")
269+
# style = TextTableStyle(first_line_column_label = crayon"yellow bold")
270+
# pretty_table(
271+
# io,
272+
# data;
273+
# column_labels=header,
274+
# style= style,
275+
# highlighters=[h1, h2],
276+
# alignment=:c,
277+
# compact_printing=true,
278+
# )
265279

266280
#
267281
return nothing
@@ -537,6 +551,7 @@ function Base.show(io::IO, ::MIME"text/plain", ocp::PreModel)
537551
__is_objective_set(ocp) ? "V" : "X",
538552
)
539553
println("")
554+
#### PrettyTables v2
540555
h1 = Highlighter((data, i, j) -> data[i, j] == "X"; bold=true, foreground=:red)
541556
h2 = Highlighter((data, i, j) -> data[i, j] == "V"; bold=true, foreground=:green)
542557
pretty_table(
@@ -550,6 +565,19 @@ function Base.show(io::IO, ::MIME"text/plain", ocp::PreModel)
550565
alignment=:c,
551566
compact_printing=true,
552567
)
568+
#### PrettyTables v3
569+
# h1 = TextHighlighter((data, i, j) -> data[i, j] == "X", crayon"bold red")
570+
# h2 = TextHighlighter((data, i, j) -> data[i, j] == "V", crayon"bold green")
571+
# style = TextTableStyle(first_line_column_label = crayon"yellow bold")
572+
# pretty_table(
573+
# io,
574+
# data;
575+
# column_labels=header,
576+
# style= style,
577+
# highlighters=[h1, h2],
578+
# alignment=:c,
579+
# compact_printing=true,
580+
# )
553581

554582
#
555583
return nothing

test/Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Aqua = "0.8"
1616
CTBase = "0.16"
1717
CTDirect = "0.16"
1818
CTParser = "0.6"
19-
JLD2 = "0.5"
19+
JLD2 = "0.6"
2020
JSON3 = "1"
2121
NLPModelsIpopt = "0.10"
2222
Plots = "1"

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)