Skip to content

Commit 8bfe00a

Browse files
authored
Remove isordered trait (#19)
* Remove 'isordered' trait * Update CI
1 parent 236600d commit 8bfe00a

File tree

5 files changed

+15
-30
lines changed

5 files changed

+15
-30
lines changed

.github/dependabot.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5+
6+
version: 2
7+
updates:
8+
- package-ecosystem: "github-actions" # See documentation for possible values
9+
directory: "/" # Location of package manifests
10+
schedule:
11+
interval: "weekly"

.github/workflows/CI.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,16 @@ jobs:
2828
arch:
2929
- x64
3030
steps:
31-
- uses: actions/checkout@v3
32-
- uses: julia-actions/setup-julia@v1
31+
- uses: actions/checkout@v4
32+
- uses: julia-actions/setup-julia@v2
3333
with:
3434
version: ${{ matrix.version }}
3535
arch: ${{ matrix.arch }}
36-
- uses: julia-actions/cache@v1
36+
- uses: julia-actions/cache@v2
3737
- uses: julia-actions/julia-buildpkg@v1
3838
- uses: julia-actions/julia-runtest@v1
3939
- uses: julia-actions/julia-processcoverage@v1
40-
- uses: codecov/codecov-action@v3
40+
- uses: codecov/codecov-action@v4
4141
with:
4242
files: lcov.info
4343
token: ${{ secrets.CODECOV_TOKEN }}

ext/DataScienceTraitsCategoricalArraysExt.jl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,4 @@ using CategoricalArrays
1010
DataScienceTraits.scitype(::Type{<:CategoricalValue}) = DataScienceTraits.Categorical
1111
DataScienceTraits.elscitype(::Type{<:CategoricalArray}) = DataScienceTraits.Categorical
1212

13-
DataScienceTraits.isordered(array::CategoricalArray) = isordered(array)
14-
1513
end

src/DataScienceTraits.jl

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -148,18 +148,6 @@ Convert the scientific type of elements of the iterable `itr` to `S`, ignoring m
148148
"""
149149
coerce(::Type{S}, itr) where {S<:SciType} = map(x -> ismissing(x) ? missing : sciconvert(S, x), itr)
150150

151-
"""
152-
isordered(itr)
153-
154-
Checks whether the categorical variables of the iterable `itr` are ordered.
155-
"""
156-
function isordered(itr)
157-
if !(elscitype(itr) <: Categorical)
158-
throw(ArgumentError("iterable elements are not categorical"))
159-
end
160-
false
161-
end
162-
163151
#---------
164152
# EXPORTS
165153
#---------

test/runtests.jl

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -127,15 +127,6 @@ const DST = DataScienceTraits
127127
@test elscitype(DST.coerce(DST.Categorical, (1.0, 2.0, 3.0))) <: DST.Categorical
128128
end
129129

130-
@testset "isordered" begin
131-
@test !DST.isordered([1, 2, 3])
132-
@test !DST.isordered(['a', 'b', 'c'])
133-
@test !DST.isordered(("a", "b", "c"))
134-
135-
# throws
136-
@test_throws ArgumentError DST.isordered([1.0, 2.0, 3.0])
137-
end
138-
139130
@testset "missing values" begin
140131
@test scitype(Missing) <: DST.Unknown
141132
@test scitype(Union{Float64,Missing}) <: DST.Continuous
@@ -235,9 +226,6 @@ const DST = DataScienceTraits
235226
@test elscitype(CA) <: DST.Categorical
236227
@test elscitype(carr) <: DST.Categorical
237228
@test elscitype(categorical([1, missing, 3])) <: DST.Categorical
238-
@test !DST.isordered(carr)
239-
carr = categorical([1, 3, 2], ordered=true)
240-
@test DST.isordered(carr)
241229
end
242230

243231
@testset "Colors" begin

0 commit comments

Comments
 (0)