From 57b1004b7fc40c7c2bb4ea64b4261cf6ad013ebc Mon Sep 17 00:00:00 2001 From: hustf Date: Mon, 19 Oct 2015 00:18:28 +0200 Subject: [PATCH 1/3] modified: Issue 246 Winston.jl:97 } ( -> }( plot.jl:572 FloatingPoint ~> AbstractFloat renderer.jl:63 color_to_rgb(s::AbstractString) =parse(Colorant,s) --- src/Winston.jl | 3 +-- src/plot.jl | 2 +- src/renderer.jl | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/Winston.jl b/src/Winston.jl index 293da38..a5b0ab3 100644 --- a/src/Winston.jl +++ b/src/Winston.jl @@ -10,7 +10,6 @@ end using IniFile using Compat using Dates - isdefined(Base, :Libc) && (strftime = Libc.strftime) isdefined(Base, :Dates) && (datetime2unix = Dates.datetime2unix) @@ -93,7 +92,7 @@ import Base: copy, export get_context, device_to_data, data_to_device if VERSION < v"0.3-" - typealias AbstractVecOrMat{T} (@compat Union{AbstractVector{T}, AbstractMatrix{T}}) + typealias AbstractVecOrMat{T}(@compat Union{AbstractVector{T}, AbstractMatrix{T}}) extrema(x) = (minimum(x),maximum(x)) Base.push!(x, a, b) = (push!(x, a); push!(x, b)) elseif VERSION < v"0.4-" diff --git a/src/plot.jl b/src/plot.jl index d37fdfd..b8de2ab 100644 --- a/src/plot.jl +++ b/src/plot.jl @@ -569,7 +569,7 @@ function fplot(f::Function, limits, args...; kvs...) pargs = [arg] elseif typeof(arg) <: Integer fopts[:min_points] = arg - elseif typeof(arg) <: FloatingPoint +@compat elseif typeof(arg) <: AbstractFloat fopts[:tol] = arg else error("unrecognized argument ", arg) diff --git a/src/renderer.jl b/src/renderer.jl index 6b1ebca..fc3af34 100644 --- a/src/renderer.jl +++ b/src/renderer.jl @@ -60,7 +60,7 @@ end ## state commands color_to_rgb(i::Integer) = convert(RGB, RGB24(unsigned(i))) -color_to_rgb(s::AbstractString) = color(s) +color_to_rgb(s::AbstractString) =parse(Colorant,s) color_to_rgb(rgb::@compat(Tuple{Real,Real,Real})) = RGB(rgb...) color_to_rgb(cv::Color) = convert(RGB, cv) color_to_rgb(cv::TransparentColor) = cv From ea3c0d89c2e97d093aa6d2991803eafe44ce658e Mon Sep 17 00:00:00 2001 From: hustf Date: Sat, 24 Oct 2015 10:31:54 +0200 Subject: [PATCH 2/3] Fix as given by slangangular --- src/plot.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plot.jl b/src/plot.jl index b8de2ab..2fb32b8 100644 --- a/src/plot.jl +++ b/src/plot.jl @@ -569,7 +569,7 @@ function fplot(f::Function, limits, args...; kvs...) pargs = [arg] elseif typeof(arg) <: Integer fopts[:min_points] = arg -@compat elseif typeof(arg) <: AbstractFloat + elseif typeof(arg) <: @compat AbstractFloat fopts[:tol] = arg else error("unrecognized argument ", arg) From 535ebb5e0609cbdfe8c3bebc9c60387299ce160d Mon Sep 17 00:00:00 2001 From: hustf Date: Sat, 24 Oct 2015 10:50:58 +0200 Subject: [PATCH 3/3] Added Appveyor file for enabling Windows testing too. --- appveyor.yml | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 appveyor.yml diff --git a/appveyor.yml b/appveyor.yml new file mode 100644 index 0000000..dbc29e4 --- /dev/null +++ b/appveyor.yml @@ -0,0 +1,41 @@ +environment: + matrix: + - JULIAVERSION: "julialang/bin/winnt/x86/0.3/julia-0.3-latest-win32.exe" + - JULIAVERSION: "julialang/bin/winnt/x64/0.3/julia-0.3-latest-win64.exe" + - JULIAVERSION: "julialang/bin/winnt/x86/0.4/julia-0.4-latest-win32.exe" + - JULIAVERSION: "julialang/bin/winnt/x64/0.4/julia-0.4-latest-win64.exe" + - JULIAVERSION: "julianightlies/bin/winnt/x86/julia-latest-win32.exe" + - JULIAVERSION: "julianightlies/bin/winnt/x64/julia-latest-win64.exe" + +branches: + only: + - master + - /release-.*/ + +notifications: + - provider: Email + on_build_success: false + on_build_failure: false + on_build_status_changed: false + +install: +# if there's a newer build queued for the same PR, cancel this one + - ps: if ($env:APPVEYOR_PULL_REQUEST_NUMBER -and $env:APPVEYOR_BUILD_NUMBER -ne ((Invoke-RestMethod ` + https://ci.appveyor.com/api/projects/$env:APPVEYOR_ACCOUNT_NAME/$env:APPVEYOR_PROJECT_SLUG/history?recordsNumber=50).builds | ` + Where-Object pullRequestId -eq $env:APPVEYOR_PULL_REQUEST_NUMBER)[0].buildNumber) { ` + throw "There are newer queued builds for this pull request, failing early." } +# Download most recent Julia Windows binary + - ps: (new-object net.webclient).DownloadFile( + $("http://s3.amazonaws.com/"+$env:JULIAVERSION), + "C:\projects\julia-binary.exe") +# Run installer silently, output to C:\projects\julia + - C:\projects\julia-binary.exe /S /D=C:\projects\julia + +build_script: +# Need to convert from shallow to complete for Pkg.clone to work + - IF EXIST .git\shallow (git fetch --unshallow) + - C:\projects\julia\bin\julia -F -e "versioninfo(); + Pkg.clone(pwd(), \"Winston\"); Pkg.build(\"Winston\")" + +test_script: + - C:\projects\julia\bin\julia --check-bounds=yes -e "Pkg.test(\"Winston\")"