diff --git a/REQUIRE b/REQUIRE index a40bb482..c18f8c7c 100644 --- a/REQUIRE +++ b/REQUIRE @@ -1,3 +1,4 @@ julia 0.6 Compat 0.19.0 Nulls 0.1.2 +Reexport diff --git a/benchmark/benchmarks.jl b/benchmark/benchmarks.jl index 0985e4dd..6d695622 100644 --- a/benchmark/benchmarks.jl +++ b/benchmark/benchmarks.jl @@ -1,6 +1,5 @@ using PkgBenchmark using CategoricalArrays -using Nulls @benchgroup "isequal(A, v::String)" begin function sumequals(A::AbstractArray, v::Any) diff --git a/docs/src/using.md b/docs/src/using.md index 0aaa3ebe..b5b3a08a 100644 --- a/docs/src/using.md +++ b/docs/src/using.md @@ -129,8 +129,6 @@ The examples above assumed that the data contained no missing values. This is ge Let's adapt the example developed above to support missing values. Since there are no missing values in the input vector, we need to specify that the array should be able to hold either a `String` or `null`: ```jldoctest using -julia> using Nulls - julia> y = CategoricalArray{Union{Null, String}}(["Old", "Young", "Middle", "Young"], ordered=true) 4-element CategoricalArrays.CategoricalArray{Union{Nulls.Null, String},1,UInt32}: "Old" diff --git a/src/CategoricalArrays.jl b/src/CategoricalArrays.jl index d9c3ccef..68dc60fd 100644 --- a/src/CategoricalArrays.jl +++ b/src/CategoricalArrays.jl @@ -12,6 +12,8 @@ module CategoricalArrays export cut, recode, recode! using Compat + using Reexport + @reexport using Nulls include("typedefs.jl") diff --git a/src/array.jl b/src/array.jl index 10d6dfef..f572d8a2 100644 --- a/src/array.jl +++ b/src/array.jl @@ -1,6 +1,5 @@ ## Code for CategoricalArray -using Nulls import Base: convert, copy, copy!, getindex, setindex!, similar, size, unique, vcat, in, summary @@ -526,9 +525,6 @@ end Return the levels of categorical array `A`. This may include levels which do not actually appear in the data (see [`droplevels!`](@ref)). - -As a special case, `null` is never included in the levels, even if -the array contains missing values. """ Nulls.levels(A::CategoricalArray) = levels(A.pool) diff --git a/src/nullablearray.jl b/src/nullablearray.jl index 99bcedcb..3cbaea49 100644 --- a/src/nullablearray.jl +++ b/src/nullablearray.jl @@ -1,5 +1,4 @@ import Base: convert, getindex, setindex!, similar, in -using Nulls ## Constructors and converters ## (special methods for AbstractArray{Union{T, Null}}, to avoid wrapping nulls inside CategoricalValues) diff --git a/src/typedefs.jl b/src/typedefs.jl index ca2a580f..3424d310 100644 --- a/src/typedefs.jl +++ b/src/typedefs.jl @@ -1,5 +1,3 @@ -using Nulls - const DefaultRefType = UInt32 ## Pools diff --git a/test/05_convert.jl b/test/05_convert.jl index 799be14e..cdc7e3e3 100644 --- a/test/05_convert.jl +++ b/test/05_convert.jl @@ -1,7 +1,6 @@ module TestConvert using Base.Test using CategoricalArrays - using Nulls pool = CategoricalPool([1, 2, 3]) @test convert(CategoricalPool{Int, CategoricalArrays.DefaultRefType}, pool) === pool diff --git a/test/08_equality.jl b/test/08_equality.jl index b32c3e49..cdf318ad 100644 --- a/test/08_equality.jl +++ b/test/08_equality.jl @@ -1,7 +1,6 @@ module TestEquality using Base.Test using CategoricalArrays - using Nulls pool1 = CategoricalPool([1, 2, 3]) pool2 = CategoricalPool([2.0, 1.0, 3.0]) diff --git a/test/10_isless.jl b/test/10_isless.jl index 39db98f9..9cfffc59 100644 --- a/test/10_isless.jl +++ b/test/10_isless.jl @@ -1,7 +1,6 @@ module TestIsLess using Base.Test using CategoricalArrays - using Nulls pool = CategoricalPool([1, 2, 3]) diff --git a/test/12_nullablearray.jl b/test/12_nullablearray.jl index 3ca325dd..524fcee9 100644 --- a/test/12_nullablearray.jl +++ b/test/12_nullablearray.jl @@ -1,7 +1,6 @@ module TestNullableArray using Base.Test -using Nulls using CategoricalArrays using CategoricalArrays: DefaultRefType diff --git a/test/13_arraycommon.jl b/test/13_arraycommon.jl index 4c9e268b..43c72ef8 100644 --- a/test/13_arraycommon.jl +++ b/test/13_arraycommon.jl @@ -2,7 +2,6 @@ module TestArrayCommon using Base.Test using CategoricalArrays -using Nulls using CategoricalArrays: DefaultRefType, index const ≅ = isequal diff --git a/test/14_view.jl b/test/14_view.jl index ff31939d..049334d4 100644 --- a/test/14_view.jl +++ b/test/14_view.jl @@ -2,7 +2,6 @@ module TestView using Base.Test using CategoricalArrays -using Nulls for T in (Union{}, Null) for order in (true, false) diff --git a/test/15_extras.jl b/test/15_extras.jl index 2690f66c..872eff06 100644 --- a/test/15_extras.jl +++ b/test/15_extras.jl @@ -2,7 +2,6 @@ module TestExtras using Base.Test using CategoricalArrays -using Nulls const ≅ = isequal diff --git a/test/16_recode.jl b/test/16_recode.jl index bb35ec77..9304cc26 100644 --- a/test/16_recode.jl +++ b/test/16_recode.jl @@ -2,7 +2,6 @@ module TestRecode using Base.Test using CategoricalArrays using CategoricalArrays: DefaultRefType - using Nulls const ≅ = isequal