-
Notifications
You must be signed in to change notification settings - Fork 31
/
runtests.jl
99 lines (78 loc) · 2.51 KB
/
runtests.jl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
using Pkg
# Activate test environment on older Julia versions
if VERSION < v"1.2"
Pkg.activate(@__DIR__)
Pkg.develop(PackageSpec(path=dirname(@__DIR__)))
Pkg.instantiate()
end
using MCMCChains
using Documenter
using Test
using Random
# set seed for all testsets
Random.seed!(0)
@testset "MCMCChains" begin
# MLJXGBoostInterface requires Julia >= 1.3
# XGBoost errors on 32bit systems: https://github.com/dmlc/XGBoost.jl/issues/92
if VERSION >= v"1.3" && VERSION < v"1.7" && Sys.WORD_SIZE == 64
# run tests related to rstar statistic
println("Rstar")
Pkg.add("MLJBase")
Pkg.add("MLJXGBoostInterface")
@time include("rstar_tests.jl")
DocMeta.setdocmeta!(
MCMCChains,
:DocTestSetup,
:(using MCMCChains);
recursive=true
)
doctest(
MCMCChains;
# https://github.com/JuliaLang/julia/pull/37085#issuecomment-683356098
doctestfilters = [
r"{([a-zA-Z0-9]+,\s?)+[a-zA-Z0-9]+}",
r"(Array{[a-zA-Z0-9]+,\s?1}|Vector{[a-zA-Z0-9]+})",
r"(Array{[a-zA-Z0-9]+,\s?2}|Matrix{[a-zA-Z0-9]+})",
],
)
end
# run tests for effective sample size
println("ESS")
@time include("ess_tests.jl")
# run plotting tests
println("Plotting")
@time include("plot_test.jl")
# run function tests
println("Diagnostics")
@time include("diagnostic_tests.jl")
# run tests for missing values
println("Missing values")
@time include("missing_tests.jl")
# run tests for describing sections
println("Sections")
@time include("sections_tests.jl")
# run tests for accessing parameters
println("Accessing parameters")
@time include("get_tests.jl")
# run tests for serialization
println("Serialization")
@time include("serialization_tests.jl")
# run tests for sampling api
println("Sampling")
@time include("sampling_tests.jl")
# run tests for array constructor
println("Array")
@time include("arrayconstructor_tests.jl")
# run tests for tables interfaces
println("Tables interfaces")
@time include("tables_tests.jl")
# run tests for dataframe summary
println("Summary")
@time include("summarize_tests.jl")
# run tests for posterior stats
println("Model statistics")
@time include("modelstats_test.jl")
# run tests for concatenation
println("Concatenation")
@time include("concatenation_tests.jl")
end