Skip to content

Add QA (Aqua/JET) groups to sublibraries (SciML/.github#77)#17

Merged
ChrisRackauckas merged 2 commits into
SciML:mainfrom
ChrisRackauckas-Claude:sublib-qa
Jun 15, 2026
Merged

Add QA (Aqua/JET) groups to sublibraries (SciML/.github#77)#17
ChrisRackauckas merged 2 commits into
SciML:mainfrom
ChrisRackauckas-Claude:sublib-qa

Conversation

@ChrisRackauckas-Claude

Copy link
Copy Markdown
Contributor

Part of SciML/.github#77 (canonical QA groups across monorepo sublibraries).

Adds a canonical QA test group (Aqua + JET, standard only) to every unit of this repo:

  • ROOT (OptimalUncertaintyQuantification): test/qa/{Project.toml,qa.jl}, QA dispatch in test/runtests.jl gated on GROUP, [QA] cell in test/test_groups.toml
  • lib/CanonicalMoments: test/qa env, QA dispatch gated on OPTIMALUNCERTAINTYQUANTIFICATION_TEST_GROUP, [QA] cell
  • lib/DiscreteMeasures: same
  • lib/OUQBase: same

Details:

  • Each test/qa/Project.toml carries Aqua + JET + Test plus the package (and its local-path deps) via [sources], with full [compat] (Aqua = "0.8", JET = "0.9, 0.10, 0.11", julia = "1.10").
  • qa.jl runs Aqua.test_all(<Pkg>) and JET.test_package(<Pkg>; target_defined_modules = true).
  • On Julia < 1.11 the QA env Pkg.develops the local path dependencies (mirroring the existing root runtests pattern), since [sources] is not honored there.
  • [QA] groups declare versions = ["lts", "1"] (no pre), ubuntu-only.
  • Pkg added to each unit's test extras/targets with a [compat] entry so Aqua deps_compat stays green.

Verification: static only (TOML parse, Meta.parseall of all touched .jl files, [sources] path resolution, Runic clean). QA findings, if any, will be triaged from CI per the established mark-broken+issue policy.

Further batches may be pushed to this branch. Ignore until reviewed by @ChrisRackauckas.

🤖 Generated with Claude Code

ChrisRackauckas and others added 2 commits June 15, 2026 11:28
…OUQBase

Each sublibrary gets a test/qa sub-environment (Aqua + JET + Test with the
package wired via [sources]), a qa.jl driver running Aqua.test_all and
JET.test_package(target_defined_modules = true), a QA dispatch in
test/runtests.jl gated on OPTIMALUNCERTAINTYQUANTIFICATION_TEST_GROUP, and a
[QA] cell (versions lts/1) in test/test_groups.toml. Pkg is added to each
sublibrary's test extras/targets with a [compat] entry so Aqua deps_compat
stays green.

Part of SciML/.github#77.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Adds test/qa (Aqua + JET + Test, all local packages wired via [sources]), a
qa.jl driver, a QA dispatch in test/runtests.jl gated on GROUP, and a [QA]
cell (versions lts/1) in test/test_groups.toml. Pkg/Test gain [compat]
entries so Aqua deps_compat stays green.

Part of SciML/.github#77.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@ChrisRackauckas ChrisRackauckas marked this pull request as ready for review June 15, 2026 11:29
@ChrisRackauckas ChrisRackauckas merged commit 93ba552 into SciML:main Jun 15, 2026
7 of 8 checks passed
ChrisRackauckas-Claude pushed a commit to ChrisRackauckas-Claude/OptimalUncertaintyQuantification.jl that referenced this pull request Jul 5, 2026
The `sublibraries / [QA]` checks (added in SciML#17) fail on `main` with real
Aqua/JET findings. SciML#34 landed the run_qa v1.6 conversion and marked the
piracy/import findings as broken (aqua_broken/ei_broken); this PR instead
fixes the remaining findings at the source and drops the now-obsolete
`aqua_broken = (:piracies,)` marker (SciML/SciML#33), so OUQBase QA is a clean
pass rather than an Unexpected-Pass.

OUQBase
- Aqua piracy: rename the pirate `CanonicalMoments.RawMomentSequence(::Num,
  ::Vector{...})` method (a constructor on a foreign type with foreign arg
  types) to an internal `build_raw_moment_sequence`; it was only ever called
  inside OUQBase, so behavior is unchanged. Remove the stale
  `aqua_broken = (:piracies,)` from `test/qa/qa.jl` now that the check passes.
- JET `OUQBase.simplify is not defined`: qualify the bare `simplify` call as
  `Symbolics.simplify` (the bare binding is ambiguous between the
  ModelingToolkit and Symbolics `using` imports).
- JET `local variable objective is not defined`: assign `objective =
  ouq_sys.objective` before the `@debug` that interpolates it.
- JET `getindex(::Nothing, ::Any)`: make `raw_moments_map`/`p_free_map`
  dispatch on the concretely typed `reduction_data` instead of a runtime
  `isa` ternary, and read the maps off the concrete `StengerCanonicalMoments`
  arg inside `discrete_measure_map`, so the accessors stay type stable.
- JET `convert(...)` union split in the `OUQSystem` constructor: route the
  `process_objective` result through a `_OUQSystem` function barrier so the
  struct's objective field is built with a concrete type parameter.

(The unused `PolynomialRoots` dep was also dropped here originally; SciML#34 has
since removed it on `main`, so that hunk is no longer part of this PR.)

CanonicalMoments
- JET `no matching method found kwcall(...)`: `DEFAULT_ROOT_SOLVER` forwarded
  `args...; kwargs...` to the closed-form solvers (`quadratic_eq_sridhare`,
  `simple_real_cubic_eq`, `simple_real_quartic_eq`), which take only the
  coefficient vector. Only the generic `Polynomials.roots` fallback consumes
  those options, so pass them only there.

Verified locally on Julia 1.12 (the `julia 1` QA matrix entry) against
released SciMLTesting 1.8.0 via the canonical `GROUP=QA Pkg.test()` flow:
- OUQBase QA: 18/18 pass, 0 fail/error/broken (was 16 pass + 2 broken on main).
- CanonicalMoments QA: 18/18 pass, 0 fail/error/broken.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
ChrisRackauckas added a commit that referenced this pull request Jul 5, 2026
…#27)

The `sublibraries / [QA]` checks (added in #17) fail on `main` with real
Aqua/JET findings. #34 landed the run_qa v1.6 conversion and marked the
piracy/import findings as broken (aqua_broken/ei_broken); this PR instead
fixes the remaining findings at the source and drops the now-obsolete
`aqua_broken = (:piracies,)` marker (SciML/#33), so OUQBase QA is a clean
pass rather than an Unexpected-Pass.

OUQBase
- Aqua piracy: rename the pirate `CanonicalMoments.RawMomentSequence(::Num,
  ::Vector{...})` method (a constructor on a foreign type with foreign arg
  types) to an internal `build_raw_moment_sequence`; it was only ever called
  inside OUQBase, so behavior is unchanged. Remove the stale
  `aqua_broken = (:piracies,)` from `test/qa/qa.jl` now that the check passes.
- JET `OUQBase.simplify is not defined`: qualify the bare `simplify` call as
  `Symbolics.simplify` (the bare binding is ambiguous between the
  ModelingToolkit and Symbolics `using` imports).
- JET `local variable objective is not defined`: assign `objective =
  ouq_sys.objective` before the `@debug` that interpolates it.
- JET `getindex(::Nothing, ::Any)`: make `raw_moments_map`/`p_free_map`
  dispatch on the concretely typed `reduction_data` instead of a runtime
  `isa` ternary, and read the maps off the concrete `StengerCanonicalMoments`
  arg inside `discrete_measure_map`, so the accessors stay type stable.
- JET `convert(...)` union split in the `OUQSystem` constructor: route the
  `process_objective` result through a `_OUQSystem` function barrier so the
  struct's objective field is built with a concrete type parameter.

(The unused `PolynomialRoots` dep was also dropped here originally; #34 has
since removed it on `main`, so that hunk is no longer part of this PR.)

CanonicalMoments
- JET `no matching method found kwcall(...)`: `DEFAULT_ROOT_SOLVER` forwarded
  `args...; kwargs...` to the closed-form solvers (`quadratic_eq_sridhare`,
  `simple_real_cubic_eq`, `simple_real_quartic_eq`), which take only the
  coefficient vector. Only the generic `Polynomials.roots` fallback consumes
  those options, so pass them only there.

Verified locally on Julia 1.12 (the `julia 1` QA matrix entry) against
released SciMLTesting 1.8.0 via the canonical `GROUP=QA Pkg.test()` flow:
- OUQBase QA: 18/18 pass, 0 fail/error/broken (was 16 pass + 2 broken on main).
- CanonicalMoments QA: 18/18 pass, 0 fail/error/broken.

Co-authored-by: ChrisRackauckas-Claude <accounts@chrisrackauckas.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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