From c40db33fa1eb917cf7c5e06c7f91543c32931f2d Mon Sep 17 00:00:00 2001 From: Ben Cottier Date: Wed, 13 Oct 2021 17:32:39 +0100 Subject: [PATCH 1/2] Fix and test ArgumentError for nonexistant dir --- src/indexing.jl | 2 +- test/indexing.jl | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/indexing.jl b/src/indexing.jl index ad89a85..e73633c 100644 --- a/src/indexing.jl +++ b/src/indexing.jl @@ -138,7 +138,7 @@ You can also work with it directly, say you wanted to get all checkpoints files 2: https://github.com/JuliaData/DataFrames.jl """ function index_checkpoint_files(dir::AbstractPath) - isdir(dir) || throw(ArgumentError(dir, "Need an existing directory.")) + isdir(dir) || throw(ArgumentError("Need an existing directory.")) map(Iterators.filter(==("jlso") ∘ extension, walkpath(dir))) do checkpoint_path return IndexEntry(checkpoint_path) end diff --git a/test/indexing.jl b/test/indexing.jl index 486014f..b224708 100644 --- a/test/indexing.jl +++ b/test/indexing.jl @@ -53,4 +53,8 @@ @test_throws ErrorException entry.tags end end + + @testset "nonexistent dir" begin + @test_throws ArgumentError index_checkpoint_files("nonexistent_dir") + end end From 21cde530beffdd03e7aa181ffce9073cfa78ab8a Mon Sep 17 00:00:00 2001 From: Ben Cottier Date: Wed, 13 Oct 2021 17:33:50 +0100 Subject: [PATCH 2/2] Bump patch version --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index fc2cc50..5cf8ece 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "Checkpoints" uuid = "b4a3413d-e481-5afc-88ff-bdfbd6a50dce" authors = "Invenia Technical Computing Corporation" -version = "0.3.13" +version = "0.3.14" [deps] AWSS3 = "1c724243-ef5b-51ab-93f4-b0a88ac62a95"