Skip to content

QA: run_qa v1.6 form + ExplicitImports#337

Merged
ChrisRackauckas merged 4 commits into
SciML:masterfrom
ChrisRackauckas-Claude:qa/run_qa-v1.6-explicit-imports
Jul 3, 2026
Merged

QA: run_qa v1.6 form + ExplicitImports#337
ChrisRackauckas merged 4 commits into
SciML:masterfrom
ChrisRackauckas-Claude:qa/run_qa-v1.6-explicit-imports

Conversation

@ChrisRackauckas-Claude

Copy link
Copy Markdown
Contributor

Please ignore until reviewed by @ChrisRackauckas.

Converts the hand-rolled test/qa/qa.jl (manual Aqua + ExplicitImports + JET) onto the SciMLTesting 1.6 run_qa form with ExplicitImports enabled (explicit_imports = true), so all six ExplicitImports checks run.

ExplicitImports findings (6 checks vs released SciMLTesting 1.6.0)

Check Result
no_implicit_imports pass
no_stale_explicit_imports fixed 2, ignored 7 (see below)
all_explicit_imports_via_owners pass
all_qualified_accesses_via_owners pass
all_qualified_accesses_are_public ignored 6 (other pkgs' non-public, see below)
all_explicit_imports_are_public pass

no_stale_explicit_imports:

  • Fixed: removed DebugLevel and ErrorLevel from src/Integrals.jl — genuinely unused (verified: package still precompiles and all IntegralVerbosity preset/keyword constructors + solve work).
  • Ignored (kept, macro-extension): None, Minimal, Standard, Detailed, All, MessageLevel, AbstractVerbositySpecifier. These appear stale to ExplicitImports but are referenced inside the @verbosity_specifier IntegralVerbosity macro expansion in src/verbosity.jl — the macro generates IntegralVerbosity(::None) / (::Minimal) / ... preset constructors and MessageLevel / AbstractVerbositySpecifier type guards that need these bare names in Integrals' scope. Removing them breaks precompile (UndefVarError: \None` not defined), verified empirically. So they stay imported and are listed in the no_stale_explicit_imports` ignore.

all_qualified_accesses_are_public: ignore six non-public names accessed qualified from other packages (stable cross-package APIs; may go public as those libs release):

  • AbstractIntegralAlgorithm, Success, build_solutionSciMLBase
  • fast_scalar_indexingArrayInterface
  • get_extensionBase
  • seed!Random

Preserved

  • Aqua piracies tweak treat_as_own = [IntegralProblem, SampledIntegralProblem] via aqua_kwargs.
  • The bespoke @report_opt opt-mode solver-path type-stability guards (incl. the VEGAS <= 2 regression bound) kept as a separate @testset, orthogonal to run_qa's package-level JET typo check. There were no @test_broken markers in the old qa.jl, so none are lost.

Deps (test/qa/Project.toml)

  • Drop ExplicitImports (transitive via SciMLTesting).
  • Bump SciMLTesting compat to "1.6".
  • Keep Aqua (its test_ambiguities child process needs Aqua a direct dep), JET, and SafeTestsets (the run_tests folder harness wraps each group file in @safetestset, which needs SafeTestsets in the active sub-env — dropping it errors).

Verification (local, Julia 1.10, released SciMLTesting 1.6.0)

QA group via run_tests harness: 24/24 pass, 0 fail/error/broken (Quality Assurance 18/18 = Aqua.test_all + 6 ExplicitImports + JET test_package; JET opt-mode solver paths 6/6).

🤖 Generated with Claude Code

ChrisRackauckas and others added 4 commits June 25, 2026 06:11
Convert the hand-rolled test/qa/qa.jl (manual Aqua + ExplicitImports + JET)
onto the SciMLTesting 1.6 run_qa form with ExplicitImports enabled
(explicit_imports = true), running all six ExplicitImports checks.

ExplicitImports findings:
- no_stale_explicit_imports: removed the genuinely-unused SciMLLogging imports
  DebugLevel and ErrorLevel from src/Integrals.jl. The remaining stale-reported
  names (None/Minimal/Standard/Detailed/All/MessageLevel/AbstractVerbositySpecifier)
  are referenced only inside the @verbosity_specifier macro expansion (the macro
  generates IntegralVerbosity(::None)/(::Minimal)/... preset constructors and
  MessageLevel/AbstractVerbositySpecifier type guards in Integrals' scope), which
  ExplicitImports cannot see through; dropping them breaks precompile
  (UndefVarError: `None` not defined), so they are kept and ignored.
- all_qualified_accesses_are_public: ignore six non-public names accessed
  qualified from other packages (AbstractIntegralAlgorithm/Success/build_solution
  from SciMLBase, fast_scalar_indexing from ArrayInterface, get_extension from
  Base, seed! from Random).
- The other four EI checks pass clean.

Preserve the piracies treat_as_own = [IntegralProblem, SampledIntegralProblem]
tweak via aqua_kwargs. The bespoke @report_opt opt-mode solver-path
type-stability guards (incl. the VEGAS <= 2 regression bound) are kept as a
separate testset, orthogonal to run_qa's package-level JET typo check.

test/qa/Project.toml: drop ExplicitImports (transitive via SciMLTesting), bump
SciMLTesting compat to "1.6". Keep Aqua (test_ambiguities child process needs
it a direct dep), JET, and SafeTestsets (the run_tests folder harness wraps each
group file in @safetestset, which needs SafeTestsets in the active sub-env).

Verified locally on Julia 1.10 against released SciMLTesting 1.6.0: QA group
24/24 pass, 0 fail/error/broken (Quality Assurance 18/18 + JET opt-mode 6/6).

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The `@verbosity_specifier IntegralVerbosity` macro (SciMLLogging) expands the
keyword constructor `IntegralVerbosity(; preset, ...)` with an unqualified
`preset isa AbstractVerbosityPreset` guard, so the bare name must resolve in
`Integrals`'s scope. It was never imported, so `IntegralVerbosity(; preset=...)`
threw `UndefVarError(:AbstractVerbosityPreset, Integrals)` at runtime; the
v1.6 run_qa JET typo-mode check (report_package) surfaces this on Julia 1.12.

Import `AbstractVerbosityPreset` from SciMLLogging and add it to the
no_stale_explicit_imports ignore list (ExplicitImports cannot see the
macro-generated reference).

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
SciMLTesting 1.7 runs check_all_qualified_accesses_are_public and
check_all_explicit_imports_are_public only on Julia >= 1.11, and the
base libs have since published the names Integrals relies on:
  AbstractIntegralAlgorithm, build_solution -> SciMLBase 3.24.0 public
  Success                                   -> no longer in SciMLBase
  fast_scalar_indexing                      -> ArrayInterface 7.26.0 public
  get_extension                             -> Base public
  seed!                                     -> Random exported (public)

With these released, the all_qualified_accesses_are_public ignore list
is fully redundant, so it is removed. Verified on Julia 1.12 (checks run)
both public-API checks are clean against the registered releases, and on
Julia 1.10 (lts, checks skipped) the QA group is green. The remaining
no_stale_explicit_imports ignore (macro-generated verbosity names) and
aqua piracies kwargs are unchanged.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The public-API ExplicitImports checks (all_qualified_accesses_are_public,
all_explicit_imports_are_public) were dropped from their ignore lists in this
PR. Those checks only behave correctly across Julia versions starting with
SciMLTesting 1.7.0, which gates them to run on Julia >= 1.11 (where the `public`
keyword and `Base.ispublic` exist) and skip on the 1.10 LTS (where a
`public`-backported name is not recognized as public and the checks would
spuriously flag genuinely-public names). Raising the QA-env floor from 1.6 to
1.7 guarantees a downgrade lane cannot pick a SciMLTesting that runs the public
checks on 1.10 against the emptied ignore lists.

Verified against the registered releases (SciMLBase 3.27.0, ArrayInterface
7.26.0, CommonSolve 0.2.9, SciMLTesting 1.7.0):
- Julia 1.12 (public checks run): Quality Assurance 18/18 pass, no restorations
  needed for the emptied all_qualified_accesses_are_public list.
- Julia 1.10 (public checks skip): Quality Assurance 16/16 pass.

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 29, 2026 09:51
@ChrisRackauckas ChrisRackauckas merged commit a267dbd into SciML:master Jul 3, 2026
10 of 11 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