diff --git a/Project.toml b/Project.toml index 034d148..c184514 100644 --- a/Project.toml +++ b/Project.toml @@ -11,6 +11,7 @@ GLMNet = "8d5ece8b-de18-5317-b113-243142960cc6" Interpolations = "a98d9a8b-a2ab-59e6-89dd-64a1c18fca59" Lasso = "b4fcebef-c861-5a0f-a7e2-ba9dc32b180a" MLJModelInterface = "e80e1ace-859a-464e-9ed9-23947d8ae3ea" +MLJTestInterface = "72560011-54dd-4dc2-94f3-c5de45b75ecd" SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" StatsAPI = "82ae8749-77ed-4fe6-ae5f-f523153014b0" @@ -26,6 +27,7 @@ Interpolations = "0.15" Lasso = "0.7" MLJBase = "1" MLJModelInterface = "1" +MLJTestInterface = "0.2.6" Statistics = "1" StatsAPI = "1" StatsBase = "0.34" @@ -36,7 +38,8 @@ julia = "1.9" [extras] DelimitedFiles = "8bb1440f-4735-579b-a4ab-409b98df4dab" MLJBase = "a7f614a8-145f-11e9-1d2a-a57a1082229d" +MLJTestInterface = "72560011-54dd-4dc2-94f3-c5de45b75ecd" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [targets] -test = ["DelimitedFiles", "MLJBase", "Test"] +test = ["DelimitedFiles", "MLJBase", "MLJTestInterface", "Test"] diff --git a/test/runtests.jl b/test/runtests.jl index ed8e29a..b43c57b 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -1,4 +1,4 @@ -using Maxnet, Test, Statistics, CategoricalArrays +using Maxnet, Test, Statistics, CategoricalArrays, MLJTestInterface p_a, env = Maxnet.bradypus() # Make the levels in ecoreg string to make sure that that works @@ -85,6 +85,16 @@ end m = maxnet(p_a, env; features = "lq", addsamplestobackground = false) @testset "MLJ" begin + data = MLJTestInterface.make_binary() + failures, summary = MLJTestInterface.test( + [MaxnetBinaryClassifier], + data...; + mod=@__MODULE__, + verbosity=0, # bump to debug + throw=false, # set to true to debug + ) + @test isempty(failures) + using MLJBase mn = Maxnet.MaxnetBinaryClassifier