Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set minimum Julia version to 1.6 #514

Merged
merged 2 commits into from
Feb 10, 2023
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
2 changes: 1 addition & 1 deletion .github/workflows/CI-stable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
strategy:
fail-fast: false
matrix:
version: ['1.0', '1']
version: ['1.6', '1']
os: ['ubuntu-latest', 'macos-latest', 'windows-latest']
arch: ['x64']
steps:
Expand Down
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ StatsBase = "0.33.5"
StatsFuns = "0.6, 0.7, 0.8, 0.9, 1.0"
StatsModels = "0.6.23"
Tables = "1"
julia = "1"
julia = "1.6"

[extras]
CSV = "336ed68f-0bac-5ca0-87d4-7b16caf5d00b"
Expand Down
29 changes: 14 additions & 15 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -190,21 +190,20 @@ end

# Saturated and rank-deficient model
df = DataFrame(x1=["a", "b", "c"], x2=["a", "b", "c"], y=[1, 2, 3])
model = lm(@formula(y ~ x1 + x2), df)
ct = coeftable(model)
@test dof_residual(model) == 0
@test dof(model) == 4
@test isinf(GLM.dispersion(model))
@test coef(model) ≈ [1, 1, 2, 0, 0]
@test isequal(hcat(ct.cols[2:end]...),
[Inf 0.0 1.0 -Inf Inf
Inf 0.0 1.0 -Inf Inf
Inf 0.0 1.0 -Inf Inf
NaN NaN NaN NaN NaN
NaN NaN NaN NaN NaN])

# TODO: add tests similar to the one above once this model can be fitted
@test_broken glm(@formula(y ~ x1 + x2), df, Normal(), IdentityLink())
for model in (lm(@formula(y ~ x1 + x2), df),
glm(@formula(y ~ x1 + x2), df, Normal(), IdentityLink()))
ct = coeftable(model)
@test dof_residual(model) == 0
@test dof(model) == 4
@test isinf(GLM.dispersion(model))
@test coef(model) ≈ [1, 1, 2, 0, 0]
@test isequal(hcat(ct.cols[2:end]...),
[Inf 0.0 1.0 -Inf Inf
Inf 0.0 1.0 -Inf Inf
Inf 0.0 1.0 -Inf Inf
NaN NaN NaN NaN NaN
NaN NaN NaN NaN NaN])
end
end

@testset "Linear model with no intercept" begin
Expand Down