JeffreySarnoff / RollingFunctions.jl

Roll a window over data; apply a function over the window.
MIT License
114 stars 6 forks source link

Unused type parameters #31

Closed KristofferC closed 1 year ago

KristofferC commented 1 year ago

Julia 1.9 shows these warnings when testing the package. The redundant type parameters can just be removed.

WARNING: method definition for rolling at /home/pkgeval/.julia/packages/RollingFunctions/4Jh9c/src/roll/rolling.jl:44 declares type variable N but does not use it.
WARNING: method definition for rolling at /home/pkgeval/.julia/packages/RollingFunctions/4Jh9c/src/roll/rolling.jl:44 declares type variable N but does not use it.
WARNING: method definition for running at /home/pkgeval/.julia/packages/RollingFunctions/4Jh9c/src/run/running.jl:39 declares type variable N but does not use it.
WARNING: method definition for running at /home/pkgeval/.julia/packages/RollingFunctions/4Jh9c/src/run/running.jl:39 declares type variable N but does not use it.
WARNING: method definition for running at /home/pkgeval/.julia/packages/RollingFunctions/4Jh9c/src/run/running2.jl:80 declares type variable N but does not use it.
WARNING: method definition for running at /home/pkgeval/.julia/packages/RollingFunctions/4Jh9c/src/run/running2.jl:84 declares type variable N but does not use it.
WARNING: method definition for running at /home/pkgeval/.julia/packages/RollingFunctions/4Jh9c/src/run/running2.jl:80 declares type variable N but does not use it.
WARNING: method definition for running at /home/pkgeval/.julia/packages/RollingFunctions/4Jh9c/src/run/running2.jl:84 declares type variable N but does not use it.
JeffreySarnoff commented 1 year ago

thank you

On Fri, Oct 21, 2022 at 4:38 AM Kristoffer Carlsson < @.***> wrote:

Julia 1.9 shows these warnings when testing the package. The redundant type parameters can just be removed.

WARNING: method definition for rolling at /home/pkgeval/.julia/packages/RollingFunctions/4Jh9c/src/roll/rolling.jl:44 declares type variable N but does not use it. WARNING: method definition for rolling at /home/pkgeval/.julia/packages/RollingFunctions/4Jh9c/src/roll/rolling.jl:44 declares type variable N but does not use it. WARNING: method definition for running at /home/pkgeval/.julia/packages/RollingFunctions/4Jh9c/src/run/running.jl:39 declares type variable N but does not use it. WARNING: method definition for running at /home/pkgeval/.julia/packages/RollingFunctions/4Jh9c/src/run/running.jl:39 declares type variable N but does not use it. WARNING: method definition for running at /home/pkgeval/.julia/packages/RollingFunctions/4Jh9c/src/run/running2.jl:80 declares type variable N but does not use it. WARNING: method definition for running at /home/pkgeval/.julia/packages/RollingFunctions/4Jh9c/src/run/running2.jl:84 declares type variable N but does not use it. WARNING: method definition for running at /home/pkgeval/.julia/packages/RollingFunctions/4Jh9c/src/run/running2.jl:80 declares type variable N but does not use it. WARNING: method definition for running at /home/pkgeval/.julia/packages/RollingFunctions/4Jh9c/src/run/running2.jl:84 declares type variable N but does not use it.

— Reply to this email directly, view it on GitHub https://github.com/JeffreySarnoff/RollingFunctions.jl/issues/31, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAM2VRSFR47NPXZCWUITYVLWEJI6RANCNFSM6AAAAAARK6BSSM . You are receiving this because you are subscribed to this thread.Message ID: @.***>

ericphanson commented 1 year ago

I think the are still some left on v0.7, btw:

julia> using RollingFunctions, Aqua

