Showing 1 of 2 files from the diff.
Other files ignored by Codecov
test/runtests.jl has changed.

@@ -11,6 +11,17 @@
Loading
11 11
    path::AbstractPath
12 12
end
13 13
14 +
struct VegaJSONDataset
15 +
    data::OrderedDict
16 +
    path::AbstractPath
17 +
end
18 +
19 +
JSON.lower(x::VegaJSONDataset) = x.data
20 +
21 +
function Base.show(io::IO, source::VegaJSONDataset)
22 +
    print(io, "Vega JSON Dataset")
23 +
end
24 +
14 25
IteratorInterfaceExtensions.isiterable(x::VegaDataset) = true
15 26
TableTraits.isiterabletable(x::VegaDataset) = true
16 27
@@ -89,28 +100,23 @@
Loading
89 100
    return VegaDataset(OrderedDict{Symbol,Any}(Symbol(i[1])=>i[2] for i in zip(colnames,coldata)), Path(normpath(filename)))
90 101
end
91 102
92 -
function load_csv(filename)
93 -
    data, header = csvread(filename)
103 +
function load_csv(filename; delim=',')
104 +
    data, header = csvread(filename, delim)
94 105
95 106
    return VegaDataset(OrderedDict{Symbol,Any}(Symbol(i[1])=>i[2] for i in zip(header,data)), Path(normpath(filename)))
96 107
end
97 108
98 109
function dataset(name::AbstractString)
99 -
    if in(name, ["earthquakes", "graticule", "londonBoroughs", "londonTubeLines", "miserables", "sf-temps", "us-10m", "world-110m"])
100 -
        @warn "Dataset not tabular: returned Path instead of dataset"
110 +
    if in(name, ["sf-temps"])
111 +
        error("This dataset is currently not supported.")
112 +
    elseif in(name, ["earthquakes", "graticule", "londonBoroughs", "londonTubeLines", "miserables", "us-10m", "world-110m"])
101 113
        json_filename = normpath(joinpath(@__DIR__,"..","data", "data", "$name.json"))
102 -
        csv_filename = normpath(joinpath(@__DIR__,"..","data","data", "$name.csv"))
103 -
        tsv_filename = normpath(joinpath(@__DIR__,"..","data","data", "$name.tsv"))
104 -
        if isfile(json_filename)
105 -
            return Path(json_filename)
106 -
        elseif isfile(csv_filename)
107 -
            return Path(csv_filename)
108 -
        elseif isfile(tsv_filename)
109 -
            return Path(tsv_filename)
110 -
        end
114 +
        return VegaJSONDataset(JSON.parsefile(json_filename, dicttype=DataStructures.OrderedDict), Path(json_filename))
111 115
    elseif isfile(joinpath(@__DIR__,"..","data", "data", name))
112 -
        if splitext(name)[2]==".csv" || splitext(name)[2]==".tsv"
116 +
        if splitext(name)[2]==".csv"
113 117
            return load_csv(joinpath(@__DIR__,"..","data", "data", name))
118 +
        elseif splitext(name)[2]==".tsv"
119 +
            return load_csv(joinpath(@__DIR__,"..","data", "data", name), delim='\t')
114 120
        elseif splitext(name)[2]==".json"
115 121
            return load_json(joinpath(@__DIR__,"..","data", "data", name))
116 122
        else
@@ -119,10 +125,13 @@
Loading
119 125
    else
120 126
        json_filename = joinpath(@__DIR__,"..","data", "data", "$name.json")
121 127
        csv_filename = joinpath(@__DIR__,"..","data","data", "$name.csv")
128 +
        tsv_filename = normpath(joinpath(@__DIR__,"..","data","data", "$name.tsv"))
122 129
        if isfile(json_filename)
123 130
            return load_json(json_filename)
124 131
        elseif isfile(csv_filename)
125 132
            return load_csv(csv_filename)
133 +
        elseif isfile(tsv_filename)
134 +
            return load_csv(tsv_filename, delim='\t')
126 135
        else
127 136
            error("Unknown dataset.")
128 137
        end
Files Coverage
src/VegaDatasets.jl 89.06%
Project Totals (1 files) 89.06%
Untitled
Untitled
Untitled
Untitled
Untitled
Untitled
Untitled
Untitled
Untitled
Untitled
Untitled
Untitled
Untitled
Untitled
Untitled
Untitled
Untitled
Untitled
Untitled
Untitled

No yaml found.

Create your codecov.yml to customize your Codecov experience

Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading