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
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
JET = "c3a54625-cd67-489e-a8e7-0a5a0ff4e31b"
RecursiveArrayToolsArrayPartitionAnyAll = "172d604e-c495-4f00-97bf-d70957099afa"
SciMLTesting = "09d9d899-5365-40a9-917a-5f67fddea283"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[sources]
Expand All @@ -11,5 +12,6 @@ RecursiveArrayToolsArrayPartitionAnyAll = {path = "../.."}
Aqua = "0.8"
JET = "0.9, 0.10, 0.11"
RecursiveArrayToolsArrayPartitionAnyAll = "1"
SciMLTesting = "1.6"
Test = "1"
julia = "1.10"
20 changes: 9 additions & 11 deletions lib/RecursiveArrayToolsArrayPartitionAnyAll/test/qa/qa.jl
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
using RecursiveArrayToolsArrayPartitionAnyAll, Aqua, JET, Test
using SciMLTesting, RecursiveArrayToolsArrayPartitionAnyAll, JET, Test

const RATAPAA = RecursiveArrayToolsArrayPartitionAnyAll

@testset "QA" begin
@testset "Aqua" begin
# `any`/`all` are extended on the RecursiveArrayTools-owned `ArrayPartition`
# type, so they are intentional (owned) methods, not piracy.
Aqua.test_all(RATAPAA; piracies = (; treat_as_own = [RATAPAA.ArrayPartition]))
end
@testset "JET" begin
JET.test_package(RecursiveArrayToolsArrayPartitionAnyAll; target_defined_modules = true)
end
end
run_qa(
RATAPAA;
explicit_imports = true,
# `any`/`all` are extended on the RecursiveArrayTools-owned `ArrayPartition`
# type, so they are intentional (owned) methods, not piracy.
aqua_kwargs = (; piracies = (; treat_as_own = [RATAPAA.ArrayPartition])),
jet_kwargs = (; target_defined_modules = true),
)
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module RecursiveArrayToolsRaggedArrays

import RecursiveArrayTools: RecursiveArrayTools, AbstractRaggedVectorOfArray,
AbstractRaggedDiffEqArray, VectorOfArray, DiffEqArray,
AbstractVectorOfArray, AbstractDiffEqArray, AllObserved,
AbstractVectorOfArray, AbstractDiffEqArray,
recursivefill!, recursivecopy!
using SymbolicIndexingInterface
using SymbolicIndexingInterface: ParameterTimeseriesCollection, ParameterIndexingProxy,
Expand Down
2 changes: 2 additions & 0 deletions lib/RecursiveArrayToolsRaggedArrays/test/qa/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
JET = "c3a54625-cd67-489e-a8e7-0a5a0ff4e31b"
RecursiveArrayToolsRaggedArrays = "c384ba91-639a-44ca-823a-e1d3691ab84a"
SciMLTesting = "09d9d899-5365-40a9-917a-5f67fddea283"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[sources]
Expand All @@ -11,5 +12,6 @@ RecursiveArrayToolsRaggedArrays = {path = "../.."}
Aqua = "0.8"
JET = "0.9, 0.10, 0.11"
RecursiveArrayToolsRaggedArrays = "1"
SciMLTesting = "1.6"
Test = "1"
julia = "1.10"
61 changes: 52 additions & 9 deletions lib/RecursiveArrayToolsRaggedArrays/test/qa/qa.jl
Original file line number Diff line number Diff line change
@@ -1,10 +1,53 @@
using RecursiveArrayToolsRaggedArrays, Aqua, JET, Test
using SciMLTesting, RecursiveArrayToolsRaggedArrays, JET, Test

