Skip to content

Commit 8d9b2b6

Browse files
authored
Merge pull request #11 from alan-turing-institute/dev
For a 1.1.1 release
2 parents c12e449 + 3636c93 commit 8d9b2b6

File tree

3 files changed

+11
-9
lines changed

3 files changed

+11
-9
lines changed

Project.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
name = "StatisticalTraits"
22
uuid = "64bff920-2084-43da-a3e6-9bb72801c0c9"
33
authors = ["Anthony D. Blaom <[email protected]>"]
4-
version = "1.0.0"
4+
version = "1.1.1"
55

66
[deps]
7-
ScientificTypes = "321657f4-b219-11e9-178b-2701a2544e81"
7+
ScientificTypesBase = "30f210dd-8aff-4c5f-94ba-8e64358c1161"
88

99
[compat]
10-
ScientificTypes = "^1"
10+
ScientificTypesBase = "^1"
1111
julia = "^1"
1212

1313
[extras]

src/StatisticalTraits.jl

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module StatisticalTraits
22

3-
using ScientificTypes
3+
using ScientificTypesBase
44
import Base.instances
55

66
## CONSTANTS
@@ -33,7 +33,8 @@ const TRAITS = [
3333
:is_feature_dependent,
3434
:distribution_type,
3535
:iteration_parameter,
36-
:supports_training_losses
36+
:supports_training_losses,
37+
:deep_properties
3738
]
3839

3940

@@ -124,7 +125,7 @@ snakecase(s::Symbol) = Symbol(snakecase(string(s)))
124125
## TRAITS
125126

126127
# The following can return any scientific type, that is, any type
127-
# defined in the package ScientificTypes.jl, and any ordinary type
128+
# defined in the package ScientificTypesBase.jl, and any ordinary type
128129
# that functions as a scientific type (eg, `Missing`). Here "target"
129130
# is a synonym for "labels", as in supervised learning; "input" is a
130131
# synonym for "features":
@@ -168,6 +169,7 @@ reports_each_observation(::Type) = false
168169
distribution_type(::Type) = missing
169170
iteration_parameter(::Type) = nothing
170171
supports_training_losses(::Type) = false
172+
deep_properties(::Type) = ()
171173

172174
# Returns a tuple, with one entry per field of `T` (the type of some
173175
# statistical model, for example). Each entry is `nothing` or defines
@@ -205,11 +207,11 @@ traits that are meaninful for the object.
205207
*Note on overloading.* This method can be overloaded directly, as in
206208
`info(X::SomeAbstractType) = ...` or, using `info(X,
207209
::Val{:some_trait}) = ...` where `:some_trait` is a key of
208-
`ScientificTypes.TRAIT_FUNCTION_GIVEN_NAME` (such as `:is_measure`
210+
`ScientificTypesBase.TRAIT_FUNCTION_GIVEN_NAME` (such as `:is_measure`
209211
with value `is_measure`).
210212
211213
"""
212-
info(X) = info(X, Val(ScientificTypes.trait(X)))
214+
info(X) = info(X, Val(ScientificTypesBase.trait(X)))
213215
info(X, ::Val{:other}) = NamedTuple()
214216

215217
end # module

test/runtests.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
using Test
22
using StatisticalTraits
3-
using ScientificTypes
3+
using ScientificTypesBase
44
import SparseArrays
55

66
module Fruit

0 commit comments

Comments
 (0)