Skip to content

Commit

Permalink
Compatibility with Julia 1.4
Browse files Browse the repository at this point in the history
  • Loading branch information
PGS62 committed Apr 6, 2024
1 parent 58f8688 commit eacc25f
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 359 deletions.
2 changes: 1 addition & 1 deletion src/corkendall_fromfile.jl
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ function csvread(filename::String, ignorefirstrow::Bool, ignorefirstcol::Bool;
types = Union{Missing,Float64}
strict = true

filedata = File(filename; header, drop, missingstring, types, strict)
filedata = File(filename; header=header, drop=drop, missingstring=missingstring, types=types, strict=strict)
data = matrix(filedata)

#Convert to Array{Float64} if there are in fact no missings
Expand Down
347 changes: 0 additions & 347 deletions test/Manifest.toml

This file was deleted.

8 changes: 4 additions & 4 deletions test/compare_implementations.jl
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ function compare_implementations(fn1::Function=corkendall, fn2::Function=corkend

if j <= 3
if fns_handle_missing
res1 = fn1(arg1; skipmissing)
res1 = fn1(arg1; skipmissing=skipmissing)
else
res1 = fn1(arg1)
end
Expand All @@ -162,7 +162,7 @@ function compare_implementations(fn1::Function=corkendall, fn2::Function=corkend
@error("Detected that function $fn1name mutated its argument, $casedesc")

if fns_handle_missing
res2 = fn2(arg1; skipmissing)
res2 = fn2(arg1; skipmissing=skipmissing)
else
res2 = fn2(arg1)
end
Expand All @@ -172,15 +172,15 @@ function compare_implementations(fn1::Function=corkendall, fn2::Function=corkend
else
arg2_backup = copy(arg2)
if fns_handle_missing
res1 = fn1(arg1, arg2; skipmissing)
res1 = fn1(arg1, arg2; skipmissing=skipmissing)
else
res1 = fn1(arg1, arg2)
end

(myisequal(arg1, arg1_backup) && myisequal(arg2, arg2_backup)) ||
@error("Detected that function $fn1name mutated one of its argument, $casedesc")
if fns_handle_missing
res2 = fn2(arg1, arg2; skipmissing)
res2 = fn2(arg1, arg2; skipmissing=skipmissing)
else
res2 = fn2(arg1, arg2)
end
Expand Down
Loading

0 comments on commit eacc25f

Please sign in to comment.