File tree Expand file tree Collapse file tree 3 files changed +5
-1
lines changed Expand file tree Collapse file tree 3 files changed +5
-1
lines changed Original file line number Diff line number Diff line change 1
1
name = " StatisticalTraits"
2
2
uuid = " 64bff920-2084-43da-a3e6-9bb72801c0c9"
3
3
authors = [
" Anthony D. Blaom <[email protected] >" ]
4
- version = " 3.2 .0"
4
+ version = " 3.3 .0"
5
5
6
6
[deps ]
7
7
ScientificTypesBase = " 30f210dd-8aff-4c5f-94ba-8e64358c1161"
Original file line number Diff line number Diff line change @@ -42,6 +42,7 @@ const TRAITS = [
42
42
:supports_training_losses ,
43
43
:deep_properties ,
44
44
:reporting_operations ,
45
+ :constructor ,
45
46
]
46
47
47
48
@@ -172,6 +173,7 @@ abstract_type(::Type) = Any
172
173
is_wrapper (:: Type ) = false # or `true`
173
174
supports_online (:: Type ) = false # or `true`
174
175
docstring (M:: Type ) = string (M) # some `String`
176
+ docstring (Constructor:: Function ) = Base. Docs. doc (Constructor) |> string
175
177
is_supervised (:: Type ) = false # or `true`
176
178
human_name (M:: Type ) = snakecase (name (M), delim= ' ' ) # `name` defined below
177
179
orientation (:: Type ) = :loss # or `:score`, `:other`
@@ -184,6 +186,7 @@ iteration_parameter(::Type) = nothing
184
186
supports_training_losses (:: Type ) = false
185
187
deep_properties (:: Type ) = ()
186
188
reporting_operations (:: Type ) = ()
189
+ constructor (:: Type ) = nothing
187
190
188
191
# Returns a tuple, with one entry per field of `T` (the type of some
189
192
# statistical model, for example). Each entry is `nothing` or defines
Original file line number Diff line number Diff line change 46
46
@testset " docstring" begin
47
47
@test docstring (Foo (1 ,' x' )) == " Foo"
48
48
@test docstring (Fruit. RedApple (4 )) == " Main.Fruit.RedApple{Int64}"
49
+ @test docstring (sin) == Base. Docs. doc (sin) |> string
49
50
end
50
51
51
52
@testset " hyperparameter_ranges" begin
You can’t perform that action at this time.
0 commit comments