@@ -52,7 +52,7 @@
Loading
52 52
# The following method allows for the construction of zero-element
53 53
# DataValueArrays by calling the parametrized type on zero arguments.
54 54
function DataValueArray{T,N}() where {T,N}
55 -
    return DataValueArray{T}(ntuple(i->0, N))
55 +
    return DataValueArray{T}(ntuple(i -> 0, N))
56 56
end
57 57
58 58
function DataValueArray{T,N}(data::AbstractArray{S,N}) where {S,T,N}

@@ -180,7 +180,7 @@
Loading
180 180
    if !(DataValue <: T) && !(T <: DataValue)
181 181
        return copy(X)
182 182
    else
183 -
        Y = filter(x->!isna(x), X)
183 +
        Y = filter(x -> !isna(x), X)
184 184
        res = similar(Y, eltype(T))
185 185
        for i in eachindex(Y, res)
186 186
            @inbounds res[i] = isa(Y[i], DataValue) ? Y[i].value : Y[i]

@@ -96,7 +96,7 @@
Loading
96 96
are shifted down to fill the resulting gap. If specified, replacement values from
97 97
an ordered collection will be spliced in place of the removed item.
98 98
"""
99 -
function Base.splice!(X::DataValueVector, i::Integer, ins = _default_splice)
99 +
function Base.splice!(X::DataValueVector, i::Integer, ins=_default_splice)
100 100
    v = X[i]
101 101
    m = length(ins)
102 102
    if m == 0
@@ -125,7 +125,7 @@
Loading
125 125
To insert `ins` before an index `n` without removing any items, use
126 126
`splice!(X, n:n-1, ins)`.
127 127
"""
128 -
function Base.splice!(X::DataValueVector, rng::UnitRange{T}, ins = _default_splice) where {T <: Integer}
128 +
function Base.splice!(X::DataValueVector, rng::UnitRange{T}, ins=_default_splice) where {T <: Integer}
129 129
    vs = X[rng]
130 130
    m = length(ins)
131 131
    if m == 0
@@ -250,7 +250,7 @@
Loading
250 250
(inclusive). If unspecified, `s` and `n` will default to `1` and `length(X)`,
251 251
respectively.
252 252
"""
253 -
function Base.reverse!(X::DataValueVector, s = 1, n = length(X))
253 +
function Base.reverse!(X::DataValueVector, s=1, n=length(X))
254 254
    if isbitstype(eltype(X)) || !any(isna, X)
255 255
        reverse!(X.values, s, n)
256 256
        reverse!(X.isna, s, n)
@@ -280,7 +280,7 @@
Loading
280 280
(inclusive) reversed. If unspecified, `s` and `n` will default to `1` and
281 281
`length(X)`, respectively.
282 282
"""
283 -
function Base.reverse(X::DataValueVector, s = 1, n = length(X))
283 +
function Base.reverse(X::DataValueVector, s=1, n=length(X))
284 284
    return reverse!(copy(X), s, n)
285 285
end
286 286

@@ -11,12 +11,12 @@
Loading
11 11
_nullable_eltype(f, A, As...) =
12 12
    Base._return_type(f, maptoTuple(_unsafe_get_eltype, A, As...))
13 13
14 -
function Dates.DateTime(dt::DataValue{T}, format::AbstractString; locale::Dates.Locale = Dates.ENGLISH) where {T <: AbstractString}
15 -
    isna(dt) ? DataValue{DateTime}() : DataValue{DateTime}(DateTime(unsafe_get(dt), format, locale = locale))
14 +
function Dates.DateTime(dt::DataValue{T}, format::AbstractString; locale::Dates.Locale=Dates.ENGLISH) where {T <: AbstractString}
15 +
    isna(dt) ? DataValue{DateTime}() : DataValue{DateTime}(DateTime(unsafe_get(dt), format, locale=locale))
16 16
end
17 17
18 -
function Dates.Date(dt::DataValue{T}, format::AbstractString; locale::Dates.Locale = Dates.ENGLISH) where {T <: AbstractString}
19 -
    isna(dt) ? DataValue{Date}() : DataValue{Date}(Date(unsafe_get(dt), format, locale = locale))
18 +
function Dates.Date(dt::DataValue{T}, format::AbstractString; locale::Dates.Locale=Dates.ENGLISH) where {T <: AbstractString}
19 +
    isna(dt) ? DataValue{Date}() : DataValue{Date}(Date(unsafe_get(dt), format, locale=locale))
20 20
end
21 21
22 22
for f in (:(Base.abs), :(Base.abs2), :(Base.conj), :(Base.sign))

@@ -106,7 +106,7 @@
Loading
106 106
Note that, in general, mapreducing over a `DataValueArray` will return a
107 107
`DataValue` object regardless of whether `skipna` is set to `true` or `false`.
108 108
"""
109 -
function Base.mapreduce(f, op::Function, X::T; skipna::Bool = false) where {N,S <: DataValue,T <: AbstractArray{S,N}}
109 +
function Base.mapreduce(f, op::Function, X::T; skipna::Bool=false) where {N,S <: DataValue,T <: AbstractArray{S,N}}
110 110
    if skipna
111 111
        return DataValue(mapreduce(f, op, dropna(X)))
112 112
    else
@@ -124,8 +124,8 @@
Loading
124 124
`DataValueArray` will return a `DataValue` object regardless of whether `skipna`
125 125
is set to `true` or `false`.
126 126
"""
127 -
function Base.reduce(op, X::T; skipna::Bool = false) where {N,S <: DataValue,T <: AbstractArray{S,N}}
128 -
    return mapreduce(identity, op, X; skipna = skipna)
