Improve static analysis: type stability and JET tests#140
Merged
ChrisRackauckas merged 7 commits intoJan 12, 2026
Merged
Conversation
- Add type parameters to POD struct (POD{S, T <: AbstractFloat}) for type stability
- Add type parameters to SVD and TSVD structs for proper kwargs typing
- Add return type annotations to key functions:
- matricize, determine_truncation, reduce!, only_dvs, Base.show(::IO, ::POD)
- Add JET.jl tests to verify type stability of core functions:
- deim_interpolation_indices
- matricize
- POD constructors
- reduce! with SVD
The POD struct now properly propagates element types through all operations,
eliminating type instabilities where variables were previously inferred as Any.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Member
Author
Changes MadeSplit JET tests into a separate group excluded from prerelease Julia, following the pattern used by DelayDiffEq and other SciML packages. Changes:
This matches the pattern used in DelayDiffEq.jl where QA tests are excluded from prerelease versions. |
- Update test/runtests.jl to use GROUP env pattern (Core and nopre groups) - Update Tests.yml to run both groups, excluding nopre from prerelease Julia - JET often has compatibility issues with prerelease Julia versions Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
ChrisRackauckas-Claude
force-pushed
the
static-improvements-20260107-124314
branch
from
January 11, 2026 21:14
538cc65 to
99cd5d4
Compare
3 tasks
- Disable downgrade CI pending dependency updates (see SciML#142) - Move JET tests to test/nopre/ with separate Project.toml - Remove JET dependency from main test/Project.toml - JET tests now only run in nopre group (excluded from pre Julia) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Member
Author
Additional ChangesDisabled Downgrade CI
Moved JET to separate nopre Project.toml
This follows the OrdinaryDiffEq pattern where JET has its own Project.toml in a separate test group folder. |
- Move qa.jl and explicit_imports.jl to test/nopre/ - Add Aqua and ExplicitImports to test/nopre/Project.toml - Remove Aqua and ExplicitImports from test/Project.toml - Update runtests.jl to activate nopre project for nopre group - nopre group now includes: Aqua, ExplicitImports, JET tests Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Remove ModelOrderReduction from nopre/Project.toml deps - Add Pkg.develop(path=...) to use local package instead of registry Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
PODstruct (POD{S, T <: AbstractFloat}) for improved type stabilitySVDandTSVDstructs for proper kwargs typing (usingNamedTuple)Changes Made
Type Parameter Improvements
Anytyped fields to properly parameterized typessnapshots::S(parameterized by snapshot type)min_renergy::T,renergy::T(parameterized by element type)rbasis::Union{Missing, Matrix{T}},spectrum::Union{Missing, Vector{T}}kwargs::Anytokwargs::KwhereK <: NamedTupleReturn Type Annotations
matricize(VoV::Vector{Vector{T}})::Matrix{T}determine_truncation(...)::Tuple{Int, T}reduce!(...)::Nothingonly_dvs(...)::BoolBase.show(::IO, ::POD)::NothingJET.jl Tests
Added new test file
test/jet.jlthat verifies type stability of:deim_interpolation_indicesmatricizePODconstructors (Matrix and Vector{Vector})reduce!with SVD algorithmType Stability Before/After
Before (
@code_warntype reduce!(pod, TSVD())):After:
Test plan
Pkg.test()- all tests passCC: @ChrisRackauckas
🤖 Generated with Claude Code