Skip to content

Commit 8affa46

Browse files
authored
Merge pull request #8 from TuringLang/mt/fix_tests
Update Distributions.jl in Manifest
2 parents 590adb2 + e2317a4 commit 8affa46

File tree

2 files changed

+39
-13
lines changed

2 files changed

+39
-13
lines changed

Manifest.toml

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -70,15 +70,15 @@ uuid = "a8cc5b0e-0ffa-5ad4-8c14-923d3ee1735f"
7070
version = "4.0.0"
7171

7272
[[DataAPI]]
73-
git-tree-sha1 = "8903f0219d3472543fc4b2f5ebaf675a07f817c0"
73+
git-tree-sha1 = "674b67f344687a88310213ddfa8a2b3c76cc4252"
7474
uuid = "9a962f9c-6df0-11e9-0e5d-c546b8b5ee8a"
75-
version = "1.0.1"
75+
version = "1.1.0"
7676

7777
[[DataStructures]]
7878
deps = ["InteractiveUtils", "OrderedCollections"]
79-
git-tree-sha1 = "0809951a1774dc724da22d26e4289bbaab77809a"
79+
git-tree-sha1 = "517ce30aa57cdfae1ab444a7c0aef8bb86345bc2"
8080
uuid = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8"
81-
version = "0.17.0"
81+
version = "0.17.1"
8282

8383
[[Dates]]
8484
deps = ["Printf"]
@@ -106,21 +106,21 @@ uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b"
106106

107107
[[Distributions]]
108108
deps = ["LinearAlgebra", "PDMats", "Printf", "QuadGK", "Random", "SpecialFunctions", "Statistics", "StatsBase", "StatsFuns"]
109-
git-tree-sha1 = "baaf9e165ba8a2d11fb4fb3511782ee070ee3694"
109+
git-tree-sha1 = "b419fcf95ef9c8cf4d6610cd323890ad66d64240"
110110
uuid = "31c24e10-a181-5473-b8eb-7969acd0382f"
111-
version = "0.21.1"
111+
version = "0.21.3"
112112

113113
[[FFTW]]
114114
deps = ["AbstractFFTs", "BinaryProvider", "Conda", "Libdl", "LinearAlgebra", "Reexport", "Test"]
115-
git-tree-sha1 = "03f8776fbdae28c20c0d1d2ae4e090cd1dfcd247"
115+
git-tree-sha1 = "6c5b420da0b8c12098048561b8d58f81adea506f"
116116
uuid = "7a1cc6ca-52ef-59f5-83cd-3a7055c09341"
117-
version = "1.0.0"
117+
version = "1.0.1"
118118

119119
[[FillArrays]]
120120
deps = ["LinearAlgebra", "Random", "SparseArrays"]
121-
git-tree-sha1 = "4c707c87ddd3199fc5624d5c98b2c706e4d00675"
121+
git-tree-sha1 = "16974065d5bfa867446d3228bc63f05a440e910b"
122122
uuid = "1a297f60-69ca-5386-bcde-b61e274b549b"
123-
version = "0.7.0"
123+
version = "0.7.2"
124124

125125
[[FiniteDifferences]]
126126
deps = ["LinearAlgebra", "Printf"]
@@ -174,9 +174,10 @@ deps = ["Base64"]
174174
uuid = "d6f4376e-aef5-505a-96c1-9c027394607a"
175175

176176
[[Missings]]
177-
git-tree-sha1 = "29858ce6c8ae629cf2d733bffa329619a1c843d0"
177+
deps = ["DataAPI"]
178+
git-tree-sha1 = "de0a5ce9e5289f27df672ffabef4d1e5861247d5"
178179
uuid = "e1d29d7a-bbdc-5cf2-9ac0-f12de2c33e28"
179-
version = "0.4.2"
180+
version = "0.4.3"
180181

181182
[[Mmap]]
182183
uuid = "a63ad114-7e13-5084-954f-fe012c677804"
@@ -309,7 +310,7 @@ uuid = "4c63d2b9-4356-54db-8cca-17b64c39e42c"
309310
version = "0.8.0"
310311

