-
Notifications
You must be signed in to change notification settings - Fork 4
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
Test with Aqua.jl #62
Merged
Changes from 11 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
a30863f
Add Aqua tests
lbenet 6a94878
Fixes related to Aqua
lbenet 039bcb1
Add compat entry for Aqua
lbenet be78452
Mark failed tests by aqua as broken, run all tests
lbenet 6cb8140
Update Project.toml
PerezHz 99ad8dd
Update Project.toml
PerezHz e5d9f35
Resolve method ambiguity and a possible type piracy
PerezHz 965e152
Avoid method ambiguity detection only on julia1.9
PerezHz 584383e
Run Aqua tests (additional) via Aqua.test_all
PerezHz 56c2ee4
Revert "Avoid method ambiguity detection only on julia1.9"
PerezHz 9782bde
Run Aqua.test_ambiguities separately (don't test ambiguities on Base,…
PerezHz bb04691
Remove TaylorNSerialization and update tests
PerezHz a462694
Marking piracies again as broken (due to TaylorInterpolant)
PerezHz baca6bd
Use TaylorInterpolant custom serializations from PE throughout
PerezHz 1143277
Update Project.toml
PerezHz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
using Test | ||
using NEOs | ||
using Aqua | ||
|
||
@testset "Aqua tests (performance)" begin | ||
# This tests that we don't accidentally run into | ||
# https://github.com/JuliaLang/julia/issues/29393 | ||
# Aqua.test_unbound_args(NEOs) | ||
ua = Aqua.detect_unbound_args_recursively(NEOs) | ||
@test length(ua) == 0 | ||
|
||
# See: https://github.com/SciML/OrdinaryDiffEq.jl/issues/1750 | ||
# Test that we're not introducing method ambiguities across deps | ||
ambs = Aqua.detect_ambiguities(NEOs; recursive = true) | ||
pkg_match(pkgname, pkdir::Nothing) = false | ||
pkg_match(pkgname, pkdir::AbstractString) = occursin(pkgname, pkdir) | ||
filter!(x -> pkg_match("NEOs", pkgdir(last(x).module)), ambs) | ||
for method_ambiguity in ambs | ||
@show method_ambiguity | ||
end | ||
if VERSION < v"1.10.0-DEV" | ||
@test length(ambs) == 0 | ||
end | ||
end | ||
|
||
@testset "Aqua tests (additional)" begin | ||
Aqua.test_ambiguities(NEOs) | ||
Aqua.test_all( | ||
NEOs; | ||
ambiguities=false, | ||
piracies=(broken=true,) | ||
) | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Naive question: what is the motivation for this change? (I think
AbstractVector
would allow applying this function to more types, e.g.SubArray{T,1}
orSVector
).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.
This may perhaps not be relevant, but I thought it was easier to ask...
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.
This helps avoid an ambiguity with callable methods from Interpolations.jl which also dispatch on
<:AbstractArray{T,N}
; I agree it's perhaps a bit restrictive, and a more generic solution could be to define aOpticalResidualVector
struct and define the callable methods over that struct. I would suggest to go with this approach for now, and revisit this if needed.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.
Yet another possibility is to avoid using
Vector{T}
for the calling argument type (again, maybe wrapping it somehow in another struct)