From 60cb0955cadfd3a9d1a4e9002da837f1b09a6238 Mon Sep 17 00:00:00 2001 From: Penelope Yong Date: Wed, 28 Aug 2024 12:23:00 +0100 Subject: [PATCH 1/4] CI fixes (#4974) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Update tests for Latexify 0.16.5 Behaviour was changed such that ã becomes \tilde{a}, instead of \textnormal{\~{a}}. * Test Julia 1.6 on x86 macOS instead of ARM See: https://discourse.julialang.org/t/how-to-fix-github-actions-ci-failures-with-julia-1-6-or-1-7-on-macos-latest-and-macos-14/117019 * Bump GR compat and Plots version number * update plotly show methods for PlotlyKaleido v2 * remove Pkg * add it back --------- Co-authored-by: Simon Christ --- .github/workflows/ci.yml | 8 ++++++++ PlotsBase/test/test_pgfplotsx.jl | 2 +- Project.toml | 16 +++++++++++++++- 3 files changed, 24 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4ab7f3dd0..547fea419 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -35,7 +35,15 @@ jobs: - false os: [ubuntu-latest, windows-latest, macos-latest] arch: [x64] + exclude: + # No native binaries for Julia 1.6 on ARM macOS + - os: macos-latest + version: '1.6' include: + # In its place, test Julia 1.6 on x86 macOS + - os: macos-13 + experimental: false + version: '1.6' - os: ubuntu-latest experimental: true version: 'pre' # upcoming julia version (`alpha`, `beta` or `rc`) diff --git a/PlotsBase/test/test_pgfplotsx.jl b/PlotsBase/test/test_pgfplotsx.jl index af51bde12..0d5f86068 100644 --- a/PlotsBase/test/test_pgfplotsx.jl +++ b/PlotsBase/test/test_pgfplotsx.jl @@ -436,7 +436,7 @@ with(:pgfplotsx) do @test PlotsBase.pgfx_sanitize_string("A string, with 2 punctuation chars.") == "A string, with 2 punctuation chars." @test PlotsBase.pgfx_sanitize_string("Interpolação polinomial") == - raw"Interpola$\textnormal{\c{c}}$$\textnormal{\~{a}}$o polinomial" + raw"Interpola$\textnormal{\c{c}}$$\tilde{a}$o polinomial" @test PlotsBase.pgfx_sanitize_string("∫∞ ∂x") == raw"$\int$$\infty$ $\partial$x" # special LaTeX characters diff --git a/Project.toml b/Project.toml index cb4539f3b..36e36ba3f 100644 --- a/Project.toml +++ b/Project.toml @@ -9,8 +9,22 @@ PlotsBase = "c52230a3-c5da-43a3-9e85-260fcdfdc737" PrecompileTools = "aea7be01-6a6a-4083-8856-8a6e6704d82a" Reexport = "189a3867-3050-52da-a836-e630ba90ab69" +[weakdeps] +FileIO = "5789e2e9-d7fb-5bc7-8068-2c6fae9b9549" +GeometryBasics = "5c1252a2-5f33-56bf-86c9-59e7332b4326" +IJulia = "7073ff75-c697-5162-941a-fcdaad2a7d2a" +ImageInTerminal = "d8c32880-2388-543b-8c61-d9f865259254" +Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d" + +[extensions] +FileIOExt = "FileIO" +GeometryBasicsExt = "GeometryBasics" +IJuliaExt = "IJulia" +ImageInTerminalExt = "ImageInTerminal" +UnitfulExt = "Unitful" + [compat] -GR = "0, 1" +GR = "0.73, 1" PlotsBase = "0.1" PrecompileTools = "1" Reexport = "1" From f54a5fbb546811818093233bb7b5b9763320746e Mon Sep 17 00:00:00 2001 From: Penelope Yong Date: Fri, 30 Aug 2024 01:03:30 +0100 Subject: [PATCH 2/4] Don't need to edit CI for 1.6 as no longer supported --- .github/workflows/ci.yml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 547fea419..4ab7f3dd0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -35,15 +35,7 @@ jobs: - false os: [ubuntu-latest, windows-latest, macos-latest] arch: [x64] - exclude: - # No native binaries for Julia 1.6 on ARM macOS - - os: macos-latest - version: '1.6' include: - # In its place, test Julia 1.6 on x86 macOS - - os: macos-13 - experimental: false - version: '1.6' - os: ubuntu-latest experimental: true version: 'pre' # upcoming julia version (`alpha`, `beta` or `rc`) From e3aebe6bc7c0f594669fe30f5e05e6ad74fd7f73 Mon Sep 17 00:00:00 2001 From: Penelope Yong Date: Sun, 8 Sep 2024 16:13:20 +0100 Subject: [PATCH 3/4] Don't test GR/50 on macOS --- PlotsBase/test/runtests.jl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/PlotsBase/test/runtests.jl b/PlotsBase/test/runtests.jl index 85b987e21..6b5fa1b78 100644 --- a/PlotsBase/test/runtests.jl +++ b/PlotsBase/test/runtests.jl @@ -63,6 +63,9 @@ const blacklist = if VERSION.major == 1 && VERSION.minor ≥ 9 else [] end +if Sys.isapple() + push!(blacklist, 50) # FIXME: https://github.com/jheinen/GR.jl/issues/550 +end for name ∈ ( "misc", From 014c5be364d33827ede9cfad60f84ae3b7940d3d Mon Sep 17 00:00:00 2001 From: Penelope Yong Date: Mon, 9 Sep 2024 15:27:20 +0100 Subject: [PATCH 4/4] Reorganise failing tests - Disabled reference tests 25 and 30, which require StatsPlots support, for all backends (in PlotsBase/src/examples.jl) - Separate tests that are skipped and tests that are known to be broken due to upstream issues - Re-enable reference test 41 as upstream issue has been fixed (https://github.com/JuliaLang/julia/issues/47261) - Disable reference test 50 because of upstream issue (https://github.com/jheinen/GR.jl/issues/550) --- PlotsBase/src/examples.jl | 8 +++++--- PlotsBase/test/runtests.jl | 11 ++--------- PlotsBase/test/test_backends.jl | 2 +- PlotsBase/test/test_reference.jl | 10 ++++++++-- 4 files changed, 16 insertions(+), 15 deletions(-) diff --git a/PlotsBase/src/examples.jl b/PlotsBase/src/examples.jl index 86c02710e..d11b4a342 100644 --- a/PlotsBase/src/examples.jl +++ b/PlotsBase/src/examples.jl @@ -1258,12 +1258,10 @@ _animation_examples = [02, 31] _backend_skips = Dict( :none => Int[], :pythonplot => Int[], - :gr => [25, 30], # TODO: add back when StatsPlots is available + :gr => Int[], :plotlyjs => [ 21, 24, - 25, - 30, 49, 50, 51, @@ -1314,6 +1312,10 @@ _backend_skips = Dict( ], ) _backend_skips[:plotly] = _backend_skips[:plotlyjs] +# 25 and 30 require StatsPlots, which doesn't support Plots v2 yet +for backend in keys(_backend_skips) + append!(_backend_skips[backend], [25, 30]) +end # --------------------------------------------------------------------------------- # replace `f(args...)` with `f(rng, args...)` for `f ∈ (rand, randn)` diff --git a/PlotsBase/test/runtests.jl b/PlotsBase/test/runtests.jl index 6b5fa1b78..c154cc0ca 100644 --- a/PlotsBase/test/runtests.jl +++ b/PlotsBase/test/runtests.jl @@ -54,18 +54,11 @@ is_ci() || @eval using Gtk # see JuliaPlots/VisualRegressionTests.jl/issues/30 ref_name(i) = "ref" * lpad(i, 3, '0') -const blacklist = if VERSION.major == 1 && VERSION.minor ≥ 9 - [ - 25, - 30, # FIXME: remove, when StatsPlots supports Plots v2 - 41, - ] # FIXME: github.com/JuliaLang/julia/issues/47261 +const broken_examples = if Sys.isapple() + [50] # FIXME: https://github.com/jheinen/GR.jl/issues/550 else [] end -if Sys.isapple() - push!(blacklist, 50) # FIXME: https://github.com/jheinen/GR.jl/issues/550 -end for name ∈ ( "misc", diff --git a/PlotsBase/test/test_backends.jl b/PlotsBase/test/test_backends.jl index 6c83ac87b..b30fc6b99 100644 --- a/PlotsBase/test/test_backends.jl +++ b/PlotsBase/test/test_backends.jl @@ -66,7 +66,7 @@ is_pkgeval() || @testset "Backends" begin @test filesize(fn) > 1_000 end Sys.islinux() && for be ∈ TEST_BACKENDS - skip = vcat(PlotsBase._backend_skips[be], blacklist) + skip = vcat(PlotsBase._backend_skips[be], broken_examples) PlotsBase.test_examples(be; skip, callback, disp = is_ci(), strict = true) # `ci` display for coverage closeall() end diff --git a/PlotsBase/test/test_reference.jl b/PlotsBase/test/test_reference.jl index a03389b30..4e3133af0 100644 --- a/PlotsBase/test/test_reference.jl +++ b/PlotsBase/test/test_reference.jl @@ -105,6 +105,7 @@ end function image_comparison_facts( pkg::Symbol; skip = [], # skip these examples (int index) + broken = [], # known broken examples (int index) only = nothing, # limit to these examples (int index) debug = false, # print debug information ? sigma = [1, 1], # number of pixels to "blur" @@ -112,7 +113,11 @@ function image_comparison_facts( ) for i ∈ setdiff(1:length(PlotsBase._examples), skip) if only ≡ nothing || i in only - @test success(image_comparison_tests(pkg, i; debug, sigma, tol)) + if i ∈ broken + @test_broken success(image_comparison_tests(pkg, i; debug, sigma, tol)) + else + @test success(image_comparison_tests(pkg, i; debug, sigma, tol)) + end end end end @@ -141,7 +146,8 @@ end image_comparison_facts( :gr, tol = PLOTS_IMG_TOL, - skip = vcat(PlotsBase._backend_skips[:gr], blacklist), + skip = vcat(PlotsBase._backend_skips[:gr]), + broken = broken_examples, ) end end