Fix QA group dispatch: pass QA via the qa kwarg, not groups#156
Merged
ChrisRackauckas merged 4 commits intoJun 20, 2026
Merged
Conversation
The canonicalization conversion (SciML#154) placed the QA group inside the `groups` Dict, but SciMLTesting's `run_tests` routes `GROUP="QA"` through a dedicated `elseif group == "QA"` branch that consumes the `qa` keyword argument and short-circuits before the `groups` table is ever consulted. With `qa` unset, that branch throws ArgumentError: run_tests: GROUP="QA" was requested but no `qa` body was provided so the QA CI job failed on master before loading FEniCS. Moving the QA spec to the `qa` kwarg (matching the documented SciMLTesting form) makes `GROUP="QA"` reach the QA body, while `all = ["Core"]` keeps QA out of the default `GROUP="All"`/local `]test` run as before. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Verify the scoped GitHub-hosted runner routing (SciML/.github SciML#97) now sends this repo's apt-packages/container legs to ubuntu-24.04. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The QA group now actually runs FEniCS's own Aqua/JET checks, surfacing
six pre-existing package-quality issues. Fix the real causes:
- Type piracy + Base.write method ambiguity: `write(path, solution,
time::Number)` extended `Base.write` with no FEniCS-owned argument
type, which is piracy and also clashed with `Base.write(::IO, x1,
xs...)`. Stop importing `write` from Base so `write`/`store` are
FEniCS-owned functions (still exported); behavior unchanged.
- Undefined export: `export fenicsclass` referenced a nonexistent
binding; the macro is `@fenicsclass`. Export the macro.
- JET no-matching-method: `Argument(V, number)` lowered to
`Argument(::Any, ::Any, ::Nothing)` because `part::StringOrSymbol`
cannot accept its own `nothing` default. Widen to
`Union{StringOrSymbol, Nothing}`.
- Stale dependency: ProgressMeter was declared but unused (only a
dead `@require ... using ProgressMeter` no-op). Drop it from deps,
compat, and the no-op __init__ block.
- deps_compat: add a `[compat]` entry for the LinearAlgebra stdlib.
Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…g types
The prior commit removed `write` from the `Base` import to kill the type
piracy, but that made `FEniCS.write` a distinct exported binding that
clashed with the exported `Base.write` ("both FEniCS and Base export
write"), breaking the Core examples (tutorial8/9: `UndefVarError: write`).
Restore `import Base: ...write` so `write` stays a single function, and
fix the two QA findings on it through argument types instead:
- Type piracy: `write` now takes `solution::fenicsobject` (a FEniCS-owned
type), so the method is owned by FEniCS rather than pirating Base. The
unused, unavoidably-piratical `write(::Any, ::PyObject, ::Number)`
overload is dropped (use `store` for raw vectors like `vector(u)`).
- Method ambiguity: type `path::PyObject` (what `XDMFFile`/`TimeSeries`
return), which is disjoint from `Base.write(::IO, ...)` and
`write(::AbstractString, ...)`, removing both ambiguities.
`store` is FEniCS-owned (not a Base function), so its overloads are not
piracy; `path::PyObject` is added there too for symmetry/correctness.
Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The QA CI job fails on
master(introduced by the canonicalization conversion #154) before any test runs:The conversion placed the QA group inside the
groupsDict. ButSciMLTesting.run_testsroutesGROUP="QA"through a dedicatedelseif group == "QA"branch that consumes theqakeyword argument and short-circuits before thegroupstable is ever consulted. Withqaleft unset, that branch throws "noqabody was provided" — so a QA entry ingroupsis unreachable forGROUP="QA".Fix
Move the QA spec from the
groupsDict to the dedicatedqakeyword argument (the documented SciMLTesting form).all = ["Core"]is retained, so QA still runs only whenGROUP="QA"is explicitly selected and remains excluded from the defaultGROUP="All"/ local]testrun, exactly as before.Verification (local, Julia 1.10 + SciMLTesting v1.2.0)
Reproduced the exact CI error with the old
groups["QA"]form, then confirmed the fix with a stub tree mirroringtest/(core.jl + qa/qa.jl + qa/Project.toml):GROUP=QA→ exit 0, QA body runs (was:ArgumentError: no qa body provided)GROUP=Core→ exit 0, Core onlyGROUP=All/ no GROUP → exit 0, Core only (QA excluded)In a checkout of this repo,
GROUP=QA julia test/runtests.jlnow reaches the QA branch, activatestest/qa, develops local FEniCS, and resolves Aqua/JET/PyCall — it no longer throws the dispatch error (the local run then needs thecmhyett/julia-fenicsPython stack, which is only present in CI).Note: the other three master jobs (Core julia 1, Core julia pre, QA julia lts) failed separately with
permission denied ... docker.sock— transient self-hosted-runner infrastructure errors unrelated to this change; not addressed here.Please ignore until reviewed by @ChrisRackauckas.
Follow-up: fix the QA package-quality failures the QA group now surfaces (commits 85a709b, f70877a)
With the dispatch fixed, the QA group runs FEniCS's own
Aqua.test_all/JET.report_packagefor the first time, exposing six pre-existing package-quality issues (all present onmaster, none introduced here). Each is fixed at its real cause; no Aqua check is disabled or loosened:write(path, solution, time::Number)(jsolve.jl) extendedBase.writewith no FEniCS-owned argument type.Base.write(sowritestays a single function usable unqualified), but typesolution::fenicsobjectso the method is FEniCS-owned, not piracy. The unused, unavoidably-piraticalwrite(::Any, ::PyObject, ::Number)overload is dropped (usestorefor raw vectors).writemethod's untypedpathclashed withBase.write(::IO, ...)andwrite(::AbstractString, ...).path::PyObject(whatXDMFFile/TimeSeriesreturn), disjoint fromIO/AbstractString.export fenicsclassnamed a binding that doesn't exist — the macro is@fenicsclass.export @fenicsclass.Argument(V, number)→Argument(::Any, ::Any, ::Nothing)no matching method, becausepart::StringOrSymbolcannot hold its ownnothingdefault.part::Union{StringOrSymbol, Nothing} = nothing(PyCall mapsnothing→None, matchingfenics.Argument(part=None)).ProgressMeterdeclared but unused (only a no-op@require ... using ProgressMeter; no function from it is ever called).[deps],[compat], and the dead__init__block.LinearAlgebra(runtime stdlib dep) had no[compat]entry.LinearAlgebra = "1".The first attempt (85a709b) instead removed
writefrom theBaseimport, which madeFEniCS.writeclash with the exportedBase.writeand broke the Core examples (UndefVarError: writein tutorial8/9). f70877a corrects that by extendingBase.writeand disambiguating via argument types as above.Verified locally in the
cmhyett/julia-fenicscontainer (the fenics Python stack) with Julia 1.10:Aqua.test_all(FEniCS)→ 11 passed / 0 failed;JET.test_package(FEniCS)→ 1 passed / 0 failed; and amodule … using FEniCS; write(…)sanity check confirms the Base.write name clash is gone. (The earlier CI on 85a709b had already shown both QA legs green — i.e. piracy/exports/stale/deps_compat/JET all fixed — and Core red from the clash; f70877a keeps QA green and unbreaks Core.)Please ignore until reviewed by @ChrisRackauckas.