-
-
Notifications
You must be signed in to change notification settings - Fork 34
Add JET static analysis tests and fix VEGAS type stability #302
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add JET static analysis tests and fix VEGAS type stability #302
Conversation
Changes: - Add JET.jl as a test dependency with JET tests for key entry points - Fix type instability in VEGAS algorithm: the assertion on line 349 was calling `length(y)` and `eltype(y)` on what could be a scalar Float64, which caused runtime dispatch errors - Add `_is_real_scalar` helper function that handles both Number and AbstractArray types in a type-stable way JET analysis results: - QuadGKJL: 0 reports - HCubatureJL: 0 reports - TrapezoidalRule: 0 reports - SimpsonsRule: 0 reports - Infinite bounds transformation: 0 reports - VEGAS: 2 reports (down from 4) - remaining are inherent closure capture and unavoidable runtime dispatch for type checking 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
The JET tests have been moved from the Core group to their own JET group, which is excluded from running on Julia pre-release versions. This prevents CI failures due to JET compatibility issues with unreleased Julia versions. Co-Authored-By: Claude Opus 4.5 <[email protected]>
|
Moved JET tests to a separate CI group that skips pre-release Julia: Changes:
This prevents CI failures from JET compatibility issues with unreleased Julia versions. 🤖 Generated with Claude Code |
Move JET tests to test/nopre/ directory with its own Project.toml so JET is not a test dependency of the main package. This follows the pattern used in OrdinaryDiffEq.jl for tests with additional dependencies. Changes: - Create test/nopre/Project.toml with JET dependency - Move jet_tests.jl to test/nopre/jet_tests.jl - Update runtests.jl to activate nopre environment before running tests - Remove JET from main Project.toml extras and test targets - Rename JET group to nopre in CI.yml - Exclude nopre tests from both pre and lts Julia versions Co-Authored-By: Claude Opus 4.5 <[email protected]>
Updates to nopre group structureThis commit consolidates the JET tests into a proper Changes:
This approach ensures JET is not a test dependency of the main package, while still allowing JET tests to run on stable Julia versions. 🤖 Generated with Claude Code |
The runtests.jl uses Pkg for activating the nopre environment, so it needs to be in the test dependencies. Co-Authored-By: Claude Opus 4.5 <[email protected]>
Co-Authored-By: Claude Opus 4.5 <[email protected]>
Summary
This PR adds JET.jl static analysis tests to the test suite and fixes a type instability issue in the VEGAS algorithm.
Changes:
Added JET tests (
test/jet_tests.jl) that verify type stability for key entry points:Fixed type instability in VEGAS algorithm: The assertion on line 349 was calling
length(y)andeltype(y)on what could be a scalarFloat64, which caused runtime dispatch errors. Added a type-stable helper function_is_real_scalar()that properly handles bothNumberandAbstractArraytypes.Added JET to test dependencies in Project.toml
JET Analysis Results:
The remaining 2 reports for VEGAS are:
yin closure (inherent to in-place operations)_is_real_scalarcall (unavoidable due to type-unstableprob.f(mid, p)return)Test Plan
cc @ChrisRackauckas
🤖 Generated with Claude Code