Skip to content

Commit

Permalink
Reexport Nulls
Browse files Browse the repository at this point in the history
This is more convenient for users.
  • Loading branch information
nalimilan committed Oct 14, 2017
1 parent 3e03f91 commit ff1ec26
Show file tree
Hide file tree
Showing 15 changed files with 3 additions and 18 deletions.
1 change: 1 addition & 0 deletions REQUIRE
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
julia 0.6
Compat 0.19.0
Nulls 0.1.2
Reexport
1 change: 0 additions & 1 deletion benchmark/benchmarks.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using PkgBenchmark
using CategoricalArrays
using Nulls

@benchgroup "isequal(A, v::String)" begin
function sumequals(A::AbstractArray, v::Any)
Expand Down
2 changes: 0 additions & 2 deletions docs/src/using.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 2 additions & 0 deletions src/CategoricalArrays.jl
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ module CategoricalArrays
export cut, recode, recode!

using Compat
using Reexport
@reexport using Nulls

include("typedefs.jl")

Expand Down
4 changes: 0 additions & 4 deletions src/array.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
## Code for CategoricalArray

using Nulls
import Base: convert, copy, copy!, getindex, setindex!, similar, size,
unique, vcat, in, summary

Expand Down Expand Up @@ -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)

Expand Down
1 change: 0 additions & 1 deletion src/nullablearray.jl
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
2 changes: 0 additions & 2 deletions src/typedefs.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using Nulls

const DefaultRefType = UInt32

## Pools
Expand Down
1 change: 0 additions & 1 deletion test/05_convert.jl
Original file line number Diff line number Diff line change
@@ -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
Expand Down
1 change: 0 additions & 1 deletion test/08_equality.jl
Original file line number Diff line number Diff line change
@@ -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])
Expand Down
1 change: 0 additions & 1 deletion test/10_isless.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
module TestIsLess
using Base.Test
using CategoricalArrays
using Nulls

pool = CategoricalPool([1, 2, 3])

Expand Down
1 change: 0 additions & 1 deletion test/12_nullablearray.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
module TestNullableArray

using Base.Test
using Nulls
using CategoricalArrays
using CategoricalArrays: DefaultRefType

Expand Down
1 change: 0 additions & 1 deletion test/13_arraycommon.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ module TestArrayCommon

using Base.Test
using CategoricalArrays
using Nulls
using CategoricalArrays: DefaultRefType, index

const = isequal
Expand Down
1 change: 0 additions & 1 deletion test/14_view.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ module TestView

using Base.Test
using CategoricalArrays
using Nulls

for T in (Union{}, Null)
for order in (true, false)
Expand Down
1 change: 0 additions & 1 deletion test/15_extras.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ module TestExtras

using Base.Test
using CategoricalArrays
using Nulls

const = isequal

Expand Down
1 change: 0 additions & 1 deletion test/16_recode.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ module TestRecode
using Base.Test
using CategoricalArrays
using CategoricalArrays: DefaultRefType
using Nulls

const = isequal

Expand Down

0 comments on commit ff1ec26

Please sign in to comment.