Canonicalize QA group to @safetestset#102
Closed
ChrisRackauckas-Claude wants to merge 1 commit into
Closed
Conversation
Convert the QA group's `@testset "JET static analysis"` unit to
`@safetestset` so it runs in its own isolated module, matching the
canonical OrdinaryDiffEq structure. The testset body is extracted into
a new `test/jet_tests.jl` and loaded via `@safetestset "..." begin
include("jet_tests.jl") end`; the include() form is required because the
body uses the JET `@test_opt` macro and the StaticArrays `@SVector`
macro, which must be resolved after their `using` lines run (include
evaluates statements sequentially, whereas an inline @safetestset body
would macroexpand before the in-body `using`s take effect).
The two backend-independent units (Regression, Reinitialization tests)
already use @safetestset. The backend-parameterized units (gpu/
constraints/lbfgs) are left unchanged: they run inside a
`@testset for BACKEND in ...` dispatch loop with a dynamic interpolated
name (which @safetestset rejects — it requires a literal String) and
depend on the loop-set `GROUP`/`backend` globals, so they cannot be
wrapped in @safetestset without restructuring the GROUP dispatch.
SafeTestsets added to test/qa/Project.toml (the QA group activates its
own env). No assertions or test logic changed.
Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
Author
|
Superseded by the v1.2 folder conversion on sciml-testing-rollout (#101). The QA @safetestset canonicalization from this branch is incorporated there (test/qa/qa.jl + test/qa/jet_tests.jl). Closing as duplicate. |
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.
What
Canonicalizes the test suite toward the standard SciML/OrdinaryDiffEq structure where each independent unit runs in its own module via
@safetestset(isolation + world-age safety).Changes
@testset "JET static analysis"→@safetestset "JET static analysis" begin include("jet_tests.jl") end. The body was extracted into the newtest/jet_tests.jl. Theinclude()form is required (not an inline@safetestsetbody) because the body uses the JET@test_optmacro and StaticArrays'@SVectormacro, which must resolve after theirusinglines run —includeevaluates statements sequentially, whereas an inline@safetestsetbody macroexpands the whole block before the in-bodyusings take effect.SafeTestsetsadded totest/qa/Project.toml(the QA group activates its own environment).Already canonical / intentionally unchanged
regression.jlandreinit.jlare already wrapped in@safetestsetinruntests.jl.gpu.jl,constraints.jl,lbfgs.jl) run inside the@testset for BACKEND in unique(("CPU", CI_GROUP))dispatch loop. They are left unchanged because:"$(BACKEND) optimizers tests"), and@safetestsetonly accepts a literalString(it throwsArgumentErrorotherwise); andGROUP/backendglobals (viautils.jl), which a fresh@safetestsetmodule cannot see.Converting them would require restructuring the GROUP/backend dispatch loop, which is out of scope for this behavior-preserving change.
Verification
Ran the QA group locally on Julia 1.11:
Exit code 0. No assertions or test logic changed.
Ignore until reviewed by @ChrisRackauckas.
🤖 Generated with Claude Code