diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ac95c4a51..732654b24 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,7 +19,7 @@ jobs: env: GKS_ENCODING: "utf8" GKSwstype: "nul" - PYTHON: "Conda" # for `PyPlot` + JULIA_CONDAPKG_BACKEND: "MicroMamba" name: Julia ${{ matrix.version }} - ${{ matrix.os }} runs-on: ${{ matrix.os }} continue-on-error: ${{ matrix.version == 'nightly' }} @@ -72,11 +72,8 @@ jobs: - name: Install conda based matplotlib shell: julia --project=@. --color=yes {0} run: | - @show ENV["PYTHON"] - using Pkg - Pkg.add("Conda"); Pkg.build("Conda"; verbose=true) - using Conda; env, rc = Conda.ROOTENV, Conda.conda_rc(Conda.ROOTENV) - Conda.runconda(`config --set auto_update_conda False --file $rc --force`, env) + using Pkg; Pkg.add("CondaPkg") + using CondaPkg; CondaPkg.resolve() libgcc = if Sys.islinux() # see discourse.julialang.org/t/glibcxx-version-not-found/82209/8 # julia 1.8.3 is built with libstdc++.so.6.0.29, so we must restrict to this version (gcc 11.3.0, not gcc 12.2.0) @@ -91,9 +88,8 @@ jobs: else () end - Conda.add([libgcc..., "matplotlib"]) - Conda.list() - Pkg.add("PyCall"); Pkg.build("PyCall"; verbose=true) + CondaPkg.PkgREPL.add([libgcc..., "matplotlib"]) + CondaPkg.status() - uses: julia-actions/julia-runtest@latest with: diff --git a/Project.toml b/Project.toml index c100002ae..2a38a5b7c 100644 --- a/Project.toml +++ b/Project.toml @@ -41,7 +41,6 @@ UnicodeFun = "1cfade01-22cf-5700-b092-accc4b62d6e1" Unzip = "41fe7b60-77ed-43a1-b4f0-825fd5a5650d" [compat] -Conda = "1" Contour = "0.5 - 0.6" FFMPEG = "0.2 - 0.4" FixedPointNumbers = "0.6 - 0.8" @@ -63,7 +62,6 @@ PlotlyBase = "0.7 - 0.8" PlotlyJS = "0.18" PlotlyKaleido = "1" Preferences = "1" -PyCall = "1" PyPlot = "2" PythonPlot = "1" RecipesBase = "1.3.1" @@ -83,7 +81,6 @@ julia = "1.6" [extras] Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595" Colors = "5ae59095-9a9b-59fe-a467-6f913c188581" -Conda = "8f4d0f93-b110-5947-807f-2305c1781a2d" Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f" FileIO = "5789e2e9-d7fb-5bc7-8068-2c6fae9b9549" FilePathsBase = "48062228-2e41-5def-b9a4-89aafe57970f" @@ -101,7 +98,6 @@ PGFPlotsX = "8314cec4-20b6-5062-9cdb-752b83310925" PlotlyBase = "a03496cd-edff-5a9b-9e67-9cda94a718b5" PlotlyJS = "f0f68f2c-4968-5e81-91da-67840de0976a" PlotlyKaleido = "f2990250-8cf9-495f-b13a-cce12b45703c" -PyCall = "438e738f-606a-5dbb-bf0a-cddfbfd45ab0" PyPlot = "d330b81b-6aea-500a-939a-2ce795aea3ee" PythonPlot = "274fc56d-3b97-40fa-a1cd-1b4a50311bf9" RDatasets = "ce6b1742-4840-55fa-b093-852dadbb1d8b" @@ -116,4 +112,4 @@ Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d" VisualRegressionTests = "34922c18-7c2a-561c-bac1-01e79b2c4c92" [targets] -test = ["Aqua", "Colors", "Conda", "Distributions", "FileIO", "FilePathsBase", "Gaston", "GeometryBasics", "Gtk", "ImageMagick", "Images", "InspectDR", "LibGit2", "OffsetArrays", "PGFPlotsX", "PlotlyJS", "PlotlyBase", "PyCall", "PyPlot", "PythonPlot", "PlotlyKaleido", "HDF5", "RDatasets", "SentinelArrays", "StableRNGs", "StaticArrays", "StatsPlots", "Test", "TestImages", "UnicodePlots", "Unitful", "VisualRegressionTests"] +test = ["Aqua", "Colors", "Distributions", "FileIO", "FilePathsBase", "Gaston", "GeometryBasics", "Gtk", "ImageMagick", "Images", "InspectDR", "LibGit2", "OffsetArrays", "PGFPlotsX", "PlotlyJS", "PlotlyBase", "PyPlot", "PythonPlot", "PlotlyKaleido", "HDF5", "RDatasets", "SentinelArrays", "StableRNGs", "StaticArrays", "StatsPlots", "Test", "TestImages", "UnicodePlots", "Unitful", "VisualRegressionTests"] diff --git a/src/backends/deprecated/pyplot.jl b/src/backends/deprecated/pyplot.jl index 2e2a5e151..1610fd7ba 100644 --- a/src/backends/deprecated/pyplot.jl +++ b/src/backends/deprecated/pyplot.jl @@ -1,4 +1,5 @@ # https://github.com/JuliaPy/PyPlot.jl +# COV_EXCL_START is_marker_supported(::PyPlotBackend, shape::Shape) = true @@ -1635,3 +1636,5 @@ for (mime, fmt) in ( end closeall(::PyPlotBackend) = PyPlot.plt."close"("all") + +# COV_EXCL_STOP diff --git a/test/test_backends.jl b/test/test_backends.jl index b7b371739..6d8fdf7e3 100644 --- a/test/test_backends.jl +++ b/test/test_backends.jl @@ -12,7 +12,7 @@ const PLOTS_IMG_TOL = parse(Float64, get(ENV, "PLOTS_IMG_TOL", is_ci() ? ci_tol( # NOTE: don't use `plotly` (test hang, not surprised), test only the backends used in the docs const CONCRETE_BACKENDS = - :gr, :unicodeplots, :pyplot, :pythonplot, :pgfplotsx, :plotlyjs, :gaston, :inspectdr + :gr, :unicodeplots, :pythonplot, :pgfplotsx, :plotlyjs, :gaston, :inspectdr Base.eval(TESTS_MODULE, :(using Random, StableRNGs, Plots)) @@ -284,10 +284,8 @@ is_pkgeval() || @testset "Examples" begin @test filesize(fn) > 1_000 end Sys.islinux() && for be in CONCRETE_BACKENDS - withenv("JULIA_PYTHONCALL_EXE" => "@PyCall", "JULIA_CONDAPKG_BACKEND" => "Null") do - skip = vcat(Plots._backend_skips[be], blacklist) - Plots.test_examples(be; skip, callback, disp = is_ci(), strict = true) # `ci` display for coverage - closeall() - end + skip = vcat(Plots._backend_skips[be], blacklist) + Plots.test_examples(be; skip, callback, disp = is_ci(), strict = true) # `ci` display for coverage + closeall() end end diff --git a/test/test_output.jl b/test/test_output.jl index 4a8b08b55..f66a7750b 100644 --- a/test/test_output.jl +++ b/test/test_output.jl @@ -69,7 +69,7 @@ if Sys.islinux() && Sys.which("pdflatex") ≢ nothing @test_save :pdf end - with(:pyplot) do + with(:pythonplot) do @test_save :pdf @test_save :png @test_save :svg diff --git a/test/test_quality.jl b/test/test_quality.jl index dd45d6aab..956b42de9 100644 --- a/test/test_quality.jl +++ b/test/test_quality.jl @@ -4,10 +4,9 @@ # :PyCall and :Conda stale deps show up when running CI Aqua.test_all( Plots; - stale_deps = (; - ignore = [:PyCall, :Conda, :Contour, :Latexify, :LaTeXStrings, :GR] - ), + stale_deps = (; ignore = [:GR, :CondaPkg, :Contour, :Latexify, :LaTeXStrings]), ambiguities = false, + deps_compat = false, # FIXME: fails `CondaPkg` ) Aqua.test_ambiguities(Plots; exclude = [RecipesBase.apply_recipe]) # FIXME: remaining ambiguities end