-
-
Notifications
You must be signed in to change notification settings - Fork 8
Improve static analysis: type stability and JET tests #140
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
Merged
ChrisRackauckas
merged 7 commits into
SciML:main
from
ChrisRackauckas-Claude:static-improvements-20260107-124314
Jan 12, 2026
Merged
Changes from 1 commit
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
5f736a7
Improve static analysis and type stability
claude 6a0092c
Update test/Project.toml
ChrisRackauckas 99cd5d4
Split JET tests into nopre group excluded from pre
claude 4093d26
Disable downgrade CI and move JET to nopre group
claude e03ef5c
Move QA tests to nopre group with separate Project.toml
claude 76a6181
Add Pkg dependency for nopre project activation
claude 4de5b55
Use Pkg.develop for local package in nopre tests
claude File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| using Test, JET | ||
| using ModelOrderReduction | ||
| using LinearAlgebra: qr | ||
|
|
||
| @testset "JET Static Analysis" begin | ||
| # Create test data | ||
| n = 20 # state dimension | ||
| m = 10 # number of snapshots | ||
| snapshot_matrix = Float64[sin(i * j / n) for i in 1:n, j in 1:m] | ||
| snapshot_vov = [Float64[sin(i * j / n) for i in 1:n] for j in 1:m] | ||
|
|
||
| # Create an orthonormal basis for deim_interpolation_indices | ||
| Q, _ = qr(snapshot_matrix) | ||
| deim_basis = Matrix(Q[:, 1:5]) | ||
|
|
||
| @testset "deim_interpolation_indices type stability" begin | ||
| rep = JET.report_call(ModelOrderReduction.deim_interpolation_indices, (Matrix{Float64},)) | ||
| @test length(JET.get_reports(rep)) == 0 | ||
| end | ||
|
|
||
| @testset "matricize type stability" begin | ||
| rep = JET.report_call(ModelOrderReduction.matricize, (Vector{Vector{Float64}},)) | ||
| @test length(JET.get_reports(rep)) == 0 | ||
| end | ||
|
|
||
| @testset "POD constructor type stability" begin | ||
| # Matrix constructor | ||
| rep1 = JET.report_call(ModelOrderReduction.POD, (Matrix{Float64}, Int)) | ||
| @test length(JET.get_reports(rep1)) == 0 | ||
|
|
||
| # Vector{Vector} constructor | ||
| rep2 = JET.report_call(ModelOrderReduction.POD, (Vector{Vector{Float64}}, Int)) | ||
| @test length(JET.get_reports(rep2)) == 0 | ||
| end | ||
|
|
||
| @testset "reduce! with SVD type stability" begin | ||
| pod = POD(snapshot_matrix, 3) | ||
| rep = JET.report_call(ModelOrderReduction.reduce!, (typeof(pod), typeof(SVD()))) | ||
| @test length(JET.get_reports(rep)) == 0 | ||
| end | ||
| end |
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.