311312
[[SuiteSparse]]
312-
deps = ["Libdl", "LinearAlgebra", "SparseArrays"]
313+
deps = ["Libdl", "LinearAlgebra", "Serialization", "SparseArrays"]
313314
uuid = "4607b0f0-06f3-5cda-b6b1-a6196a1729e9"
314315

315316
[[Test]]

test/runtests.jl

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,19 @@ norm_val = ones(dim)
1919
alpha = ones(4)
2020
dir_val = fill(0.25, 4)
2121
beta_mat = rand(MatrixBeta(dim, dim, dim))
22+
tested = []
23+
function test_info(name)
24+
if !(name in tested)
25+
push!(tested, name)
26+
@info("Testing: $(name)")
27+
end
28+
end
29+
test_head(s) = println("\n"*s*"\n")
30+
separator() = println("\n"*"="^50)
2231

32+
separator()
2333
@testset "Univariate discrete distributions" begin
34+
test_head("Testing: Univariate discrete distributions")
2435
uni_disc_dists = [
2536
DistSpec(:Bernoulli, (0.45,), 1),
2637
DistSpec(:Bernoulli, (0.45,), 0),
@@ -34,13 +45,16 @@ beta_mat = rand(MatrixBeta(dim, dim, dim))
3445
DistSpec(:PoissonBinomial, ([0.5, 0.5],), 0),
3546
]
3647
for d in uni_disc_dists
48+
test_info(d.name)
3749
for testf in get_all_functions(d, false)
3850
test_ad(testf.f, testf.x)
3951
end
4052
end
4153
end
54+
separator()
4255

4356
@testset "Univariate continuous distributions" begin
57+
test_head("Testing: Univariate continuous distributions")
4458
uni_cont_dists = [
4559
DistSpec(:Arcsine, (), 0.5),
4660
DistSpec(:Arcsine, (1,), 0.5),
@@ -145,27 +159,33 @@ end
145159
DistSpec(:VonMises, (1, 1), 1),
146160
]
147161
for d in uni_cont_dists
162+
test_info(d.name)
148163
for testf in get_all_functions(d, true)
149164
test_ad(testf.f, testf.x)
150165
end
151166
end
152167
end
168+
separator()
153169

154170
@testset "Multivariate discrete distributions" begin
171+
test_head("Testing: Multivariate discrete distributions")
155172
mult_disc_dists = [
156173
]
157174
broken_mult_disc_dists = [
158175
# Dispatch error caused by lack of type parameters in Distributions.Multinomial
159176
DistSpec(:((p) -> Multinomial(4, p)), (fill(0.25, 4),), 1),
160177
]
161178
for d in mult_disc_dists
179+
test_info(d.name)
162180
for testf in get_all_functions(d, false)
163181
test_ad(testf.f, testf.x)
164182
end
165183
end
166184
end
185+
separator()
167186

168187
@testset "Multivariate continuous distributions" begin
188+
test_head("Testing: Multivariate continuous distributions")
169189
mult_cont_dists = [
170190
DistSpec(:MvNormal, (mean, cov_mat), norm_val),
171191
DistSpec(:MvNormal, (mean, cov_vec), norm_val),
@@ -195,13 +215,16 @@ end
195215
]
196216

197217
for d in mult_cont_dists
218+
test_info(d.name)
198219
for testf in get_all_functions(d, true)
199220
test_ad(testf.f, testf.x)
200221
end
201222
end
202223
end
224+
separator()
203225

204226
@testset "Matrix-variate continuous distributions" begin
227+
test_head("Testing: Matrix-variate continuous distributions")
205228
matrix_cont_dists = [
206229
DistSpec(:((n1, n2)->MatrixBeta(dim, n1, n2)), (dim, dim), beta_mat),
207230
]
@@ -215,8 +238,10 @@ end
215238
]
216239

217240
for d in matrix_cont_dists
241+
test_info(d.name)
218242
for testf in get_all_functions(d, true)
219243
test_ad(testf.f, testf.x)
220244
end
221245
end
222246
end
247+
separator()

0 commit comments

Comments
 (0)