From b95a92265f4d154602104b90cb925cddeab43f0b Mon Sep 17 00:00:00 2001 From: ChrisRackauckas-Claude Date: Fri, 10 Jul 2026 15:21:46 -0400 Subject: [PATCH 1/8] Document public API coverage Co-Authored-By: Chris Rackauckas --- docs/make.jl | 1 + src/SparseMatrixIdentification.jl | 67 +++++++++++------ test/public_api_docs_tests.jl | 120 ++++++++++++++++++++++++++++++ 3 files changed, 164 insertions(+), 24 deletions(-) create mode 100644 test/public_api_docs_tests.jl diff --git a/docs/make.jl b/docs/make.jl index b14094f..831447a 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -10,6 +10,7 @@ makedocs( sitename = "SparseMatrixIdentification.jl", authors = "Anastasia Dunca", modules = [SparseMatrixIdentification], + checkdocs = :exports, clean = true, doctest = false, linkcheck = true, diff --git a/src/SparseMatrixIdentification.jl b/src/SparseMatrixIdentification.jl index 881143e..54a2b9e 100644 --- a/src/SparseMatrixIdentification.jl +++ b/src/SparseMatrixIdentification.jl @@ -341,23 +341,25 @@ export getstructure """ getstructure(A::AbstractMatrix) -Compute structure metrics for a matrix. +Compute the bandedness and sparsity metrics for `A`. -Returns a tuple `(percentage_banded, percentage_sparsity)` where: -- `percentage_banded`: The percentage of positions within bandwidth=1 that contain non-zero elements -- `percentage_sparsity`: The proportion of zero elements in the matrix (1 - density) +Returns `(percentage_banded, percentage_sparsity)`, where `percentage_banded` is +the percentage of entries in the bandwidth-1 band that are nonzero, and +`percentage_sparsity` is the fraction of entries in `A` that are zero. # Arguments -- `A::AbstractMatrix`: The input matrix to analyze +- `A`: matrix to analyze. # Returns -- `Tuple{Float64, Float64}`: A tuple of (bandedness percentage, sparsity percentage) +- `percentage_banded`: percentage of nonzero entries in the bandwidth-1 band. +- `percentage_sparsity`: fraction of zero entries in `A`. # Examples ```julia -julia> A = [1 2 0; 3 4 5; 0 6 7] -julia> getstructure(A) -(100.0, 0.2222222222222222) +using SparseMatrixIdentification + +A = [1 2 0; 3 4 5; 0 6 7] +getstructure(A) ``` """ function getstructure(A::AbstractMatrix)::Any @@ -391,40 +393,54 @@ const _fastalmostbandedmatrices_loaded = Ref(false) """ try_special_matrices(Ad, n, m) -Extension point for SpecialMatrices.jl. Returns nothing when SpecialMatrices is not loaded. -When SpecialMatrices is loaded, returns Hilbert, Strang, Vandermonde, or Cauchy if detected. +Extension hook used by the SpecialMatrices.jl integration. + +Extension methods return a `Hilbert`, `Strang`, `Vandermonde`, or `Cauchy` +matrix when `Ad` matches one of those structures, and `nothing` otherwise. +The base package defines only the generic function. """ function try_special_matrices end """ try_toeplitz(A) -Extension point for ToeplitzMatrices.jl. Returns nothing when ToeplitzMatrices is not loaded. -When ToeplitzMatrices is loaded, returns Toeplitz if detected. +Extension hook used by the ToeplitzMatrices.jl integration. + +Extension methods return a `Toeplitz` matrix when `A` has constant diagonals, +and `nothing` otherwise. The base package defines only the generic function. """ function try_toeplitz end """ try_blockbanded(Ad, n) -Extension point for BlockBandedMatrices.jl. Returns nothing when BlockBandedMatrices is not loaded. -When BlockBandedMatrices is loaded, returns BlockBandedMatrix if detected. +Extension hook used by the BlockBandedMatrices.jl integration. + +Extension methods return a `BlockBandedMatrix` when `Ad` has a detected +block-banded structure, and `nothing` otherwise. The base package defines only +the generic function. """ function try_blockbanded end """ try_almostbanded(Ad, n) -Extension point for FastAlmostBandedMatrices.jl. Returns nothing when FastAlmostBandedMatrices is not loaded. -When FastAlmostBandedMatrices is loaded, returns AlmostBandedMatrix if detected. +Extension hook used by the FastAlmostBandedMatrices.jl integration. + +Extension methods return an `AlmostBandedMatrix` when `Ad` is banded with +low-rank fill outside the band, and `nothing` otherwise. The base package +defines only the generic function. """ function try_almostbanded end """ try_banded(A, threshold) -Extension point for BandedMatrices.jl. Returns nothing when BandedMatrices is not loaded. -When BandedMatrices is loaded, returns BandedMatrix if detected. +Extension hook used by the BandedMatrices.jl integration. + +Extension methods return a `BandedMatrix` when nonzero entries in `A` are +confined to the `threshold` band, and `nothing` otherwise. The base package +defines only the generic function. """ function try_banded end @@ -470,12 +486,15 @@ One of the following matrix types based on detected structure: # Examples ```julia -julia> using SparseArrays -julia> A = sparse([1 2 2; 2 3 4; 2 4 5]) -julia> sparsestructure(A, 0.5) # Returns Symmetric +using LinearAlgebra +using SparseArrays +using SparseMatrixIdentification + +A = sparse([1 2 2; 2 3 4; 2 4 5]) +sparsestructure(A, 0.5) isa Symmetric -julia> L = sparse([1 0 0; 2 3 0; 4 5 6]) -julia> sparsestructure(L, 0.5) # Returns LowerTriangular +L = sparse([1 0 0; 2 3 0; 4 5 6]) +sparsestructure(L, 0.5) isa LowerTriangular ``` """ function sparsestructure(A::AbstractSparseMatrix, threshold) diff --git a/test/public_api_docs_tests.jl b/test/public_api_docs_tests.jl new file mode 100644 index 0000000..217e55a --- /dev/null +++ b/test/public_api_docs_tests.jl @@ -0,0 +1,120 @@ +using SparseMatrixIdentification +using Test + +const SMI = SparseMatrixIdentification +const SRC_FILE = normpath(joinpath(@__DIR__, "..", "src", "SparseMatrixIdentification.jl")) +const DOCS_SRC_DIR = normpath(joinpath(@__DIR__, "..", "docs", "src")) +const EXTENSION_POINT_NAMES = ( + :try_special_matrices, + :try_toeplitz, + :try_banded, + :try_blockbanded, + :try_almostbanded, +) + +function _append_symbol_names!(names, declaration) + cleaned = first(split(declaration, '#')) + for token in split(cleaned, [',', ' ', '\t']; keepempty = false) + name = replace(strip(token), r"\(.*$" => "") + if occursin(r"^[A-Za-z_]\w*[!?]?$", name) + push!(names, Symbol(name)) + end + end + return names +end + +function _declared_public_names() + public_names = Set(Symbol.(names(SMI; all = false, imported = false))) + delete!(public_names, nameof(SMI)) + + source_lines = split(read(SRC_FILE, String), '\n') + line_index = 1 + while line_index <= length(source_lines) + line = strip(source_lines[line_index]) + if startswith(line, "export ") || startswith(line, "public ") + declaration = replace(line, r"^(export|public)\s+" => "") + while endswith(strip(first(split(declaration, '#'))), ",") && + line_index < length(source_lines) + line_index += 1 + declaration *= " " * strip(source_lines[line_index]) + end + _append_symbol_names!(public_names, declaration) + elseif occursin(r"^([A-Za-z_]\w*\.)?@public\s+", line) + _append_symbol_names!(public_names, replace(line, r"^([A-Za-z_]\w*\.)?@public\s+" => "")) + end + line_index += 1 + end + + return public_names +end + +function _has_docstring(name) + doc = Docs.doc(Docs.Binding(SMI, name)) + rendered = sprint(show, MIME("text/plain"), doc) + return !startswith(rendered, "No documentation found.") +end + +function _append_docs_entry!(names, line) + isempty(line) && return names + startswith(line, "#") && return names + + entry = first(split(line)) + entry = replace(entry, r"\(.*$" => "") + entry = last(split(entry, '.')) + if occursin(r"^[A-Za-z_]\w*[!?]?$", entry) + push!(names, Symbol(entry)) + end + return names +end + +function _documented_reference_names() + documented_names = Set{Symbol}() + has_module_autodocs = false + + for (root, _, files) in walkdir(DOCS_SRC_DIR) + for file in files + endswith(file, ".md") || continue + + in_docs_block = false + in_autodocs_block = false + for line in eachline(joinpath(root, file)) + stripped = strip(line) + if startswith(stripped, "```@docs") + in_docs_block = true + in_autodocs_block = false + elseif startswith(stripped, "```@autodocs") + in_docs_block = false + in_autodocs_block = true + elseif startswith(stripped, "```") + in_docs_block = false + in_autodocs_block = false + elseif in_docs_block + _append_docs_entry!(documented_names, stripped) + elseif in_autodocs_block && occursin("SparseMatrixIdentification", stripped) + has_module_autodocs = true + end + end + end + end + + if has_module_autodocs + union!(documented_names, _declared_public_names()) + end + + return documented_names +end + +@testset "Public API documentation coverage" begin + public_names = sort!(collect(_declared_public_names()); by = string) + documented_names = _documented_reference_names() + + @test [name for name in public_names if !_has_docstring(name)] == Symbol[] + @test setdiff(Set(public_names), documented_names) == Set{Symbol}() +end + +@testset "Documented extension point coverage" begin + documented_names = _documented_reference_names() + + @test [name for name in EXTENSION_POINT_NAMES if !_has_docstring(name)] == Symbol[] + @test setdiff(Set(EXTENSION_POINT_NAMES), documented_names) == Set{Symbol}() +end From 4af180deb9dcba2d84361af566cd6d721e0c146d Mon Sep 17 00:00:00 2001 From: ChrisRackauckas-Claude Date: Fri, 10 Jul 2026 15:42:25 -0400 Subject: [PATCH 2/8] Use SciMLTesting API docs QA Co-Authored-By: Chris Rackauckas --- test/public_api_docs_tests.jl | 120 ---------------------------------- test/qa/Project.toml | 3 +- test/qa/qa.jl | 1 + 3 files changed, 3 insertions(+), 121 deletions(-) delete mode 100644 test/public_api_docs_tests.jl diff --git a/test/public_api_docs_tests.jl b/test/public_api_docs_tests.jl deleted file mode 100644 index 217e55a..0000000 --- a/test/public_api_docs_tests.jl +++ /dev/null @@ -1,120 +0,0 @@ -using SparseMatrixIdentification -using Test - -const SMI = SparseMatrixIdentification -const SRC_FILE = normpath(joinpath(@__DIR__, "..", "src", "SparseMatrixIdentification.jl")) -const DOCS_SRC_DIR = normpath(joinpath(@__DIR__, "..", "docs", "src")) -const EXTENSION_POINT_NAMES = ( - :try_special_matrices, - :try_toeplitz, - :try_banded, - :try_blockbanded, - :try_almostbanded, -) - -function _append_symbol_names!(names, declaration) - cleaned = first(split(declaration, '#')) - for token in split(cleaned, [',', ' ', '\t']; keepempty = false) - name = replace(strip(token), r"\(.*$" => "") - if occursin(r"^[A-Za-z_]\w*[!?]?$", name) - push!(names, Symbol(name)) - end - end - return names -end - -function _declared_public_names() - public_names = Set(Symbol.(names(SMI; all = false, imported = false))) - delete!(public_names, nameof(SMI)) - - source_lines = split(read(SRC_FILE, String), '\n') - line_index = 1 - while line_index <= length(source_lines) - line = strip(source_lines[line_index]) - if startswith(line, "export ") || startswith(line, "public ") - declaration = replace(line, r"^(export|public)\s+" => "") - while endswith(strip(first(split(declaration, '#'))), ",") && - line_index < length(source_lines) - line_index += 1 - declaration *= " " * strip(source_lines[line_index]) - end - _append_symbol_names!(public_names, declaration) - elseif occursin(r"^([A-Za-z_]\w*\.)?@public\s+", line) - _append_symbol_names!(public_names, replace(line, r"^([A-Za-z_]\w*\.)?@public\s+" => "")) - end - line_index += 1 - end - - return public_names -end - -function _has_docstring(name) - doc = Docs.doc(Docs.Binding(SMI, name)) - rendered = sprint(show, MIME("text/plain"), doc) - return !startswith(rendered, "No documentation found.") -end - -function _append_docs_entry!(names, line) - isempty(line) && return names - startswith(line, "#") && return names - - entry = first(split(line)) - entry = replace(entry, r"\(.*$" => "") - entry = last(split(entry, '.')) - if occursin(r"^[A-Za-z_]\w*[!?]?$", entry) - push!(names, Symbol(entry)) - end - return names -end - -function _documented_reference_names() - documented_names = Set{Symbol}() - has_module_autodocs = false - - for (root, _, files) in walkdir(DOCS_SRC_DIR) - for file in files - endswith(file, ".md") || continue - - in_docs_block = false - in_autodocs_block = false - for line in eachline(joinpath(root, file)) - stripped = strip(line) - if startswith(stripped, "```@docs") - in_docs_block = true - in_autodocs_block = false - elseif startswith(stripped, "```@autodocs") - in_docs_block = false - in_autodocs_block = true - elseif startswith(stripped, "```") - in_docs_block = false - in_autodocs_block = false - elseif in_docs_block - _append_docs_entry!(documented_names, stripped) - elseif in_autodocs_block && occursin("SparseMatrixIdentification", stripped) - has_module_autodocs = true - end - end - end - end - - if has_module_autodocs - union!(documented_names, _declared_public_names()) - end - - return documented_names -end - -@testset "Public API documentation coverage" begin - public_names = sort!(collect(_declared_public_names()); by = string) - documented_names = _documented_reference_names() - - @test [name for name in public_names if !_has_docstring(name)] == Symbol[] - @test setdiff(Set(public_names), documented_names) == Set{Symbol}() -end - -@testset "Documented extension point coverage" begin - documented_names = _documented_reference_names() - - @test [name for name in EXTENSION_POINT_NAMES if !_has_docstring(name)] == Symbol[] - @test setdiff(Set(EXTENSION_POINT_NAMES), documented_names) == Set{Symbol}() -end diff --git a/test/qa/Project.toml b/test/qa/Project.toml index b28b74f..b80e763 100644 --- a/test/qa/Project.toml +++ b/test/qa/Project.toml @@ -6,11 +6,12 @@ SparseMatrixIdentification = "2607229e-3272-44a7-bc4a-cd97a328dfbf" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [sources] +SciMLTesting = {url = "https://github.com/SciML/SciMLTesting.jl", rev = "a5cecca928f2c684c23505c3cd83921d71753e2e"} SparseMatrixIdentification = {path = "../.."} [compat] Aqua = "0.8" JET = "0.9,0.10,0.11" -SciMLTesting = "1.6" +SciMLTesting = "2.1" Test = "1" julia = "1.10" diff --git a/test/qa/qa.jl b/test/qa/qa.jl index 3121153..86a75c4 100644 --- a/test/qa/qa.jl +++ b/test/qa/qa.jl @@ -9,4 +9,5 @@ run_qa( # ArrayInterface; it is the only non-public name this package accesses. all_qualified_accesses_are_public = (; ignore = (:fast_scalar_indexing,)), ), + api_docs_kwargs = (; rendered = true), ) From 012ff7b3723b08fdf87016b20c0fab17e167443d Mon Sep 17 00:00:00 2001 From: ChrisRackauckas-Claude Date: Fri, 10 Jul 2026 16:00:57 -0400 Subject: [PATCH 3/8] Pin root SciMLTesting for API docs QA Co-Authored-By: Chris Rackauckas --- Project.toml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index 5593f18..634a3bf 100644 --- a/Project.toml +++ b/Project.toml @@ -23,6 +23,9 @@ FastAlmostBandedMatricesExt = ["FastAlmostBandedMatrices", "BandedMatrices"] SpecialMatricesExt = "SpecialMatrices" ToeplitzMatricesExt = "ToeplitzMatrices" +[sources] +SciMLTesting = {url = "https://github.com/SciML/SciMLTesting.jl", rev = "a5cecca928f2c684c23505c3cd83921d71753e2e"} + [compat] AllocCheck = "0.2" ArrayInterface = "7.7" @@ -34,7 +37,7 @@ GPUArrays = "8.4, 9, 10, 11" JLArrays = "0.1, 0.2, 0.3" LinearAlgebra = "1" SafeTestsets = "0.0.1, 0.1, 1" -SciMLTesting = "1" +SciMLTesting = "2.1" SemiseparableMatrices = "0.4.0" SparseArrays = "1" SpecialMatrices = "3.1.0" From 8c93bba383125f5925c81a2369525ca7b1d6e6ae Mon Sep 17 00:00:00 2001 From: ChrisRackauckas-Claude Date: Fri, 10 Jul 2026 16:07:01 -0400 Subject: [PATCH 4/8] Isolate API docs QA environment Co-Authored-By: Chris Rackauckas --- Project.toml | 5 +---- test/qa/qa.jl | 36 ++++++++++++++++++++++++++---------- 2 files changed, 27 insertions(+), 14 deletions(-) diff --git a/Project.toml b/Project.toml index 634a3bf..5593f18 100644 --- a/Project.toml +++ b/Project.toml @@ -23,9 +23,6 @@ FastAlmostBandedMatricesExt = ["FastAlmostBandedMatrices", "BandedMatrices"] SpecialMatricesExt = "SpecialMatrices" ToeplitzMatricesExt = "ToeplitzMatrices" -[sources] -SciMLTesting = {url = "https://github.com/SciML/SciMLTesting.jl", rev = "a5cecca928f2c684c23505c3cd83921d71753e2e"} - [compat] AllocCheck = "0.2" ArrayInterface = "7.7" @@ -37,7 +34,7 @@ GPUArrays = "8.4, 9, 10, 11" JLArrays = "0.1, 0.2, 0.3" LinearAlgebra = "1" SafeTestsets = "0.0.1, 0.1, 1" -SciMLTesting = "2.1" +SciMLTesting = "1" SemiseparableMatrices = "0.4.0" SparseArrays = "1" SpecialMatrices = "3.1.0" diff --git a/test/qa/qa.jl b/test/qa/qa.jl index 86a75c4..b8e43ac 100644 --- a/test/qa/qa.jl +++ b/test/qa/qa.jl @@ -1,13 +1,29 @@ using SciMLTesting, SparseMatrixIdentification, Test using JET -run_qa( - SparseMatrixIdentification; - explicit_imports = true, - ei_kwargs = (; - # `fast_scalar_indexing` is not public (unexported, not declared public) in - # ArrayInterface; it is the only non-public name this package accesses. - all_qualified_accesses_are_public = (; ignore = (:fast_scalar_indexing,)), - ), - api_docs_kwargs = (; rendered = true), -) +function _run_qa() + return run_qa( + SparseMatrixIdentification; + explicit_imports = true, + ei_kwargs = (; + # `fast_scalar_indexing` is not public (unexported, not declared public) in + # ArrayInterface; it is the only non-public name this package accesses. + all_qualified_accesses_are_public = (; ignore = (:fast_scalar_indexing,)), + ), + api_docs_kwargs = (; rendered = true), + ) +end + +if isdefined(SciMLTesting, :run_api_docs) + _run_qa() +else + if get(ENV, "SPARSEMATRIXIDENTIFICATION_QA_SUBPROCESS", "") == "1" + error("The QA environment must resolve SciMLTesting with run_api_docs.") + end + + script = "using Pkg; Pkg.instantiate(); include($(repr(@__FILE__)))" + cmd = `$(Base.julia_cmd()) --startup-file=no --project=$(@__DIR__) -e $script` + withenv("SPARSEMATRIXIDENTIFICATION_QA_SUBPROCESS" => "1") do + @test success(cmd) + end +end From ab37116cb6e4b9d1542ee087419a5a58de91b76d Mon Sep 17 00:00:00 2001 From: ChrisRackauckas-Claude Date: Fri, 10 Jul 2026 16:27:11 -0400 Subject: [PATCH 5/8] Fix QA API docs source isolation Co-Authored-By: Chris Rackauckas --- test/qa/Project.toml | 2 ++ test/qa/qa.jl | 20 ++++++++++++++++++-- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/test/qa/Project.toml b/test/qa/Project.toml index b80e763..e481c46 100644 --- a/test/qa/Project.toml +++ b/test/qa/Project.toml @@ -1,6 +1,7 @@ [deps] Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595" JET = "c3a54625-cd67-489e-a8e7-0a5a0ff4e31b" +Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" SciMLTesting = "09d9d899-5365-40a9-917a-5f67fddea283" SparseMatrixIdentification = "2607229e-3272-44a7-bc4a-cd97a328dfbf" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" @@ -12,6 +13,7 @@ SparseMatrixIdentification = {path = "../.."} [compat] Aqua = "0.8" JET = "0.9,0.10,0.11" +Pkg = "1" SciMLTesting = "2.1" Test = "1" julia = "1.10" diff --git a/test/qa/qa.jl b/test/qa/qa.jl index b8e43ac..d0bc9c3 100644 --- a/test/qa/qa.jl +++ b/test/qa/qa.jl @@ -14,6 +14,21 @@ function _run_qa() ) end +function _qa_julia_cmd() + julia_args = String[] + skip_arg = false + for arg in Base.julia_cmd().exec + if skip_arg + skip_arg = false + elseif arg == "--project" + skip_arg = true + elseif !startswith(arg, "--project=") + push!(julia_args, arg) + end + end + return Cmd(julia_args) +end + if isdefined(SciMLTesting, :run_api_docs) _run_qa() else @@ -22,8 +37,9 @@ else end script = "using Pkg; Pkg.instantiate(); include($(repr(@__FILE__)))" - cmd = `$(Base.julia_cmd()) --startup-file=no --project=$(@__DIR__) -e $script` + cmd = `$(_qa_julia_cmd()) --startup-file=no --project=$(@__DIR__) -e $script` withenv("SPARSEMATRIXIDENTIFICATION_QA_SUBPROCESS" => "1") do - @test success(cmd) + run(cmd) + @test true end end From 0df55df6db85bcbcd2fab117bda5e4768fc7eabf Mon Sep 17 00:00:00 2001 From: ChrisRackauckas-Claude Date: Sat, 11 Jul 2026 00:39:10 -0400 Subject: [PATCH 6/8] Use SciMLTesting v2.1 test runner Co-Authored-By: Chris Rackauckas --- Project.toml | 2 +- test/qa/Project.toml | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/Project.toml b/Project.toml index 5593f18..9143a0a 100644 --- a/Project.toml +++ b/Project.toml @@ -34,7 +34,7 @@ GPUArrays = "8.4, 9, 10, 11" JLArrays = "0.1, 0.2, 0.3" LinearAlgebra = "1" SafeTestsets = "0.0.1, 0.1, 1" -SciMLTesting = "1" +SciMLTesting = "2.1" SemiseparableMatrices = "0.4.0" SparseArrays = "1" SpecialMatrices = "3.1.0" diff --git a/test/qa/Project.toml b/test/qa/Project.toml index e481c46..d2e725d 100644 --- a/test/qa/Project.toml +++ b/test/qa/Project.toml @@ -7,7 +7,6 @@ SparseMatrixIdentification = "2607229e-3272-44a7-bc4a-cd97a328dfbf" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [sources] -SciMLTesting = {url = "https://github.com/SciML/SciMLTesting.jl", rev = "a5cecca928f2c684c23505c3cd83921d71753e2e"} SparseMatrixIdentification = {path = "../.."} [compat] From e7b16bf9ff1a1bee68e51bfa683e4958c7bdc89d Mon Sep 17 00:00:00 2001 From: ChrisRackauckas-Claude Date: Sat, 11 Jul 2026 00:53:34 -0400 Subject: [PATCH 7/8] Remove redundant test package sources Co-Authored-By: Chris Rackauckas --- test/qa/Project.toml | 3 --- 1 file changed, 3 deletions(-) diff --git a/test/qa/Project.toml b/test/qa/Project.toml index d2e725d..692ac3c 100644 --- a/test/qa/Project.toml +++ b/test/qa/Project.toml @@ -6,9 +6,6 @@ SciMLTesting = "09d9d899-5365-40a9-917a-5f67fddea283" SparseMatrixIdentification = "2607229e-3272-44a7-bc4a-cd97a328dfbf" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" -[sources] -SparseMatrixIdentification = {path = "../.."} - [compat] Aqua = "0.8" JET = "0.9,0.10,0.11" From a079c0efc894593d3deda81ea0a49f6c7b0d0879 Mon Sep 17 00:00:00 2001 From: ChrisRackauckas-Claude Date: Sat, 11 Jul 2026 14:07:07 -0400 Subject: [PATCH 8/8] Remove stale SciMLTesting fallback Co-Authored-By: Chris Rackauckas --- test/qa/Project.toml | 2 -- test/qa/qa.jl | 54 +++++++++----------------------------------- 2 files changed, 11 insertions(+), 45 deletions(-) diff --git a/test/qa/Project.toml b/test/qa/Project.toml index 692ac3c..b6a1719 100644 --- a/test/qa/Project.toml +++ b/test/qa/Project.toml @@ -1,7 +1,6 @@ [deps] Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595" JET = "c3a54625-cd67-489e-a8e7-0a5a0ff4e31b" -Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" SciMLTesting = "09d9d899-5365-40a9-917a-5f67fddea283" SparseMatrixIdentification = "2607229e-3272-44a7-bc4a-cd97a328dfbf" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" @@ -9,7 +8,6 @@ Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [compat] Aqua = "0.8" JET = "0.9,0.10,0.11" -Pkg = "1" SciMLTesting = "2.1" Test = "1" julia = "1.10" diff --git a/test/qa/qa.jl b/test/qa/qa.jl index d0bc9c3..14af5fc 100644 --- a/test/qa/qa.jl +++ b/test/qa/qa.jl @@ -1,45 +1,13 @@ -using SciMLTesting, SparseMatrixIdentification, Test +using SciMLTesting, SparseMatrixIdentification using JET -function _run_qa() - return run_qa( - SparseMatrixIdentification; - explicit_imports = true, - ei_kwargs = (; - # `fast_scalar_indexing` is not public (unexported, not declared public) in - # ArrayInterface; it is the only non-public name this package accesses. - all_qualified_accesses_are_public = (; ignore = (:fast_scalar_indexing,)), - ), - api_docs_kwargs = (; rendered = true), - ) -end - -function _qa_julia_cmd() - julia_args = String[] - skip_arg = false - for arg in Base.julia_cmd().exec - if skip_arg - skip_arg = false - elseif arg == "--project" - skip_arg = true - elseif !startswith(arg, "--project=") - push!(julia_args, arg) - end - end - return Cmd(julia_args) -end - -if isdefined(SciMLTesting, :run_api_docs) - _run_qa() -else - if get(ENV, "SPARSEMATRIXIDENTIFICATION_QA_SUBPROCESS", "") == "1" - error("The QA environment must resolve SciMLTesting with run_api_docs.") - end - - script = "using Pkg; Pkg.instantiate(); include($(repr(@__FILE__)))" - cmd = `$(_qa_julia_cmd()) --startup-file=no --project=$(@__DIR__) -e $script` - withenv("SPARSEMATRIXIDENTIFICATION_QA_SUBPROCESS" => "1") do - run(cmd) - @test true - end -end +run_qa( + SparseMatrixIdentification; + explicit_imports = true, + ei_kwargs = (; + # `fast_scalar_indexing` is not public (unexported, not declared public) in + # ArrayInterface; it is the only non-public name this package accesses. + all_qualified_accesses_are_public = (; ignore = (:fast_scalar_indexing,)), + ), + api_docs_kwargs = (; rendered = true), +)