@testset "QA" begin
@testset "Aqua" begin
Aqua.test_all(RecursiveArrayToolsRaggedArrays)
end
@testset "JET" begin
JET.test_package(RecursiveArrayToolsRaggedArrays; target_defined_modules = true)
end
end
run_qa(
RecursiveArrayToolsRaggedArrays;
explicit_imports = true,
# The arithmetic/array methods (`*`, `+`, `Array`, `copyto!`, ...) are defined on
# the RecursiveArrayTools-owned `AbstractRaggedVectorOfArray` /
# `AbstractRaggedDiffEqArray` abstract types, so they are intentional (owned)
# methods, not piracy.
aqua_kwargs = (;
piracies = (;
treat_as_own = [
RecursiveArrayToolsRaggedArrays.AbstractRaggedVectorOfArray,
RecursiveArrayToolsRaggedArrays.AbstractRaggedDiffEqArray,
],
),
),
jet_kwargs = (; target_defined_modules = true),
# Pre-existing JET typo-mode finding (reproduces byte-identically on master):
# the `copyto!`/`fill!`/broadcast immutable-element branches call
# `StaticArraysCore.similar_type(dest.u[i])`, but `dest.u[i]` infers as `::Any`
# because the abstract `AbstractRaggedVectorOfArray` `.u` field is untyped, so
# `similar_type(::Any)` has no matching method. Tracked (with the real fix —
# tightening the `.u` type / guarding the immutable branch) in
# https://github.com/SciML/RecursiveArrayTools.jl/issues/620. `jet_broken`
# auto-flags an Unexpected Pass once that fix lands, prompting removal.
jet_broken = true,
ei_kwargs = (;
# `AbstractRaggedVectorOfArray`/`AbstractRaggedDiffEqArray` are
# RecursiveArrayTools-owned abstract types this subpackage subtypes; they are
# not (yet) declared public in RecursiveArrayTools.
all_explicit_imports_are_public = (;
ignore = (:AbstractRaggedVectorOfArray, :AbstractRaggedDiffEqArray),
),
# Non-public names legitimately qualified/imported from upstream packages
# (Base, Base.Broadcast, StaticArraysCore, ArrayInterface, Adapt,
# SymbolicIndexingInterface). Not this subpackage's to make public.
all_qualified_accesses_are_public = (;
ignore = (
Symbol("@propagate_inbounds"), :AbstractArrayStyle, :AllVariables,
:Broadcasted, :DefaultArrayStyle, :HasLength, :IteratorSize, :OneTo,
:Slice, :SolvedVariables, :StaticVecOrMat, :SymbolicTypeTrait,
:adapt_structure, :add_sum, :broadcastable, :check_parent_index_match,
:ensure_indexable, :flatten, :front, :index_dimsum, :ismutable,
:issingular, :maybeview, :mul_prod, :similar_type, :tail, :typename,
:unalias, :viewindexing,
),
),
),
# Whole-module `using` exposes many names implicitly; explicit-import refactor
# tracked in https://github.com/SciML/RecursiveArrayTools.jl/issues/619
ei_broken = (:no_implicit_imports,),
)
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
JET = "c3a54625-cd67-489e-a8e7-0a5a0ff4e31b"
RecursiveArrayToolsShorthandConstructors = "39fb7555-b4ad-4efd-8abe-30331df017d3"
SciMLTesting = "09d9d899-5365-40a9-917a-5f67fddea283"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[sources]
Expand All @@ -11,5 +12,6 @@ RecursiveArrayToolsShorthandConstructors = {path = "../.."}
Aqua = "0.8"
JET = "0.9, 0.10, 0.11"
RecursiveArrayToolsShorthandConstructors = "1"
SciMLTesting = "1.6"
Test = "1"
julia = "1.10"
22 changes: 10 additions & 12 deletions lib/RecursiveArrayToolsShorthandConstructors/test/qa/qa.jl
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
using RecursiveArrayToolsShorthandConstructors, Aqua, JET, Test
using SciMLTesting, RecursiveArrayToolsShorthandConstructors, JET, Test

const RATSC = RecursiveArrayToolsShorthandConstructors

