Skip to content

QA: run_qa v1.6 form + ExplicitImports#88

Merged
ChrisRackauckas merged 4 commits into
SciML:masterfrom
ChrisRackauckas-Claude:qa-runqa-v16-explicitimports
Jul 3, 2026
Merged

QA: run_qa v1.6 form + ExplicitImports#88
ChrisRackauckas merged 4 commits into
SciML:masterfrom
ChrisRackauckas-Claude:qa-runqa-v16-explicitimports

Conversation

@ChrisRackauckas-Claude

Copy link
Copy Markdown
Contributor

Please ignore until reviewed by @ChrisRackauckas.

Converts the hand-rolled JET-only QA group (test/qa/jet_tests.jl) to the SciMLTesting 1.6 run_qa form with ExplicitImports enabled (folder-discovery run_tests model, test/qa/qa.jl).

test/qa/qa.jl

  • run_qa(PDEBase; explicit_imports = true) — runs Aqua + JET + ExplicitImports.
  • Aqua tweaks (genuine, not broken-markers):
    • piracies = (; treat_as_own = [PDEBase.symbolic_discretize]) — PDEBase extends SciMLBase.symbolic_discretize(::PDESystem, ::AbstractDiscretization) as its discretization entry point; the function is conceptually owned by the discretization stack PDEBase implements.
    • deps_compat = (; check_extras = false) — folder-model test deps live in test/qa/Project.toml; the root [extras] (SafeTestsets, Test) are vestigial.
  • JET runs in normal test_package mode (target_modules = (PDEBase,), mode = :typo) — clean, 0 reports (strictly stronger than the old 5 hand-picked report_calls, all of which were also clean).

ExplicitImports findings (6 checks)

  • no_stale_explicit_imports → FIXED: removed 8 stale (unused) explicit imports from src/PDEBase.jl: parameters, varmap_to_vars, solve_for, expand_derivatives, diff2term, variable, Postwalk, symtype. (Verified each has no non-import use in src/.)
  • no_implicit_importsei_broken = (:no_implicit_imports,): PDEBase's public surface rests on heavy using ModelingToolkit / Symbolics / SymbolicUtils / SciMLBase / DomainSets; making each of the ~20 implicitly used names explicit is a large, risky refactor deferred and tracked separately (auto-flags once resolved).
  • all_explicit_imports_via_owners / all_qualified_accesses_via_owners → IGNORE: names imported/accessed from a re-exporter rather than their owner — ProblemTypeCtx, get_*, varmap_to_vars, ExtraVariablesSystemException (owner ModelingToolkitBase, via ModelingToolkit), maketerm/metadata (owner TermInterface, via SymbolicUtils), unwrap (owner SymbolicUtils, via Symbolics).
  • all_qualified_accesses_are_public / all_explicit_imports_are_public → IGNORE: other packages' non-public names (SciMLBase AbstractDiscretization/AbstractDiscretizationMetadata/NullParameters; SymbolicUtils Chain/Prewalk/maketerm/metadata; ModelingToolkit get_*/ProblemTypeCtx/ExtraVariablesSystemException; Symbolics unwrap/value/Arr/rename/setname). Each ignore documents its source package.

Other src fix

  • Removed the phantom export pde_substitute_filter (exported but never defined anywhere — Aqua undefined_exports failure; only pde_substitute exists).

test/qa/Project.toml

  • Added Aqua as a direct dep (Aqua.test_ambiguities spawns a child process that import Aquas, so Aqua must be a direct dep, not transitive via SciMLTesting).
  • Dropped Symbolics / SymbolicUtils (only used by the old jet_tests.jl).
  • SciMLTesting compat → "1.6".

Verification (Julia LTS, released SciMLTesting 1.6.0, no dev-from-branch)

  • QA group: QA/qa.jl | 16 Pass | 1 Broken (no_implicit_imports) | 0 Fail | 0 Error.
  • Core group: Core/alloc_tests.jl | 12 Pass | 0 Fail; "PDEBase tests passed".

🤖 Generated with Claude Code

ChrisRackauckas and others added 3 commits June 25, 2026 06:28
Convert the hand-rolled JET-only QA group (test/qa/jet_tests.jl) to the
SciMLTesting 1.6 run_qa form with ExplicitImports enabled.

