diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1545270c7..139046b03 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,16 +29,18 @@ jobs: # arch: x64 steps: - uses: actions/checkout@v4 - - uses: julia-actions/setup-julia@v1 + - uses: julia-actions/setup-julia@v2 with: version: ${{ matrix.version }} arch: ${{ matrix.arch }} - uses: julia-actions/cache@v1 - uses: julia-actions/julia-buildpkg@v1 - uses: julia-actions/julia-runtest@v1 - with: - depwarn: error + # See https://github.com/JuliaCollections/DataStructures.jl/pull/951 + # with: + # depwarn: error - uses: julia-actions/julia-processcoverage@v1 - - uses: codecov/codecov-action@v3 + - uses: codecov/codecov-action@v4 with: file: lcov.info + token: ${{ secrets.CODECOV_TOKEN }} diff --git a/Project.toml b/Project.toml index 299a03b2c..236bf0e12 100644 --- a/Project.toml +++ b/Project.toml @@ -19,7 +19,7 @@ SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" SymbolicWedderburn = "858aa9a9-4c7c-4c62-b466-2421203962a2" [compat] -DataStructures = "0.18" +DataStructures = "0.18, 0.19" JuMP = "1.10" MathOptInterface = "1.13" MultivariateBases = "0.2" @@ -29,5 +29,5 @@ MutableArithmetics = "1" PolyJuMP = "0.7" Reexport = "0.2, 1.0" SemialgebraicSets = "0.3" -SymbolicWedderburn = "0.3" +SymbolicWedderburn = "0.3, 0.4" julia = "1.6" diff --git a/docs/src/tutorials/Symmetry/cyclic.jl b/docs/src/tutorials/Symmetry/cyclic.jl index f7088f4b0..edb9cef8c 100644 --- a/docs/src/tutorials/Symmetry/cyclic.jl +++ b/docs/src/tutorials/Symmetry/cyclic.jl @@ -158,10 +158,10 @@ gram = gram_matrix(con_ref).blocks #src @test gram[1].basis.polynomials[2] ≈ -sum(x)/√3 #src @test gram[2].Q ≈ [0.5;;] rtol = 1e-6 #src @test length(gram[2].basis.polynomials) == 1 #src -@test gram[2].basis.polynomials[1] ≈ (basis[1] - basis[2] * im) / √2 #src +@test gram[2].basis.polynomials[1] ≈ (basis[1] + basis[2] * im) / √2 #src @test gram[3].Q ≈ [0.5;;] rtol = 1e-6 #src @test length(gram[3].basis.polynomials) == 1 #src -@test gram[3].basis.polynomials[1] ≈ (basis[1] + basis[2] * im) / √2 #src +@test gram[3].basis.polynomials[1] ≈ (basis[1] - basis[2] * im) / √2 #src for gram in gram_matrix(con_ref).blocks println(gram.basis.polynomials) display(gram.Q) diff --git a/docs/src/tutorials/Symmetry/dihedral.jl b/docs/src/tutorials/Symmetry/dihedral.jl index 7802a8b65..920859c18 100644 --- a/docs/src/tutorials/Symmetry/dihedral.jl +++ b/docs/src/tutorials/Symmetry/dihedral.jl @@ -149,9 +149,9 @@ function solve(G) g = gram_matrix(con_ref).blocks #src @test length(g) == 5 #src - @test g[1].basis.polynomials == [y^3, x^2*y, y] #src - @test g[2].basis.polynomials == [-x^3, -x*y^2, -x] #src - for i in 1:2 #src + @test g[4].basis.polynomials == [y^3, x^2*y, y] #src + @test g[5].basis.polynomials == [-x^3, -x*y^2, -x] #src + for i in [4, 5] #src I = 3:-1:1 #src Q = g[i].Q[I, I] #src @test size(Q) == (3, 3) #src @@ -162,20 +162,20 @@ function solve(G) @test Q[1, 3] ≈ -5/8 rtol=1e-2 #src @test Q[3, 3] ≈ 1 rtol=1e-2 #src end #src - @test length(g[3].basis.polynomials) == 2 #src - @test g[3].basis.polynomials[1] == 1.0 #src - @test g[3].basis.polynomials[2] ≈ -(√2/2)x^2 - (√2/2)y^2 #src - @test size(g[3].Q) == (2, 2) #src - @test g[3].Q[1, 1] ≈ 7921/4096 rtol=1e-2 #src - @test g[3].Q[1, 2] ≈ 0.983 rtol=1e-2 #src - @test g[3].Q[2, 2] ≈ 1/2 rtol=1e-2 #src - @test g[4].basis.polynomials == [x * y] #src - @test size(g[4].Q) == (1, 1) #src - @test g[4].Q[1, 1] ≈ 0 atol=1e-2 #src - @test length(g[5].basis.polynomials) == 1 #src - @test g[5].basis.polynomials[1] ≈ (√2/2)x^2 - (√2/2)y^2 #src - @test size(g[5].Q) == (1, 1) #src - @test g[5].Q[1, 1] ≈ 0 atol=1e-2 #src + @test length(g[1].basis.polynomials) == 2 #src + @test g[1].basis.polynomials[1] == 1.0 #src + @test g[1].basis.polynomials[2] ≈ -(√2/2)x^2 - (√2/2)y^2 #src + @test size(g[1].Q) == (2, 2) #src + @test g[1].Q[1, 1] ≈ 7921/4096 rtol=1e-2 #src + @test g[1].Q[1, 2] ≈ 0.983 rtol=1e-2 #src + @test g[1].Q[2, 2] ≈ 1/2 rtol=1e-2 #src + @test g[2].basis.polynomials == [x * y] #src + @test size(g[2].Q) == (1, 1) #src + @test g[2].Q[1, 1] ≈ 0 atol=1e-2 #src + @test length(g[3].basis.polynomials) == 1 #src + @test g[3].basis.polynomials[1] ≈ (√2/2)x^2 - (√2/2)y^2 #src + @test size(g[3].Q) == (1, 1) #src + @test g[3].Q[1, 1] ≈ 0 atol=1e-2 #src for g in gram_matrix(con_ref).blocks println(g.basis.polynomials) end diff --git a/src/Certificate/Symmetry/wedderburn.jl b/src/Certificate/Symmetry/wedderburn.jl index 71adffce5..698ed0c16 100644 --- a/src/Certificate/Symmetry/wedderburn.jl +++ b/src/Certificate/Symmetry/wedderburn.jl @@ -11,11 +11,12 @@ function SymbolicWedderburn.decompose( end function SymbolicWedderburn.ExtensionHomomorphism( + ::Type{I}, action::SymbolicWedderburn.Action, basis::MB.MonomialBasis, -) +) where {I<:Integer} monos = collect(basis.monomials) - return SymbolicWedderburn.ExtensionHomomorphism(Int, action, monos) + return SymbolicWedderburn.ExtensionHomomorphism(I, action, monos) end struct VariablePermutation <: SymbolicWedderburn.ByPermutations end diff --git a/test/Project.toml b/test/Project.toml index 492f4adbb..97ea56b78 100644 --- a/test/Project.toml +++ b/test/Project.toml @@ -13,4 +13,4 @@ SumOfSquares = "4b9e565b-77fc-50a5-a571-1244f986bda1" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [compat] -DynamicPolynomials = "0.5" +DynamicPolynomials = "0.5, 0.6"