diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 0b5c05a..b930fec 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -15,7 +15,6 @@ jobs: fail-fast: false matrix: version: - - '1.0' - '1' - 'nightly' os: diff --git a/Project.toml b/Project.toml index b77c5db..d983611 100644 --- a/Project.toml +++ b/Project.toml @@ -1,6 +1,6 @@ name = "TableView" uuid = "40c74d1a-b44c-5b06-a7c1-6cbea58ea978" -version = "0.7.1" +version = "0.7.2" [deps] Dates = "ade2ca70-3891-5945-98fb-dc099432e06a" @@ -14,7 +14,7 @@ WebIO = "0f1e0344-ec1d-5b48-a673-e5cf874b6c29" [compat] JSExpr = "0.4, 0.5" JSON = "0.18, 0.19, 0.20, 0.21" -Observables = "0.2, 0.3, 0.4" +Observables = "0.2, 0.3, 0.4, 0.5" Tables = "1" WebIO = "0.8" julia = "0.7, 1" diff --git a/test/runtests.jl b/test/runtests.jl index 3948cab..0edf890 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -20,11 +20,12 @@ end @test showtable(nttable) isa WebIO.Scope end @testset "inf, nan, and missing serializing" begin - rows = Tables.table([NaN Inf -Inf 0 missing]) names = [:a, :b, :c, :d, :e] + rows = Tables.table([NaN Inf -Inf 0 missing]; header=names) types = vcat([Float64 for _ in 1:4], [Missing]) Base.show(io::IO, x::Missing) = print(io, "test_missing") - json = TableView.table2json(Tables.Schema(names, types), rows, types) + schema = Tables.Schema(names, types) + json = TableView.table2json(schema, Tables.rows(rows), types) firstrow = JSON.parse(json)[1] @test firstrow["a"] == "NaN" @test firstrow["b"] == "Inf" @@ -33,20 +34,22 @@ end @test firstrow["e"] == "test_missing" end @testset "large integers" begin - rows = Tables.table([2^52 2^53 2^54]) names = [:a, :b, :c] + rows = Tables.table([2^52 2^53 2^54]; header=names) types = [Int64 for _ in 1:3] - json = TableView.table2json(Tables.Schema(names, types), rows, types) + schema = Tables.Schema(names, types) + json = TableView.table2json(schema, Tables.rows(rows), types) firstrow = JSON.parse(json)[1] @test firstrow["a"] == 4503599627370496 @test firstrow["b"] == "9007199254740992" @test firstrow["c"] == "18014398509481984" end @testset "large floats" begin - rows = Tables.table([1.0e50 1.0e100]) names = [:a, :b] + rows = Tables.table([1.0e50 1.0e100]; header=names) types = [Float64, Float64] - json = TableView.table2json(Tables.Schema(names, types), rows, types) + schema = Tables.Schema(names, types) + json = TableView.table2json(schema, Tables.rows(rows), types) firstrow = JSON.parse(json)[1] @test firstrow["a"] == "1.0e50" @test firstrow["b"] == "1.0e100"