Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/problems/problem_utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ function Base.summary(io::IO, prob::AbstractLinearProblem)
type_color, isinplace(prob),
no_color)
end
Base.show(io::IO, A::AbstractSciMLProblem) = show(io, MIME"text/plain", A)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this pretty much goes against the default and expected behaviour of show, see eg https://docs.julialang.org/en/v1/manual/types/#man-custom-pretty-printing. The two args method should print a compact one-line representation.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right. The 2 arg version shouldn't have the line breaks. I'll take another pass on this tomorrow (that also removes the redundancy of all the show methods.)

function Base.show(io::IO, mime::MIME"text/plain", A::AbstractLinearProblem)
summary(io, A)
println(io)
Expand Down
2 changes: 2 additions & 0 deletions src/solutions/solution_interface.jl
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,8 @@ function Base.summary(io::IO, A::AbstractTimeseriesSolution)
type_color, eltype(A.t), no_color)
end


Base.show(io::IO, A::AbstractSciMLProblem) = show(io, MIME"text/plain", A)
function Base.show(io::IO, m::MIME"text/plain", A::AbstractTimeseriesSolution)
println(io, string("retcode: ", A.retcode))
println(io, string("Interpolation: "), interp_summary(A.interp))
Expand Down