@testset "QA" begin
@testset "Aqua" begin
# `getindex(::Type{VA}, ...)` / `getindex(::Type{AP}, ...)` extend Base on
# RecursiveArrayTools-owned types, so they are intentional (owned) methods,
# not piracy.
Aqua.test_all(RATSC; piracies = (; treat_as_own = [RATSC.VA, RATSC.AP]))
end
@testset "JET" begin
JET.test_package(RecursiveArrayToolsShorthandConstructors; target_defined_modules = true)
end
end
run_qa(
RATSC;
explicit_imports = true,
# `getindex(::Type{VA}, ...)` / `getindex(::Type{AP}, ...)` extend Base on
# RecursiveArrayTools-owned types, so they are intentional (owned) methods,
# not piracy.
aqua_kwargs = (; piracies = (; treat_as_own = [RATSC.VA, RATSC.AP])),
jet_kwargs = (; target_defined_modules = true),
)
2 changes: 2 additions & 0 deletions test/QA/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
RecursiveArrayTools = "731186ca-8d62-57ce-b412-fbd966d074cd"
SciMLTesting = "09d9d899-5365-40a9-917a-5f67fddea283"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[sources]
Expand All @@ -11,5 +12,6 @@ RecursiveArrayTools = {path = "../.."}
Aqua = "0.8"
Pkg = "1"
RecursiveArrayTools = "4"
SciMLTesting = "1.6"
Test = "1"
julia = "1.10"
39 changes: 28 additions & 11 deletions test/QA/qa.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using RecursiveArrayTools, Aqua, Pkg
using SciMLTesting, RecursiveArrayTools, Test, Pkg

# yes this is horrible, we'll fix it when Pkg or Base provides a decent API
manifest = Pkg.Types.EnvCache().manifest
Expand All @@ -7,13 +7,30 @@ if haskey(manifest.deps, "NonlinearSolveBase") || haskey(manifest.deps, "DiffEqB
error("Don't put Downstream Packages in non Downstream CI")
end

@testset "Aqua" begin
Aqua.find_persistent_tasks_deps(RecursiveArrayTools)
Aqua.test_ambiguities(RecursiveArrayTools; recursive = false, broken = true)
Aqua.test_deps_compat(RecursiveArrayTools)
Aqua.test_piracies(RecursiveArrayTools)
Aqua.test_project_extras(RecursiveArrayTools)
Aqua.test_stale_deps(RecursiveArrayTools)
Aqua.test_unbound_args(RecursiveArrayTools)
Aqua.test_undefined_exports(RecursiveArrayTools)
end
run_qa(
RecursiveArrayTools;
explicit_imports = true,
# Method-table ambiguities tracked in
# https://github.com/SciML/RecursiveArrayTools.jl/issues/326
aqua_broken = (:ambiguities,),
ei_kwargs = (;
# Non-public names legitimately qualified/imported from upstream packages
# (Base, Base.Broadcast, LinearAlgebra, StaticArraysCore, ArrayInterface,
# Adapt, SymbolicIndexingInterface). Not RecursiveArrayTools' to make public.
all_qualified_accesses_are_public = (;
ignore = (
Symbol("@propagate_inbounds"), :AbstractArrayStyle, :AllVariables,
:ArrayStyle, :BroadcastStyle, :Broadcasted, :DefaultArrayStyle, :OneTo,
:QRCompactWY, :SolvedVariables, :StaticArray, :StaticVecOrMat,
:SymbolicTypeTrait, :_InitialValue, :_ipiv_rows!, :_maybe_reshape,
:_swap_rows!, :_unsafe_getindex, :_unsafe_getindex!, :adapt_structure,
:add_sum, :flatten, :front, :index_shape, :ismutable, :issingular,
:promote_op, :restructure, :result_style, :similar_type, :tail,
:unalias, :zeromatrix,
),
),
),
# Whole-module `using` exposes many names implicitly; explicit-import refactor
# tracked in https://github.com/SciML/RecursiveArrayTools.jl/issues/619
ei_broken = (:no_implicit_imports,),
)
Loading