Skip to content
This repository has been archived by the owner on May 5, 2019. It is now read-only.

Commit

Permalink
Remove Juno code
Browse files Browse the repository at this point in the history
  • Loading branch information
nalimilan committed Feb 20, 2017
1 parent 5f9d24f commit 6a7b91d
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 34 deletions.
1 change: 0 additions & 1 deletion REQUIRE
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,3 @@ SortingAlgorithms
Reexport
Compat 0.8.4
FileIO 0.1.2
Juno 0.2.4
25 changes: 0 additions & 25 deletions src/abstractdatatable/show.jl
Original file line number Diff line number Diff line change
Expand Up @@ -572,28 +572,3 @@ function showcols(io::IO, dt::AbstractDataTable) # -> Void
end

showcols(dt::AbstractDataTable) = showcols(STDOUT, dt) # -> Void

using Juno
using Juno: Inline, LazyTree, Table, Row, strong

const SIZE = 25

function to_matrix(dt::AbstractDataTable)
res = Array{Any}(size(dt))
for (j, col) in enumerate(columns(dt)), i = 1:length(col)
isassigned(col, i) && (res[i, j] = col[i])
end
return res
end

function _render(dt::AbstractDataTable)
width = min(size(dt, 2), SIZE)
height = min(size(dt, 1), SIZE)
header = map(x->strong(string(x)), reshape(names(dt), 1, width))
body = Juno.undefs(to_matrix(dt))[1:height, 1:width]
view = Table(vcat(header, body))
LazyTree(Row(typeof(dt), text" ", Juno.dims(size(dt)...)),
() -> [view])
end

@render Inline dt::AbstractDataTable _render(dt)
8 changes: 0 additions & 8 deletions test/show.jl
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,6 @@ module TestShow
showall(io, subdt)
showall(io, subdt, true)

if VERSION > v"0.5-"
using Juno
out = DataTables._render(dt)
@assert out.head.xs[1] == DataTable
@assert isa(out.children()[1], Juno.Table)
@assert size(out.children()[1].xs) == (4, 2)
end

dtvec = DataTable[dt for _=1:3]
show(io, dtvec)
showall(io, dtvec)
Expand Down

0 comments on commit 6a7b91d

Please sign in to comment.