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
8 changes: 4 additions & 4 deletions docs/make.jl
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
using Documenter, TableTraits

makedocs(
modules = [TableTraits],
sitename = "TableTraits.jl",
modules=[TableTraits],
sitename="TableTraits.jl",
analytics="UA-132838790-1",
pages = [
pages=[
"Introduction" => "index.md"
]
)

deploydocs(
repo = "github.com/queryverse/TableTraits.jl.git"
repo="github.com/queryverse/TableTraits.jl.git"
)
4 changes: 2 additions & 2 deletions src/TableTraits.jl
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ export supports_get_columns_view, get_columns_view
function isiterabletable(x::T) where {T}
isiterable(x) || return false

if Base.IteratorEltype(x)==Base.HasEltype()
if Base.IteratorEltype(x) == Base.HasEltype()
et = Base.eltype(x)
if et === Union{}
return false
elseif et <: NamedTuple
return true
elseif et===Any
elseif et === Any
return missing
else
return false
Expand Down
8 changes: 4 additions & 4 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ using Test

@testset "TableTraits" begin

table_array = [(a=1,), (a=2,)]
any_table_array = Any[(a=1,), (a=2,)]
table_array = [(a = 1,), (a = 2,)]
any_table_array = Any[(a = 1,), (a = 2,)]
other_array = [1,2,3]
without_eltype = (i for i in table_array)

@test isiterabletable(table_array)
@test !isiterabletable(other_array)
@test isiterabletable(without_eltype)===missing
@test isiterabletable(any_table_array)===missing
@test isiterabletable(without_eltype) === missing
@test isiterabletable(any_table_array) === missing
@test !supports_get_columns_copy(table_array)
@test !supports_get_columns_view(table_array)
@test !supports_get_columns_copy_using_missing(table_array)
Expand Down