From acc0c094152638d1491f349ecbd1c457bcf3e396 Mon Sep 17 00:00:00 2001 From: Maximilian HUEBL Date: Thu, 4 Sep 2025 15:02:24 +0200 Subject: [PATCH 1/8] raise julia compat to 1.10; remove tests on 1.6 --- .github/workflows/CI.yml | 1 - Project.toml | 2 +- test/jet.jl | 34 +++++++++++++++++----------------- test/runtests.jl | 4 ++-- 4 files changed, 20 insertions(+), 21 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index e1a14c6..84f9b6f 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -25,7 +25,6 @@ jobs: version: - '1.11' - '1.10' - - '1.6' - 'pre' os: - ubuntu-latest diff --git a/Project.toml b/Project.toml index 2729810..e3079ad 100644 --- a/Project.toml +++ b/Project.toml @@ -13,5 +13,5 @@ nauty_jll = "55c6dc9b-343a-50ca-8ff2-b71adb3733d5" Graphs = "1.9" LinearAlgebra = "1" SHA = "0.7, 1" -julia = "1.6" +julia = "1.10" nauty_jll = "2.8.9" diff --git a/test/jet.jl b/test/jet.jl index 728091f..3c3bd32 100644 --- a/test/jet.jl +++ b/test/jet.jl @@ -1,31 +1,31 @@ using JET @testset "JET" begin - test_package(NautyGraphs; target_modules=(NautyGraphs,)) + test_package(NautyGraphs) - @test_opt target_modules=(NautyGraphs,) NautyGraph(10) - @test_opt target_modules=(NautyGraphs,) NautyDiGraph(10) + @test_opt NautyGraph(10) + @test_opt NautyDiGraph(10) A = [1 0 1; 0 1 0; 1 1 1] - @test_opt target_modules=(NautyGraphs,) NautyDiGraph(A) + @test_opt NautyDiGraph(A) g = NautyDiGraph(5; vertex_labels=1:5) h = NautyGraph(g) - @test_opt target_modules=(NautyGraphs,) copy(g) - @test_opt target_modules=(NautyGraphs,) NautyDiGraph(g) + @test_opt copy(g) + @test_opt NautyDiGraph(g) add_edge!(g, 2, 5) - @test_opt target_modules=(NautyGraphs,) add_edge!(g, 1, 2) - @test_opt target_modules=(NautyGraphs,) add_vertex!(g) - @test_opt target_modules=(NautyGraphs,) add_vertex!(g; vertex_label=5) - @test_opt target_modules=(NautyGraphs,) rem_vertex!(g, 3) - @test_opt target_modules=(NautyGraphs,) rem_edge!(g, 2, 5) - @test_opt target_modules=(NautyGraphs,) outneighbors(g, 1) - @test_opt target_modules=(NautyGraphs,) inneighbors(g, 1) - @test_opt target_modules=(NautyGraphs,) collect(edges(g)) - @test_opt target_modules=(NautyGraphs,) blockdiag(g, h) + @test_opt add_edge!(g, 1, 2) + @test_opt add_vertex!(g) + @test_opt add_vertex!(g; vertex_label=5) + @test_opt rem_vertex!(g, 3) + @test_opt rem_edge!(g, 2, 5) + @test_opt outneighbors(g, 1) + @test_opt inneighbors(g, 1) + @test_opt collect(edges(g)) + @test_opt blockdiag(g, h) - @test_opt target_modules=(NautyGraphs,) nauty(g) - @test_opt target_modules=(NautyGraphs,) canonize!(g) + @test_opt nauty(g) + @test_opt canonize!(g) end diff --git a/test/runtests.jl b/test/runtests.jl index 1a29d37..b3dd87a 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -9,7 +9,7 @@ using Base.Threads include("nauty.jl") include("graphset.jl") include("utils.jl") - VERSION >= v"1.9-" && include("interface.jl") + include("interface.jl") include("aqua.jl") - VERSION >= v"1.10" && include("jet.jl") + include("jet.jl") end From 1017cb15c0e42454fc7a9d707cb88e0ba068fc27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20H=C3=BCbl?= <89022871+mxhbl@users.noreply.github.com> Date: Sun, 7 Sep 2025 18:16:57 +0200 Subject: [PATCH 2/8] Update runtests.jl --- test/runtests.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/runtests.jl b/test/runtests.jl index b3dd87a..8c6e044 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -10,6 +10,6 @@ using Base.Threads include("graphset.jl") include("utils.jl") include("interface.jl") - include("aqua.jl") - include("jet.jl") + VERSION >= v"1.11" && include("aqua.jl") + VERSION >= v"1.11" && include("jet.jl") end From a165efc2ee07f8278fc6f3dde92320f7f3e38ff5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20H=C3=BCbl?= <89022871+mxhbl@users.noreply.github.com> Date: Thu, 30 Oct 2025 13:47:14 +0100 Subject: [PATCH 3/8] Update tests to specify target_modules --- test/jet.jl | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/test/jet.jl b/test/jet.jl index 3c3bd32..728091f 100644 --- a/test/jet.jl +++ b/test/jet.jl @@ -1,31 +1,31 @@ using JET @testset "JET" begin - test_package(NautyGraphs) + test_package(NautyGraphs; target_modules=(NautyGraphs,)) - @test_opt NautyGraph(10) - @test_opt NautyDiGraph(10) + @test_opt target_modules=(NautyGraphs,) NautyGraph(10) + @test_opt target_modules=(NautyGraphs,) NautyDiGraph(10) A = [1 0 1; 0 1 0; 1 1 1] - @test_opt NautyDiGraph(A) + @test_opt target_modules=(NautyGraphs,) NautyDiGraph(A) g = NautyDiGraph(5; vertex_labels=1:5) h = NautyGraph(g) - @test_opt copy(g) - @test_opt NautyDiGraph(g) + @test_opt target_modules=(NautyGraphs,) copy(g) + @test_opt target_modules=(NautyGraphs,) NautyDiGraph(g) add_edge!(g, 2, 5) - @test_opt add_edge!(g, 1, 2) - @test_opt add_vertex!(g) - @test_opt add_vertex!(g; vertex_label=5) - @test_opt rem_vertex!(g, 3) - @test_opt rem_edge!(g, 2, 5) - @test_opt outneighbors(g, 1) - @test_opt inneighbors(g, 1) - @test_opt collect(edges(g)) - @test_opt blockdiag(g, h) + @test_opt target_modules=(NautyGraphs,) add_edge!(g, 1, 2) + @test_opt target_modules=(NautyGraphs,) add_vertex!(g) + @test_opt target_modules=(NautyGraphs,) add_vertex!(g; vertex_label=5) + @test_opt target_modules=(NautyGraphs,) rem_vertex!(g, 3) + @test_opt target_modules=(NautyGraphs,) rem_edge!(g, 2, 5) + @test_opt target_modules=(NautyGraphs,) outneighbors(g, 1) + @test_opt target_modules=(NautyGraphs,) inneighbors(g, 1) + @test_opt target_modules=(NautyGraphs,) collect(edges(g)) + @test_opt target_modules=(NautyGraphs,) blockdiag(g, h) - @test_opt nauty(g) - @test_opt canonize!(g) + @test_opt target_modules=(NautyGraphs,) nauty(g) + @test_opt target_modules=(NautyGraphs,) canonize!(g) end From e8e4e333dd26d8f7a4d28d23e0d5158cac2759d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20H=C3=BCbl?= <89022871+mxhbl@users.noreply.github.com> Date: Thu, 30 Oct 2025 13:47:41 +0100 Subject: [PATCH 4/8] Update CI to use version 1.12 --- .github/workflows/CI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 84f9b6f..5af813a 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -23,7 +23,7 @@ jobs: fail-fast: false matrix: version: - - '1.11' + - '1.12' - '1.10' - 'pre' os: From 69e9693c3a2d374c43a1db6dbf9e1688a16608fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20H=C3=BCbl?= <89022871+mxhbl@users.noreply.github.com> Date: Thu, 30 Oct 2025 13:48:13 +0100 Subject: [PATCH 5/8] Update version check for aqua.jl and jet.jl --- test/runtests.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/runtests.jl b/test/runtests.jl index 8c6e044..b8cc8a9 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -10,6 +10,6 @@ using Base.Threads include("graphset.jl") include("utils.jl") include("interface.jl") - VERSION >= v"1.11" && include("aqua.jl") - VERSION >= v"1.11" && include("jet.jl") + VERSION >= v"1.12" && include("aqua.jl") + VERSION >= v"1.12" && include("jet.jl") end From 190e1aae3a2483bd13cd4e2462066b9a1a059887 Mon Sep 17 00:00:00 2001 From: Maximilian HUEBL Date: Fri, 31 Oct 2025 16:07:17 +0100 Subject: [PATCH 6/8] change test rng to Xoshiro --- test/densenautygraph.jl | 1 - test/graphset.jl | 2 -- test/runtests.jl | 2 ++ 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/test/densenautygraph.jl b/test/densenautygraph.jl index db400c2..553949d 100644 --- a/test/densenautygraph.jl +++ b/test/densenautygraph.jl @@ -1,4 +1,3 @@ -rng = Random.Random.MersenneTwister(0) # Use MersenneTwister for Julia 1.6 compat symmetrize_adjmx(A) = (A = convert(typeof(A), (A + A') .> 0); for i in axes(A, 1); A[i, i] = 0; end; A) @testset "densenautygraph" begin diff --git a/test/graphset.jl b/test/graphset.jl index d0c7802..94c45a2 100644 --- a/test/graphset.jl +++ b/test/graphset.jl @@ -1,5 +1,3 @@ -rng = Random.Random.MersenneTwister(0) # Use MersenneTwister for Julia 1.6 compat - function test_graphsets(A; mfacts) n, _ = size(A) for mf in mfacts diff --git a/test/runtests.jl b/test/runtests.jl index b8cc8a9..8eaa6ab 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -4,6 +4,8 @@ using Test using Random, LinearAlgebra using Base.Threads +rng = Random.Random.Xoshiro(0) + @testset verbose=true "NautyGraphs" begin include("densenautygraph.jl") include("nauty.jl") From f85468b7b5cf180d65b573f6a36ff70fcf10e07b Mon Sep 17 00:00:00 2001 From: Maximilian HUEBL Date: Fri, 31 Oct 2025 16:08:09 +0100 Subject: [PATCH 7/8] cosmetics --- test/runtests.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/runtests.jl b/test/runtests.jl index 8eaa6ab..d62705a 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -4,7 +4,7 @@ using Test using Random, LinearAlgebra using Base.Threads -rng = Random.Random.Xoshiro(0) +rng = Random.Xoshiro(0) @testset verbose=true "NautyGraphs" begin include("densenautygraph.jl") From 20856e7c6c7569f2448d2d92c33b45b64b7aa288 Mon Sep 17 00:00:00 2001 From: Maximilian HUEBL Date: Fri, 31 Oct 2025 16:16:32 +0100 Subject: [PATCH 8/8] more costmetics in tests --- test/densenautygraph.jl | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/test/densenautygraph.jl b/test/densenautygraph.jl index 3f0ae30..ece1eed 100644 --- a/test/densenautygraph.jl +++ b/test/densenautygraph.jl @@ -1,16 +1,14 @@ -symmetrize_adjmx(A) = (A = convert(typeof(A), (A + A') .> 0); for i in axes(A, 1); end; A) - @testset "densenautygraph" begin nverts = [1, 2, 3, 4, 5, 10, 20, 31, 32, 33, 50, 63, 64, 65, 100, 122, 123, 124, 125, 126, 200, 500, 1000] - As = [rand(rng, [0, 1], i, i) for i in nverts] + As = [rand(rng, 0:1, i, i) for i in nverts] wtypes = [UInt16, UInt32, UInt64] gs = [] ngs = [] for A in As, wt in wtypes - Asym = symmetrize_adjmx(A) + Asym = Int.((A + A') .> 0) push!(gs, Graph(Asym)) push!(gs, DiGraph(A)) push!(ngs, NautyGraph{wt}(Asym))