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
4 changes: 3 additions & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ ChainRulesCore = "1"
ChainRulesTestUtils = "1"
JET = "0.9"
LinearAlgebra = "1"
SafeTestsets = "0.1"
StableRNGs = "1"
Test = "1"
TestExtras = "0.2,0.3"
Expand All @@ -28,10 +29,11 @@ julia = "1.10"
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
ChainRulesTestUtils = "cdddcdb0-9152-4a09-a978-84456f9df70a"
JET = "c3a54625-cd67-489e-a8e7-0a5a0ff4e31b"
SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f"
StableRNGs = "860ef19b-820b-49d6-a774-d7a799459cd3"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
TestExtras = "5ed8adda-3752-4e41-b88a-e8b09835ee3a"
Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f"

[targets]
test = ["Aqua", "JET", "Test", "TestExtras","ChainRulesCore", "ChainRulesTestUtils", "StableRNGs", "Zygote"]
test = ["Aqua", "JET", "SafeTestsets", "Test", "TestExtras","ChainRulesCore", "ChainRulesTestUtils", "StableRNGs", "Zygote"]
6 changes: 5 additions & 1 deletion test/chainrules.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
using MatrixAlgebraKit
using Test
using TestExtras
using StableRNGs
using ChainRulesCore, ChainRulesTestUtils, Zygote
using MatrixAlgebraKit: diagview, TruncatedAlgorithm, PolarViaSVD
using LinearAlgebra: UpperTriangular, Diagonal, Hermitian
using LinearAlgebra: UpperTriangular, Diagonal, Hermitian, mul!

function remove_svdgauge_depence!(ΔU, ΔVᴴ, U, S, Vᴴ;
degeneracy_atol=MatrixAlgebraKit.default_pullback_gaugetol(S))
Expand Down
7 changes: 7 additions & 0 deletions test/eig.jl
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
using MatrixAlgebraKit
using Test
using TestExtras
using StableRNGs
using LinearAlgebra: Diagonal
using MatrixAlgebraKit: diagview

@testset "eig_full! for T = $T" for T in (Float32, Float64, ComplexF32, ComplexF64)
rng = StableRNG(123)
m = 54
Expand Down
7 changes: 7 additions & 0 deletions test/eigh.jl
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
using MatrixAlgebraKit
using Test
using TestExtras
using StableRNGs
using LinearAlgebra: LinearAlgebra, Diagonal, I
using MatrixAlgebraKit: diagview

@testset "eigh_full! for T = $T" for T in (Float32, Float64, ComplexF32, ComplexF64)
rng = StableRNG(123)
m = 54
Expand Down
6 changes: 6 additions & 0 deletions test/lq.jl
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
using MatrixAlgebraKit
using Test
using TestExtras
using StableRNGs
using LinearAlgebra: diag, I

@testset "lq_compact! for T = $T" for T in (Float32, Float64, ComplexF32, ComplexF64)
rng = StableRNG(123)
m = 54
Expand Down
6 changes: 6 additions & 0 deletions test/orthnull.jl
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
using MatrixAlgebraKit
using Test
using TestExtras
using StableRNGs
using LinearAlgebra: LinearAlgebra, I

@testset "left_orth and left_null for T = $T" for T in (Float32, Float64, ComplexF32,
ComplexF64)
rng = StableRNG(123)
Expand Down
5 changes: 5 additions & 0 deletions test/polar.jl
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
using MatrixAlgebraKit
using Test
using TestExtras
using StableRNGs
using LinearAlgebra: LinearAlgebra, I, isposdef
using MatrixAlgebraKit: PolarViaSVD

@testset "left_polar! for T = $T" for T in (Float32, Float64, ComplexF32, ComplexF64)
Expand Down
6 changes: 6 additions & 0 deletions test/qr.jl
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
using MatrixAlgebraKit
using Test
using TestExtras
using StableRNGs
using LinearAlgebra: diag, I

@testset "qr_compact! and qr_null! for T = $T" for T in (Float32, Float64, ComplexF32,
ComplexF64)
rng = StableRNG(123)
Expand Down
36 changes: 16 additions & 20 deletions test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,44 +1,40 @@
using MatrixAlgebraKit
using Test
using TestExtras
using ChainRulesTestUtils
using StableRNGs
using Aqua
using JET
using LinearAlgebra: LinearAlgebra, diag, Diagonal, I, isposdef, diagind, mul!
using MatrixAlgebraKit: diagview
using SafeTestsets

@testset "QR / LQ Decomposition" begin
@safetestset "QR / LQ Decomposition" begin
include("qr.jl")
include("lq.jl")
end
@testset "Singular Value Decomposition" begin
@safetestset "Singular Value Decomposition" begin
include("svd.jl")
end
@testset "Hermitian Eigenvalue Decomposition" begin
@safetestset "Hermitian Eigenvalue Decomposition" begin
include("eigh.jl")
end
@testset "General Eigenvalue Decomposition" begin
@safetestset "General Eigenvalue Decomposition" begin
include("eig.jl")
end
@testset "Schur Decomposition" begin
@safetestset "Schur Decomposition" begin
include("schur.jl")
end
@testset "Polar Decomposition" begin
@safetestset "Polar Decomposition" begin
include("polar.jl")
end
@testset "Image and Null Space" begin
@safetestset "Image and Null Space" begin
include("orthnull.jl")
end
@testset "ChainRules" verbose = true begin
@safetestset "ChainRules" begin
include("chainrules.jl")
end

@testset "MatrixAlgebraKit.jl" begin
@testset "Code quality (Aqua.jl)" begin
@safetestset "MatrixAlgebraKit.jl" begin
@safetestset "Code quality (Aqua.jl)" begin
using MatrixAlgebraKit
using Aqua
Aqua.test_all(MatrixAlgebraKit)
end
@testset "Code linting (JET.jl)" begin
@safetestset "Code linting (JET.jl)" begin
using MatrixAlgebraKit
using JET
JET.test_package(MatrixAlgebraKit; target_defined_modules=true)
end
end
6 changes: 6 additions & 0 deletions test/schur.jl
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
using MatrixAlgebraKit
using Test
using TestExtras
using StableRNGs
using LinearAlgebra: I

@testset "schur_full! for T = $T" for T in (Float32, Float64, ComplexF32, ComplexF64)
rng = StableRNG(123)
m = 54
Expand Down
7 changes: 7 additions & 0 deletions test/svd.jl
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
using MatrixAlgebraKit
using Test
using TestExtras
using StableRNGs
using LinearAlgebra: LinearAlgebra, Diagonal, I, isposdef
using MatrixAlgebraKit: diagview

@testset "svd_compact! for T = $T" for T in (Float32, Float64, ComplexF32, ComplexF64)
rng = StableRNG(123)
m = 54
Expand Down