Skip to content

Commit ee28fa8

Browse files
committed
reenable release tests, remove trailing whitespace
1 parent a42b129 commit ee28fa8

File tree

4 files changed

+23
-13
lines changed

4 files changed

+23
-13
lines changed

.travis.yml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,25 @@ compiler:
44
notifications:
55
email: false
66
env:
7-
matrix:
8-
# - JULIAVERSION="juliareleases"
9-
- JULIAVERSION="julianightlies"
7+
matrix:
8+
- JULIAVERSION="juliareleases"
9+
- JULIAVERSION="julianightlies"
1010
before_install:
1111
- sudo add-apt-repository ppa:staticfloat/julia-deps -y
1212
- sudo add-apt-repository ppa:staticfloat/${JULIAVERSION} -y
1313
- sudo apt-get update -qq -y
1414
- sudo apt-get install libpcre3-dev julia -y
1515
script:
16+
- if git --no-pager grep --color -n --full-name ' $' -- .; then
17+
echo "Error trailing whitespace found in source file(s)";
18+
echo "";
19+
echo "This can often be fixed with:";
20+
echo " git rebase --whitespace=fix HEAD~1";
21+
echo "or";
22+
echo " git rebase --whitespace=fix master";
23+
echo "and then a forced push of the correct branch";
24+
exit 1;
25+
fi
1626
- julia -e 'Pkg.init(); run(`ln -s $(pwd()) $(Pkg.dir("KernelDensity"))`); Pkg.pin("KernelDensity"); Pkg.resolve()'
1727
- julia -e 'using KernelDensity; @assert isdefined(:KernelDensity); @assert typeof(KernelDensity) === Module'
1828
- julia test/runtests.jl

src/univariate.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ function tabulate(data::RealVector, midpoints::Range)
8686
end
8787
end
8888

89-
# returns an un-convolved KDE
89+
# returns an un-convolved KDE
9090
UnivariateKDE(midpoints, grid)
9191
end
9292

@@ -126,7 +126,7 @@ end
126126

127127
function kde(data::RealVector, dist::UnivariateDistribution;
128128
boundary::(Real,Real)=kde_boundary(data,std(dist)), npoints::Int=2048)
129-
129+
130130
midpoints = kde_range(boundary,npoints)
131131
kde(data,midpoints,dist)
132132
end

test/bivariate.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ for X in ([0.0], [0.0,0.0], [0.0,0.5], [-0.5:0.1:0.5])
2121
w = default_bandwidth(X)
2222
@test w > 0
2323
lo, hi = kde_boundary(X,w)
24-
@test lo < hi
24+
@test lo < hi
2525
kr = kde_range((lo,hi), 10)
26-
@test step(kr) > 0
27-
26+
@test step(kr) > 0
27+
2828
for D in (Normal, )
2929
k1 = tabulate((X,X),(r,r))
3030
@test isa(k1,BivariateKDE)
@@ -43,7 +43,7 @@ for X in ([0.0], [0.0,0.0], [0.0,0.5], [-0.5:0.1:0.5])
4343
@test size(k3.density) == (length(k3.x), length(k3.y))
4444
@test all(k3.density .>= 0.0)
4545
@test_approx_eq sum(k3.density)*step(k3.x)*step(k3.y) 1.0
46-
46+
4747
k4 = kde((X,X),(r,r);kernel=D)
4848
@test isa(k4,BivariateKDE)
4949
@test size(k4.density) == (length(k4.x), length(k4.y))

test/univariate.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ for X in ([0.0], [0.0,0.0], [0.0,0.5], [-0.5:0.1:0.5])
1818
w = default_bandwidth(X)
1919
@test w > 0
2020
lo, hi = kde_boundary(X,w)
21-
@test lo < hi
21+
@test lo < hi
2222
kr = kde_range((lo,hi), 10)
23-
@test step(kr) > 0
24-
23+
@test step(kr) > 0
24+
2525
for D in (Normal, )
2626
k1 = tabulate(X,r)
2727
@test isa(k1,UnivariateKDE)
@@ -40,7 +40,7 @@ for X in ([0.0], [0.0,0.0], [0.0,0.5], [-0.5:0.1:0.5])
4040
@test length(k3.density) == length(k3.x)
4141
@test all(k3.density .>= 0.0)
4242
@test_approx_eq sum(k3.density)*step(k3.x) 1.0
43-
43+
4444
k4 = kde(X,r;kernel=D)
4545
@test isa(k4,UnivariateKDE)
4646
@test length(k4.density) == length(k4.x)

0 commit comments

Comments
 (0)