Skip to content

Commit 2d09793

Browse files
fredrikekrejrevels
authored andcommitted
Updates for Julia v0.7 (#329)
- bump Julia requirement to 0.7-beta - update Travis and AppVeyor scripts - remove usage of Compat - misc other Julia 0.7 changes
1 parent 3f62885 commit 2d09793

16 files changed

+77
-73
lines changed

.travis.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
language: julia
22
julia:
3-
- 0.6
3+
- 0.7
44
- nightly
55
matrix:
66
allow_failures:
@@ -10,10 +10,9 @@ notifications:
1010
sudo: false
1111
script:
1212
- if [[ -a .git/shallow ]]; then git fetch --unshallow; fi
13-
- julia -e 'include(joinpath(JULIA_HOME, Base.DATAROOTDIR, "julia", "build_sysimg.jl")); build_sysimg(force=true)';
1413
- julia -e 'Pkg.clone(pwd()); Pkg.build("ForwardDiff"); Pkg.test("ForwardDiff"; coverage=true)';
15-
- julia -O3 -e 'include(joinpath(Pkg.dir("ForwardDiff"), "test/SIMDTest.jl"))';
14+
- julia -O3 -e 'include("test/SIMDTest.jl")';
1615
after_success:
17-
- julia -e 'cd(Pkg.dir("ForwardDiff")); Pkg.add("Coverage"); using Coverage; Coveralls.submit(Coveralls.process_folder())'
16+
- julia -e 'Pkg.add("Coverage"); using Coverage; Coveralls.submit(Coveralls.process_folder())'
1817
- julia -e 'Pkg.add("Documenter")'
19-
- julia -e 'cd(Pkg.dir("ForwardDiff")); include(joinpath("docs", "make.jl"))'
18+
- julia -e 'include("docs/make.jl")'

REQUIRE

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
julia 0.6.0
2-
Compat 0.47.0
1+
julia 0.7-beta2
32
StaticArrays 0.5.0
43
DiffResults 0.0.1
54
DiffRules 0.0.4

appveyor.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
11
environment:
22
matrix:
3-
- JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x86/0.6/julia-0.6-latest-win32.exe"
4-
- JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x64/0.6/julia-0.6-latest-win64.exe"
3+
- JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x86/0.7/julia-0.7-latest-win32.exe"
4+
- JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x64/0.7/julia-0.7-latest-win64.exe"
5+
- JULIA_URL: "https://julialangnightlies-s3.julialang.org/bin/winnt/x86/julia-latest-win32.exe"
6+
- JULIA_URL: "https://julialangnightlies-s3.julialang.org/bin/winnt/x64/julia-latest-win64.exe"
7+
8+
matrix:
9+
allow_failures:
10+
- JULIA_URL: "https://julialangnightlies-s3.julialang.org/bin/winnt/x86/julia-latest-win32.exe"
11+
- JULIA_URL: "https://julialangnightlies-s3.julialang.org/bin/winnt/x64/julia-latest-win64.exe"
512

613
branches:
714
only:

docs/make.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ makedocs(modules=[ForwardDiff],
1616

1717
deploydocs(repo = "github.com/JuliaDiff/ForwardDiff.jl.git",
1818
osname = "linux",
19-
julia = "0.6",
19+
julia = "0.7",
2020
target = "build",
2121
deps = nothing,
2222
make = nothing)

src/ForwardDiff.jl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@ module ForwardDiff
55
using DiffRules, DiffResults
66
using DiffResults: DiffResult, MutableDiffResult, ImmutableDiffResult
77
using StaticArrays
8-
using Compat
9-
using Compat.Random
8+
using Random
109

1110
import NaNMath
1211
import SpecialFunctions

test/ConfusionTest.jl

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
module ConfusionTest
22

3-
using Compat
4-
using Compat.Test
3+
using Test
54
using ForwardDiff
65

6+
using LinearAlgebra
7+
78
# Perturbation Confusion (Issue #83) #
89
#------------------------------------#
910

@@ -44,7 +45,7 @@ function Legendre_transformation(F, w)
4445
z = fill(0.0, size(w))
4546
M = ForwardDiff.hessian(F, z)
4647
b = ForwardDiff.gradient(F, z)
47-
v = cholfact(M)\(w-b)
48+
v = cholesky(M)\(w-b)
4849
dot(w,v) - F(v)
4950
end
5051
function Lagrangian2Hamiltonian(Lagrangian, t, q, p)

test/DeprecatedTest.jl

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
module DeprecatedTest
22

3-
using Compat
4-
using Compat.Test
3+
using Test
54
using ForwardDiff, DiffResults
65

76
using ForwardDiff: AbstractConfig, GradientConfig,
@@ -31,7 +30,7 @@ out = DiffResults.HessianResult(x)
3130
N = 1
3231
chunk = ForwardDiff.Chunk{N}()
3332

34-
info("The following tests print lots of deprecation warnings on purpose.")
33+
@info("The following tests print lots of deprecation warnings on purpose.")
3534

3635
@test similar_config(GradientConfig{N}(x), GradientConfig(nothing, x, chunk))
3736
@test similar_config(JacobianConfig{N}(x), JacobianConfig(nothing, x, chunk))
@@ -40,6 +39,6 @@ info("The following tests print lots of deprecation warnings on purpose.")
4039
@test similar_config(HessianConfig{N}(out, x), HessianConfig(nothing, out, x, chunk))
4140
@test similar_config(MultithreadConfig(GradientConfig(nothing, x, chunk)), GradientConfig(nothing, x, chunk))
4241

43-
info("Deprecation testing is now complete, so any further deprecation warnings are real.")
42+
@info("Deprecation testing is now complete, so any further deprecation warnings are real.")
4443

4544
end # module

test/DerivativeTest.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ module DerivativeTest
22

33
import Calculus
44

5-
using Compat
6-
using Compat.Test
5+
using Test
6+
using Random
77
using ForwardDiff
88
using DiffTests
99

test/DualTest.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
module DualTest
22

3-
using Compat
4-
using Compat.Test
3+
using Test
4+
using Random
55
using ForwardDiff
66
using ForwardDiff: Partials, Dual, value, partials
77

test/GradientTest.jl

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@ module GradientTest
22

33
import Calculus
44

5-
using Compat
6-
using Compat.Test
5+
using Test
76
using ForwardDiff
87
using ForwardDiff: Dual, Tag
98
using StaticArrays
@@ -21,7 +20,7 @@ v = f(x)
2120
g = [-9.4, 15.6, 52.0]
2221

2322
for c in (1, 2, 3), tag in (nothing, Tag(f, eltype(x)))
24-
println(" ...running hardcoded test with chunk size = $c and tag = $tag")
23+
println(" ...running hardcoded test with chunk size = $c and tag = $(repr(tag))")
2524
cfg = ForwardDiff.GradientConfig(f, x, ForwardDiff.Chunk{c}(), tag)
2625

2726
@test eltype(cfg) == Dual{typeof(tag), eltype(x), c}
@@ -61,7 +60,7 @@ for f in DiffTests.VECTOR_TO_NUMBER_FUNCS
6160
g = ForwardDiff.gradient(f, X)
6261
@test isapprox(g, Calculus.gradient(f, X), atol=FINITEDIFF_ERROR)
6362
for c in CHUNK_SIZES, tag in (nothing, Tag(f, eltype(x)))
64-
println(" ...testing $f with chunk size = $c and tag = $tag")
63+
println(" ...testing $f with chunk size = $c and tag = $(repr(tag))")
6564
cfg = ForwardDiff.GradientConfig(f, X, ForwardDiff.Chunk{c}(), tag)
6665

6766
out = ForwardDiff.gradient(f, X, cfg)

0 commit comments

Comments
 (0)