Skip to content

Commit 37fabb0

Browse files
committed
removed the hacky debugging stuff used for the CI
1 parent c98fe49 commit 37fabb0

File tree

3 files changed

+85
-98
lines changed

3 files changed

+85
-98
lines changed

test/Project.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ JET = "c3a54625-cd67-489e-a8e7-0a5a0ff4e31b"
1616
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
1717
LogDensityProblems = "6fdf6af0-433a-55f7-b3ed-c6c6e0b8df7c"
1818
LogDensityProblemsAD = "996a588d-648d-4e1f-a8f0-a84b347e47b1"
19-
Logging = "56ddb016-857b-54e1-b83d-db4d58db5568"
2019
MCMCChains = "c7f686f2-ff18-58e9-bc7b-31028e88f75d"
2120
MacroTools = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09"
2221
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"

test/ext/DynamicPPLJETExt.jl

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -56,20 +56,8 @@
5656

5757
@testset "demo models" begin
5858
@testset "$(model.f)" for model in DynamicPPL.TestUtils.DEMO_MODELS
59-
using Logging: Logging
6059
# Use debug logging below.
6160
varinfo = DynamicPPL.DynamicPPL.determine_suitable_varinfo(model)
62-
if varinfo isa DynamicPPL.UntypedVarInfo
63-
# HACK: Let's debug this.
64-
varinfo_typed = DynamicPPL.typed_varinfo(model)
65-
f_eval, argtypes_eval = DynamicPPL.DebugUtils.gen_evaluator_call_with_types(
66-
model, varinfo_typed, SamplingContext()
67-
)
68-
@show JET.report_call(
69-
f_eval, argtypes_eval; target_modules=(JET.AnyFrameModule(DynamicPPL),)
70-
)
71-
@show JET.report_call(f_eval, argtypes_eval)
72-
end
7361
# They should all result in typed.
7462
@test varinfo isa DynamicPPL.TypedVarInfo
7563
# But let's also make sure that they're not lying.

test/runtests.jl

Lines changed: 85 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -45,98 +45,98 @@ include("test_util.jl")
4545

4646
@testset "DynamicPPL.jl" begin
4747
if GROUP == "All" || GROUP == "DynamicPPL"
48-
# @testset "interface" begin
49-
# include("utils.jl")
50-
# include("compiler.jl")
51-
# include("varnamedvector.jl")
52-
# include("varinfo.jl")
53-
# include("simple_varinfo.jl")
54-
# include("model.jl")
55-
# include("sampler.jl")
56-
# include("independence.jl")
57-
# include("distribution_wrappers.jl")
58-
# include("contexts.jl")
59-
# include("context_implementations.jl")
60-
# include("logdensityfunction.jl")
61-
# include("linking.jl")
62-
63-
# include("threadsafe.jl")
64-
65-
# include("serialization.jl")
66-
67-
# include("pointwise_logdensities.jl")
68-
69-
# include("lkj.jl")
70-
71-
# include("debug_utils.jl")
72-
# end
48+
@testset "interface" begin
49+
include("utils.jl")
50+
include("compiler.jl")
51+
include("varnamedvector.jl")
52+
include("varinfo.jl")
53+
include("simple_varinfo.jl")
54+
include("model.jl")
55+
include("sampler.jl")
56+
include("independence.jl")
57+
include("distribution_wrappers.jl")
58+
include("contexts.jl")
59+
include("context_implementations.jl")
60+
include("logdensityfunction.jl")
61+
include("linking.jl")
62+
63+
include("threadsafe.jl")
64+
65+
include("serialization.jl")
66+
67+
include("pointwise_logdensities.jl")
68+
69+
include("lkj.jl")
70+
71+
include("debug_utils.jl")
72+
end
7373

74-
# @testset "compat" begin
75-
# include(joinpath("compat", "ad.jl"))
76-
# end
74+
@testset "compat" begin
75+
include(joinpath("compat", "ad.jl"))
76+
end
7777

7878
@testset "extensions" begin
7979
include("ext/DynamicPPLMCMCChainsExt.jl")
8080
include("ext/DynamicPPLJETExt.jl")
8181
end
8282

