Skip to content

Commit 0fc3526

Browse files
authored
Mode DSP to an extension (#145)
1 parent 392498f commit 0fc3526

File tree

4 files changed

+32
-7
lines changed

4 files changed

+32
-7
lines changed

Project.toml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "InfiniteLinearAlgebra"
22
uuid = "cde9dba0-b1de-11e9-2c62-0bab9446c55c"
3-
version = "0.6.22"
3+
version = "0.6.23"
44

55
[deps]
66
ArrayLayouts = "4c555306-a7a7-4459-81d9-ec55ddd5c99a"
@@ -16,6 +16,12 @@ LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
1616
MatrixFactorizations = "a3b82374-2e81-5b9e-98ce-41277c0e4c87"
1717
SemiseparableMatrices = "f8ebbe35-cbfb-4060-bf7f-b10e4670cf57"
1818

19+
[weakdeps]
20+
DSP = "717857b8-e6f2-59f4-9121-6e50c889abd2"
21+
22+
[extensions]
23+
InfiniteLinearAlgebraDSPExt = "DSP"
24+
1925
[compat]
2026
Aqua = "0.6"
2127
ArrayLayouts = "1.0.12"
@@ -33,10 +39,11 @@ julia = "1.6"
3339

3440
[extras]
3541
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
42+
DSP = "717857b8-e6f2-59f4-9121-6e50c889abd2"
3643
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
3744
SpecialFunctions = "276daf66-3868-5448-9aa4-cd146d93841b"
3845
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
3946
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
4047

4148
[targets]
42-
test = ["Aqua", "Test", "Random", "SpecialFunctions", "StaticArrays"]
49+
test = ["Aqua", "DSP", "Test", "Random", "SpecialFunctions", "StaticArrays"]

src/infconv.jl renamed to ext/InfiniteLinearAlgebraDSPExt.jl

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
module InfiniteLinearAlgebraDSPExt
2+
3+
using InfiniteLinearAlgebra
4+
using InfiniteArrays
5+
using InfiniteArrays: InfRanges, OneToInf
6+
using FillArrays
7+
using FillArrays: AbstractFill, getindex_value
8+
using LazyArrays
9+
import DSP: conv
10+
111

212
##
313
# conv
@@ -68,3 +78,6 @@ function conv(r1::Ones{<:Any,1,<:Tuple{<:OneToInf}}, r2::AbstractFill{<:Any,1,<:
6878
a = getindex_value(r1) * getindex_value(r2)
6979
a:a:
7080
end
81+
82+
83+
end

src/InfiniteLinearAlgebra.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,6 @@ import BlockBandedMatrices: _BlockSkylineMatrix, _BandedMatrix, _BlockSkylineMat
3636
BlockSkylineSizes, BlockSkylineMatrix, BlockBandedMatrix, _BlockBandedMatrix, BlockTridiagonal,
3737
AbstractBlockBandedLayout, _blockbanded_qr!, BlockBandedLayout
3838

39-
import DSP: conv
40-
4139
import SemiseparableMatrices: AbstractAlmostBandedLayout, _almostbanded_qr!
4240

4341

@@ -118,8 +116,6 @@ pad(c::BlockVec, ax::BlockedUnitRange{<:InfStepRange}) = BlockVec(pad(c.args[1],
118116

119117
export Vcat, Fill, ql, ql!, ∞, ContinuousSpectrumError, BlockTridiagonal
120118

121-
include("infconv.jl")
122-
123119
include("banded/hessenbergq.jl")
124120

125121
include("banded/infbanded.jl")
@@ -131,4 +127,8 @@ include("inful.jl")
131127
include("infcholesky.jl")
132128

133129

130+
if !isdefined(Base, :get_extension)
131+
include("../ext/InfiniteLinearAlgebraDSPExt.jl")
132+
end
133+
134134
end # module

test/runtests.jl

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,12 @@ import LazyBandedMatrices: BroadcastBandedBlockBandedLayout, BroadcastBandedLayo
1515

1616
using Aqua
1717
@testset "Project quality" begin
18-
Aqua.test_all(InfiniteLinearAlgebra, ambiguities=false, unbound_args=false, piracy=false)
18+
Aqua.test_all(InfiniteLinearAlgebra, ambiguities=false, unbound_args=false, piracy=false,
19+
# Project.toml formatting issue on v1.6
20+
# Pkg issue: https://github.com/JuliaLang/Pkg.jl/issues/3481
21+
# Aqua workaround: https://github.com/JuliaTesting/Aqua.jl/issues/105#issuecomment-1551405866
22+
# we only check the formatting on more recent versions
23+
project_toml_formatting = VERSION>=v"1.7")
1924
end
2025

2126
@testset "chop" begin

0 commit comments

Comments
 (0)