Skip to content

Commit

Permalink
fix deprecation warnings - constraint LinearAlgebra (#132)
Browse files Browse the repository at this point in the history
* fix deprecations - constraint LinearAlgebra

* bump version
  • Loading branch information
t-bltg authored Jan 13, 2024
1 parent bd82113 commit b654654
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 14 deletions.
5 changes: 3 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "FastGaussQuadrature"
uuid = "442a2c76-b920-505d-bb47-c5924d526838"
version = "1.0.1"
version = "1.0.2"

[deps]
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Expand All @@ -9,6 +9,7 @@ StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"

[compat]
Aqua = "0.7"
LinearAlgebra = "1"
SpecialFunctions = "0.7, 0.8, 0.9, 0.10, 1.0, 2"
StaticArrays = "1.0"
julia = "1.6"
Expand All @@ -19,4 +20,4 @@ Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[targets]
test = ["Test", "Random", "Aqua"]
test = ["Aqua", "Random", "Test"]
8 changes: 4 additions & 4 deletions src/gaussjacobi.jl
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ function gaussjacobi(n::Integer, α::Real, β::Real)
elseif α == 0. && β == 0.
gausslegendre(n)
elseif α == -0.5 && β == -0.5
gausschebyshev(n, 1)
gausschebyshevt(n)
elseif α == 0.5 && β == 0.5
gausschebyshev(n, 2)
gausschebyshevu(n)
elseif α == -0.5 && β == 0.5
gausschebyshev(n, 3)
gausschebyshevv(n)
elseif α == 0.5 && β == -0.5
gausschebyshev(n, 4)
gausschebyshevw(n)
elseif n == 0
Float64[], Float64[]
elseif n == 1
Expand Down
8 changes: 4 additions & 4 deletions test/test_gausschebyshev.jl
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@

@testset "deprecated" begin
n = 42
@test gausschebyshevt(n) == gausschebyshev(n, 1)
@test gausschebyshevu(n) == gausschebyshev(n, 2)
@test gausschebyshevv(n) == gausschebyshev(n, 3)
@test gausschebyshevw(n) == gausschebyshev(n, 4)
@test gausschebyshevt(n) == @test_deprecated gausschebyshev(n, 1)
@test gausschebyshevu(n) == @test_deprecated gausschebyshev(n, 2)
@test gausschebyshevv(n) == @test_deprecated gausschebyshev(n, 3)
@test gausschebyshevw(n) == @test_deprecated gausschebyshev(n, 4)
@test_throws ArgumentError gausschebyshev(0,5)
end
end
8 changes: 4 additions & 4 deletions test/test_gaussjacobi.jl
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
α₋ = prevfloat(α₀)
β₋ = prevfloat(β₀)
for n in n_range
x, w = gausschebyshev(n, 1)
x, w = @test_deprecated gausschebyshev(n, 1)
x₀₀, w₀₀ = gaussjacobi(n, α₀, β₀)
x₀₊, w₀₊ = gaussjacobi(n, α₀, β₊)
x₀₋, w₀₋ = gaussjacobi(n, α₀, β₋)
Expand All @@ -73,7 +73,7 @@
α₋ = prevfloat(α₀)
β₋ = prevfloat(β₀)
for n in n_range
x, w = gausschebyshev(n, 2)
x, w = @test_deprecated gausschebyshev(n, 2)
x₀₀, w₀₀ = gaussjacobi(n, α₀, β₀)
x₀₊, w₀₊ = gaussjacobi(n, α₀, β₊)
x₀₋, w₀₋ = gaussjacobi(n, α₀, β₋)
Expand All @@ -100,7 +100,7 @@
α₋ = prevfloat(α₀)
β₋ = prevfloat(β₀)
for n in n_range
x, w = gausschebyshev(n, 3)
x, w = @test_deprecated gausschebyshev(n, 3)
x₀₀, w₀₀ = gaussjacobi(n, α₀, β₀)
x₀₊, w₀₊ = gaussjacobi(n, α₀, β₊)
x₀₋, w₀₋ = gaussjacobi(n, α₀, β₋)
Expand All @@ -127,7 +127,7 @@
α₋ = prevfloat(α₀)
β₋ = prevfloat(β₀)
for n in n_range
x, w = gausschebyshev(n, 4)
x, w = @test_deprecated gausschebyshev(n, 4)
x₀₀, w₀₀ = gaussjacobi(n, α₀, β₀)
x₀₊, w₀₊ = gaussjacobi(n, α₀, β₊)
x₀₋, w₀₋ = gaussjacobi(n, α₀, β₋)
Expand Down

2 comments on commit b654654

@hyrodium
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/98812

Tip: Release Notes

Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.

@JuliaRegistrator register

Release notes:

## Breaking changes

- blah

To add them here just re-invoke and the PR will be updated.

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v1.0.2 -m "<description of version>" b654654677bc254e8f936c54bd2128a6dda57bba
git push origin v1.0.2

Please sign in to comment.