Skip to content

Commit 1e4ce49

Browse files
committed
Switch from JuliaFormatter to Runic.jl for code formatting
- Update CI workflow to use fredrikekre/runic-action@v1 - Remove .JuliaFormatter.toml configuration - Format all source files with Runic.jl 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent ca5d4b1 commit 1e4ce49

7 files changed

Lines changed: 34 additions & 20 deletions

File tree

.JuliaFormatter.toml

Lines changed: 0 additions & 3 deletions
This file was deleted.

.github/workflows/FormatCheck.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,19 @@
1-
name: "Format Check"
1+
name: format-check
22

33
on:
44
push:
55
branches:
66
- 'master'
7+
- 'main'
8+
- 'release-'
79
tags: '*'
810
pull_request:
911

1012
jobs:
11-
format-check:
12-
name: "Format Check"
13-
uses: "SciML/.github/.github/workflows/format-check.yml@v1"
13+
runic:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
- uses: fredrikekre/runic-action@v1
18+
with:
19+
version: '1'

docs/make.jl

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,20 @@ cp("./docs/Project.toml", "./docs/src/assets/Project.toml", force = true)
55

66
include("pages.jl")
77

8-
makedocs(sitename = "PoissonRandom.jl",
8+
makedocs(
9+
sitename = "PoissonRandom.jl",
910
authors = "Chris Rackauckas",
1011
modules = [PoissonRandom],
1112
clean = true, doctest = false, linkcheck = true,
12-
format = Documenter.HTML(analytics = "UA-90474609-3",
13+
format = Documenter.HTML(
14+
analytics = "UA-90474609-3",
1315
assets = ["assets/favicon.ico"],
14-
canonical = "https://docs.sciml.ai/PoissonRandom/stable/"),
15-
pages = pages)
16+
canonical = "https://docs.sciml.ai/PoissonRandom/stable/"
17+
),
18+
pages = pages
19+
)
1620

17-
deploydocs(repo = "github.com/SciML/PoissonRandom.jl.git";
18-
push_preview = true)
21+
deploydocs(
22+
repo = "github.com/SciML/PoissonRandom.jl.git";
23+
push_preview = true
24+
)

docs/pages.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22

33
pages = [
44
"Home" => "index.md",
5-
"pois_rand.md"
5+
"pois_rand.md",
66
]

src/PoissonRandom.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ function ad_rand(rng::AbstractRNG, λ::Real)
8080
return K
8181
end
8282
end
83+
return
8384
end
8485

8586
# Procedure F

test/qa.jl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,10 @@ using Random
55
Aqua.find_persistent_tasks_deps(PoissonRandom)
66
Aqua.test_ambiguities(PoissonRandom, recursive = false)
77
Aqua.test_deps_compat(PoissonRandom)
8-
Aqua.test_piracies(PoissonRandom,
9-
treat_as_own = [])
8+
Aqua.test_piracies(
9+
PoissonRandom,
10+
treat_as_own = []
11+
)
1012
Aqua.test_project_extras(PoissonRandom)
1113
Aqua.test_stale_deps(PoissonRandom)
1214
Aqua.test_unbound_args(PoissonRandom)

test/runtests.jl

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,13 @@ include("qa.jl")
66

77
n_tsamples = 10^5
88

9-
function test_samples(rand_func,
9+
function test_samples(
10+
rand_func,
1011
distr::Distributions.DiscreteUnivariateDistribution,
1112
n::Int; # number of samples to generate
1213
q::Float64 = 1.0e-8, # confidence interval, 1 - q as confidence
13-
verbose::Bool = false) # show intermediate info (for debugging)
14+
verbose::Bool = false
15+
) # show intermediate info (for debugging)
1416

1517
# The basic idea
1618
# ------------------
@@ -68,7 +70,7 @@ function test_samples(rand_func,
6870

6971
# check the counts
7072
for i in 1:m
71-
verbose && println("v = $(rmin+i-1) ==> ($(clb[i]), $(cub[i])): $(cnts[i])")
73+
verbose && println("v = $(rmin + i - 1) ==> ($(clb[i]), $(cub[i])): $(cnts[i])")
7274
clb[i] <= cnts[i] <= cub[i] ||
7375
error("The counts are out of the confidence interval.")
7476
end
@@ -113,7 +115,7 @@ end
113115
@test abs(sample_mean - Float64(λ)) < 3 * sqrt(Float64(λ))
114116
end
115117
end
116-
118+
117119
if get(ENV, "GROUP", "all") == "all" || get(ENV, "GROUP", "all") == "nopre"
118120
@testset "Allocation Tests" begin
119121
include("alloc_tests.jl")

0 commit comments

Comments
 (0)