From 4475a65f13f642f893cce6f5b644ed692ac1454b Mon Sep 17 00:00:00 2001 From: ys126800 Date: Wed, 29 Jan 2025 07:58:32 +0900 Subject: [PATCH 1/2] hotfix/using expressions -ParallelPlots.jl: implemented 'detailed using' expressions -test files: refined 'detailed using' expressions tests don't assume any other test to be runned before itself each of them only assumes the test_utils.jl to be runned before it --- src/ParallelPlots.jl | 5 ++--- test/runtests.jl | 3 ++- test/test_argument_errors.jl | 1 + test/test_call_with_color_feature.jl | 1 + test/test_call_with_feature_labels.jl | 1 + test/test_call_with_normalize.jl | 1 + test/test_curved.jl | 5 ++--- test/test_custom_dimensions.jl | 3 ++- test/test_default_call.jl | 5 ++--- test/test_lines_count.jl | 3 ++- test/test_recipe_observable.jl | 4 +--- test/test_utils.jl | 2 +- test/watson_example.jl | 4 ++-- 13 files changed, 20 insertions(+), 18 deletions(-) diff --git a/src/ParallelPlots.jl b/src/ParallelPlots.jl index e759df1..9bc2f83 100644 --- a/src/ParallelPlots.jl +++ b/src/ParallelPlots.jl @@ -1,8 +1,7 @@ module ParallelPlots -using CairoMakie -using DataFrames -#using Interpolations +using CairoMakie: Makie, Axis, Colorbar, Point2f, Point2, text!, lines!, empty!, current_figure, hidespines!, size, Observable, lift, @recipe, Attributes, hidedecorations! +using DataFrames: DataFrame, names, eachcol, size, minimum, maximum function normalize_DF(data::DataFrame) diff --git a/test/runtests.jl b/test/runtests.jl index 815e7e0..78ea12c 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -8,4 +8,5 @@ include("test_call_with_normalize.jl") include("test_custom_dimensions.jl") include("test_default_call.jl") include("test_recipe_observable.jl") -include("test_lines_count.jl") \ No newline at end of file +include("test_lines_count.jl") +include("watson_example.jl") \ No newline at end of file diff --git a/test/test_argument_errors.jl b/test/test_argument_errors.jl index 4ddd958..cd7151e 100644 --- a/test/test_argument_errors.jl +++ b/test/test_argument_errors.jl @@ -1,6 +1,7 @@ using ParallelPlots: parallelplot using Test: @testset, @test_throws using DataFrames: DataFrame +using CairoMakie: save @testset "ArgumentError Tests" begin df_missing = DataFrame(Name=["Alice", "Bob", "Charlie"], diff --git a/test/test_call_with_color_feature.jl b/test/test_call_with_color_feature.jl index 52499be..d20df94 100644 --- a/test/test_call_with_color_feature.jl +++ b/test/test_call_with_color_feature.jl @@ -1,5 +1,6 @@ using ParallelPlots: parallelplot using Test: @testset, @test, @test_throws +using CairoMakie: save @testset "call with color feature Axis" begin diff --git a/test/test_call_with_feature_labels.jl b/test/test_call_with_feature_labels.jl index 50eb673..61424c5 100644 --- a/test/test_call_with_feature_labels.jl +++ b/test/test_call_with_feature_labels.jl @@ -1,5 +1,6 @@ using ParallelPlots: parallelplot using Test: @testset, @test, @test_throws +using CairoMakie: save @testset "call with feature_labels" begin # Generate sample multivariate data df = create_person_df(3) diff --git a/test/test_call_with_normalize.jl b/test/test_call_with_normalize.jl index 4658137..2132cbd 100644 --- a/test/test_call_with_normalize.jl +++ b/test/test_call_with_normalize.jl @@ -1,5 +1,6 @@ using ParallelPlots: parallelplot using Test: @testset, @test +using CairoMakie: save @testset "call with normalize" begin diff --git a/test/test_curved.jl b/test/test_curved.jl index 662b61d..573936e 100644 --- a/test/test_curved.jl +++ b/test/test_curved.jl @@ -1,7 +1,6 @@ using ParallelPlots:parallelplot -using Test: @test - -using DataFrames: DataFrame +using Test: @test, @testset +using CairoMakie: save @testset "default call curved" begin diff --git a/test/test_custom_dimensions.jl b/test/test_custom_dimensions.jl index 04954a3..44abf71 100644 --- a/test/test_custom_dimensions.jl +++ b/test/test_custom_dimensions.jl @@ -1,5 +1,6 @@ using ParallelPlots: parallelplot -using Test:@test +using Test:@test, @testset +using CairoMakie: save @testset "call with scene width & height" begin diff --git a/test/test_default_call.jl b/test/test_default_call.jl index aa69511..0829289 100644 --- a/test/test_default_call.jl +++ b/test/test_default_call.jl @@ -1,7 +1,6 @@ using ParallelPlots: parallelplot -using Test: @test - -using DataFrames +using Test: @test, @testset +using CairoMakie: save @testset "default call" begin diff --git a/test/test_lines_count.jl b/test/test_lines_count.jl index 49b3cde..9cd7617 100644 --- a/test/test_lines_count.jl +++ b/test/test_lines_count.jl @@ -1,5 +1,6 @@ using ParallelPlots: parallelplot -using Test: @test +using Test: @test, @testset +using DataFrames: size @testset "Lines Count" begin df=create_person_df() diff --git a/test/test_recipe_observable.jl b/test/test_recipe_observable.jl index d0298d1..4160b0b 100644 --- a/test/test_recipe_observable.jl +++ b/test/test_recipe_observable.jl @@ -1,9 +1,7 @@ using ParallelPlots: parallelplot -using CairoMakie:Observable, record # for Record Video +using CairoMakie:Observable, record, save # for Record Video using Test: @testset -using DataFrames - @testset "Use a Observable DataFrame" begin # create the Data diff --git a/test/test_utils.jl b/test/test_utils.jl index 764023a..f31b160 100644 --- a/test/test_utils.jl +++ b/test/test_utils.jl @@ -1,6 +1,6 @@ using Random: seed!, rand using DataFrames: DataFrame -using CairoMakie: LineSegments, save, Lines +using CairoMakie: LineSegments, Lines #generate Data diff --git a/test/watson_example.jl b/test/watson_example.jl index d3ecaac..2bc0a9f 100644 --- a/test/watson_example.jl +++ b/test/watson_example.jl @@ -1,7 +1,7 @@ using DrWatson: display, @unpack, push!, first, Dict, dict_list -using DataFrames: DataFrame, nrow +using DataFrames: nrow using ParallelPlots: parallelplot -using CairoMakie: save +using CairoMakie: save, Observable, record function projectile_simulation() dicts = prepare_simulation() From 51b327ce285bbbc39a59d4407961b07f5db0dabb Mon Sep 17 00:00:00 2001 From: ys126800 Date: Wed, 29 Jan 2025 08:10:52 +0900 Subject: [PATCH 2/2] added dependancy for CairoMakie.on --- src/ParallelPlots.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ParallelPlots.jl b/src/ParallelPlots.jl index b00a2ca..ea617d2 100644 --- a/src/ParallelPlots.jl +++ b/src/ParallelPlots.jl @@ -1,6 +1,6 @@ module ParallelPlots -using CairoMakie: Makie, Axis, Colorbar, Point2f, Point2, text!, lines!, empty!, current_figure, hidespines!, size, Observable, lift, @recipe, Attributes, hidedecorations! +using CairoMakie: Makie, Axis, Colorbar, Point2f, Point2, text!, lines!, empty!, current_figure, hidespines!, size, Observable, lift, @recipe, Attributes, hidedecorations!, on using DataFrames: DataFrame, names, eachcol, size, minimum, maximum