Skip to content

Drop support under Julia v1.6 #220

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jan 28, 2022
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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
strategy:
matrix:
version:
- '1.0'
- '1.6'
- '1'
os:
- ubuntu-latest
Expand Down
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"

[compat]
Quaternions = "0.4"
StaticArrays = "0.10, 0.11, 0.12, 1.0"
julia = "0.7, 1"
StaticArrays = "1.2.12"
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is related with this release

Expand signature of normalize from StaticVector to StaticArray

julia = "1.6"

[extras]
BenchmarkTools = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf"
Expand Down
6 changes: 2 additions & 4 deletions test/2d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,8 @@ using Unitful
for i = 1:repeats
r = rand(R)
@test norm(r) ≈ norm(Matrix(r))
if VERSION ≥ v"1.5"
@test normalize(r) ≈ normalize(Matrix(r))
@test normalize(r) isa SMatrix
end
@test normalize(r) ≈ normalize(Matrix(r))
@test normalize(r) isa SMatrix
end
end
end
Expand Down
14 changes: 6 additions & 8 deletions test/eigen.jl
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
@test norm(v3) ≈ 1
@test E.values == λs
@test E.vectors == vs
if !(T in oneaxis_types) && VERSION ≥ v"1.2"
if !(T in oneaxis_types)
# If the rotation angle is in [0°, 180°], then the eigvals will be equal.
# Note that the randomized RotX (and etc.) have rotation angle in [0°, 360°].
# This needs Julia(≥1.2) to get sorted eigenvalues in a canonical order
Expand All @@ -46,12 +46,10 @@ end
@test norm(v2) ≈ 1
@test E.values == λs
@test E.vectors == vs
if VERSION ≥ v"1.2"
# If the rotation angle θ is in [0°, 180°], then the eigvals will be equal.
# Note that the randomized RotX (and etc.) have rotation angle in [0°, 360°].
# This needs Julia(≥1.2) to get sorted eigenvalues in a canonical order
# See https://github.com/JuliaLang/julia/pull/21598
@test eigvals(R) ≈ eigvals(collect(R))
end
# If the rotation angle θ is in [0°, 180°], then the eigvals will be equal.
# Note that the randomized RotX (and etc.) have rotation angle in [0°, 360°].
# This needs Julia(≥1.2) to get sorted eigenvalues in a canonical order
# See https://github.com/JuliaLang/julia/pull/21598
@test eigvals(R) ≈ eigvals(collect(R))
end
end
6 changes: 1 addition & 5 deletions test/rotation_generator.jl
Original file line number Diff line number Diff line change
Expand Up @@ -199,11 +199,7 @@
r = zero(RotMatrixGenerator{2})
show(io, MIME("text/plain"), r)
str = String(take!(io))
if VERSION ≥ v"1.6"
@test startswith(str, "2×2 RotMatrixGenerator2{Float64}")
else
@test startswith(str, "2×2 RotMatrixGenerator{2,Float64,4}")
end
@test startswith(str, "2×2 RotMatrixGenerator2{Float64}")

rvec = RotationVecGenerator(1.0, 2.0, 3.0)
show(io, MIME("text/plain"), rvec)
Expand Down
12 changes: 3 additions & 9 deletions test/rotation_tests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -163,10 +163,8 @@ all_types = (RotMatrix{3}, AngleAxis, RotationVec,
for i = 1:repeats
r = rand(R)
@test norm(r) ≈ norm(Matrix(r))
if VERSION ≥ v"1.5"
@test normalize(r) ≈ normalize(Matrix(r))
@test normalize(r) isa SMatrix
end
@test normalize(r) ≈ normalize(Matrix(r))
@test normalize(r) isa SMatrix
end
end
end
Expand Down Expand Up @@ -464,11 +462,7 @@ all_types = (RotMatrix{3}, AngleAxis, RotationVec,
r = rand(RotMatrix{2})
show(io, MIME("text/plain"), r)
str = String(take!(io))
if VERSION ≥ v"1.6"
@test startswith(str, "2×2 RotMatrix2{Float64}")
else
@test startswith(str, "2×2 RotMatrix{2,Float64,4}")
end
@test startswith(str, "2×2 RotMatrix2{Float64}")

rxyz = RotXYZ(1.0, 2.0, 3.0)
show(io, MIME("text/plain"), rxyz)
Expand Down
4 changes: 0 additions & 4 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@ import Unitful

import Random

if VERSION < v"1.2.0"
Base.:<(x) = Base.Fix2(<, x)
end

# Check that there are no ambiguities beyond those present in StaticArrays
ramb = detect_ambiguities(Rotations, Base, Core)
samb = detect_ambiguities(StaticArrays, Base, Core)
Expand Down