127 +
function Base.reduce(op, X::T; skipna::Bool=false) where {N,S <: DataValue,T <: AbstractArray{S,N}}
128 +
    return mapreduce(identity, op, X; skipna=skipna)
129 129
end
130 130
131 131
# standard reductions
@@ -137,12 +137,12 @@
Loading
137 137
    @eval begin
138 138
        # supertype(typeof(@functorize(abs))) returns Func{1} on Julia 0.4,
139 139
        # and Function on 0.5
140 -
        function $fn(f::Union{Function,Type}, X::T; skipna::Bool = false) where {N,S <: DataValue,T <: AbstractArray{S,N}}
141 -
            return mapreduce(f, $op, X; skipna = skipna)
140 +
        function $fn(f::Union{Function,Type}, X::T; skipna::Bool=false) where {N,S <: DataValue,T <: AbstractArray{S,N}}
141 +
            return mapreduce(f, $op, X; skipna=skipna)
142 142
        end
143 143
144 -
        function $fn(X::T; skipna::Bool = false) where {N,S <: DataValue,T <: AbstractArray{S,N}}
145 -
            return mapreduce(identity, $op, X; skipna = skipna)
144 +
        function $fn(X::T; skipna::Bool=false) where {N,S <: DataValue,T <: AbstractArray{S,N}}
145 +
            return mapreduce(identity, $op, X; skipna=skipna)
146 146
        end
147 147
    end
148 148
end
@@ -191,7 +191,7 @@
Loading
191 191
#     return v
192 192
# end
193 193
194 -
function Base.extrema(X::T; skipna::Bool = false) where {N,T2,T <: DataValueArray{T2,N}}
194 +
function Base.extrema(X::T; skipna::Bool=false) where {N,T2,T <: DataValueArray{T2,N}}
195 195
    length(X) > 0 || throw(ArgumentError("collection must be non-empty"))
196 196
    vmin = DataValue{T2}()
197 197
    vmax = DataValue{T2}()
@@ -213,7 +213,7 @@
Loading
213 213
    return (vmin, vmax)
214 214
end
215 215
216 -
function Base.extrema(X::T; skipna::Bool = false) where {N,T2,S <: DataValue{T2},T <: AbstractArray{S,N}}
216 +
function Base.extrema(X::T; skipna::Bool=false) where {N,T2,S <: DataValue{T2},T <: AbstractArray{S,N}}
217 217
    length(X) > 0 || throw(ArgumentError("collection must be non-empty"))
218 218
    vmin = DataValue{T2}()
219 219
    vmax = DataValue{T2}()

@@ -3,7 +3,7 @@
Loading
3 3
    value::T
4 4
5 5
    DataValue{T}() where {T} = new(false)
6 -
    DataValue{T}(value::T, hasvalue::Bool = true) where {T} = new(hasvalue, value)
6 +
    DataValue{T}(value::T, hasvalue::Bool=true) where {T} = new(hasvalue, value)
7 7
end
8 8
9 9
struct DataValueException <: Exception
@@ -11,7 +11,7 @@
Loading
11 11
12 12
const NA = DataValue{Union{}}()
13 13
14 -
DataValue(value::T, hasvalue::Bool = true) where {T} = DataValue{T}(value, hasvalue)
14 +
DataValue(value::T, hasvalue::Bool=true) where {T} = DataValue{T}(value, hasvalue)
15 15
DataValue(value::Missing) = DataValue{Union{}}()
16 16
DataValue{T}(::Missing) where T = DataValue{T}()
17 17
DataValue() = DataValue{Union{}}()
Files Coverage
src 71.72%
Project Totals (13 files) 71.72%
codecov-umbrella
Build #219879382 -
unittests
codecov-umbrella
Build #219879382 -
unittests
codecov-umbrella
Build #219879382 -
unittests
codecov-umbrella
Build #219879382 -
unittests
codecov-umbrella
Build #219879382 -
unittests
codecov-umbrella
Build #219879382 -
unittests
codecov-umbrella
Build #219879382 -
unittests
codecov-umbrella
Build #219879382 -
unittests
codecov-umbrella
Build #219879382 -
unittests
codecov-umbrella
Build #219879382 -
unittests
codecov-umbrella
Build #219879382 -
unittests
codecov-umbrella
Build #219879382 -
unittests
codecov-umbrella
Build #219879382 -
unittests
codecov-umbrella
Build #219879382 -
unittests
codecov-umbrella
Build #219879382 -
unittests
codecov-umbrella
Build #219879382 -
unittests
codecov-umbrella
Build #219879382 -
unittests
codecov-umbrella
Build #219879382 -
unittests
codecov-umbrella
Build #219879382 -
unittests
codecov-umbrella
Build #219879382 -
unittests
codecov-umbrella
Build #219879382 -
unittests
codecov-umbrella
Build #219879382 -
unittests
codecov-umbrella
Build #219879382 -
unittests
codecov-umbrella
Build #219879382 -
unittests
codecov-umbrella
Build #219879382 -
unittests
codecov-umbrella
Build #219879382 -
unittests
codecov-umbrella
Build #219879382 -
unittests
codecov-umbrella
Build #219879382 -
unittests
codecov-umbrella
Build #219879382 -
unittests
codecov-umbrella
Build #219879382 -
unittests

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