Skip to content

Commit

Permalink
printing
Browse files Browse the repository at this point in the history
  • Loading branch information
louisponet committed Jun 7, 2018
1 parent ba8b28a commit 518ddf0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 18 deletions.
17 changes: 9 additions & 8 deletions src/display/overloads.jl
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@ function Base.display(data::Vector{InputData})
map(display, data)
end

function Base.display(input::DFInput)
print_info(input)
end

function Base.display(band::DFBand{T}) where T <: AbstractFloat
string = """DFBand{$T}:
k_points of length $(length(band.k_points_cryst)):
Expand All @@ -41,9 +37,14 @@ function Base.display(bands::Vector{<:DFBand})
map(display,bands)
end

function Base.show(io::IO, job::DFJob)
print_info(job, io)
end
function Base.display(io::IO, job::DFJob)
print_info(job, io)
s = """--------------------
DFJob: $(job.name)
Local_dir: $(job.local_dir)
Server: $(job.server)
Server_dir: $(job.server_dir)
$(length(job.inputs)) calculations
--------------------
"""
dfprintln(io, s)
end
11 changes: 1 addition & 10 deletions src/job.jl
Original file line number Diff line number Diff line change
Expand Up @@ -847,16 +847,7 @@ end
Prints general info of the job.
"""
function print_info(job::DFJob,io=STDIN)
s = """--------------------
DFJob: $(job.name)
Local_dir: $(job.local_dir)
Server: $(job.server)
Server_dir: $(job.server_dir)
$(length(job.inputs)) calculations
--------------------
"""
dfprintln(io, s)
end
end

hasoutput(job::DFJob, input) = ispath(outpath(job, input))

Expand Down

0 comments on commit 518ddf0

Please sign in to comment.