Skip to content

Commit 2e5875f

Browse files
committed
Remove Turing integration tests
1 parent f0c31f0 commit 2e5875f

File tree

7 files changed

+64
-914
lines changed

7 files changed

+64
-914
lines changed

test/runtests.jl

Lines changed: 64 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -31,107 +31,76 @@ using Combinatorics: combinations
3131

3232
using DynamicPPL: getargs_dottilde, getargs_tilde, Selector
3333

34-
const DIRECTORY_DynamicPPL = dirname(dirname(pathof(DynamicPPL)))
35-
const DIRECTORY_Turing_tests = joinpath(DIRECTORY_DynamicPPL, "test", "turing")
36-
const GROUP = get(ENV, "GROUP", "All")
37-
3834
Random.seed!(100)
3935

4036
include("test_util.jl")
4137

4238
@testset "DynamicPPL.jl" begin
43-
if GROUP == "All" || GROUP == "DynamicPPL"
44-
@testset "interface" begin
45-
include("utils.jl")
46-
include("compiler.jl")
47-
include("varnamedvector.jl")
48-
include("varinfo.jl")
49-
include("simple_varinfo.jl")
50-
include("model.jl")
51-
include("sampler.jl")
52-
include("independence.jl")
53-
include("distribution_wrappers.jl")
54-
include("contexts.jl")
55-
include("context_implementations.jl")
56-
include("logdensityfunction.jl")
57-
include("linking.jl")
58-
59-
include("threadsafe.jl")
60-
61-
include("serialization.jl")
62-
63-
include("pointwise_logdensities.jl")
64-
65-
include("lkj.jl")
66-
67-
include("debug_utils.jl")
68-
end
69-
70-
@testset "compat" begin
71-
include(joinpath("compat", "ad.jl"))
72-
end
73-
74-
@testset "extensions" begin
75-
include("ext/DynamicPPLMCMCChainsExt.jl")
76-
end
77-
78-
@testset "ad" begin
79-
include("ext/DynamicPPLForwardDiffExt.jl")
80-
include("ad.jl")
81-
end
82-
83-
@testset "prob and logprob macro" begin
84-
@test_throws ErrorException prob"..."
85-
@test_throws ErrorException logprob"..."
86-
end
87-
88-
@testset "doctests" begin
89-
DocMeta.setdocmeta!(
90-
DynamicPPL,
91-
:DocTestSetup,
92-
:(using DynamicPPL, Distributions);
93-
recursive=true,
94-
)
95-
doctestfilters = [
96-
# Older versions will show "0 element Array" instead of "Type[]".
97-
r"(Any\[\]|0-element Array{.+,[0-9]+})",
98-
# Older versions will show "Array{...,1}" instead of "Vector{...}".
99-
r"(Array{.+,\s?1}|Vector{.+})",
100-
# Older versions will show "Array{...,2}" instead of "Matrix{...}".
101-
r"(Array{.+,\s?2}|Matrix{.+})",
102-
# Errors from macros sometimes result in `LoadError: LoadError:`
103-
# rather than `LoadError:`, depending on Julia version.
104-
r"ERROR: (LoadError:\s)+",
105-
# Older versions do not have `;;]` but instead just `]` at end of the line
106-
# => need to treat `;;]` and `]` as the same, i.e. ignore them if at the end of a line
107-
r"(;;){0,1}\]$"m,
108-
]
109-
doctest(DynamicPPL; manual=false, doctestfilters=doctestfilters)
110-
end
39+
@testset "interface" begin
40+
include("utils.jl")
41+
include("compiler.jl")
42+
include("varnamedvector.jl")
43+
include("varinfo.jl")
44+
include("simple_varinfo.jl")
45+
include("model.jl")
46+
include("sampler.jl")
47+
include("independence.jl")
48+
include("distribution_wrappers.jl")
49+
include("contexts.jl")
50+
include("context_implementations.jl")
51+
include("logdensityfunction.jl")
52+
include("linking.jl")
53+
54+
include("threadsafe.jl")
55+
56+
include("serialization.jl")
57+
58+
include("pointwise_logdensities.jl")
59+
60+
include("lkj.jl")
61+
62+
include("debug_utils.jl")
63+
end
64+
65+
@testset "compat" begin
66+
include(joinpath("compat", "ad.jl"))
67+
end
68+
69+
@testset "extensions" begin
70+
include("ext/DynamicPPLMCMCChainsExt.jl")
71+
end
72+
73+
@testset "ad" begin
74+
include("ext/DynamicPPLForwardDiffExt.jl")
75+
include("ad.jl")
76+
end
77+
78+
@testset "prob and logprob macro" begin
79+
@test_throws ErrorException prob"..."
80+
@test_throws ErrorException logprob"..."
11181
end
11282

113-
if GROUP == "All" || GROUP == "Downstream"
114-
@testset "turing" begin
115-
try
116-
# activate separate test environment
117-
Pkg.activate(DIRECTORY_Turing_tests)
118-
Pkg.develop(PackageSpec(; path=DIRECTORY_DynamicPPL))
119-
Pkg.instantiate()
120-
121-
# make sure that the new environment is considered `using` and `import` statements
122-
# (not added automatically on Julia 1.3, see e.g. PR #209)
123-
if !(joinpath(DIRECTORY_Turing_tests, "Project.toml") in Base.load_path())
124-
pushfirst!(LOAD_PATH, DIRECTORY_Turing_tests)
125-
end
126-
127-
include(joinpath("turing", "runtests.jl"))
128-
catch err
129-
err isa Pkg.Resolve.ResolverError || rethrow()
130-
# If we can't resolve that means this is incompatible by SemVer and this is fine
131-
# It means we marked this as a breaking change, so we don't need to worry about
132-
# Mistakenly introducing a breaking change, as we have intentionally made one
133-
@info "Not compatible with this release. No problem." exception = err
134-
end
135-
end
83+
@testset "doctests" begin
84+
DocMeta.setdocmeta!(
85+
DynamicPPL,
86+
:DocTestSetup,
87+
:(using DynamicPPL, Distributions);
88+
recursive=true,
89+
)
90+
doctestfilters = [
91+
# Older versions will show "0 element Array" instead of "Type[]".
92+
r"(Any\[\]|0-element Array{.+,[0-9]+})",
93+
# Older versions will show "Array{...,1}" instead of "Vector{...}".
94+
r"(Array{.+,\s?1}|Vector{.+})",
95+
# Older versions will show "Array{...,2}" instead of "Matrix{...}".
96+
r"(Array{.+,\s?2}|Matrix{.+})",
97+
# Errors from macros sometimes result in `LoadError: LoadError:`
98+
# rather than `LoadError:`, depending on Julia version.
99+
r"ERROR: (LoadError:\s)+",
100+
# Older versions do not have `;;]` but instead just `]` at end of the line
101+
# => need to treat `;;]` and `]` as the same, i.e. ignore them if at the end of a line
102+
r"(;;){0,1}\]$"m,
103+
]
104+
doctest(DynamicPPL; manual=false, doctestfilters=doctestfilters)
136105
end
137106
end

test/turing/Project.toml

Lines changed: 0 additions & 19 deletions
This file was deleted.

0 commit comments

Comments
 (0)