Skip to content
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
12 changes: 12 additions & 0 deletions .github/workflows/Format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Format suggestions
on:
pull_request:
# this argument is not required if you don't use the `suggestion-label` input
types: [opened, reopened, synchronize, labeled, unlabeled]
jobs:
code-style:
runs-on: ubuntu-latest
steps:
- uses: julia-actions/julia-format@v4
with:
version: '1' # Set `version` to '1.0.54' if you need to use JuliaFormatter.jl v1.0.54 (default: '1')
5 changes: 2 additions & 3 deletions ext/SparseMatrixColoringsColorsExt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -271,9 +271,8 @@ function show_colors!(
A_ccolor_indices = mod1.(column_colors(res), length(colorscheme))
A_rcolor_indices = mod1.(row_shift .+ row_colors(res), length(colorscheme))
B_ccolor_indices = mod1.(1:maximum(column_colors(res)), length(colorscheme))
B_rcolor_indices = mod1.(
(row_shift + 1):(row_shift + maximum(row_colors(res))), length(colorscheme)
)
B_rcolor_indices =
mod1.((row_shift + 1):(row_shift + maximum(row_colors(res))), length(colorscheme))
A_ccolors = colorscheme[A_ccolor_indices]
A_rcolors = colorscheme[A_rcolor_indices]
B_ccolors = colorscheme[B_ccolor_indices]
Expand Down
4 changes: 1 addition & 3 deletions src/postprocessing.jl
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,7 @@ function postprocess_with_star_set!(
end

function postprocess_with_tree_set!(
color_used::Vector{Bool},
color::AbstractVector{<:Integer},
tree_set::TreeSet,
color_used::Vector{Bool}, color::AbstractVector{<:Integer}, tree_set::TreeSet
)
# only the colors of non-leaf vertices are used
(; reverse_bfs_orders, is_star, tree_edge_indices, nt) = tree_set
Expand Down
1 change: 0 additions & 1 deletion test/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
HiGHS = "87dc4568-4c63-4d18-b0c0-bb2238e4078b"
JET = "c3a54625-cd67-489e-a8e7-0a5a0ff4e31b"
JuMP = "4076af6c-e467-56ae-b986-b466b2749572"
JuliaFormatter = "98e50ef6-434e-11e9-1051-2b60c6c9e899"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
MatrixDepot = "b51810bb-c9f3-55da-ae3c-350fc1fbce05"
MiniZinc = "a7f392d2-6c35-496e-b8cc-0974fbfcbf91"
Expand Down
15 changes: 5 additions & 10 deletions test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using Aqua
using Documenter
using JET
using JuliaFormatter
using SparseMatrixColorings
using Test

Expand All @@ -19,17 +18,13 @@ include("utils.jl")
else
@testset verbose = true "Code quality" begin
@testset "Aqua" begin
Aqua.test_all(SparseMatrixColorings; stale_deps = (; ignore = [:Requires]))
Aqua.test_all(SparseMatrixColorings; undocumented_names=true)
end
@testset "JET" begin
JET.test_package(SparseMatrixColorings; target_defined_modules = true)
end
# @testset "JuliaFormatter" begin
# TODO: switch to Runic (temporarily deactivated)
# @test JuliaFormatter.format(
# SparseMatrixColorings; verbose=false, overwrite=false
# )
# end
JET.test_package(
SparseMatrixColorings; target_modules=(SparseMatrixColorings,)
)
end
@testset "Doctests" begin
Documenter.doctest(SparseMatrixColorings)
end
Expand Down
Loading