From 288372dbe5df332d9b8cc53048beac4284b54229 Mon Sep 17 00:00:00 2001 From: Penelope Yong Date: Wed, 28 Aug 2024 12:23:00 +0100 Subject: [PATCH] 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 ++++++++ Project.toml | 34 +++++++++++++++++----------------- src/backends/plotlybase.jl | 6 +++++- test/test_pgfplotsx.jl | 2 +- 4 files changed, 31 insertions(+), 19 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 877989d51..ca1c3bdf2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -34,7 +34,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: false prefix: xvfb-run # julia-actions/julia-runtest/blob/master/README.md diff --git a/Project.toml b/Project.toml index a88a89e27..a489f5390 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "Plots" uuid = "91a5bcdd-55d7-5caf-9e0b-520d859cae80" author = ["Tom Breloff (@tbreloff)"] -version = "1.40.7" +version = "1.40.8" [deps] Base64 = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" @@ -41,13 +41,27 @@ UnicodeFun = "1cfade01-22cf-5700-b092-accc4b62d6e1" UnitfulLatexify = "45397f5d-5981-4c77-b2b3-fc36d6e9b728" Unzip = "41fe7b60-77ed-43a1-b4f0-825fd5a5650d" +[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] Aqua = "0.8" Contour = "0.5 - 0.6" Downloads = "1" FFMPEG = "0.3, 0.4" FixedPointNumbers = "0.6 - 0.8" -GR = "0.69.5 - 0.73" +GR = "0.73" Gaston = "1" HDF5 = "0.16 - 0.17" InspectDR = "0.5" @@ -63,7 +77,7 @@ PlotThemes = "2, 3" PlotUtils = "1" PlotlyBase = "0.7 - 0.8" PlotlyJS = "0.18" -PlotlyKaleido = "1" +PlotlyKaleido = "1,2" PrecompileTools = "1" PyPlot = "2" PythonPlot = "1" @@ -82,13 +96,6 @@ UnitfulLatexify = "1" Unzip = "0.1 - 0.2" julia = "1.6" -[extensions] -FileIOExt = "FileIO" -GeometryBasicsExt = "GeometryBasics" -IJuliaExt = "IJulia" -ImageInTerminalExt = "ImageInTerminal" -UnitfulExt = "Unitful" - [extras] Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595" Colors = "5ae59095-9a9b-59fe-a467-6f913c188581" @@ -125,10 +132,3 @@ VisualRegressionTests = "34922c18-7c2a-561c-bac1-01e79b2c4c92" [targets] test = ["Aqua", "Colors", "Distributions", "FileIO", "FilePathsBase", "FreeType", "Gaston", "GeometryBasics", "Gtk", "ImageMagick", "Images", "LibGit2", "OffsetArrays", "PGFPlotsX", "PlotlyJS", "PlotlyBase", "PyPlot", "PythonPlot", "PlotlyKaleido", "HDF5", "RDatasets", "SentinelArrays", "StableRNGs", "StaticArrays", "StatsPlots", "Test", "TestImages", "UnicodePlots", "Unitful", "VisualRegressionTests"] - -[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" diff --git a/src/backends/plotlybase.jl b/src/backends/plotlybase.jl index 8e614a48e..f6e8285a0 100644 --- a/src/backends/plotlybase.jl +++ b/src/backends/plotlybase.jl @@ -22,6 +22,10 @@ for (mime, fmt) in ( "image/svg+xml" => "svg", "image/eps" => "eps", ) - @eval _show(io::IO, ::MIME{Symbol($mime)}, plt::Plot{PlotlyBackend}) = + @eval function _show(io::IO, ::MIME{Symbol($mime)}, plt::Plot{PlotlyBackend}) + if !PlotlyKaleido.is_running() + PlotlyKaleido.restart() + end PlotlyKaleido.savefig(io, plotlybase_syncplot(plt), format = $fmt) + end end diff --git a/test/test_pgfplotsx.jl b/test/test_pgfplotsx.jl index 12069b740..39c7f749d 100644 --- a/test/test_pgfplotsx.jl +++ b/test/test_pgfplotsx.jl @@ -432,7 +432,7 @@ Plots.with(:pgfplotsx) do @test Plots.pgfx_sanitize_string("A string, with 2 punctuation chars.") == "A string, with 2 punctuation chars." @test Plots.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 Plots.pgfx_sanitize_string("∫∞ ∂x") == raw"$\int$$\infty$ $\partial$x" # special LaTeX characters