Skip to content

Commit b2b999f

Browse files
ChrisRackauckas-ClaudeChrisRackauckasclaude
authored
QA: run_qa v1.6 form + ExplicitImports (#160)
* QA: run_qa v1.6 form + ExplicitImports Replace the hand-rolled Aqua + ExplicitImports QA files (qa_tests.jl, explicit_imports_tests.jl) with a single qa.jl on the SciMLTesting 1.6 `run_qa` form, with ExplicitImports enabled (all six checks). - Aqua: `run_qa` runs the full `Aqua.test_all` (11 checks); no broken markers or aqua_kwargs tweaks needed — all pass. - ExplicitImports: `explicit_imports = true`. Two checks needed ignore lists for third-party symbolic-stack internal names re-exported but not owned/public by ModelingToolkit/Symbolics (documented per source pkg); the other four checks pass unmodified. - JET: `jet = false` in run_qa. Whole-package JET hits a toplevel `invalid redefinition of constant ModelOrderReduction.TSVD` (the exported `TSVD` struct collides with the `TSVD` dependency package under JET's toplevel virtualizer). The existing targeted `report_call` checks in jet_tests.jl provide the JET coverage and stay as a separate group file. test/qa/Project.toml: drop ExplicitImports (transitive via SciMLTesting), keep Aqua (ambiguities child-proc needs it direct) and JET (jet_tests.jl), bump SciMLTesting compat to "1.6". Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * Inline rhs extraction instead of internal Symbolics.rhss `Symbolics.rhss` is an undocumented one-line internal helper (`rhss(xs) = map(x->x.rhs, xs)`, not exported). Replace the single use in deim.jl with the equivalent comprehension and drop its ExplicitImports non-public allow-list entry, so we don't depend on a Symbolics internal. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * QA: strip redundant public-API EI ignores (SciMLTesting 1.7) SciMLTesting 1.7 runs the two public-API ExplicitImports checks (check_all_qualified_accesses_are_public / check_all_explicit_imports_are_public) only on Julia >= 1.11, and the base-lib make-public releases (ModelingToolkit 11.29, Symbolics 7.28+, SymbolicUtils 4.36, SciMLBase 3.24) marked most of the previously-ignored names public. Verified against registered releases on Julia 1.12: of the 13 all_qualified_accesses_are_public ignores, only :topsort_equations (still non-public in ModelingToolkit) and :getname (re-exported by Symbolics from SymbolicIndexingInterface, non-public) remain flagged. The other 11 are now public and removed. QA group passes 17/17 on 1.12 and 15/15 on 1.10 (public checks skipped on the LTS). The all_qualified_accesses_via_owners list is a distinct (non public-API) check and is left untouched. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * QA: raise SciMLTesting compat floor to 1.7 for public-API EI gating SciMLTesting 1.7 gates the two public-API ExplicitImports checks (check_all_qualified_accesses_are_public / check_all_explicit_imports_are_public) to Julia >= 1.11, which is the regime in which the stripped public-API ignore lists are correct. Raising the floor from "1.6" to "1.7" ensures CI resolves a SciMLTesting that runs those checks rather than potentially an older release. Verified against the registered releases (SciMLBase 3.27.0, DiffEqBase 7.6.0, ModelingToolkit 11.29.0, Symbolics 7.29.0, SymbolicUtils 4.36.0, SciMLTesting 1.7.0, ExplicitImports 1.15.0): - Julia 1.12 (public-API checks run): emptying both public-API ignore lists leaves exactly two survivors flagged by all_qualified_accesses_are_public -- topsort_equations (non-public in ModelingToolkit) and getname (re-exported by Symbolics from SymbolicIndexingInterface, non-public). Neither is a SciMLBase-owned name, so no DiffEqBase.X -> SciMLBase.X migration applies; both are restored. all_explicit_imports_are_public passes with an empty ignore list. QA group: 17/17 pass. - Julia 1.10 (public-API checks skipped on the LTS): QA group 15/15 pass. ModelOrderReduction's source makes no qualified SciMLBase/DiffEqBase accesses, so steps 2 (caller-migrate) is a no-op for this package. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * QA: migrate re-export-gap accesses to public owners + drop now-public ignores Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> * QA: thorough EI ignore re-clean (drop stale incl via_owners, migrate non-public re-exports) Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> --------- Co-authored-by: ChrisRackauckas-Claude <accounts@chrisrackauckas.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 68c4861 commit b2b999f

7 files changed

Lines changed: 33 additions & 32 deletions

File tree

Project.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ PrecompileTools = "aea7be01-6a6a-4083-8856-8a6e6704d82a"
1111
RandomizedLinAlg = "0448d7d9-159c-5637-8537-fd72090fea46"
1212
Setfield = "efcf1570-3423-57d1-acb7-fd33fddbac46"
1313
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
14+
SymbolicIndexingInterface = "2efcf032-c050-4f8e-a9bb-153293bab1f5"
1415
TSVD = "9449cd9e-2762-5aa3-a617-5413e99d722e"
1516

1617
[compat]
@@ -21,5 +22,6 @@ PrecompileTools = "1.2.1"
2122
RandomizedLinAlg = "0.1"
2223
Setfield = "1.1.2"
2324
SparseArrays = "1"
25+
SymbolicIndexingInterface = "0.3.49"
2426
TSVD = "0.4.4"
2527
julia = "1.10"

src/ModelOrderReduction.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ using DocStringExtensions: DocStringExtensions, FUNCTIONNAME, SIGNATURES, TYPEDS
55
using ModelingToolkit: ModelingToolkit, @variables, Differential, Equation, Num, ODESystem,
66
SymbolicUtils, Symbolics, arguments, build_function, complete,
77
expand, substitute, tearing_substitution
8+
using SymbolicIndexingInterface: SymbolicIndexingInterface
89
using LinearAlgebra: LinearAlgebra, /, \, mul!, qr, svd
910

1011
using Setfield: Setfield, @set!

src/deim.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,10 +143,10 @@ function deim(
143143
var_name = gensym(:ŷ)
144144
= (@variables $var_name(iv)[1:pod_dim])[1]
145145
@set! sys.unknowns = Symbolics.value.(Symbolics.scalarize(ŷ)) # new variables from POD
146-
ModelingToolkit.get_var_to_name(sys)[Symbolics.getname(ŷ)] = Symbolics.unwrap(ŷ)
146+
ModelingToolkit.get_var_to_name(sys)[SymbolicIndexingInterface.getname(ŷ)] = Symbolics.unwrap(ŷ)
147147

148148
deqs, eqs = get_deqs(sys) # split eqs into differential and non-differential equations
149-
rhs = Symbolics.rhss(deqs)
149+
rhs = [eq.rhs for eq in deqs]
150150
# a sparse matrix of coefficients for the linear part,
151151
# a vector of constant terms and a vector of nonlinear terms about dvs
152152
A, g, F = separate_terms(rhs, dvs, iv)

test/qa/Project.toml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
[deps]
22
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
3-
ExplicitImports = "7d51a73a-1435-4ff3-83d9-f097790105c7"
43
JET = "c3a54625-cd67-489e-a8e7-0a5a0ff4e31b"
54
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
65
ModelOrderReduction = "207801d6-6cee-43a9-ad0c-f0c64933efa0"
@@ -10,11 +9,10 @@ Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
109

1110
[compat]
1211
Aqua = "0.8"
13-
ExplicitImports = "1"
1412
JET = "0.9, 0.10, 0.11"
1513
LinearAlgebra = "1"
1614
SafeTestsets = "0.0.1, 0.1"
17-
SciMLTesting = "1"
15+
SciMLTesting = "1.7"
1816
Test = "1"
1917

2018
[sources]

test/qa/explicit_imports_tests.jl

Lines changed: 0 additions & 13 deletions
This file was deleted.

test/qa/qa.jl

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
using SciMLTesting, ModelOrderReduction, Test
2+
3+
run_qa(
4+
ModelOrderReduction;
5+
explicit_imports = true,
6+
# Whole-package JET (`report_package`/`test_package`) hits a toplevel
7+
# `invalid redefinition of constant ModelOrderReduction.TSVD` error: the package
8+
# exports a `TSVD` struct whose name collides with the `TSVD` dependency package
9+
# under JET's toplevel virtualizer. JET coverage is provided by the targeted
10+
# `report_call` checks in jet_tests.jl, which sidestep the toplevel re-eval.
11+
jet = false,
12+
ei_kwargs = (;
13+
# `topsort_equations` is owned by ModelingToolkitBase, re-exported but not
14+
# marked public by ModelingToolkit, and there is no make-public plan for it.
15+
# `via_owners` flags the re-export; `are_public` flags the non-public status.
16+
all_qualified_accesses_via_owners = (;
17+
ignore = (
18+
:topsort_equations,
19+
),
20+
),
21+
all_qualified_accesses_are_public = (;
22+
ignore = (
23+
:topsort_equations,
24+
),
25+
),
26+
)
27+
)

test/qa/qa_tests.jl

Lines changed: 0 additions & 14 deletions
This file was deleted.

0 commit comments

Comments
 (0)