diff --git a/NEWS.md b/NEWS.md index 4d3020922..f0c4aefd7 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,8 @@ +MixedModels v4.22.4 Release Notes +============================== +* Switch to explicit imports from all included packages (i.e. replace `using Foo` by `using Foo: Foo, bar, baz`) [#748] +* Reset parameter values before a `deepcopy` in a test (doesn't change test result) [#744] + MixedModels v4.22.3 Release Notes ============================== * Comment out calls to `@debug` [#733] @@ -490,3 +495,5 @@ Package dependencies [#715]: https://github.com/JuliaStats/MixedModels.jl/issues/715 [#717]: https://github.com/JuliaStats/MixedModels.jl/issues/717 [#733]: https://github.com/JuliaStats/MixedModels.jl/issues/733 +[#744]: https://github.com/JuliaStats/MixedModels.jl/issues/744 +[#748]: https://github.com/JuliaStats/MixedModels.jl/issues/748 diff --git a/Project.toml b/Project.toml index db8aa1d3a..2a6d9d685 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "MixedModels" uuid = "ff71e718-51f3-5ec2-a782-8ffcbfa3c316" author = ["Phillip Alday ", "Douglas Bates ", "Jose Bayoan Santiago Calderon "] -version = "4.22.3" +version = "4.22.4" [deps] Arrow = "69666777-d1a9-59fb-9406-91d4454c9d45" @@ -36,6 +36,7 @@ BSplineKit = "0.14, 0.15, 0.16, 0.17" DataAPI = "1" DataFrames = "1" Distributions = "0.21, 0.22, 0.23, 0.24, 0.25" +ExplicitImports = "1.3" GLM = "1.8.2" InteractiveUtils = "1" JSON3 = "1" @@ -65,10 +66,11 @@ julia = "1.8" [extras] Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595" DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0" +ExplicitImports = "7d51a73a-1435-4ff3-83d9-f097790105c7" InteractiveUtils = "b77e0a4c-d291-57a0-90e8-8db25a27a240" StableRNGs = "860ef19b-820b-49d6-a774-d7a799459cd3" Suppressor = "fd094767-a336-5f1f-9728-57cf17d0bbfb" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [targets] -test = ["Aqua", "DataFrames", "InteractiveUtils", "StableRNGs", "Suppressor", "Test"] +test = ["Aqua", "DataFrames", "ExplicitImports", "InteractiveUtils", "StableRNGs", "Suppressor", "Test"] diff --git a/src/MixedModels.jl b/src/MixedModels.jl index 9052d5b1f..b3c43c4d4 100644 --- a/src/MixedModels.jl +++ b/src/MixedModels.jl @@ -1,35 +1,47 @@ module MixedModels -using Arrow -using BSplineKit -using DataAPI -using Distributions -using GLM -using JSON3 -using LinearAlgebra -using Markdown -using NLopt -using Random -using PooledArrays -using ProgressMeter -using SparseArrays -using StaticArrays -using Statistics -using StatsAPI -using StatsBase -using StatsModels -using StructTypes -using Tables -using TypedTables - -using LinearAlgebra: BlasFloat, BlasReal, HermOrSym, PosDefException, copytri! +using Arrow: Arrow using Base: Ryu, require_one_based_indexing -using DataAPI: levels, refpool, refarray, refvalue -using GLM: Link, canonicallink, linkfun, linkinv, dispersion, dispersion_parameter +using BSplineKit: BSplineKit, BSplineOrder, Natural, Derivative, SplineInterpolation +using BSplineKit: interpolate +using DataAPI: DataAPI, levels, refpool, refarray, refvalue +using Distributions: Distributions, Bernoulli, Binomial, Chisq, Distribution, Gamma +using Distributions: InverseGaussian, Normal, Poisson, ccdf, estimate +using GLM: GLM, GeneralizedLinearModel, IdentityLink, InverseLink, LinearModel +using GLM: Link, LogLink, LogitLink, ProbitLink, SqrtLink +using GLM: canonicallink, glm, linkinv, dispersion, dispersion_parameter +using JSON3: JSON3 +using LinearAlgebra: LinearAlgebra, Adjoint, BLAS, BlasFloat, ColumnNorm +using LinearAlgebra: Diagonal, Hermitian, HermOrSym, I, LAPACK, LowerTriangular +using LinearAlgebra: PosDefException, SVD, SymTridiagonal, Symmetric +using LinearAlgebra: UpperTriangular, cond, diag, diagind, dot, eigen, isdiag +using LinearAlgebra: ldiv!, lmul!, logdet, mul!, norm, normalize, normalize!, qr +using LinearAlgebra: rank, rdiv!, rmul!, svd, tr, tril! +using Markdown: Markdown using MixedModelsDatasets: dataset, datasets -using NLopt: Opt -using StatsModels: TableRegressionModel +using NLopt: NLopt, Opt, ftol_abs, ftol_rel, initial_step, maxtime, xtol_abs, xtol_rel +using PooledArrays: PooledArrays, PooledArray +using PrecompileTools: PrecompileTools, @setup_workload, @compile_workload +using ProgressMeter: ProgressMeter, Progress, ProgressUnknown, finish!, next! +using Random: Random, AbstractRNG, randn! +using SparseArrays: SparseArrays, SparseMatrixCSC, SparseVector, dropzeros!, nnz +using SparseArrays: nonzeros, nzrange, rowvals, sparse +using StaticArrays: StaticArrays, SVector +using Statistics: Statistics, mean, quantile, std +using StatsAPI: StatsAPI, aic, aicc, bic, coef, coefnames, coeftable, confint, deviance +using StatsAPI: dof, dof_residual, fit, fit!, fitted, isfitted, islinear, leverage +using StatsAPI: loglikelihood, meanresponse, modelmatrix, nobs, predict, r2, residuals +using StatsAPI: response, responsename, stderror, vcov, weights +using StatsBase: StatsBase, CoefTable, model_response, summarystats using StatsFuns: log2π, normccdf +using StatsModels: StatsModels, AbstractContrasts, AbstractTerm, CategoricalTerm +using StatsModels: ConstantTerm, DummyCoding, EffectsCoding, FormulaTerm, FunctionTerm +using StatsModels: HelmertCoding, HypothesisCoding, InteractionTerm, InterceptTerm +using StatsModels: MatrixTerm, SeqDiffCoding, TableRegressionModel, Term +using StatsModels: apply_schema, drop_term, formula, modelcols, term, @formula +using StructTypes: StructTypes +using Tables: Tables, columntable, rows +using TypedTables: TypedTables, DictTable, FlexTable, Table export @formula, AbstractReMat, @@ -77,6 +89,8 @@ export @formula, condVar, condVartables, confint, + dataset, + datasets, deviance, dispersion, dispersion_parameter, @@ -190,8 +204,6 @@ include("mimeshow.jl") include("serialization.jl") include("profile/profile.jl") -using PrecompileTools - @setup_workload begin # Putting some things in `setup` can reduce the size of the # precompile file and potentially make loading faster. diff --git a/test/runtests.jl b/test/runtests.jl index 797989bb7..71c82ce1e 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -1,4 +1,5 @@ using Aqua +using ExplicitImports using GLM using MixedModels using Test @@ -18,6 +19,11 @@ import LinearAlgebra: BLAS piracies=(;treat_as_own=[GLM.wrkresp!, Base.:|])) end +@testset "ExplicitImports" begin + @test check_no_implicit_imports(MixedModels) === nothing + @test check_no_stale_explicit_imports(MixedModels) === nothing +end + include("utilities.jl") include("misc.jl") include("pivot.jl")