Skip to content

Commit

Permalink
rework conda deps
Browse files Browse the repository at this point in the history
  • Loading branch information
t-bltg committed Dec 4, 2022
1 parent 4b6595c commit 288256c
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 24 deletions.
14 changes: 5 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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' }}
Expand Down Expand Up @@ -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)
Expand All @@ -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:
Expand Down
6 changes: 1 addition & 5 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
Expand All @@ -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"
Expand All @@ -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"
Expand All @@ -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"]
3 changes: 3 additions & 0 deletions src/backends/deprecated/pyplot.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# https://github.com/JuliaPy/PyPlot.jl
# COV_EXCL_START

is_marker_supported(::PyPlotBackend, shape::Shape) = true

Expand Down Expand Up @@ -1635,3 +1636,5 @@ for (mime, fmt) in (
end

closeall(::PyPlotBackend) = PyPlot.plt."close"("all")

# COV_EXCL_STOP
10 changes: 4 additions & 6 deletions test/test_backends.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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))

Expand Down Expand Up @@ -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
2 changes: 1 addition & 1 deletion test/test_output.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 2 additions & 3 deletions test/test_quality.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 288256c

Please sign in to comment.