From 0d97ebbffd6182c440d66218af5bebf01dda4dda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Syver=20D=C3=B8ving=20Agdestein?= Date: Wed, 4 Oct 2023 16:52:32 +0200 Subject: [PATCH 1/4] Add missing Animation constructor --- src/animation.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/animation.jl b/src/animation.jl index aec29fb36..2b0847963 100644 --- a/src/animation.jl +++ b/src/animation.jl @@ -13,7 +13,7 @@ struct Animation frames::Vector{String} end -Animation() = Animation(convert(String, mktempdir()), String[]) +Animation(dir = convert(String, mktempdir())) = Animation(dir, String[]) """ frame(animation[, plot]) From d6050063b91e9c6ed122b302b14a2fc4c2731bcf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Syver=20D=C3=B8ving=20Agdestein?= Date: Wed, 4 Oct 2023 17:04:39 +0200 Subject: [PATCH 2/4] Add zenodo entry --- .zenodo.json | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.zenodo.json b/.zenodo.json index 8e98373f7..539036d03 100644 --- a/.zenodo.json +++ b/.zenodo.json @@ -765,6 +765,11 @@ "name": "Alexander Von Moll", "orcid": "0000-0002-7661-5752", "type": "Other" + }, + { + "name": "Syver Døving Agdestein", + "orcid": "0000-0002-1589-2916", + "type": "Other" } ], "upload_type": "software" From f21f06550f115de78505b5491ec66e63608a8465 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Syver=20D=C3=B8ving=20Agdestein?= Date: Wed, 18 Oct 2023 11:53:12 +0200 Subject: [PATCH 3/4] Add Animation tests --- test/test_animations.jl | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/test_animations.jl b/test/test_animations.jl index 4ad7fe2e6..562e7ef22 100644 --- a/test/test_animations.jl +++ b/test/test_animations.jl @@ -1,3 +1,11 @@ +@testset "Animation constructors" begin + @test Animation() isa Animation + @test Animation("dir") isa Animation + @test Animation("dir", String[]) isa Animation + anim = Animation("nonexisting_dir") + @test_throws SystemError frame(anim, plot([1, 2, 3])) +end + @testset "Empty anim" begin anim = @animate for i in [] end From bb233a665d88e6cb5f01ec659737555c2afe80cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Syver=20D=C3=B8ving=20Agdestein?= Date: Wed, 18 Oct 2023 12:00:30 +0200 Subject: [PATCH 4/4] Add testset --- test/test_animations.jl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/test_animations.jl b/test/test_animations.jl index 562e7ef22..cc1025053 100644 --- a/test/test_animations.jl +++ b/test/test_animations.jl @@ -2,6 +2,9 @@ @test Animation() isa Animation @test Animation("dir") isa Animation @test Animation("dir", String[]) isa Animation +end + +@testset "Missing animation directory" begin anim = Animation("nonexisting_dir") @test_throws SystemError frame(anim, plot([1, 2, 3])) end