Skip to content

Commit ce3ae73

Browse files
remove Juno dependency
1 parent 0fcc66d commit ce3ae73

File tree

5 files changed

+9
-15
lines changed

5 files changed

+9
-15
lines changed

REQUIRE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
julia 0.6
2-
Juno
2+
Requires
33
RecipesBase 0.1.0
44
StaticArrays

src/RecursiveArrayTools.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,16 @@ __precompile__()
22

33
module RecursiveArrayTools
44

5-
using Juno, RecipesBase, StaticArrays
5+
using Requires, RecipesBase, StaticArrays
66

77
abstract type AbstractVectorOfArray{T, N} <: AbstractArray{T, N} end
88
abstract type AbstractDiffEqArray{T, N} <: AbstractVectorOfArray{T, N} end
99

1010
include("utils.jl")
1111
include("vector_of_array.jl")
1212
include("array_partition.jl")
13-
13+
include("juno_rendering.jl")
14+
1415
export VectorOfArray, DiffEqArray, AbstractVectorOfArray, AbstractDiffEqArray,
1516
vecarr_to_arr, vecarr_to_vectors, tuples
1617

src/array_partition.jl

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -206,12 +206,6 @@ Base.first(A::ArrayPartition) = first(first(A.x))
206206
Base.last(A::ArrayPartition) = last(last(A.x))
207207

208208
## display
209-
210-
# restore the type rendering in Juno
211-
Juno.@render Juno.Inline x::ArrayPartition begin
212-
fields = fieldnames(typeof(x))
213-
Juno.LazyTree(typeof(x), () -> [Juno.SubTree(Juno.Text("$f"), Juno.getfield′(x, f)) for f in fields])
214-
end
215209
Base.summary(A::ArrayPartition) = string(typeof(A), " with arrays:")
216210
Base.show(io::IO,A::ArrayPartition) = Base.show.(io,A.x)
217211
Base.show(io::IO, m::MIME"text/plain", A::ArrayPartition) = show(io, m, A.x)

src/juno_rendering.jl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
@require Juno begin
2+
# Juno Rendering
3+
Juno.render(i::Juno.Inline, x::ArrayPartition) = Juno.render(i, Juno.defaultrepr(x))
4+
Juno.render(i::Juno.Inline, x::AbstractVectorOfArray) = Juno.render(i, Juno.defaultrepr(x))
5+
end

src/vector_of_array.jl

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -91,12 +91,6 @@ Base.summary(A::AbstractVectorOfArray) = string("VectorOfArray{",eltype(A),",",n
9191
Base.show(io::IO, x::AbstractDiffEqArray) = (print(io,"t: ");show(io, x.t);println(io);print(io,"u: ");show(io, x.u))
9292
Base.show(io::IO, m::MIME"text/plain", x::AbstractDiffEqArray) = (print(io,"t: ");show(io,m,x.t);println(io);print(io,"u: ");show(io,m,x.u))
9393

94-
# restore the type rendering in Juno
95-
Juno.@render Juno.Inline x::AbstractVectorOfArray begin
96-
fields = fieldnames(typeof(x))
97-
Juno.LazyTree(typeof(x), () -> [Juno.SubTree(Juno.Text("$f"), Juno.getfield′(x, f)) for f in fields])
98-
end
99-
10094
# plot recipes
10195
@recipe function f(VA::AbstractVectorOfArray)
10296
convert(Array,VA)

0 commit comments

Comments
 (0)