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

begin supporting public keyword #776

Merged
merged 8 commits into from
Jul 17, 2024
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
6 changes: 6 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
MixedModels v4.25.2 Release Notes
==============================
- Use `public` keyword so that users don't see unnecessary docstring warnings on 1.11+. [#776]
- Fix accidental export of `dataset` and `datasets` and make them `public` instead. [#776]

MixedModels v4.25.1 Release Notes
==============================
- Use more sophisticated checks on property names in `restoreoptsum` to allow for optsums saved by pre-v4.25 versions to be used with this version and later. [#775]
Expand Down Expand Up @@ -543,3 +548,4 @@ Package dependencies
[#772]: https://github.com/JuliaStats/MixedModels.jl/issues/772
[#773]: https://github.com/JuliaStats/MixedModels.jl/issues/773
[#775]: https://github.com/JuliaStats/MixedModels.jl/issues/775
[#776]: https://github.com/JuliaStats/MixedModels.jl/issues/776
4 changes: 3 additions & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
name = "MixedModels"
uuid = "ff71e718-51f3-5ec2-a782-8ffcbfa3c316"
author = ["Phillip Alday <me@phillipalday.com>", "Douglas Bates <dmbates@gmail.com>", "Jose Bayoan Santiago Calderon <jbs3hp@virginia.edu>"]
version = "4.25.1"
version = "4.25.2"

[deps]
Arrow = "69666777-d1a9-59fb-9406-91d4454c9d45"
BSplineKit = "093aae92-e908-43d7-9660-e50ee39d5a0a"
Compat = "34da2185-b29b-5c13-b0c7-acf172513d20"
DataAPI = "9a962f9c-6df0-11e9-0e5d-c546b8b5ee8a"
Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"
GLM = "38e38edf-8417-5370-95a0-9cbb8c7f171a"
Expand Down Expand Up @@ -33,6 +34,7 @@ TypedTables = "9d95f2ec-7b3d-5a63-8d20-e2491e220bb9"
Aqua = "0.8"
Arrow = "1, 2"
BSplineKit = "0.14, 0.15, 0.16, 0.17"
Compat = "4.10"
DataAPI = "1"
DataFrames = "1"
Distributions = "0.21, 0.22, 0.23, 0.24, 0.25"
Expand Down
9 changes: 5 additions & 4 deletions src/MixedModels.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ using Arrow: Arrow
using Base: Ryu, require_one_based_indexing
using BSplineKit: BSplineKit, BSplineOrder, Natural, Derivative, SplineInterpolation
using BSplineKit: interpolate
using Compat: @compat
using DataAPI: DataAPI, levels, refpool, refarray, refvalue
using Distributions: Distributions, Bernoulli, Binomial, Chisq, Distribution, Gamma
using Distributions: InverseGaussian, Normal, Poisson, ccdf
Expand Down Expand Up @@ -89,8 +90,6 @@ export @formula,
condVar,
condVartables,
confint,
dataset,
datasets,
deviance,
dispersion,
dispersion_parameter,
Expand Down Expand Up @@ -160,6 +159,8 @@ export @formula,
# TODO: move this to the correct spot in list once we've decided on name
export savereplicates, restorereplicates

@compat public rePCA, PCA, dataset, datasets

"""
MixedModel

Expand Down Expand Up @@ -209,8 +210,8 @@ include("profile/profile.jl")
@setup_workload begin
# Putting some things in `setup` can reduce the size of the
# precompile file and potentially make loading faster.
sleepstudy = MixedModels.dataset(:sleepstudy)
contra = MixedModels.dataset(:contra)
sleepstudy = dataset(:sleepstudy)
contra = dataset(:contra)
progress = false
@compile_workload begin
# all calls in this block will be precompiled, regardless of whether
Expand Down
6 changes: 3 additions & 3 deletions test/pls.jl
Original file line number Diff line number Diff line change
Expand Up @@ -628,7 +628,7 @@ end
"""
)
@test_throws(ArgumentError("initial or final parameters in io do not satisfy lowerbd"),
restoreoptsum!(m, seekstart(iob)))
@suppress restoreoptsum!(m, seekstart(iob)))

# make sure new fields are correctly restored
mktemp() do path, io
Expand All @@ -638,15 +638,15 @@ end
saveoptsum(io, m)
m.optsum.xtol_zero_abs = 1.0
m.optsum.ftol_zero_abs = 1.0
restoreoptsum!(m, seekstart(io))
@suppress restoreoptsum!(m, seekstart(io))
@test m.optsum.xtol_zero_abs == 0.5
@test m.optsum.ftol_zero_abs == 0.5
end

end

@testset "profile" begin
pr = profile(last(models(:sleepstudy)))
pr = @suppress profile(last(models(:sleepstudy)))
tbl = pr.tbl
@test length(tbl) >= 122
ci = confint(pr)
Expand Down
4 changes: 2 additions & 2 deletions test/predict.jl
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ end
slp1 = subset(slp, :days => ByRow(>(0)))
# this model probably doesn't make much sense, but it has two
# variables on the left hand side in a FunctionTerm
m = fit(MixedModel, @formula(reaction / days ~ 1 + (1|subj)), slp1)
m = @suppress fit(MixedModel, @formula(reaction / days ~ 1 + (1|subj)), slp1)
# make sure that we're getting the transformation
@test response(m) ≈ slp1.reaction ./ slp1.days
@test_throws ArgumentError predict(m, slp[:, Not(:reaction)])
Expand All @@ -154,7 +154,7 @@ end
@test predict(m, slp1) ≈ fitted(m)


m = fit(MixedModel, @formula(log10(reaction) ~ 1 + days + (1|subj)), slp1)
m = @suppress fit(MixedModel, @formula(log10(reaction) ~ 1 + days + (1|subj)), slp1)
# make sure that we're getting the transformation
@test response(m) ≈ log10.(slp1.reaction)
@test_throws ArgumentError predict(m, slp[:, Not(:reaction)])
Expand Down
Loading