Skip to content
This repository has been archived by the owner on May 4, 2019. It is now read-only.

Fixes for 0.6 #235

Merged
merged 14 commits into from
Feb 17, 2017
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
language: julia
julia:
- 0.4
- 0.5
# - 0.6
- nightly
os:
- linux
Expand Down
4 changes: 2 additions & 2 deletions REQUIRE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
julia 0.4
julia 0.6-
StatsBase 0.3
Compat 0.8.6
Reexport
SpecialFunctions
6 changes: 2 additions & 4 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
environment:
matrix:
- JULIAVERSION: "julialang/bin/winnt/x86/0.4/julia-0.4-latest-win32.exe"
- JULIAVERSION: "julialang/bin/winnt/x64/0.4/julia-0.4-latest-win64.exe"
- JULIAVERSION: "julialang/bin/winnt/x86/0.5/julia-0.5-latest-win32.exe"
- JULIAVERSION: "julialang/bin/winnt/x64/0.5/julia-0.5-latest-win64.exe"
# - JULIAVERSION: "julialang/bin/winnt/x86/0.6/julia-0.6-latest-win32.exe"
# - JULIAVERSION: "julialang/bin/winnt/x64/0.6/julia-0.6-latest-win64.exe"
- JULIAVERSION: "julianightlies/bin/winnt/x86/julia-latest-win32.exe"
- JULIAVERSION: "julianightlies/bin/winnt/x64/julia-latest-win64.exe"

Expand Down
12 changes: 3 additions & 9 deletions src/DataArrays.jl
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
__precompile__()

module DataArrays
using Base: promote_op
using Base.Cartesian, Compat, Reexport
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since Compat was removed from REQUIRE, it should be removed here too. (Not sure how this didn't cause CI to fail...)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True. I think it is installed by the dependencies.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah yeah, probably installed by StatsBase.

import Compat.String
@reexport using StatsBase
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is tangential to the current changes, but it would make sense to me to stop reexporting StatsBase from this package. I'm not sure why we do it currently. If we do stop doing that, we could also drop the dependency on Reexport (not that it's a huge or problematic dependency, just saying).

using SpecialFunctions

const DEFAULT_POOLED_REF_TYPE = UInt32

import Base: ==, !=, >, <, >=, <=, +, -, *, !, &, |, $, ^, /,
.==, .!=, .>, .<, .>=, .<=, .+, .-, .*, .%, ./, .\, .^
import Base: ==, !=, >, <, >=, <=, +, -, *, !, &, |, $, ^, /

import StatsBase: autocor, inverse_rle, rle

Expand Down Expand Up @@ -80,10 +80,4 @@ module DataArrays
include("predicates.jl")
include("literals.jl")
include("deprecated.jl")

Base.@deprecate removeNA dropna
Base.@deprecate each_failNA each_failna
Base.@deprecate each_replaceNA each_replacena
Base.@deprecate set_levels setlevels
Base.@deprecate set_levels! setlevels!
end
12 changes: 6 additions & 6 deletions src/abstractdataarray.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
#'
#' An AbstractDataArray is an Array whose entries can take on
#' values of type `T` or the value `NA`.
abstract AbstractDataArray{T, N} <: AbstractArray{T, N}
abstract type AbstractDataArray{T, N} <: AbstractArray{T, N} end

#' @description
#'
#' An AbstractDataVector is an AbstractDataArray of order 1.
typealias AbstractDataVector{T} AbstractDataArray{T, 1}
const AbstractDataVector{T} = AbstractDataArray{T, 1}

#' @description
#'
#' An AbstractDataMatrix is an AbstractDataArray of order 2.
typealias AbstractDataMatrix{T} AbstractDataArray{T, 2}
const AbstractDataMatrix{T} = AbstractDataArray{T, 2}

#' @description
#' Determine the type of the elements of an AbstractDataArray.
Expand Down Expand Up @@ -121,7 +121,7 @@ dropna(v::AbstractVector) = copy(v) # -> AbstractVector
# TODO: Use values()
# Use DataValueIterator type?

type EachFailNA{T}
struct EachFailNA{T}
da::AbstractDataArray{T}
end
each_failna{T}(da::AbstractDataArray{T}) = EachFailNA(da)
Expand All @@ -136,7 +136,7 @@ function Base.next(itr::EachFailNA, ind::Integer)
end
end

type EachDropNA{T}
struct EachDropNA{T}
da::AbstractDataArray{T}
end
each_dropna{T}(da::AbstractDataArray{T}) = EachDropNA(da)
Expand All @@ -154,7 +154,7 @@ function Base.next(itr::EachDropNA, ind::Int)
(itr.da[ind], _next_nonna_ind(itr.da, ind))
end

type EachReplaceNA{S, T}
struct EachReplaceNA{S, T}
da::AbstractDataArray{S}
replacement::T
end
Expand Down
Loading