Skip to content

QA: run_qa v1.6 form + ExplicitImports#34

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

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

Conversation

@ChrisRackauckas-Claude

Copy link
Copy Markdown
Contributor

Please ignore until reviewed by @ChrisRackauckas.

Converts all four monorepo QA groups (umbrella OptimalUncertaintyQuantification + sublibraries OUQBase, CanonicalMoments, DiscreteMeasures) from hand-rolled Aqua.test_all + JET.test_package to SciMLTesting.run_qa (v1.6) with explicit_imports = true.

Each test/qa/Project.toml gains SciMLTesting (compat "1.6"); Aqua and JET stay direct deps (Aqua's ambiguities/persistent-tasks child-proc needs Aqua; JET runs), ExplicitImports is transitive through SciMLTesting.

ExplicitImports findings

  • OptimalUncertaintyQuantification (umbrella): only OUQBase implicit, from @reexport using OUQBase -> ignored in no_implicit_imports. Narrowed using Reexport to using Reexport: @reexport. QA 18/18.
  • DiscreteMeasures: zero findings. QA 18/18.
  • CanonicalMoments: FIX removed stale import Base: inv and the redundant import Polynomials: denominator, numerator (both owned by Base, already imported there); made the implicit using Polynomials/LinearAlgebra/RecurrenceRelationships/Reexport explicit. Remaining DiscreteMeasures/DiscreteMeasure come from @reexport using DiscreteMeasures -> ignored. QA 18/18.
  • OUQBase: FIX removed stale dep PolynomialRoots (never imported). no_implicit_imports (~40 names from heavy ModelingToolkit/Symbolics/Optimization/JuMP using) is a large refactor -> ei_broken (OUQBase: make implicit imports explicit (ExplicitImports no_implicit_imports) #32). Pre-existing type piracy CanonicalMoments.RawMomentSequence(::Symbolics.Num, ...) -> aqua_broken = (:piracies,) (OUQBase: type piracy in RawMomentSequence(::Symbolics.Num, ...) constructor (Aqua piracies) #33). Upstream non-public / non-owner names ignored via ei_kwargs (each documented with its source package). QA 16 pass + 2 broken, 0 fail (was 2 fail on main: stale_deps + piracies).

Notes

  • The OUQBase QA lane (and Core) were already red on main; the two Aqua failures (stale PolynomialRoots, piracy) are pre-existing. This PR fixes the stale dep and tracks the piracy as a documented @test_broken (OUQBase: type piracy in RawMomentSequence(::Symbolics.Num, ...) constructor (Aqua piracies) #33). The OUQBase Core failure is a separate pre-existing issue, out of scope here.
  • Verified locally on Julia 1.10 (lts) via the canonical Pkg.test GROUP=QA flow against released SciMLTesting 1.6.0 (no dev-from-branch). Runic-clean.

🤖 Generated with Claude Code

ChrisRackauckas and others added 5 commits June 25, 2026 07:06
Convert all four monorepo QA groups (umbrella + OUQBase/CanonicalMoments/
DiscreteMeasures) from hand-rolled `Aqua.test_all` + `JET.test_package` to
`SciMLTesting.run_qa` (v1.6) with `explicit_imports = true`. Add SciMLTesting
(compat "1.6") to each test/qa/Project.toml; Aqua + JET stay direct deps
(ambiguities child-proc needs Aqua; JET runs); ExplicitImports is transitive
via SciMLTesting.

ExplicitImports findings, by package:

- OptimalUncertaintyQuantification (umbrella): only `OUQBase` implicit, brought
  in by `@reexport using OUQBase`; ignored in `no_implicit_imports`.
  `using Reexport` narrowed to `using Reexport: @reexport`. QA 18/18.

- DiscreteMeasures: zero findings. QA 18/18.

- CanonicalMoments: FIX removed stale `import Base: inv` and the redundant
  `import Polynomials: denominator, numerator` (both owned by Base, already
  imported there), and made the implicit `using Polynomials/LinearAlgebra/
  RecurrenceRelationships/Reexport` explicit. Remaining implicit
  `DiscreteMeasures`/`DiscreteMeasure` come from `@reexport using
  DiscreteMeasures`; ignored. QA 18/18.

- OUQBase: FIX removed stale dep `PolynomialRoots` (never imported).
  `no_implicit_imports` (~40 names from heavy ModelingToolkit/Symbolics/
  Optimization/JuMP `using`) is a large refactor, tracked as ei_broken (SciML#32).
  Pre-existing type piracy `CanonicalMoments.RawMomentSequence(::Symbolics.Num,
  ...)` tracked as aqua_broken=(:piracies,) (SciML#33). Upstream non-public/non-owner
  names ignored via ei_kwargs (each documented with its source package).
  QA 16 pass + 2 broken, 0 fail (was 2 fail on main: stale_deps + piracies).

Verified locally on Julia 1.10 (lts) via the canonical `Pkg.test` GROUP=QA flow
against released SciMLTesting 1.6.0. Runic-clean.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The run_qa v1.6 conversion turns on JET's `mode = :typo` check (the
previous QA used `JET.test_package(...; target_defined_modules = true)`,
i.e. `:basic` mode, which does not flag undefined-name typos). Typo mode
found two genuine, pre-existing bugs in `OUQBase` that the old config let
through:

- `winkler_extremal_measures.jl`: the `construct_optimization_problem`
  method for `WinklerExtremalMeasures` referenced the local `objective`
  in a `@debug` string *before* it was bound on the next line
  (`local variable `objective` is not defined`). Assign `objective`
  first, and interpolate the real field (`objective._obj`) to match the
  `canonical_moments.jl` sibling method.

- `canonical_moments.jl`: the `ExpectationObjective` branch of the
  `StengerCanonicalMoments` method called bare `simplify(...)`
  (`OUQBase.simplify is not defined`); every other call site in the file
  uses `Symbolics.simplify`. Qualify it.

Verified on Julia 1.11 against released SciMLTesting 1.6.0:
`JET.report_package(OUQBase; target_modules = (OUQBase,), mode = :typo)`
now returns 0 reports (was 2).

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
SciMLTesting 1.7.0 gates check_all_explicit_imports_are_public and
check_all_qualified_accesses_are_public to Julia >= 1.11, so the public-API
ignore-lists only matter on >= 1.11. Swept the two lists against the registered
releases on Julia 1.12 and removed the entries that are now genuinely public in
the versions OUQBase actually resolves:

  - :wrap  (now public in Symbolics 6.58.0) -- removed from both
    all_explicit_imports_are_public and all_qualified_accesses_are_public
  - :remove_linenums!  (public in Base) -- removed from
    all_qualified_accesses_are_public

Every other entry was re-flagged by the empty-list run and restored: OUQBase's
[compat] pins SciMLBase 2.x / Symbolics 6.x / SymbolicUtils 3.x /
ModelingToolkit 9.x, where NullParameters / value / NoAD / etc. are still
non-public (the public declarations landed in the later majors OUQBase's compat
excludes), and AbstractSupportAlg / AbstractWeightAlg are non-public siblings in
CanonicalMoments.

Verified via Pkg.test (GROUP=QA) on Julia 1.12 against registered releases
(SciMLTesting 1.7.0): Quality Assurance 16 Pass / 2 Broken / 0 Fail/Error.

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

SciMLTesting 1.7.0 gates check_all_qualified_accesses_are_public and
check_all_explicit_imports_are_public to Julia >= 1.11 (they silently skip on the
LTS), so the qa envs should require >=1.7 for the gated behavior. Bumped the
SciMLTesting [compat] floor "1.6" -> "1.7" in all four qa environments (root +
CanonicalMoments + DiscreteMeasures + OUQBase).

Re-swept OUQBase's two public-API EI ignore-lists against the registered releases
on Julia 1.12 (SciMLBase 3.27 / Symbolics 7.29 / SymbolicUtils 4.36 /
ModelingToolkit 11.29 all live, SciMLTesting 1.7.0). An empty-ignore-list run
re-flagged every existing entry: OUQBase's [compat] caps SciMLBase 2.x /
Symbolics 6.x / SymbolicUtils 3.x / ModelingToolkit 9.x, so the resolution lands
on SciMLBase 2.153.1 / Symbolics 6.58.0 / SymbolicUtils 3.32.0 /
ModelingToolkit 9.84.0, where NullParameters / NoAD / value / Operator / Term /
symtype / BasicSymbolic / evaluate / geq / leq / getdefault / isbinop /
promote_symtype are still not `public`-declared (the public declarations only
landed in the later majors that [compat] excludes), and AbstractSupportAlg /
AbstractWeightAlg are non-public siblings in CanonicalMoments. No name became
public under the resolved versions, so the lists stay as-is; only their comment
was updated to record the versions verified against. There are no DiffEqBase
qualified accesses anywhere in src/ (NullParameters/NoAD are already accessed as
SciMLBase.*), so there was nothing to migrate.

Verified via the QA group on Julia 1.12 against the registered releases
(SciMLTesting 1.7.0): Quality Assurance 16 Pass / 2 Broken / 0 Fail/Error. The 2
Broken are the pre-existing aqua piracies (SciML#33) and no_implicit_imports (SciML#32).
On Julia 1.10 the two public-API checks skip (SciMLTesting 1.7 gating), so the
ignore-lists are irrelevant there. CI runs QA only on Julia 1, where all four QA
lanes (root + 3 sublibraries) pass.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ed-resolution [sources] strip

The Downgrade and Downgrade Sublibraries lanes failed on the run from
2026-06-27 with 'unknown package UUID' (OUQBase 01930cae / DiscreteMeasures
7766d772) because julia-downgrade-compat @v2 was still v2.5.1, whose
create_merged_project did not strip in-tree [sources] path packages from
the merged project's [deps]/[compat]/[sources]. v2.5.2 (released 2026-06-28,
@v2 retagged) adds that strip; verified locally on Julia 1.10 that both the
root merged resolution and lib/OUQBase resolve cleanly. Empty commit to
re-run CI since the prior run cannot be rerun via the API.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
@ChrisRackauckas-Claude ChrisRackauckas-Claude marked this pull request as ready for review June 29, 2026 09:51
… + shrink ignores

Minimize the ExplicitImports exceptions surfaced by the run_qa v1.6 conversion.

OUQBase:
- Make all imports explicit (drop the blanket `using ModelingToolkit/Symbolics/
  Optimization/JuMP/SymbolicUtils/...`), consolidated at the module top per
  `print_explicit_imports`. This eliminates `ei_broken = (:no_implicit_imports,)`
  entirely (39 previously-hidden names; SciML#32).
- Import `BasicSymbolic`/`Term`/`symtype` from their owner `SymbolicUtils` instead of
  `Symbolics`, eliminating the `all_explicit_imports_via_owners` ignore.
- Import the two exporter≠owner names from their owners directly: `arguments`
  (TermInterface) and `AbstractADType` (ADTypes); both added as direct deps.
- Remaining ignores are genuinely-irreducible non-public upstream API in the majors
  OUQBase's [compat] resolves (SciMLBase 2.x / Symbolics 6.x / SymbolicUtils 3.x /
  ModelingToolkit 9.x): 5 explicit-import names + 9 qualified-access names.

CanonicalMoments:
- Declare the documented `AbstractSupportAlg`/`AbstractWeightAlg` supertypes public
  via SciMLPublic `@public`, so OUQBase no longer needs to ignore them in
  `all_qualified_accesses_are_public` (11 -> 9).

Verified on Julia 1.12 (develop_sources monorepo [sources] setup):
- OUQBase QA: 17 pass / 1 broken (pre-existing piracy SciML#33), all EI checks green.
- CanonicalMoments QA: 18 pass. Root umbrella QA: 18 pass. DiscreteMeasures: unchanged.
- OUQBase Core (Flood Problem) tests pass: import refactor preserves runtime behavior.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
@ChrisRackauckas ChrisRackauckas merged commit defd941 into SciML:main Jul 3, 2026
27 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