tRM test files, improve NetCDF/JLD check. Remove pycall pre-build - Granular.jl… | |
git clone git://src.adamsgaard.dk/Granular.jl | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit 18360a3aa9af572cc7fd542d2eab32b1b9a3f8fe | |
parent 6124d9ec8caee679b1b5186ee0b3cc069092ed90 | |
Author: Anders Damsgaard <[email protected]> | |
Date: Wed, 6 Jun 2018 15:02:38 -0400 | |
RM test files, improve NetCDF/JLD check. Remove pycall pre-build | |
Diffstat: | |
M .travis.yml | 4 ++-- | |
M src/io.jl | 9 ++++++--- | |
M src/ocean.jl | 5 ++++- | |
M test/wall.jl | 2 +- | |
4 files changed, 13 insertions(+), 7 deletions(-) | |
--- | |
diff --git a/.travis.yml b/.travis.yml | |
t@@ -20,8 +20,8 @@ addons: | |
- gnuplot | |
- imagemagick | |
-before_script: | |
- - julia -e 'info("Preparing Python"); ENV["PYTHON"]=""; Pkg.add("PyCall"); P… | |
+before_script: # NetCDF is not required, but test its dependent functions any… | |
+ - julia -e 'Pkg.add("NetCDF")' | |
script: | |
- if [[ -a .git/shallow ]]; then git fetch --unshallow; fi | |
diff --git a/src/io.jl b/src/io.jl | |
t@@ -8,9 +8,12 @@ if VERSION < v"0.7.0-alpha" | |
import JLD | |
hasJLD = true | |
end | |
-elseif haskey(Pkg.installed(), "JLD") | |
- import JLD | |
- hasJLD = true | |
+else | |
+ import Pkg | |
+ if haskey(Pkg.installed(), "JLD") | |
+ import JLD | |
+ hasJLD = true | |
+ end | |
end | |
import Compat | |
diff --git a/src/ocean.jl b/src/ocean.jl | |
t@@ -8,9 +8,12 @@ if VERSION < v"0.7.0-alpha" | |
import NetCDF | |
hasNetCDF = true | |
end | |
-elseif haskey(Pkg.installed(), "NetCDF") | |
+else | |
+ import Pkg | |
+ if haskey(Pkg.installed(), "NetCDF") | |
import NetCDF | |
hasNetCDF = true | |
+ end | |
end | |
if !hasNetCDF | |
Compat.@warn "Package NetCDF not found. " * | |
diff --git a/test/wall.jl b/test/wall.jl | |
t@@ -445,6 +445,6 @@ Granular.addWallLinearFrictionless!(sim, [0., 1.], y_max_i… | |
bc="normal stress", normal_stress=-100e3) | |
Granular.setTimeStep!(sim) | |
Granular.setTotalTime!(sim, 1.) | |
-Granular.setOutputFileInterval!(sim, 10.) | |
Granular.run!(sim) | |
+Granular.removeSimulationFiles(sim) | |
@test sim.walls[1].pos < y_max_init |