-
Notifications
You must be signed in to change notification settings - Fork 195
Add tests with JET #955
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
Add tests with JET #955
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -23,11 +23,7 @@ end | |
|
|
||
| ## scatter matrix | ||
|
|
||
| _unscaled_covzm(x::DenseMatrix, dims::Colon) = unscaled_covzm(x) | ||
| _unscaled_covzm(x::DenseMatrix, dims::Integer) = unscaled_covzm(x, dims) | ||
|
|
||
| _unscaled_covzm(x::DenseMatrix, wv::AbstractWeights, dims::Colon) = | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same here. |
||
| _symmetrize!(unscaled_covzm(x, _scalevars(x, wv))) | ||
| _unscaled_covzm(x::DenseMatrix, wv::AbstractWeights, dims::Integer) = | ||
| _symmetrize!(unscaled_covzm(x, _scalevars(x, wv, dims), dims)) | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,7 +5,7 @@ | |
| else | ||
| function (io::typeof(stderr))(obj::StatisticalModel) | ||
| Base.depwarn("stderr(obj::StatisticalModel) is deprecated, use stderror(obj) instead", :stderr) | ||
| io === stderr ? stderror(obj) : throw(MethodErrror(io, (obj,))) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. A typo. |
||
| io === stderr ? stderror(obj) : throw(MethodError(io, (obj,))) | ||
| end | ||
| end | ||
|
|
||
|
|
@@ -22,8 +22,6 @@ | |
| @deprecate scattermatm(x::DenseMatrix, mean, wv::AbstractWeights, dims::Int) scattermat(x, wv, mean=mean, dims=dims) | ||
| @deprecate scattermat(x::DenseMatrix, dims::Int) scattermat(x, dims=dims) | ||
| @deprecate scattermat(x::DenseMatrix, wv::AbstractWeights, dims::Int) scattermat(x, wv, dims=dims) | ||
| @deprecate scattermat_zm(x::DenseMatrix, dims::Int) scattermat_zm(x, dims=dims) | ||
| @deprecate scattermat_zm(x::DenseMatrix, wv::AbstractWeights, dims::Int) scattermat_zm(x::DenseMatrix, wv::AbstractWeights, dims=dims) | ||
|
Comment on lines
-25
to
-26
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also these do not exist. |
||
| @deprecate mean!(R::AbstractArray, A::AbstractArray, w::AbstractWeights, dims::Int) mean!(R, A, w, dims=dims) | ||
| @deprecate mean(A::AbstractArray{T}, w::AbstractWeights{W}, dims::Int) where {T<:Number,W<:Real} mean(A, w, dims=dims) | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| using StatsBase, Test | ||
| import JET | ||
|
|
||
| # JET has only experimental support for Julia 1.12 currently | ||
| # It throws an internal `AssertionError` in the tests below | ||
| if VERSION < v"1.12-" | ||
| @testset "JET" begin | ||
| # Check that there are no undefined global references and undefined field accesses | ||
| JET.test_package("StatsBase"; target_defined_modules = true, mode = :typo) | ||
|
|
||
| # Default error analysis for common problem fails since JET errors on interface definitions | ||
| # The (deprecated) `model_response(::StatisticalModel)` calls the interface | ||
| # function `response(::StatisticalModel)` for which no method exists yet | ||
| # Note: This analysis is not enough strict to guarantee that there are no runtime errors! | ||
| # Ref https://github.com/aviatesk/JET.jl/issues/495 | ||
| res = JET.report_package("StatsBase"; target_defined_modules = true, mode = :basic, toplevel_logger = nothing) | ||
| println(res) | ||
| reports = JET.get_reports(res) | ||
| @test_broken isempty(reports) | ||
| @test length(reports) <= 1 | ||
| end | ||
| end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There exists no
unscaled_covzmwith this type signature in Statistics.