remove PlotReferenceImages dependency

This commit is contained in:
Daniel Schwabeneder 2019-09-08 21:33:56 +02:00
parent a203c86af6
commit de13d400aa
4 changed files with 28 additions and 8 deletions

View File

@ -45,14 +45,13 @@ Gtk = "4c0ca9eb-093a-5379-98c5-f87ac0bbbf44"
ImageMagick = "6218d12a-5da1-5696-b52f-db25d2ecc6d1"
Images = "916415d5-f1e6-5110-898d-aaa5f9f070e0"
LaTeXStrings = "b964fa9f-0449-5b57-a5c2-d3ea65f4040f"
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
PlotReferenceImages = "c5e800db-1e6b-5f72-915a-308d267b7a19"
RDatasets = "ce6b1742-4840-55fa-b093-852dadbb1d8b"
LibGit2 = "76f85450-5226-5b5a-8eaa-529ad045b433"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
RDatasets = "ce6b1742-4840-55fa-b093-852dadbb1d8b"
StatsPlots = "f3b207a7-027a-5e70-b257-86293d7955fd"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
UnicodePlots = "b8865327-cd53-5732-bb35-84acbb429228"
VisualRegressionTests = "34922c18-7c2a-561c-bac1-01e79b2c4c92"
[targets]
test = ["Pkg", "Test", "Random", "StatsPlots", "VisualRegressionTests", "LaTeXStrings", "Images", "ImageMagick", "RDatasets", "FileIO", "Gtk", "UnicodePlots", "PlotReferenceImages"]
test = ["FileIO", "Gtk", "ImageMagick", "Images", "LaTeXStrings", "LibGit2", "Random", "RDatasets", "StatsPlots", "Test", "UnicodePlots", "VisualRegressionTests"]

View File

@ -1,6 +1,6 @@
module Plots
_current_plots_version = v"0.26.1"
const _current_plots_version = VersionNumber(split(first(filter(line -> occursin("version", line), readlines(normpath(@__DIR__, "..", "Project.toml")))), "\"")[2])
using Reexport

View File

@ -14,7 +14,6 @@ function image_comparison_tests(pkg::Symbol, idx::Int; debug = false, popup = !i
fn = "ref$idx.png"
reffn = reference_file(pkg, idx, _current_plots_version)
newfn = joinpath(reference_path(pkg, _current_plots_version), fn)
>>>>>>> use PlotReferenceImages Julia Package for tests
# test function
func = (fn, idx) -> begin

View File

@ -3,10 +3,32 @@ using Plots
using Random
using Test
using FileIO
using PlotReferenceImages
using Gtk
>>>>>>> use PlotReferenceImages Julia Package for tests
reference_dir(args...) = joinpath(homedir(), ".julia", "dev", "PlotReferenceImages", args...)
function reference_file(backend, i, version)
refdir = reference_dir("Plots", string(backend))
fn = "ref$i.png"
versions = sort(VersionNumber.(readdir(refdir)), rev = true)
reffn = joinpath(refdir, string(version), fn)
for v in versions
tmpfn = joinpath(refdir, string(v), fn)
if isfile(tmpfn)
reffn = tmpfn
break
end
end
return reffn
end
reference_path(backend, version) = reference_dir("Plots", string(backend), string(version))
if !isdir(reference_dir())
LibGit2.clone("https://github.com/JuliaPlots/PlotReferenceImages.jl.git", reference_dir())
end
include("imgcomp.jl")
# don't actually show the plots