Skip to content

Commit c3ab1db

Browse files
authored
CI tweaks (#48)
* suppress some output in tests * YAS
1 parent 6118aff commit c3ab1db

File tree

5 files changed

+16
-10
lines changed

5 files changed

+16
-10
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,6 @@ jobs:
4141
uses: julia-actions/julia-processcoverage@v1
4242
- name: Coverage Upload
4343
uses: codecov/codecov-action@v5
44-
env:
45-
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
44+
with:
45+
token: ${{ secrets.CODECOV_TOKEN }}
4646
slug: JuliaMixedModels/MixedModelsExtras.jl

Project.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ LinearAlgebra = "1"
2121
MixedModels = "4, 5"
2222
MixedModelsDatasets = "0.1"
2323
RDatasets = "0.7.7, 0.8"
24+
Suppressor = "0.2.8"
2425
StableRNGs = "1"
2526
Statistics = "1"
2627
StatsBase = "0.33, 0.34"
@@ -36,7 +37,8 @@ Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"
3637
MixedModelsDatasets = "7e9fb7ac-9f67-43bf-b2c8-96ba0796cbb6"
3738
RDatasets = "ce6b1742-4840-55fa-b093-852dadbb1d8b"
3839
StableRNGs = "860ef19b-820b-49d6-a774-d7a799459cd3"
40+
Suppressor = "fd094767-a336-5f1f-9728-57cf17d0bbfb"
3941
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
4042

4143
[targets]
42-
test = ["Test", "Aqua", "DataFrames", "Distributions", "MixedModelsDatasets", "RDatasets", "StableRNGs"]
44+
test = ["Test", "Aqua", "DataFrames", "Distributions", "MixedModelsDatasets", "RDatasets", "Suppressor", "StableRNGs"]

test/icc.jl

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
model = fit(MixedModel, @formula(reaction ~ 1 + (1 | subj)), dataset(:sleepstudy);
33
progress)
44
@test icc(model, :subj) == icc(model, [:subj]) == icc(model)
5-
@test icc(model, :subj) 0.37918288
5+
@test icc(model, :subj) 0.37918288 rtol = 1e-6
66

77
formula = @formula(rt_trunc ~ 1 + spkr * prec * load +
88
(1 + spkr | subj) +
@@ -25,8 +25,9 @@ end
2525

2626
@testset "Binomial" begin
2727
cbpp = dataset(:cbpp)
28-
model = fit(MixedModel, @formula((incid / hsz) ~ 1 + (1 | herd)),
29-
cbpp, Binomial(); wts=float(cbpp.hsz), progress)
28+
# suppress depwarn on wts vs weights
29+
model = @suppress fit(MixedModel, @formula((incid / hsz) ~ 1 + (1 | herd)),
30+
cbpp, Binomial(); wts=float(cbpp.hsz), progress)
3031
@test icc(model, :herd) == icc(model, [:herd]) == icc(model)
3132
@test icc(model, :herd) 0.1668 atol = 0.0005
3233
end
@@ -36,8 +37,10 @@ end
3637
modelbern = fit(MixedModel, @formula(use ~ 1 + (1 | urban & dist)),
3738
contra, Bernoulli(); fast=true, progress)
3839
# force treating as a Binomial model
39-
modelbin = fit(MixedModel, @formula(use ~ 1 + (1 | urban & dist)),
40-
contra, Binomial(); fast=true, wts=ones(length(contra.dist)), progress)
40+
# suppress depwarn on wts vs weights
41+
modelbin = @suppress fit(MixedModel, @formula(use ~ 1 + (1 | urban & dist)),
42+
contra, Binomial(); fast=true, wts=ones(length(contra.dist)),
43+
progress)
4144
# Bernoullis are a special case of binomial, so make sure they give the same answer
4245
@test icc(modelbern, Symbol("urban & dist")) icc(modelbin, Symbol("urban & dist"))
4346

test/set_up_tests.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ using GLM
55
using LinearAlgebra
66
using MixedModels
77
using MixedModelsExtras
8+
using Suppressor
89
using StableRNGs
910
using Statistics
1011
using StatsBase

test/shrinkage.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
end
1717

1818
@testset "_ranef error path" begin
19-
@test_throws PosDefException _ranef(m1, 1e12 .* m1.optsum.initial)
19+
@suppress @test_throws PosDefException _ranef(m1, 1e12 .* m1.optsum.initial)
2020
end
2121
end
2222

@@ -41,6 +41,6 @@ end
4141
@formula(ticks ~ 1 + year + height + (1 | index) + (1 | brood) +
4242
(1 | location)),
4343
grouseticks, Poisson(); fast=true, progress)
44-
@test_throws ArgumentError _ranef(model, NaN .* model.optsum.initial)
44+
@suppress @test_throws ArgumentError _ranef(model, NaN .* model.optsum.initial)
4545
end
4646
end

0 commit comments

Comments
 (0)