Skip to content

Commit

Permalink
Require Julia v0.7.0-beta.85 (Statistics stdlib)
Browse files Browse the repository at this point in the history
This permits massive code deletion, but means that we can only test on
nightly, at least until the next 0.7 prerelease after the current beta.
  • Loading branch information
ararslan committed Jul 9, 2018
1 parent 11a4439 commit 2159564
Show file tree
Hide file tree
Showing 10 changed files with 16 additions and 678 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ os:
- linux
- osx
julia:
- 0.7
- nightly
notifications:
email: false
Expand Down
2 changes: 1 addition & 1 deletion REQUIRE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
julia 0.7.0-alpha
julia 0.7.0-beta.85
DataStructures 0.5.0
SortingAlgorithms
Missings
2 changes: 0 additions & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
environment:
matrix:
- JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x86/0.7/julia-0.7-latest-win32.exe"
- JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x64/0.7/julia-0.7-latest-win64.exe"
- JULIA_URL: "https://julialangnightlies-s3.julialang.org/bin/winnt/x86/julia-latest-win32.exe"
- JULIA_URL: "https://julialangnightlies-s3.julialang.org/bin/winnt/x64/julia-latest-win64.exe"

Expand Down
31 changes: 4 additions & 27 deletions src/StatsBase.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,27 +8,16 @@ module StatsBase
using SortingAlgorithms
using Missings

if VERSION >= v"0.7.0-beta.85"
using Statistics
import Statistics: mean, mean!, var, varm, varm!, std, stdm, cov, covm,
cor, corm, cov2cor!, unscaled_covzm, quantile, sqrt!,
median, middle
else
import Base: mean, mean!, var, varm, varm!, std, stdm, cov, covm,
cor, corm, cov2cor!, unscaled_covzm, quantile, sqrt!,
median, middle
end

# Location of the `mean` function, used for calling the function inside of
# functions definitions that have `mean` as a keyword argument
const MEANHOME = (VERSION >= v"0.7.0-beta.85" ? Statistics : Base)::Module

using Statistics
using LinearAlgebra
using Random
using Printf
using SparseArrays
import Random: rand, rand!
import LinearAlgebra: BlasReal, BlasFloat
import Statistics: mean, mean!, var, varm, varm!, std, stdm, cov, covm,
cor, corm, cov2cor!, unscaled_covzm, quantile, sqrt!,
median, middle

## tackle compatibility issues

Expand Down Expand Up @@ -206,18 +195,6 @@ module StatsBase

ConvergenceException

const BASESTATS_IN_STATSBASE = v"0.7.0-DEV.5238" <= VERSION < v"0.7.0-beta.85"

@static if BASESTATS_IN_STATSBASE
export cor, cov, std, stdm, var, varm, linreg
include("base.jl")
end

module StatsCompat
import ..StatsBase: var, std, varm, cov, cor, MEANHOME
end
export StatsCompat

# source files

include("common.jl")
Expand Down
Loading

0 comments on commit 2159564

Please sign in to comment.