83-
# @testset "ad" begin
84-
# include("ext/DynamicPPLForwardDiffExt.jl")
85-
# include("ad.jl")
86-
# end
87-
88-
# @testset "prob and logprob macro" begin
89-
# @test_throws ErrorException prob"..."
90-
# @test_throws ErrorException logprob"..."
91-
# end
92-
93-
# @testset "doctests" begin
94-
# DocMeta.setdocmeta!(
95-
# DynamicPPL,
96-
# :DocTestSetup,
97-
# :(using DynamicPPL, Distributions);
98-
# recursive=true,
99-
# )
100-
# doctestfilters = [
101-
# # Older versions will show "0 element Array" instead of "Type[]".
102-
# r"(Any\[\]|0-element Array{.+,[0-9]+})",
103-
# # Older versions will show "Array{...,1}" instead of "Vector{...}".
104-
# r"(Array{.+,\s?1}|Vector{.+})",
105-
# # Older versions will show "Array{...,2}" instead of "Matrix{...}".
106-
# r"(Array{.+,\s?2}|Matrix{.+})",
107-
# # Errors from macros sometimes result in `LoadError: LoadError:`
108-
# # rather than `LoadError:`, depending on Julia version.
109-
# r"ERROR: (LoadError:\s)+",
110-
# # Older versions do not have `;;]` but instead just `]` at end of the line
111-
# # => need to treat `;;]` and `]` as the same, i.e. ignore them if at the end of a line
112-
# r"(;;){0,1}\]$"m,
113-
# ]
114-
# doctest(DynamicPPL; manual=false, doctestfilters=doctestfilters)
115-
# end
83+
@testset "ad" begin
84+
include("ext/DynamicPPLForwardDiffExt.jl")
85+
include("ad.jl")
86+
end
87+
88+
@testset "prob and logprob macro" begin
89+
@test_throws ErrorException prob"..."
90+
@test_throws ErrorException logprob"..."
91+
end
92+
93+
@testset "doctests" begin
94+
DocMeta.setdocmeta!(
95+
DynamicPPL,
96+
:DocTestSetup,
97+
:(using DynamicPPL, Distributions);
98+
recursive=true,
99+
)
100+
doctestfilters = [
101+
# Older versions will show "0 element Array" instead of "Type[]".
102+
r"(Any\[\]|0-element Array{.+,[0-9]+})",
103+
# Older versions will show "Array{...,1}" instead of "Vector{...}".
104+
r"(Array{.+,\s?1}|Vector{.+})",
105+
# Older versions will show "Array{...,2}" instead of "Matrix{...}".
106+
r"(Array{.+,\s?2}|Matrix{.+})",
107+
# Errors from macros sometimes result in `LoadError: LoadError:`
108+
# rather than `LoadError:`, depending on Julia version.
109+
r"ERROR: (LoadError:\s)+",
110+
# Older versions do not have `;;]` but instead just `]` at end of the line
111+
# => need to treat `;;]` and `]` as the same, i.e. ignore them if at the end of a line
112+
r"(;;){0,1}\]$"m,
113+
]
114+
doctest(DynamicPPL; manual=false, doctestfilters=doctestfilters)
115+
end
116116
end
117117

118-
# if GROUP == "All" || GROUP == "Downstream"
119-
# @testset "turing" begin
120-
# try
121-
# # activate separate test environment
122-
# Pkg.activate(DIRECTORY_Turing_tests)
123-
# Pkg.develop(PackageSpec(; path=DIRECTORY_DynamicPPL))
124-
# Pkg.instantiate()
125-
126-
# # make sure that the new environment is considered `using` and `import` statements
127-
# # (not added automatically on Julia 1.3, see e.g. PR #209)
128-
# if !(joinpath(DIRECTORY_Turing_tests, "Project.toml") in Base.load_path())
129-
# pushfirst!(LOAD_PATH, DIRECTORY_Turing_tests)
130-
# end
131-
132-
# include(joinpath("turing", "runtests.jl"))
133-
# catch err
134-
# err isa Pkg.Resolve.ResolverError || rethrow()
135-
# # If we can't resolve that means this is incompatible by SemVer and this is fine
136-
# # It means we marked this as a breaking change, so we don't need to worry about
137-
# # Mistakenly introducing a breaking change, as we have intentionally made one
138-
# @info "Not compatible with this release. No problem." exception = err
139-
# end
140-
# end
141-
# end
118+
if GROUP == "All" || GROUP == "Downstream"
119+
@testset "turing" begin
120+
try
121+
# activate separate test environment
122+
Pkg.activate(DIRECTORY_Turing_tests)
123+
Pkg.develop(PackageSpec(; path=DIRECTORY_DynamicPPL))
124+
Pkg.instantiate()
125+
126+
# make sure that the new environment is considered `using` and `import` statements
127+
# (not added automatically on Julia 1.3, see e.g. PR #209)
128+
if !(joinpath(DIRECTORY_Turing_tests, "Project.toml") in Base.load_path())
129+
pushfirst!(LOAD_PATH, DIRECTORY_Turing_tests)
130+
end
131+
132+
include(joinpath("turing", "runtests.jl"))
133+
catch err
134+
err isa Pkg.Resolve.ResolverError || rethrow()
135+
# If we can't resolve that means this is incompatible by SemVer and this is fine
136+
# It means we marked this as a breaking change, so we don't need to worry about
137+
# Mistakenly introducing a breaking change, as we have intentionally made one
138+
@info "Not compatible with this release. No problem." exception = err
139+
end
140+
end
141+
end
142142
end

0 commit comments

Comments
 (0)