-
-
Notifications
You must be signed in to change notification settings - Fork 358
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix CI #1689
Fix CI #1689
Conversation
test/travis_commands.jl
Outdated
Pkg.add([ | ||
PackageSpec("ImageMagick"), | ||
# PackageSpec("GR"), | ||
PackageSpec(url="https://github.com/tkf/PlotReferenceImages.jl", rev="pkg3"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Revert a585592 once JuliaPlots/PlotReferenceImages.jl#30 is merged
0e95c44
to
5eae423
Compare
test/add_packages.jl
Outdated
# ENV["PYTHON"] = "" | ||
|
||
Pkg.add([ | ||
PackageSpec(url="https://github.com/tkf/PlotReferenceImages.jl", rev="pkg3"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO for me: Revert 1748063 once JuliaPlots/PlotReferenceImages.jl#30 is merged
Oops, I didn't mean to go this deep into tweaking your testing setup. I thought it was just a quick small fix :) I hope I didn't mess up anything. The biggest change is that non-registered test requirements are now Anyway, I think now the CI is reporting meaningful errors and I will not to try fixing them. |
I'm not really sure what the purpose is of this PR - could you explain? I think our existing setup quite closely followed the recommended default travis script for pacakges. |
I fixed the test suite and CI setup so that they work with Julia 1.0 / Pkg3. I don't think the current setup in master branch is compatible with Julia 1.0. I should have edited the title since it does not describe this PR well any more. |
Some more info: I don't think installing non-registered packages in
I can think of three choices:
Maybe there are more solutions. But I thought the first choice was reasonable. |
Nice work @tkf! I actually have a local branch starting a quite similar implementation, but you are one step ahead. if isinteractive()
using Gtk
end This, however, also requires the Gtk dependency for CI runs, where it is not actually used. So if you have a better idea, I'm open to suggestions. |
I prefer 1. |
Why doesn't |
test/add_packages.jl
Outdated
# PackageSpec(name="Blink", rev="master"), | ||
# PackageSpec(name="Rsvg", rev="master"), | ||
# PackageSpec(name="PlotlyJS", rev="master"), | ||
PackageSpec(name="VisualRegressionTests", rev="master"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: Comment out above (revert a8e3ecc)
@@ -2,6 +2,10 @@ | |||
using VisualRegressionTests | |||
# using ExamplePlots | |||
|
|||
if isinteractive() | |||
@eval Main import Gtk |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So it seems this part was ignored in Travis as intended https://travis-ci.org/JuliaPlots/Plots.jl/builds/420347392?utm_source=github_status&utm_medium=notification
Is it enough? Does it cover the use-case you have in mind?
So one of the problem with |
@@ -1,5 +1,6 @@ | |||
module PlotsTests | |||
|
|||
include("add_packages.jl") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel bad about unconditionally installing packages via runtests.jl which could ruin users' environments. Something like
if isinteractive()
@info """
Skip installing unregistered packages. To run Plots.jl test suite
in interactive session, you need to install them manually by, e.g.,
`include("test/add_packages.jl")`. Alternatively, you can run the test
with `Pkg.test("Plots")`.
"""
else
include("add_packages.jl")
end
would be nice. However, this still is not enough when the test is invoked from shell like julia test/runtests.jl
. Checking Base.HOME_PROJECT
and Base.ACTIVE_PROJECT
may solve this problem but I guess we need to be careful not to exclude their values when invoked via Pkg.test
.
Yes, that's the idea. Advanced users and people making PRs can run the tests manually to overwrite images with new versions, people just running |
@@ -116,7 +116,7 @@ ignorenan_minimum(x) = Base.minimum(x) | |||
ignorenan_maximum(x::AbstractArray{F}) where {F<:AbstractFloat} = NaNMath.maximum(x) | |||
ignorenan_maximum(x) = Base.maximum(x) | |||
ignorenan_mean(x::AbstractArray{F}) where {F<:AbstractFloat} = NaNMath.mean(x) | |||
ignorenan_mean(x) = Base.mean(x) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe Statistics.mean
to be explicit?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense. Applied in 6d0d8ea
test/imgcomp.jl
Outdated
@@ -15,6 +19,8 @@ using VisualRegressionTests | |||
|
|||
using Plots | |||
# using StatPlots | |||
using PlotReferenceImages |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe just import PlotReferenceImages
? You're just using it for pathof
, right?
You're on fire @tkf , great with all the contribs lately! |
It was just a little hack in the beginning :) If @daschw is OK with #1689 (comment) then I think it's good to go. @daschw But If you want to do the fix in #1693 please feel free to close this issue and cherry pick some patches if some of them are useful. |
I just blindly replace old API to the new one. Not sure if all the upstream packages are ready but I think it's handy if we can check Travis to see how much of them are ready.