julia> Aqua.test_unbound_args(RollingFunctions)
Test Failed at /Users/eph/.julia/packages/Aqua/HWLbM/src/unbound_args.jl:10
  Expression: detect_unbound_args_recursively(m) == []
   Evaluated: Any[running(fun2::Function, data1::V, data2::V, windowspan::Int64, weighting::F) where {T, N<:Number, V<:AbstractArray{Union{Missing, T}, 1}, F<:Vector{N}} in RollingFunctions at /Users/eph/.julia/packages/RollingFunctions/SJK7X/src/run/running2.jl:42, runvar(data::V, windowspan::Int64, weighting::StatsBase.AbstractWeights) where {T, V<:AbstractArray{Union{Missing, T}, 1}} in RollingFunctions at /Users/eph/.julia/packages/RollingFunctions/SJK7X/src/run/runstats.jl:22, runvar(data::V, windowspan::Int64, weighting::AbstractVector{S}) where {T, V<:AbstractArray{Union{Missing, T}, 1}, S} in RollingFunctions at /Users/eph/.julia/packages/RollingFunctions/SJK7X/src/run/runstats.jl:20, runmad_normalized(data::V, windowspan::Int64, weighting::StatsBase.AbstractWeights) where {T, V<:AbstractArray{Union{Missing, T}, 1}} in RollingFunctions at /Users/eph/.julia/packages/RollingFunctions/SJK7X/src/run/runstats.jl:22, runsem(data::V, windowspan::Int64) where {T, V<:AbstractArray{Union{Missing, T}, 1}} in RollingFunctions at /Users/eph/.julia/packages/RollingFunctions/SJK7X/src/run/runstats.jl:18, runkurtosis(data::V, windowspan::Int64, weighting::AbstractVector{S}) where {T, V<:AbstractArray{Union{Missing, T}, 1}, S} in RollingFunctions at /Users/eph/.julia/packages/RollingFunctions/SJK7X/src/run/runstats.jl:20, runskewness(data::V, windowspan::Int64) where {T, V<:AbstractArray{Union{Missing, T}, 1}} in RollingFunctions at /Users/eph/.julia/packages/RollingFunctions/SJK7X/src/run/runstats.jl:18, runsem(data::V, windowspan::Int64, weighting::AbstractVector{S}) where {T, V<:AbstractArray{Union{Missing, T}, 1}, S} in RollingFunctions at /Users/eph/.julia/packages/RollingFunctions/SJK7X/src/run/runstats.jl:20, tapers2(fun2::Function, data1::V, data2::V, trailing_data::V) where {T, V<:AbstractArray{Union{Missing, T}, 1}} in RollingFunctions at /Users/eph/.julia/packages/RollingFunctions/SJK7X/src/roll/rolling2.jl:131, running(fun2::Function, data1::V, data2::V, windowspan::Int64, weighting::W) where {T, V<:AbstractArray{Union{Missing, T}, 1}, W<:StatsBase.AbstractWeights} in RollingFunctions at /Users/eph/.julia/packages/RollingFunctions/SJK7X/src/run/running2.jl:80  …  rollmean(data::V, windowspan::Int64, weighting::AbstractVector{S}) where {T, V<:AbstractArray{Union{Missing, T}, 1}, S} in RollingFunctions at /Users/eph/.julia/packages/RollingFunctions/SJK7X/src/roll/rollstats.jl:16, runmad(data::V, windowspan::Int64, weighting::StatsBase.AbstractWeights) where {T, V<:AbstractArray{Union{Missing, T}, 1}} in RollingFunctions at /Users/eph/.julia/packages/RollingFunctions/SJK7X/src/run/runstats.jl:22, rollvar(data::V, windowspan::Int64, weighting::AbstractVector{S}) where {T, V<:AbstractArray{Union{Missing, T}, 1}, S} in RollingFunctions at /Users/eph/.julia/packages/RollingFunctions/SJK7X/src/roll/rollstats.jl:16, runmad(data::V, windowspan::Int64) where {T, V<:AbstractArray{Union{Missing, T}, 1}} in RollingFunctions at /Users/eph/.julia/packages/RollingFunctions/SJK7X/src/run/runstats.jl:18, rollmad(data::V, windowspan::Int64, weighting::StatsBase.AbstractWeights) where {T, V<:AbstractArray{Union{Missing, T}, 1}} in RollingFunctions at /Users/eph/.julia/packages/RollingFunctions/SJK7X/src/roll/rollstats.jl:18, runvariation(data::V, windowspan::Int64) where {T, V<:AbstractArray{Union{Missing, T}, 1}} in RollingFunctions at /Users/eph/.julia/packages/RollingFunctions/SJK7X/src/run/runstats.jl:18, rollkurtosis(data::V, windowspan::Int64) where {T, V<:AbstractArray{Union{Missing, T}, 1}} in RollingFunctions at /Users/eph/.julia/packages/RollingFunctions/SJK7X/src/roll/rollstats.jl:14, rollvariation(data::V, windowspan::Int64, weighting::StatsBase.AbstractWeights) where {T, V<:AbstractArray{Union{Missing, T}, 1}} in RollingFunctions at /Users/eph/.julia/packages/RollingFunctions/SJK7X/src/roll/rollstats.jl:18, rollstd(data::V, windowspan::Int64, weighting::StatsBase.AbstractWeights) where {T, V<:AbstractArray{Union{Missing, T}, 1}} in RollingFunctions at /Users/eph/.julia/packages/RollingFunctions/SJK7X/src/roll/rollstats.jl:18, runmean(data::V, windowspan::Int64, weighting::StatsBase.AbstractWeights) where {T, V<:AbstractArray{Union{Missing, T}, 1}} in RollingFunctions at /Users/eph/.julia/packages/RollingFunctions/SJK7X/src/run/runstats.jl:22] == Any[]
ERROR: There was an error during testing

(jl_rfETS1) pkg> st
Status `/private/var/folders/gj/l9rbktlj6qndlnz1nk164d280000gn/T/jl_rfETS1/Project.toml`
  [4c88cf16] Aqua v0.5.5
  [b0e4dd01] RollingFunctions v0.7.0
JeffreySarnoff commented 1 year ago

closed with new (unregistered) main