test/qa/qa.jl:
- run_qa(PDEBase; explicit_imports = true) — Aqua + JET + ExplicitImports.
- Aqua: treat_as_own = [PDEBase.symbolic_discretize] (PDEBase extends
  SciMLBase.symbolic_discretize on a PDESystem as its discretization entry
  point); deps_compat check_extras = false (folder-model test deps live in
  test/qa/Project.toml, root [extras] are vestigial).
- ExplicitImports ignore-lists for re-exporter/non-public names owned by
  ModelingToolkitBase / TermInterface / SymbolicUtils / Symbolics / SciMLBase.
- ei_broken = (:no_implicit_imports,): PDEBase's surface rests on heavy
  `using ModelingToolkit / Symbolics / SymbolicUtils / SciMLBase / DomainSets`;
  making each implicitly used name explicit is a large refactor tracked
  separately.

src/PDEBase.jl:
- Remove 8 stale (unused) explicit imports flagged by
  check_no_stale_explicit_imports: parameters, varmap_to_vars, solve_for,
  expand_derivatives, diff2term, variable, Postwalk, symtype.
- Remove the phantom export `pde_substitute_filter` (exported but never
  defined — Aqua undefined_exports failure; only pde_substitute exists).

test/qa/Project.toml:
- Add Aqua as a direct dep (Aqua.test_ambiguities spawns a child process that
  `import Aqua`s, so it must be a direct dep, not transitive via SciMLTesting).
- Drop Symbolics / SymbolicUtils (were only used by the old jet_tests.jl).
- SciMLTesting compat -> "1.6".

Verified locally on Julia LTS against released SciMLTesting 1.6.0:
QA group 16 Pass / 1 Broken (no_implicit_imports) / 0 Fail / 0 Error;
Core group alloc_tests 12/12 pass.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…aries

The QA conversion to `run_qa` runs full `JET.report_package(mode=:typo)`
instead of the old 5 hand-picked `report_call`s, which never traversed
`parse_boundaries.jl`. On Julia 1.12 this surfaced 9 JET reports:

- `isperiodic`: `issequal` is not defined — a genuine typo for `isequal`
  (present since the package's first commit). Calling `isperiodic` would
  throw `UndefVarError`. Fixed to `isequal`.
- `parse_bcs`: `local u_, u__, x_, x__` left the bindings unassigned on
  paths JET cannot prove are unreachable, yielding 8 "may be undefined"
  reports. Initializing them to `nothing` makes them definitely-assigned
  without changing behavior (they are only read inside `if isinterface`,
  which is set true only in the same branches that assign real values).

After the fix, `JET.report_package(PDEBase; mode=:typo)` reports 0 errors
and the QA group passes on Julia 1.12.6 (16 Pass | 1 Broken | 0 Fail).

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…lic)

SciMLTesting 1.7 runs the public-API ExplicitImports checks
(all_qualified_accesses_are_public / all_explicit_imports_are_public)
only on Julia >= 1.11, and the base-lib make-public releases
(SciMLBase 3.24, CommonSolve 0.2.9, Symbolics 7.28, SymbolicUtils 4.36,
ModelingToolkit 11.29, ArrayInterface 7.26) made many previously-internal
names public. Empty both public-API ignore-lists, then restore only the
names still flagged as non-public on Julia 1.12 against the registered
releases:

- all_qualified_accesses_are_public: keep ExtraVariablesSystemException
  (ModelingToolkit); drop Arr, NullParameters, unwrap, value (now public).
- all_explicit_imports_are_public: keep AbstractDiscretization,
  AbstractDiscretizationMetadata (SciMLBase); Chain, Prewalk, maketerm,
  metadata (SymbolicUtils); ProblemTypeCtx (ModelingToolkit); rename,
  setname (Symbolics). Drop the 12 get_* names and unwrap (now public).

Verified: Julia 1.12 QA group green (16 pass, 1 broken=no_implicit_imports,
0 fail/error) with the minimal lists; Julia 1.10 QA group green (14 pass,
1 broken, 0 fail/error) with public checks skipped. The *_via_owners lists
and ei_broken(no_implicit_imports) are unchanged.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@ChrisRackauckas-Claude ChrisRackauckas-Claude marked this pull request as ready for review June 27, 2026 20:59
…non-public re-exports)

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
@ChrisRackauckas ChrisRackauckas merged commit a457b87 into SciML:master Jul 3, 2026
9 of 25 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.

2 participants