Skip to content

Commit 821445b

Browse files
committed
Extract Turing tests (#209)
This PR extracts the Turing-dependent tests and moves them to a separate subfolder with a separate project environment, similar to the setup for downstream tests in SciML. If a PR to DynamicPPL breaks Turing, this allows to easily comment out the Turing-dependent tests or, preferably, to add a Manifest file that uses the corresponding Turing PR with a fix and is removed before the PR is merged. Additionally, the PR adds new exports `TypedVarInfo` and `set_flag!` instead of importing them in the tests since DynamicPPL already exports `UntypedVarInfo` and `unset_flag!`. This probably fixes #18 - tests are still not completely independent but the setup should allow to test also breaking changes and does not require to synchronize the Turing subfolder anymore. Co-authored-by: David Widmann <[email protected]>
1 parent 4b4b34b commit 821445b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+1130
-6577
lines changed

.github/workflows/CompatHelper.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ jobs:
1414
env:
1515
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1616
COMPATHELPER_PRIV: ${{ secrets.COMPATHELPER_PRIV }}
17-
run: julia -e 'using CompatHelper; CompatHelper.main(; subdirs = ["", "test"])'
17+
run: julia -e 'using CompatHelper; CompatHelper.main(; subdirs = ["", "test", "test/turing"])'

.gitignore

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,4 @@
22
*.jl.cov
33
*.jl.mem
44
.DS_Store
5-
/Manifest.toml
6-
/test/Manifest.toml
7-
/dev/
8-
/test/gdemo_default.jls
5+
Manifest.toml

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "DynamicPPL"
22
uuid = "366bfd00-2699-11ea-058f-f148b4cae6d8"
3-
version = "0.10.4"
3+
version = "0.10.5"
44

55
[deps]
66
AbstractMCMC = "80f14c24-f653-4e6a-9b94-39d6b0f70001"

src/DynamicPPL.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ import Base: Symbol,
2929
export AbstractVarInfo,
3030
VarInfo,
3131
UntypedVarInfo,
32+
TypedVarInfo,
3233
getlogp,
3334
setlogp!,
3435
acclogp!,
@@ -39,6 +40,7 @@ export AbstractVarInfo,
3940
increment_num_produce!,
4041
set_retained_vns_del_by_spl!,
4142
is_flagged,
43+
set_flag!,
4244
unset_flag!,
4345
setgid!,
4446
updategid!,

test/Project.toml

Lines changed: 2 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,27 @@
11
[deps]
22
AbstractMCMC = "80f14c24-f653-4e6a-9b94-39d6b0f70001"
3-
AdvancedHMC = "0bf59076-c3b1-5ca4-86bd-e02cd72cde3d"
4-
AdvancedMH = "5b7e9947-ddc0-4b3f-9b55-0d8042f74170"
5-
AdvancedPS = "576499cb-2369-40b2-a588-c64705576edc"
6-
AdvancedVI = "b5ca4192-6429-45e5-a2d9-87aec30a685c"
7-
BangBang = "198e06fe-97b7-11e9-32a5-e1d131e6ad66"
83
Bijectors = "76274a88-744f-5084-9051-94815aaf08c4"
94
Distributed = "8ba89e20-285c-5b6f-9357-94700520ee1b"
105
Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"
116
DistributionsAD = "ced4e74d-a319-5a8a-b0ac-84af2272839c"
12-
DocStringExtensions = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae"
13-
EllipticalSliceSampling = "cad2338a-1db2-11e9-3401-43bc07c9ede2"
147
ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210"
15-
Libtask = "6f1fad26-d15e-5dc8-ae53-837a1d7b8c9f"
16-
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
17-
LogDensityProblems = "6fdf6af0-433a-55f7-b3ed-c6c6e0b8df7c"
188
MCMCChains = "c7f686f2-ff18-58e9-bc7b-31028e88f75d"
199
MacroTools = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09"
20-
NamedArrays = "86f7a689-2022-50b4-a561-43c23ac3c673"
21-
Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7"
10+
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
2211
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
23-
Reexport = "189a3867-3050-52da-a836-e630ba90ab69"
24-
Requires = "ae029012-a4dd-5104-9daa-d747884805df"
2512
Serialization = "9e88b42a-f829-5b0c-bbe9-9e923198166b"
26-
SpecialFunctions = "276daf66-3868-5448-9aa4-cd146d93841b"
27-
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
28-
StatsBase = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91"
29-
StatsFuns = "4c63d2b9-4356-54db-8cca-17b64c39e42c"
3013
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
3114
Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c"
3215
Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f"
33-
ZygoteRules = "700de1a5-db45-46bc-99cf-38207098b444"
3416

3517
[compat]
3618
AbstractMCMC = "2.1"
37-
AdvancedHMC = "0.2.25"
38-
AdvancedMH = "0.5.2"
39-
AdvancedPS = "0.1"
40-
AdvancedVI = "0.1"
41-
BangBang = "0.3"
4219
Bijectors = "0.8.2"
43-
Distributions = "0.23.8, 0.24"
20+
Distributions = "0.24"
4421
DistributionsAD = "0.6.3"
45-
DocStringExtensions = "0.8.2"
46-
EllipticalSliceSampling = "0.4"
4722
ForwardDiff = "0.10.12"
48-
Libtask = "0.4.1, 0.5"
49-
LogDensityProblems = "0.10.3"
5023
MCMCChains = "4.0.4"
5124
MacroTools = "0.5.5"
52-
NamedArrays = "0.9"
53-
Reexport = "0.2"
54-
Requires = "1.0.1"
55-
SpecialFunctions = "0.10.3, 1.0"
56-
StatsBase = "0.33"
57-
StatsFuns = "0.9.5"
5825
Tracker = "0.2.11"
5926
Zygote = "0.5.4, 0.6"
60-
ZygoteRules = "0.2"
6127
julia = "1.3"

test/Turing/Turing.jl

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

test/Turing/contrib/inference/dynamichmc.jl

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

0 commit comments

Comments
 (0)