From 207aefd73279bf39d6e6f0b896baeb8606db63ca Mon Sep 17 00:00:00 2001 From: Claude Code Date: Sun, 4 Jan 2026 07:27:28 -0500 Subject: [PATCH] Switch from JuliaFormatter to Runic.jl for code formatting MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 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 --- .JuliaFormatter.toml | 3 --- .github/workflows/FormatCheck.yml | 14 ++++++++++---- docs/make.jl | 18 ++++++++++++------ docs/pages.jl | 2 +- src/PoissonRandom.jl | 1 + test/qa.jl | 6 ++++-- test/runtests.jl | 10 ++++++---- 7 files changed, 34 insertions(+), 20 deletions(-) delete mode 100644 .JuliaFormatter.toml diff --git a/.JuliaFormatter.toml b/.JuliaFormatter.toml deleted file mode 100644 index 959ad88..0000000 --- a/.JuliaFormatter.toml +++ /dev/null @@ -1,3 +0,0 @@ -style = "sciml" -format_markdown = true -format_docstrings = true \ No newline at end of file diff --git a/.github/workflows/FormatCheck.yml b/.github/workflows/FormatCheck.yml index c240796..6762c6f 100644 --- a/.github/workflows/FormatCheck.yml +++ b/.github/workflows/FormatCheck.yml @@ -1,13 +1,19 @@ -name: "Format Check" +name: format-check on: push: branches: - 'master' + - 'main' + - 'release-' tags: '*' pull_request: jobs: - format-check: - name: "Format Check" - uses: "SciML/.github/.github/workflows/format-check.yml@v1" + runic: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: fredrikekre/runic-action@v1 + with: + version: '1' diff --git a/docs/make.jl b/docs/make.jl index 58569ec..5e0796e 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -5,14 +5,20 @@ cp("./docs/Project.toml", "./docs/src/assets/Project.toml", force = true) include("pages.jl") -makedocs(sitename = "PoissonRandom.jl", +makedocs( + sitename = "PoissonRandom.jl", authors = "Chris Rackauckas", modules = [PoissonRandom], clean = true, doctest = false, linkcheck = true, - format = Documenter.HTML(analytics = "UA-90474609-3", + format = Documenter.HTML( + analytics = "UA-90474609-3", assets = ["assets/favicon.ico"], - canonical = "https://docs.sciml.ai/PoissonRandom/stable/"), - pages = pages) + canonical = "https://docs.sciml.ai/PoissonRandom/stable/" + ), + pages = pages +) -deploydocs(repo = "github.com/SciML/PoissonRandom.jl.git"; - push_preview = true) +deploydocs( + repo = "github.com/SciML/PoissonRandom.jl.git"; + push_preview = true +) diff --git a/docs/pages.jl b/docs/pages.jl index 64b6b06..9a91b48 100644 --- a/docs/pages.jl +++ b/docs/pages.jl @@ -2,5 +2,5 @@ pages = [ "Home" => "index.md", - "pois_rand.md" + "pois_rand.md", ] diff --git a/src/PoissonRandom.jl b/src/PoissonRandom.jl index 94c9418..14b08a4 100644 --- a/src/PoissonRandom.jl +++ b/src/PoissonRandom.jl @@ -80,6 +80,7 @@ function ad_rand(rng::AbstractRNG, λ::Real) return K end end + return end # Procedure F diff --git a/test/qa.jl b/test/qa.jl index ffb845b..b9a963c 100644 --- a/test/qa.jl +++ b/test/qa.jl @@ -5,8 +5,10 @@ using Random Aqua.find_persistent_tasks_deps(PoissonRandom) Aqua.test_ambiguities(PoissonRandom, recursive = false) Aqua.test_deps_compat(PoissonRandom) - Aqua.test_piracies(PoissonRandom, - treat_as_own = []) + Aqua.test_piracies( + PoissonRandom, + treat_as_own = [] + ) Aqua.test_project_extras(PoissonRandom) Aqua.test_stale_deps(PoissonRandom) Aqua.test_unbound_args(PoissonRandom) diff --git a/test/runtests.jl b/test/runtests.jl index 24a1b34..4f16a85 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -6,11 +6,13 @@ include("qa.jl") n_tsamples = 10^5 -function test_samples(rand_func, +function test_samples( + rand_func, distr::Distributions.DiscreteUnivariateDistribution, n::Int; # number of samples to generate q::Float64 = 1.0e-8, # confidence interval, 1 - q as confidence - verbose::Bool = false) # show intermediate info (for debugging) + verbose::Bool = false + ) # show intermediate info (for debugging) # The basic idea # ------------------ @@ -68,7 +70,7 @@ function test_samples(rand_func, # check the counts for i in 1:m - verbose && println("v = $(rmin+i-1) ==> ($(clb[i]), $(cub[i])): $(cnts[i])") + verbose && println("v = $(rmin + i - 1) ==> ($(clb[i]), $(cub[i])): $(cnts[i])") clb[i] <= cnts[i] <= cub[i] || error("The counts are out of the confidence interval.") end @@ -113,7 +115,7 @@ end @test abs(sample_mean - Float64(λ)) < 3 * sqrt(Float64(λ)) end end - + if get(ENV, "GROUP", "all") == "all" || get(ENV, "GROUP", "all") == "nopre" @testset "Allocation Tests" begin include("alloc_tests.jl")