Skip to content

Commit

Permalink
Update to Julia 0.7 (#52)
Browse files Browse the repository at this point in the history
* Require Julia 0.7 and update minimum version of dependencies

* Update travis and appveyor

* Fix warning about a global const and docs

* Further corrections in docstrings

* Get rid of const declarations

* Use AbstractRange instead of Range, and remove const

* Update syntax related to DiffEqBase

* Fixes in tests and common interface to DiffEqBase

Some tests have been commented, including whole rootfinding.jl

* Fixes in array declarations

* `warn` -> `@warn`

* Fixes of deprecation warnings in tests

* Bring back rootfinding.jl and  commented tests...

... except those  involving Taylor{Taylor1{T}}

* Changes in travis

* Uncomment some tests, and small fixes

* Add upper versions in REQUIRE

* Fix docstrings

* Adapt taylorstep! to allow using specialized methods of jetcoeffs!

* Use info and correct usage of Val in applicable

* Use info instead of warn; comment using applicable

* Solve "implicit assignment to global variable" warnings in tests

* Update REQUIRE

* Do not allow failures in travis or appveyor in Julia 1.0
  • Loading branch information
lbenet authored Sep 6, 2018
1 parent 1567bba commit d77fe2b
Show file tree
Hide file tree
Showing 17 changed files with 294 additions and 253 deletions.
11 changes: 9 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
# Documentation: http://docs.travis-ci.com/user/languages/julia/
language: julia

os:
- linux
- osx

julia:
- 0.6
- 0.7
- 1.0
- nightly

notifications:
email: false

git:
depth: 99999999

Expand All @@ -19,8 +24,10 @@ matrix:

script:
- if [[ -a .git/shallow ]]; then git fetch --unshallow; fi
- julia -e 'Pkg.clone(pwd()); Pkg.build("TaylorIntegration"); Pkg.test("TaylorIntegration"; coverage=true)'
- julia --project --check-bounds=yes -e 'using Pkg; Pkg.clone(pwd()); Pkg.build("TaylorIntegration"); Pkg.test("TaylorIntegration"; coverage=true)'

after_success:
- julia -e 'using Pkg'
# push coverage results to Coveralls
- julia -e 'cd(Pkg.dir("TaylorIntegration")); Pkg.add("Coverage"); using Coverage; Coveralls.submit(Coveralls.process_folder())'
# push coverage results to Codecov
Expand Down
8 changes: 4 additions & 4 deletions REQUIRE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
julia 0.6 0.7
TaylorSeries 0.7.2 0.8.0
Reexport
DiffEqBase 3.8.0
julia 0.7
TaylorSeries v0.8.0
Reexport v0.2.0
DiffEqBase v4.21.3
43 changes: 23 additions & 20 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,22 @@
environment:
matrix:
- JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x64/0.6/julia-0.6-latest-win64.exe"
- JULIA_URL: "https://julialangnightlies-s3.julialang.org/bin/winnt/x64/julia-latest-win64.exe"
- julia_version: 0.7
- julia_version: 1.0
- julia_version: nightly

# uncomment the following lines to allow failures on nightly julia
platform:
- 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_URL: "https://julialangnightlies-s3.julialang.org/bin/winnt/x64/julia-latest-win64.exe"
- julia_version: nightly

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

notifications:
- provider: Email
Expand All @@ -21,19 +25,18 @@ notifications:
on_build_status_changed: false

install:
- ps: "[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]::Tls12"
# Download most recent Julia Windows binary
- ps: (new-object net.webclient).DownloadFile(
$env:JULIA_URL,
"C:\projects\julia-binary.exe")
# Run installer silently, output to C:\projects\julia
- C:\projects\julia-binary.exe /S /D=C:\projects\julia
- ps: iex ((new-object net.webclient).DownloadString("https://raw.githubusercontent.com/JuliaCI/Appveyor.jl/version-1/bin/install.ps1"))

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 -e "versioninfo();
Pkg.clone(pwd(), \"TaylorIntegration\"); Pkg.build(\"TaylorIntegration\")"
- echo "%JL_BUILD_SCRIPT%"
- C:\julia\bin\julia -e "%JL_BUILD_SCRIPT%"

test_script:
- C:\projects\julia\bin\julia --check-bounds=yes -e "Pkg.test(\"TaylorIntegration\")"
- 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: 2 additions & 1 deletion src/TaylorIntegration.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ module TaylorIntegration

using Reexport
@reexport using TaylorSeries, DiffEqBase
using LinearAlgebra

const warnkeywords =
(:save_idxs, :d_discontinuities, :unstable_check, :save_everystep,
Expand All @@ -14,7 +15,7 @@ const warnkeywords =
:calck, :progress, :timeseries_steps, :tstops, :saveat, :dense)

function __init__()
const global warnlist = Set(warnkeywords)
global warnlist = Set(warnkeywords)
end

export taylorinteg, liap_taylorinteg
Expand Down
12 changes: 6 additions & 6 deletions src/common.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
abstract type TaylorAlgorithm <: DEAlgorithm end
abstract type TaylorAlgorithm <: DiffEqBase.DEAlgorithm end
struct TaylorMethod <: TaylorAlgorithm
order::Int
end
Expand All @@ -7,13 +7,13 @@ TaylorMethod() = error("Maximum order must be specified for the Taylor method")

export TaylorMethod

function DiffEqBase.solve{uType,tType,isinplace,AlgType<:TaylorAlgorithm}(
prob::AbstractODEProblem{uType,tType,isinplace},
function DiffEqBase.solve(
prob::DiffEqBase.AbstractODEProblem{uType,tType,isinplace},
alg::AlgType,
timeseries=[],ts=[],ks=[];
verbose=true, abstol = 1e-6, save_start = true,
timeseries_errors=true, maxiters = 1000000,
callback=nothing, kwargs...)
callback=nothing, kwargs...) where {uType, tType, isinplace, AlgType <: TaylorAlgorithm}

if verbose
warned = !isempty(kwargs) && check_keywords(alg, kwargs, warnlist)
Expand Down Expand Up @@ -56,15 +56,15 @@ function DiffEqBase.solve{uType,tType,isinplace,AlgType<:TaylorAlgorithm}(
_t = t[2:end]
end
if typeof(prob.u0) <: AbstractArray
_timeseries = Vector{uType}(0)
_timeseries = Vector{uType}(undef, 0)
for i=start_idx:size(vectimeseries, 1)
push!(_timeseries, reshape(view(vectimeseries, i, :, )', sizeu))
end
else
_timeseries = vec(vectimeseries)
end

build_solution(prob, alg, _t, _timeseries,
DiffEqBase.build_solution(prob, alg, _t, _timeseries,
timeseries_errors = timeseries_errors,
retcode = :Success)
end
Loading

0 comments on commit d77fe2b

Please sign in to comment.