Add JET static analysis tests and type annotations#364
Conversation
- Add JET.jl as a test dependency - Add JET test in test/jet.jl to verify package has no static analysis issues - Add `::Integer` type annotation to `generate_priors` and `generate_theta` functions - Add "JET" test group to runtests.jl JET analysis confirms DiffEqBayes has 0 issues when filtering to target module only. (All 388 issues in initial report were from dependencies like StanSample, SymbolicUtils, etc.) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Change DEProblem type annotation to Union{DEProblem, AbstractNonlinearProblem}
in turing_inference, dynamichmc_inference, and stan_inference functions.
SteadyStateProblem is a subtype of AbstractNonlinearProblem, not DEProblem,
so the previous type restriction was too narrow. This fixes the test failure
for SteadyStateProblem in test/turing.jl.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
ba43780 to
15e380e
Compare
Additional ChangesRebased on master and added a fix for the Changes in this update:
This fixes the pre-existing test failure where All Turing tests now pass including the 🤖 Generated with Claude Code |
Summary
test/jet.jlto verify package has no static analysis issues::Integertype annotation togenerate_priorsandgenerate_thetafunctions instan_inference.jltest/runtests.jlDetails
JET analysis confirms DiffEqBayes has 0 issues when filtering to target module only (using
target_modules=(DiffEqBayes,)). All 388 issues in the initial unfiltered report were from dependencies like StanSample, SymbolicUtils, AbstractPPL, etc.The type annotations added are conservative - only adding
::Integerwhere the function clearly expects an integer count. These help with static analysis without over-constraining the code.Test plan
ENV["GROUP"]="JET" Pkg.test())SteadyStateProblemnot being a subtype ofAbstractDEProblem)Note: The pre-existing test failure in
test/turing.jlforSteadyStateProblemis unrelated to these changes and exists on master.cc @ChrisRackauckas
🤖 Generated with Claude Code