Skip to content

Commit

Permalink
Tests with Aqua.jl (#186)
Browse files Browse the repository at this point in the history
* Add Aqua tests, and fix Project.toml

* Fix Project.toml (Logging being a stale dependency)

* Update test/aqua.jl

Co-authored-by: Jorge Pérez <PerezHz@users.noreply.github.com>

* Bump patch version

---------

Co-authored-by: Jorge Pérez <PerezHz@users.noreply.github.com>
  • Loading branch information
lbenet and PerezHz committed Mar 28, 2024
1 parent d67c780 commit 3c68793
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 10 deletions.
25 changes: 16 additions & 9 deletions Project.toml
@@ -1,19 +1,14 @@
name = "TaylorIntegration"
uuid = "92b13dbe-c966-51a2-8445-caca9f8a7d42"
repo = "https://github.com/PerezHz/TaylorIntegration.jl.git"
version = "0.15.0"
version = "0.15.1"

[deps]
BenchmarkTools = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf"
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"
DiffEqBase = "2b5f629d-d688-5b77-993f-72d75c75574e"
Elliptic = "b305315f-e792-5b7a-8f41-49f472929428"
Espresso = "6912e4f1-e036-58b0-9138-08d1e6358ea9"
InteractiveUtils = "b77e0a4c-d291-57a0-90e8-8db25a27a240"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Logging = "56ddb016-857b-54e1-b83d-db4d58db5568"
Markdown = "d6f4376e-aef5-505a-96c1-9c027394607a"
PkgBenchmark = "32113eaa-f34f-5b0d-bd6c-c81e245fc73d"
RecursiveArrayTools = "731186ca-8d62-57ce-b412-fbd966d074cd"
Reexport = "189a3867-3050-52da-a836-e630ba90ab69"
Requires = "ae029012-a4dd-5104-9daa-d747884805df"
Expand All @@ -27,31 +22,43 @@ OrdinaryDiffEq = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed"
TaylorIntegrationDiffEq = "OrdinaryDiffEq"

[compat]
Aqua = "0.8"
BenchmarkTools = "1.3"
DiffEqBase = "6"
Elliptic = "0.5, 1.0"
Espresso = "0.6.1"
InteractiveUtils = "<0.0.1, 1"
LinearAlgebra = "<0.0.1, 1"
Logging = "<0.0.1, 1"
Markdown = "<0.0.1, 1"
OrdinaryDiffEq = "6"
Pkg = "<0.0.1, 1"
PkgBenchmark = "0.2"
RecursiveArrayTools = "2, 3"
Reexport = "0.2, 1"
Requires = "0.5.2, 1"
Reexport = "1"
Requires = "1"
StaticArrays = "0.12.5, 1"
TaylorSeries = "0.17"
Test = "<0.0.1, 1"
julia = "1.6"

[extras]
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
BenchmarkTools = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf"
DiffEqBase = "2b5f629d-d688-5b77-993f-72d75c75574e"
Elliptic = "b305315f-e792-5b7a-8f41-49f472929428"
InteractiveUtils = "b77e0a4c-d291-57a0-90e8-8db25a27a240"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Logging = "56ddb016-857b-54e1-b83d-db4d58db5568"
OrdinaryDiffEq = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed"
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
PkgBenchmark = "32113eaa-f34f-5b0d-bd6c-c81e245fc73d"
RecursiveArrayTools = "731186ca-8d62-57ce-b412-fbd966d074cd"
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
TaylorSeries = "6aa5eb33-94cf-58f4-a9d0-e4b2c4fc25ea"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[targets]
test = ["DiffEqBase", "Elliptic", "InteractiveUtils", "LinearAlgebra", "Logging", "OrdinaryDiffEq", "Pkg", "RecursiveArrayTools", "StaticArrays", "TaylorSeries", "Test"]
test = ["Aqua", "DiffEqBase", "Elliptic", "InteractiveUtils",
"LinearAlgebra", "Logging", "OrdinaryDiffEq", "Pkg",
"RecursiveArrayTools", "StaticArrays", "TaylorSeries", "Test"]
32 changes: 32 additions & 0 deletions test/aqua.jl
@@ -0,0 +1,32 @@
using Test
using TaylorIntegration
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(TaylorIntegration)
ua = Aqua.detect_unbound_args_recursively(TaylorIntegration)
@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(TaylorIntegration; recursive = true)
pkg_match(pkgname, pkdir::Nothing) = false
pkg_match(pkgname, pkdir::AbstractString) = occursin(pkgname, pkdir)
filter!(x -> pkg_match("TaylorIntegration", 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_all(
TaylorIntegration;
stale_deps=(ignore=[:DiffEqBase, :RecursiveArrayTools, :Requires, :StaticArrays],),
)
end

3 changes: 2 additions & 1 deletion test/runtests.jl
Expand Up @@ -9,7 +9,8 @@ testfiles = (
"bigfloats.jl",
"common.jl",
"rootfinding.jl",
"taylorize.jl"
"taylorize.jl",
"aqua.jl",
)

for file in testfiles
Expand Down

2 comments on commit 3c68793

@lbenet
Copy link
Collaborator Author

@lbenet lbenet commented on 3c68793 Mar 28, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/103760

Tip: Release Notes

Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.

@JuliaRegistrator register

Release notes:

## Breaking changes

- blah

To add them here just re-invoke and the PR will be updated.

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.15.1 -m "<description of version>" 3c687932e08025b646d6e5f0cbdf31aea466f2ff
git push origin v0.15.1

Please sign in to comment.