Skip to content

Commit

Permalink
Update to Julia 1.0 (#287)
Browse files Browse the repository at this point in the history
* Updates for Julia 1.0

* NEWS for version 0.10

* Updated .travis.yml and add appeveyor.yml

* Updated .travis.yml and add appeveyor.yml
  • Loading branch information
dpsanders authored and lbenet committed Oct 16, 2018
1 parent 6ea18c0 commit 752f3b0
Show file tree
Hide file tree
Showing 6 changed files with 98 additions and 19 deletions.
13 changes: 8 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,18 @@ os:
- osx

julia:
- 0.6
- 0.7
- 1.0
- nightly

matrix:
allow_failures:
- julia: nightly
#matrix:
# allow_failures:
# - julia: nightly

notifications:
email: false

after_success:
- julia -e 'cd(Pkg.dir("ValidatedNumerics")); Pkg.add("Coverage"); using Coverage; Coveralls.submit(Coveralls.process_folder()); Codecov.submit(process_folder())'
- julia -e 'using Pkg; Pkg.add("Documenter")'
- julia -e 'cd(Pkg.dir("ValidatedNumerics")); include(joinpath("docs", "make.jl"))'
- julia -e 'cd(Pkg.dir("ValidatedNumerics")); Pkg.add("Coverage"); using Coverage; Coveralls.submit(Coveralls.process_folder()); Codecov.submit(process_folder())'
12 changes: 11 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,21 @@
# What's new in `ValidatedNumerics.jl`

## v0.11

### Supported versions of Julia

- Support for Julia 0.6 has been dropped. This release is fully compatible with Julia 1.0.

### Included packages

- `IntervalContractors.jl` is now re-exported, so that reverse functions from that package are directly accessible.


## v0.10

### Supported versions of Julia

Support for Julia 0.5 has been dropped. This is the last release compatible with Julia 0.6.
- Support for Julia 0.5 has been dropped. This is the last release compatible with Julia 0.6.

## v0.9

Expand Down
14 changes: 7 additions & 7 deletions REQUIRE
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
julia 0.6 0.7
julia 0.7

Reexport 0.1 0.2
Reexport 0.2.0

IntervalArithmetic 0.13 0.14
IntervalRootFinding 0.2 0.3
IntervalContractors 0.2 0.3
IntervalConstraintProgramming 0.8 0.9
IntervalOptimisation 0.2 0.3
IntervalArithmetic 0.15
IntervalRootFinding 0.4
IntervalContractors 0.3.1
IntervalConstraintProgramming 0.9
IntervalOptimisation 0.3
43 changes: 43 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
environment:
matrix:
- julia_version: 0.7
- julia_version: 1
- julia_version: nightly

platform:
- x86 # 32-bit
- x64 # 64-bit

# # Uncomment the following lines to allow failures on nightly julia
# # (tests will run but not make your overall status red)
# matrix:
# allow_failures:
# - julia_version: nightly

branches:
only:
- master
- /release-.*/

notifications:
- provider: Email
on_build_success: false
on_build_failure: false
on_build_status_changed: false

install:
- ps: iex ((new-object net.webclient).DownloadString("https://raw.githubusercontent.com/JuliaCI/Appveyor.jl/version-1/bin/install.ps1"))

build_script:
- echo "%JL_BUILD_SCRIPT%"
- C:\julia\bin\julia -e "%JL_BUILD_SCRIPT%"

test_script:
- echo "%JL_TEST_SCRIPT%"
- C:\julia\bin\julia -e "%JL_TEST_SCRIPT%"

# # Uncomment to support code coverage upload. Should only be enabled for packages
# # which would have coverage gaps without running on Windows
# on_success:
# - echo "%JL_CODECOV_SCRIPT%"
# - C:\julia\bin\julia -e "%JL_CODECOV_SCRIPT%"
3 changes: 1 addition & 2 deletions src/ValidatedNumerics.jl
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
# This file is part of the ValidatedNumerics.jl package; MIT licensed

__precompile__(true)

module ValidatedNumerics

using Reexport

@reexport using IntervalArithmetic
@reexport using IntervalRootFinding
@reexport using IntervalContractors
@reexport using IntervalConstraintProgramming
@reexport using IntervalOptimisation

Expand Down
32 changes: 28 additions & 4 deletions test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
using ValidatedNumerics

using Base.Test
using Test

@testset "Load and briefly test packages" begin

@testset "IntervalArithmetic" begin
@test @interval(1, 2) == Interval(1, 2)
@test 1..2 == Interval(1, 2)
end

@testset "IntervalRootFinding" begin
Expand All @@ -17,7 +18,30 @@ using Base.Test
X = (-..∞) × (-..∞)
paving = pave(S, X, 1.0)

@test length(paving.inner) == 4
@test length(paving.boundary) == 8
@test length(paving.inner) == 3
@test length(paving.boundary) == 7
end

@testset "IntervalContractors" begin
X = 1..4
Y = 5..10

Z = X + Y

Z = Z (13..15)

Z, X, Y = plus_rev(Z, X, Y)

@test X == 3..4
@test Y == 9..10
end

@testset "IntervalOptimisation" begin
f(x) = x^4 - 3x^3 + 2x

globalmin, minimisers = minimise(f, -1e10..1e10, 1e-7)

@test globalmin (-4.15.. -4.14)
end

end

0 comments on commit 752f3b0

Please # to comment.