Skip to content

Commit 7e76975

Browse files
committed
add blue style formatter
1 parent 15fef11 commit 7e76975

File tree

6 files changed

+15
-24
lines changed

6 files changed

+15
-24
lines changed

.JuliaFormatter.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
style = "blue"

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
.vscode
12
/docs/src/index.md
23

34
# Files generated by invoking Julia with --code-coverage

docs/make.jl

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,14 @@
11
using Documenter
22
using InferOptBenchmarks
33

4-
cp(
5-
joinpath(@__DIR__, "..", "README.md"),
6-
joinpath(@__DIR__, "src", "index.md");
7-
force = true,
8-
)
4+
cp(joinpath(@__DIR__, "..", "README.md"), joinpath(@__DIR__, "src", "index.md"); force=true)
95

106
makedocs(;
11-
modules = [InferOptBenchmarks, InferOptBenchmarks.Warcraft],
12-
authors = "Members of JuliaDecisionFocusedLearning",
13-
sitename = "InferOptBenchmarks.jl",
14-
format = Documenter.HTML(),
15-
pages = [
7+
modules=[InferOptBenchmarks, InferOptBenchmarks.Warcraft],
8+
authors="Members of JuliaDecisionFocusedLearning",
9+
sitename="InferOptBenchmarks.jl",
10+
format=Documenter.HTML(),
11+
pages=[
1612
"Home" => "index.md", #
1713
"API reference" => [
1814
"warcraft.md", #
@@ -21,6 +17,5 @@ makedocs(;
2117
)
2218

2319
deploydocs(;
24-
repo = "github.com/JuliaDecisionFocusedLearning/InferOptBenchmarks.jl",
25-
devbranch = "main",
20+
repo="github.com/JuliaDecisionFocusedLearning/InferOptBenchmarks.jl", devbranch="main"
2621
)

src/Warcraft/grid_graph.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ This represents the Warcraft shortest paths problem of
1010
- If `acyclic = false`, a cell has edges to each one of its 8 neighbors.
1111
- If `acyclic = true`, a cell has edges to its south, east and southeast neighbors only (ensures an acyclic graph where topological sort will work)
1212
"""
13-
function warcraft_grid_graph(costs::AbstractMatrix{R}; acyclic::Bool = false) where {R}
13+
function warcraft_grid_graph(costs::AbstractMatrix{R}; acyclic::Bool=false) where {R}
1414
h, w = size(costs)
1515
V = h * w
1616
E = count_edges(h, w; acyclic)
@@ -23,7 +23,7 @@ function warcraft_grid_graph(costs::AbstractMatrix{R}; acyclic::Bool = false) wh
2323
sizehint!(destinations, E)
2424
sizehint!(weights, E)
2525

26-
for v1 = 1:V
26+
for v1 in 1:V
2727
i1, j1 = index_to_coord(v1, h, w)
2828
for Δi in (-1, 0, 1), Δj in (-1, 0, 1)
2929
i2, j2 = i1 + Δi, j1 + Δj

test/WarcraftTest/grid_graph.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ costs = rand(h, w)
99

1010
for acyclic in (true, false)
1111
@testset "Acyclic: $acyclic" begin
12-
g = warcraft_grid_graph(costs; acyclic = acyclic)
12+
g = warcraft_grid_graph(costs; acyclic=acyclic)
1313
@test nv(g) == h * w
1414
@test ne(g) == count_edges(h, w; acyclic)
1515
@test all(edges(g)) do e

test/runtests.jl

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,14 @@ using Zygote
1010
@testset verbose = true "Formalities" begin
1111
@testset "Aqua" begin
1212
Aqua.test_all(
13-
InferOptBenchmarks;
14-
ambiguities = false,
15-
deps_compat = (check_extras = false),
13+
InferOptBenchmarks; ambiguities=false, deps_compat=(check_extras = false)
1614
)
1715
end
1816
@testset "JET" begin
19-
JET.test_package(InferOptBenchmarks; target_defined_modules = true)
17+
JET.test_package(InferOptBenchmarks; target_defined_modules=true)
2018
end
2119
@testset "JuliaFormatter" begin
22-
@test JuliaFormatter.format(
23-
InferOptBenchmarks;
24-
verbose = false,
25-
overwrite = false,
26-
)
20+
@test JuliaFormatter.format(InferOptBenchmarks; verbose=false, overwrite=false)
2721
end
2822
@testset "Documenter" begin
2923
Documenter.doctest(InferOptBenchmarks)

0 commit comments

Comments
 (0)