From f65cc8e2aca45b9ce3c7495bfca264c25b1c0268 Mon Sep 17 00:00:00 2001 From: Sam Isaacson Date: Sun, 1 Sep 2024 12:38:43 -0400 Subject: [PATCH 1/3] fix test failures --- test/reactionsystem_core/events.jl | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/test/reactionsystem_core/events.jl b/test/reactionsystem_core/events.jl index 0231951cec..36a56fae44 100644 --- a/test/reactionsystem_core/events.jl +++ b/test/reactionsystem_core/events.jl @@ -349,7 +349,7 @@ let @parameters e1=0 e2=0 e3=0 @discrete_events begin [1.0] => [e1 ~ 1] - # 1.0 => [e2 ~ 1] + 1.0 => [e2 ~ 1] (X > 1000.0) & (e3==0) => [e3 ~ 1] end (p,d), 0 <--> X @@ -363,9 +363,8 @@ let sol = solve(jprob, SSAStepper(); seed) # Checks that all `e` parameters have been updated properly. - # Note that periodic discrete events are currently broken for jump processes (and unlikely to be fixed soon due to periodic callbacks using the internals of ODE integrator and Datastructures heap implementations). @test sol.ps[:e1] == 1 - @test_broken sol.ps[:e2] == 1 # (https://github.com/SciML/JumpProcesses.jl/issues/417) + @test sol.ps[:e2] == 1 @test sol.ps[:e3] == 1 end @@ -440,8 +439,6 @@ let jprob = JumpProblem(rn, dprob, Direct(); rng) jprob_events = JumpProblem(rn_dics_events, dprob_events, Direct(); rng) sol = solve(jprob, SSAStepper(); seed, callback) - @test_broken let # (https://github.com/SciML/JumpProcesses.jl/issues/417) - sol_events = solve(jprob_events, SSAStepper(); seed) - @test sol == sol_events - end + sol_events = solve(jprob_events, SSAStepper(); seed) + @test_broken sol == sol_events # seems to be not identical in the sample paths end \ No newline at end of file From f14fb6cb480f8740cb01469752ec0085399d0013 Mon Sep 17 00:00:00 2001 From: Sam Isaacson Date: Sun, 1 Sep 2024 12:39:51 -0400 Subject: [PATCH 2/3] format --- src/dsl.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dsl.jl b/src/dsl.jl index 5a8e1ffe5a..803b999d1b 100644 --- a/src/dsl.jl +++ b/src/dsl.jl @@ -150,7 +150,7 @@ macro reaction_network(name::Expr, ex::Expr) MacroTools.striplines(ex); name = :($(esc(name.args[1]))))))) end -macro reaction_network(ex::Expr) +macro reaction_network(ex::Expr) ex = MacroTools.striplines(ex) # no name but equations: @reaction_network begin ... end ... From 2ef14dab0e55073199883c37bd309e381c01ec11 Mon Sep 17 00:00:00 2001 From: Sam Isaacson Date: Sun, 1 Sep 2024 12:40:15 -0400 Subject: [PATCH 3/3] spacing --- test/reactionsystem_core/events.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/reactionsystem_core/events.jl b/test/reactionsystem_core/events.jl index 36a56fae44..5264114d83 100644 --- a/test/reactionsystem_core/events.jl +++ b/test/reactionsystem_core/events.jl @@ -441,4 +441,4 @@ let sol = solve(jprob, SSAStepper(); seed, callback) sol_events = solve(jprob_events, SSAStepper(); seed) @test_broken sol == sol_events # seems to be not identical in the sample paths -end \ No newline at end of file +end