Skip to content

Add JET.jl tests for type stability#51

Merged
ChrisRackauckas merged 1 commit intoSciML:mainfrom
ChrisRackauckas-Claude:static-improvements-20260101-041448
Jan 1, 2026
Merged

Add JET.jl tests for type stability#51
ChrisRackauckas merged 1 commit intoSciML:mainfrom
ChrisRackauckas-Claude:static-improvements-20260101-041448

Conversation

@ChrisRackauckas-Claude
Copy link
Copy Markdown
Contributor

Summary

  • Add JET.jl as a test dependency for static analysis
  • Add comprehensive type stability tests using @test_opt for all core interface functions:
    • hasportion for all portion types (Tunable, Constants, Caches, Discrete, Initials)
    • isscimlstructure for Vector and Matrix types
    • canonicalize for all portion types
    • replace for Tunable portion

Motivation

The package is already very well-typed and type-stable. This PR adds CI tests to:

  1. Ensure type stability is maintained in future changes
  2. Document the expected type-stable behavior of the API
  3. Catch any regressions in static analysis compatibility

JET Analysis Results

All core functions pass JET analysis with no issues:

  • No type instabilities detected
  • No unresolved method calls
  • All functions have concrete return types

Test plan

  • Ran Pkg.test() locally with GROUP=core - all 37 tests pass
  • Verified JET tests pass for all functions
  • Verified @code_warntype shows no type instabilities

cc @ChrisRackauckas

🤖 Generated with Claude Code

Add JET.jl as a test dependency and include static analysis tests
covering all core interface functions:
- hasportion for all portion types
- isscimlstructure for Vector and Matrix
- canonicalize for all portion types
- replace for Tunable portion

These tests verify type stability using @test_opt with
target_modules=(SciMLStructures,) to catch any regressions.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@ChrisRackauckas ChrisRackauckas merged commit fe9a46e into SciML:main Jan 1, 2026
17 of 26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants