Skip to content

Commit 9eb16df

Browse files
committed
add the tags trait
1 parent 8603f6b commit 9eb16df

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

Project.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,14 @@ version = "3.4.0"
77
ScientificTypesBase = "30f210dd-8aff-4c5f-94ba-8e64358c1161"
88

99
[compat]
10+
REPL = "1.11.0"
1011
ScientificTypesBase = "1, 2, 3"
1112
julia = "^1"
1213

1314
[extras]
15+
REPL = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb"
1416
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
1517
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
1618

1719
[targets]
18-
test = ["Test", "SparseArrays"]
20+
test = ["Test", "REPL", "SparseArrays"]

src/StatisticalTraits.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ const TRAITS = [
2727
:docstring,
2828
:name,
2929
:human_name,
30+
:tags,
3031
:is_supervised,
3132
:prediction_type,
3233
:abstract_type, #
@@ -178,6 +179,7 @@ docstring(M::Type) = string(M) # some `String`
178179
docstring(Constructor::Function) = Base.Docs.doc(Constructor) |> string
179180
is_supervised(::Type) = false # or `true`
180181
human_name(M::Type) = snakecase(name(M), delim=' ') # `name` defined below
182+
tags(::Type) = String[]
181183
orientation(::Type) = :loss # or `:score`, `:other`
182184
aggregation(::Type) = Mean()
183185
is_feature_dependent(::Type) = false

test/runtests.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ using Test
22
using StatisticalTraits
33
using ScientificTypesBase
44
import SparseArrays
5+
using REPL
56

67
module Fruit
78

0 commit comments

Comments
 (0)