File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- # Unreleased
1+ ## Unreleased
2+
3+ ### Added
4+ ### Changed
5+ ### Deprecated
6+ ### Removed
7+ ### Fixed
8+
9+ - JET tests up front so that method extensions do not confuse it
10+
11+ ### Security
12+
13+ # v3.5.1
14+
15+ ** No changelog was kept after v3.3.0,** it should be reconstructed from commits.
216
317# v3.3.0
418
Original file line number Diff line number Diff line change @@ -10,6 +10,22 @@ using DynamicHMC.Diagnostics: ACCEPTANCE_QUANTILES
1010using LogDensityProblems: logdensity_and_gradient, dimension, LogDensityProblems
1111using LogDensityTestSuite
1212
13+ # ###
14+ # ### static analysis and QA; before everything else as tests extend methods
15+ # ###
16+
17+ @testset " static analysis with JET.jl" begin
18+ using JET
19+ @test isempty (JET. get_reports (report_package (DynamicHMC, target_modules= (DynamicHMC,))))
20+ end
21+
22+ @testset " Aqua" begin
23+ import Aqua
24+ Aqua. test_all (DynamicHMC; ambiguities = false )
25+ # testing separately, cf https://github.com/JuliaTesting/Aqua.jl/issues/77
26+ Aqua. test_ambiguities (DynamicHMC)
27+ end
28+
1329# ##
1430# ## general test environment
1531# ##
@@ -39,19 +55,3 @@ include("test_logging.jl")
3955# ###
4056
4157include (" sample-correctness_tests.jl" )
42-
43- # ###
44- # ### static analysis and QA
45- # ###
46-
47- @testset " static analysis with JET.jl" begin
48- using JET
49- @test isempty (JET. get_reports (report_package (DynamicHMC, target_modules= (DynamicHMC,))))
50- end
51-
52- @testset " Aqua" begin
53- import Aqua
54- Aqua. test_all (DynamicHMC; ambiguities = false )
55- # testing separately, cf https://github.com/JuliaTesting/Aqua.jl/issues/77
56- Aqua. test_ambiguities (DynamicHMC)
57- end
Original file line number Diff line number Diff line change @@ -44,13 +44,17 @@ Base.empty!(trajectory) = empty(trajectory.visited)
4444
4545DynamicHMC. move (:: DummyTrajectory , z, is_forward) = z + (is_forward ? 1 : - 1 )
4646
47- function DynamicHMC. is_turning (:: DummyTrajectory , τ)
47+ const DUMMY_TURN_STATISTICS = Tuple{Bool,UnitRange{Int64}}
48+
49+ function DynamicHMC. is_turning (:: DummyTrajectory , τ:: DUMMY_TURN_STATISTICS )
4850 turn_flag, positions = τ
4951 @test length (positions) > 1 # not called on a leaf
5052 turn_flag
5153end
5254
53- function DynamicHMC. combine_turn_statistics (:: DummyTrajectory , τ₁, τ₂)
55+ function DynamicHMC. combine_turn_statistics (:: DummyTrajectory ,
56+ τ₁:: DUMMY_TURN_STATISTICS ,
57+ τ₂:: DUMMY_TURN_STATISTICS )
5458 turn_flag1, positions1 = τ₁
5559 turn_flag2, positions2 = τ₂
5660 @test last (positions1) + 1 == first (positions2) # adjacency and order
You can’t perform that action at this time.
0 commit comments