From e445bbc65040aa80f24597a4cac2cd2edc46f9fd Mon Sep 17 00:00:00 2001 From: "Anthony Blaom, PhD" Date: Wed, 18 Aug 2021 14:40:04 +1200 Subject: [PATCH 1/7] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ad91148..1fb19e8 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ prediction_type(::Type) = :unknown # also :probablistic, :deterministic, :interv ``` Here `Unknown` is a type defined in the light-weight package -[ScientificTypes.jl](https://github.com/JuliaAI/ScientificTypes.jl), +[ScientificTypesBase.jl](https://github.com/JuliaAI/ScientificTypesBase.jl), the only dependency of StatsTraits.jl. Refer to [source code](src/StatisticalTraits.jl) for a complete list. From ce3a1b4efeb955dd082986bb97aaaeed343d9de4 Mon Sep 17 00:00:00 2001 From: OkonSamuel Date: Thu, 16 Dec 2021 23:05:53 +0100 Subject: [PATCH 2/7] make info method a stub and modify it's docstring --- src/StatisticalTraits.jl | 13 ++++--------- test/runtests.jl | 5 ----- 2 files changed, 4 insertions(+), 14 deletions(-) diff --git a/src/StatisticalTraits.jl b/src/StatisticalTraits.jl index c4b27c7..cced765 100644 --- a/src/StatisticalTraits.jl +++ b/src/StatisticalTraits.jl @@ -211,17 +211,12 @@ end """ info(X) -Return a named-tuple of trait values for `X`, keyed on a list of +Return a named-tuple of trait values for `X`, keyed on the names of traits that are meaninful for the object. *Note on overloading.* This method can be overloaded directly, as in -`info(X::SomeAbstractType) = ...` or, using `info(X, -::Val{:some_trait}) = ...` where `:some_trait` is a key of -`ScientificTypesBase.TRAIT_FUNCTION_GIVEN_NAME` (such as `:is_measure` -with value `is_measure`). - +`info(X::SomeAbstractType) = ...`. """ -info(X) = info(X, Val(ScientificTypesBase.trait(X))) -info(X, ::Val{:other}) = NamedTuple() +function info end -end # module +end #module \ No newline at end of file diff --git a/test/runtests.jl b/test/runtests.jl index 44dcce2..aee1d51 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -99,8 +99,3 @@ const NONCONSTANT = [:docstring, Main.eval(ex) end end - - -## INFO STUB - -@test StatisticalTraits.info(42) == NamedTuple() From 1aea58e1ef7d82ccfecbcac8da5fbddc46ba7747 Mon Sep 17 00:00:00 2001 From: "Anthony D. Blaom" Date: Tue, 21 Dec 2021 18:22:16 +1300 Subject: [PATCH 3/7] typo --- src/StatisticalTraits.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/StatisticalTraits.jl b/src/StatisticalTraits.jl index cced765..6429565 100644 --- a/src/StatisticalTraits.jl +++ b/src/StatisticalTraits.jl @@ -212,11 +212,11 @@ end info(X) Return a named-tuple of trait values for `X`, keyed on the names of -traits that are meaninful for the object. +traits that are meaningful for the object. *Note on overloading.* This method can be overloaded directly, as in `info(X::SomeAbstractType) = ...`. """ function info end -end #module \ No newline at end of file +end #module From 7b05d0a6ca208d25d18c6cc87fabbf907955fe71 Mon Sep 17 00:00:00 2001 From: "Anthony D. Blaom" Date: Tue, 21 Dec 2021 18:25:49 +1300 Subject: [PATCH 4/7] extend compat ScientificTypesBase = "^1, 2, 3" --- Project.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Project.toml b/Project.toml index ac00173..5443feb 100644 --- a/Project.toml +++ b/Project.toml @@ -1,4 +1,4 @@ -name = "StatisticalTraits" +\name = "StatisticalTraits" uuid = "64bff920-2084-43da-a3e6-9bb72801c0c9" authors = ["Anthony D. Blaom "] version = "2.1.0" @@ -7,7 +7,7 @@ version = "2.1.0" ScientificTypesBase = "30f210dd-8aff-4c5f-94ba-8e64358c1161" [compat] -ScientificTypesBase = "^1, 2" +ScientificTypesBase = "^1, 2, 3" julia = "^1" [extras] From 1052e4d4af5e17fd1b11cbb18fc98c9698d25977 Mon Sep 17 00:00:00 2001 From: "Anthony D. Blaom" Date: Tue, 21 Dec 2021 18:27:55 +1300 Subject: [PATCH 5/7] formatting in compat entry --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index 5443feb..38c99ce 100644 --- a/Project.toml +++ b/Project.toml @@ -7,7 +7,7 @@ version = "2.1.0" ScientificTypesBase = "30f210dd-8aff-4c5f-94ba-8e64358c1161" [compat] -ScientificTypesBase = "^1, 2, 3" +ScientificTypesBase = "1, 2, 3" julia = "^1" [extras] From e4d4e7e9a61dc3021cb25c1d8cc98295312cbce7 Mon Sep 17 00:00:00 2001 From: "Anthony D. Blaom" Date: Tue, 21 Dec 2021 18:30:29 +1300 Subject: [PATCH 6/7] rm extraneous character from project.toml --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index 38c99ce..b72e3aa 100644 --- a/Project.toml +++ b/Project.toml @@ -1,4 +1,4 @@ -\name = "StatisticalTraits" +name = "StatisticalTraits" uuid = "64bff920-2084-43da-a3e6-9bb72801c0c9" authors = ["Anthony D. Blaom "] version = "2.1.0" From b3e4064dcf72dd7dd914e679bc20006801614af2 Mon Sep 17 00:00:00 2001 From: "Anthony D. Blaom" Date: Tue, 21 Dec 2021 19:33:20 +1300 Subject: [PATCH 7/7] bump 3.0.0 --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index b72e3aa..a4e3f03 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "StatisticalTraits" uuid = "64bff920-2084-43da-a3e6-9bb72801c0c9" authors = ["Anthony D. Blaom "] -version = "2.1.0" +version = "3.0.0" [deps] ScientificTypesBase = "30f210dd-8aff-4c5f-94ba-8e64358c1161"