From 9eae3734920acf63efca83a06f1fca8dc2ef88af Mon Sep 17 00:00:00 2001 From: Willow Ahrens Date: Mon, 22 Apr 2024 11:15:53 -0400 Subject: [PATCH 1/3] oops. --- ext/NPZExt.jl | 2 +- test/test_issues.jl | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/ext/NPZExt.jl b/ext/NPZExt.jl index 6360cb53d..1d556f8ff 100644 --- a/ext/NPZExt.jl +++ b/ext/NPZExt.jl @@ -9,7 +9,7 @@ isdefined(Base, :get_extension) ? (using NPZ) : (using ..NPZ) function Base.getindex(g::NPYPath, key::AbstractString) path = joinpath(g.dirname, key) - if isfile(key, "$path.npy") + if isfile("$path.npy") npzread("$path.npy") else NPYPath(path) diff --git a/test/test_issues.jl b/test/test_issues.jl index 9927d3583..57f58e165 100644 --- a/test/test_issues.jl +++ b/test/test_issues.jl @@ -3,6 +3,18 @@ using SparseArrays @testset "issues" begin @info "Testing Github Issues" + #https://github.com/willow-ahrens/Finch.jl/issues/500 + let + using NPZ + f = mktempdir("finch-issue-500") + cd(f) do + A = Tensor(Dense(Element(0.0)), rand(4)) + fwrite("test.bspnpy", A) + B = fread("test.bspnpy") + @test A == B + end + end + #https://github.com/willow-ahrens/Finch.jl/issues/358 let A = Tensor(Dense(SparseList(Element(0))), [ From 52ef042c4912ce18dfbecf66e8a499203fe33883 Mon Sep 17 00:00:00 2001 From: Willow Ahrens Date: Mon, 22 Apr 2024 11:17:48 -0400 Subject: [PATCH 2/3] patch release --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index 865669a64..bbb2e102e 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "Finch" uuid = "9177782c-1635-4eb9-9bfb-d9dfa25e6bce" authors = ["Willow Ahrens"] -version = "0.6.21" +version = "0.6.22" [deps] AbstractTrees = "1520ce14-60c1-5f80-bbc7-55ef81b5835c" From aae3450b01fe03ed84b6b365d52b616caec0aba7 Mon Sep 17 00:00:00 2001 From: Willow Ahrens Date: Mon, 22 Apr 2024 11:45:56 -0400 Subject: [PATCH 3/3] fix --- test/test_issues.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test_issues.jl b/test/test_issues.jl index 57f58e165..898b8eda6 100644 --- a/test/test_issues.jl +++ b/test/test_issues.jl @@ -6,7 +6,7 @@ using SparseArrays #https://github.com/willow-ahrens/Finch.jl/issues/500 let using NPZ - f = mktempdir("finch-issue-500") + f = mktempdir(;prefix="finch-issue-500") cd(f) do A = Tensor(Dense(Element(0.0)), rand(4)) fwrite("test.bspnpy", A)