Skip to content

Commit

Permalink
Merge pull request #96 from CliMA/ne/aqua
Browse files Browse the repository at this point in the history
Add julia compat, aqua tests
  • Loading branch information
nefrathenrici authored Jun 25, 2024
2 parents 93e8088 + ac6c97e commit 1e66417
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 0 deletions.
1 change: 1 addition & 0 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,4 @@ JLD2 = "0.4"
Random = "1"
TOML = "1"
YAML = "0.4"
julia = "1.9"
1 change: 1 addition & 0 deletions test/Project.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[deps]
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
CalibrateEmulateSample = "95e48a1f-0bec-4818-9538-3db4340308e3"
ClimaCalibrate = "4347a170-ebd6-470c-89d3-5c705c0cacc2"
ClimaParams = "5c42b081-d73a-476f-9059-fd94b934656c"
Expand Down
31 changes: 31 additions & 0 deletions test/aqua.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
using Test
using ClimaCalibrate
using Aqua

@testset "Aqua tests (performance)" begin
ua = Aqua.detect_unbound_args_recursively(ClimaCalibrate)
@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(ClimaCalibrate; recursive = true)
pkg_match(pkgname, pkdir::Nothing) = false
pkg_match(pkgname, pkdir::AbstractString) = occursin(pkgname, pkdir)
filter!(x -> pkg_match("ClimaCalibrate", pkgdir(last(x).module)), ambs)

# Uncomment for debugging:
# for method_ambiguity in ambs
# @show method_ambiguity
# end
@test length(ambs) == 0
end

@testset "Aqua tests (additional)" begin
Aqua.test_undefined_exports(ClimaCalibrate)
Aqua.test_stale_deps(ClimaCalibrate)
Aqua.test_deps_compat(ClimaCalibrate)
Aqua.test_project_extras(ClimaCalibrate)
Aqua.test_piracies(ClimaCalibrate)
end

nothing
1 change: 1 addition & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ include("ekp_interface.jl")
include("model_interface.jl")
include("emulate_sample.jl")
include("pure_julia_e2e.jl")
include("aqua.jl")

2 comments on commit 1e66417

@nefrathenrici
Copy link
Member Author

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 updated: JuliaRegistries/General/109776

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.0.1 -m "<description of version>" 1e6641792cb0280c014212a7229733d2fceacdeb
git push origin v0.0.1

Please sign in to comment.