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
3 changes: 0 additions & 3 deletions .JuliaFormatter.toml

This file was deleted.

14 changes: 10 additions & 4 deletions .github/workflows/FormatCheck.yml
Original file line number Diff line number Diff line change
@@ -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'
18 changes: 12 additions & 6 deletions docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
2 changes: 1 addition & 1 deletion docs/pages.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@

pages = [
"Home" => "index.md",
"pois_rand.md"
"pois_rand.md",
]
1 change: 1 addition & 0 deletions src/PoissonRandom.jl
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ function ad_rand(rng::AbstractRNG, λ::Real)
return K
end
end
return
end

# Procedure F
Expand Down
6 changes: 4 additions & 2 deletions test/qa.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
10 changes: 6 additions & 4 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
# ------------------
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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")
Expand Down
Loading