Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions src/MethodOfLines.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,12 @@ using LinearAlgebra
using SciMLBase
using DiffEqBase
using ModelingToolkit
using ModelingToolkit: variable, get_unknowns,
parameters, varmap_to_vars, get_eqs, get_bcs, get_dvs,
using ModelingToolkit: get_unknowns,
get_eqs, get_bcs, get_dvs,
get_ivs
using SymbolicIndexingInterface
using SymbolicUtils, Symbolics
using Symbolics: unwrap, symbolic_linear_solve, expand_derivatives, diff2term, setname,
rename
using Symbolics: unwrap, symbolic_linear_solve, expand_derivatives, diff2term
using SymbolicUtils: operation, arguments, iscall, getmetadata, unwrap_const
using IfElse
using StaticArrays
Expand All @@ -26,8 +25,7 @@ using PDEBase: unitindices, unitindex, remove, insert, sym_dot, VariableMap, dep
d_orders, vcat!, update_varmap!, get_ops

# staggered changes
using PDEBase: cardinalize_eqs!, make_pdesys_compatible, parse_bcs, generate_system,
Interval
using PDEBase: Interval
using PDEBase: error_analysis, add_metadata!

# To Extend
Expand Down
7 changes: 1 addition & 6 deletions test/qa/Project.toml
Original file line number Diff line number Diff line change
@@ -1,19 +1,14 @@
[deps]
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
JET = "c3a54625-cd67-489e-a8e7-0a5a0ff4e31b"
MethodOfLines = "94925ecb-adb7-4558-8ed8-f975c56a0bf4"
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f"
SciMLTesting = "09d9d899-5365-40a9-917a-5f67fddea283"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[sources]
MethodOfLines = {path = "../.."}

[compat]
Aqua = "0.8"
JET = "0.9,0.10,0.11"
SafeTestsets = "0.0.1, 0.1"
SciMLTesting = "1"
SciMLTesting = "1.7"
Test = "1"
julia = "1.10"
94 changes: 75 additions & 19 deletions test/qa/qa.jl
Original file line number Diff line number Diff line change
@@ -1,20 +1,76 @@
using MethodOfLines, Aqua, JET, Test
using SciMLTesting, MethodOfLines, Test
using JET

# Aqua/JET findings tracked at https://github.com/SciML/MethodOfLines.jl/issues/574
@testset "Aqua" begin
# Passing sub-checks run normally.
Aqua.test_unbound_args(MethodOfLines)
Aqua.test_project_extras(MethodOfLines)
Aqua.test_persistent_tasks(MethodOfLines)

# Failing sub-checks marked broken pending fixes.
@test_broken false # Aqua ambiguities: 48 method ambiguities — see https://github.com/SciML/MethodOfLines.jl/issues/574
@test_broken false # Aqua undefined_exports: MethodOfLines.grid_align — see https://github.com/SciML/MethodOfLines.jl/issues/574
@test_broken false # Aqua stale_deps: OrdinaryDiffEq — see https://github.com/SciML/MethodOfLines.jl/issues/574
@test_broken false # Aqua deps_compat: LinearAlgebra has no compat entry — see https://github.com/SciML/MethodOfLines.jl/issues/574
@test_broken false # Aqua piracies: PDEBase.AbstractBoundary/InterfaceBoundary call ops in interface_boundary.jl — see https://github.com/SciML/MethodOfLines.jl/issues/574
end

@testset "JET" begin
@test_broken false # JET: 10 possible errors (DiscreteSpace fields, otherderivmaps, staggered_discretize) — see https://github.com/SciML/MethodOfLines.jl/issues/574
end
# Aqua/JET/ExplicitImports findings tracked at
# https://github.com/SciML/MethodOfLines.jl/issues/574
run_qa(
MethodOfLines;
explicit_imports = true,
# Aqua sub-checks with genuine findings, marked broken pending fixes (issue #574):
# :ambiguities — 48 method ambiguities involving MethodOfLines methods
# :undefined_exports — MethodOfLines.grid_align (a kwarg/field name, not a binding)
# :stale_deps — OrdinaryDiffEq declared but not loaded (uses split subpackages)
# :deps_compat — LinearAlgebra has no [compat] entry
# :piracies — call-operator methods on PDEBase.InterfaceBoundary /
# PDEBase.AbstractBoundary in interface_boundary.jl
aqua_broken = (:ambiguities, :undefined_exports, :stale_deps, :deps_compat, :piracies),
# JET: still reports possible errors on Julia 1.11/1.12 (the CI `julia 1` lane):
# DiscreteSpace getproperty `.time`/`.ps` FieldErrors via ivs/params,
# `MethodOfLines.otherderivmaps` not defined, and `f_analytic` possibly-undefined in
# MOL_discretization.jl. Kept broken there pending issue #574. JET is clean on the
# LTS (1.10) lane, so only mark broken on 1.11+; `report_package` auto-flags an
# Unexpected Pass once JET is clean on 1.11+ too.
jet_broken = VERSION >= v"1.11",
# ExplicitImports per-check ignore-lists (names owned by / non-public in other
# packages; they become clean once those packages export/declare-public these names).
ei_kwargs = (;
all_explicit_imports_via_owners = (;
ignore = (
:Interval, # owner IntervalSets, re-exported by PDEBase
:get_bcs, :get_dvs, :get_eqs, # owner ModelingToolkitBase, re-exported by ModelingToolkit
:get_ivs, :get_unknowns,
:unwrap, # owner SymbolicUtils, re-exported by Symbolics
),
),
all_qualified_accesses_via_owners = (;
ignore = (
:ProblemTypeCtx, # owner ModelingToolkitBase, accessed via ModelingToolkit
:unwrap, # owner SymbolicUtils, accessed via Symbolics
),
),
all_explicit_imports_are_public = (;
ignore = (
# non-public in PDEBase:
:Interval, :add_metadata!, :error_analysis, :get_ops, :insert, :remove,
:sym_dot, :unitindex, :unitindices, :update_varmap!, :vcat!,
# non-public in Symbolics:
:diff2term,
),
),
all_qualified_accesses_are_public = (;
ignore = (
# non-public in Base:
:AbstractCartesianIndex,
# non-public in SciMLBase:
:AbstractDiscretizationMetadata, :AbstractODESolution, :AbstractPDESolution,
:PDESolution, :observed,
# non-public in PDEBase:
:EquationState, :cardinalize_eqs!, :check_boundarymap,
:construct_differential_discretizer, :construct_disc_state,
:construct_discrete_space, :construct_var_equation_mapping,
:discretize_equation!, :generate_ic_defaults, :generate_metadata,
:get_discvars, :get_eqvar, :interface_errors, :parse_bcs,
:should_transform, :transform_pde_system!,
# non-public in ModelingToolkit:
:ProblemTypeCtx,
# non-public in IfElse:
:ifelse,
),
),
),
# no_implicit_imports: ~80 names reach MethodOfLines via `using <BigDep>` (SciMLBase,
# DiffEqBase, ModelingToolkit, Symbolics, SymbolicUtils, PDEBase, DomainSets,
# Interpolations, ...). Making them all explicit is a large, risky refactor; kept
# broken pending issue #574.
ei_broken = (:no_implicit_imports,),
)
Loading