Skip to content

Commit

Permalink
Add Aqua and JET to the tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanaelbosch committed Dec 23, 2023
1 parent d8ba02f commit 600d780
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 1 deletion.
6 changes: 6 additions & 0 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ SciMLBase = "0bca4576-84f4-4d90-8ffe-ffa030f20462"

[compat]
julia = "1.6"
ComponentArrays = "0.15"
JSON = "0.21"
LinearAlgebra = "1"
Markdown = "1"
SciMLBase = "1,2"
Test = "1"

[extras]
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
Expand Down
5 changes: 4 additions & 1 deletion src/chaotic_attractors.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3730,6 +3730,9 @@ class BeerRNN(DynSys):
"""
@doc make_docstring(BeerRNN) BeerRNN
function BeerRNN()
function sig(x)
return 1.0 / (1.0 + exp(-x))
end
function rhs(du, u, p, t)
w, theta, tau = p
du .= (-u + w * sig.(u + theta)) / tau
Expand All @@ -3738,7 +3741,7 @@ function BeerRNN()
p = dict_to_componentarray(ATTRACTOR_DATA["BeerRNN"]["parameters"])
tspan = (0.0, 1.0)
f = ODEFunction(rhs)
prob = ODEProblem(f,u0,tspan,p)
prob = ODEProblem(f, u0, tspan, p,)
return prob
end

Expand Down
4 changes: 4 additions & 0 deletions test/Project.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[deps]
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
ComponentArrays = "b0b7db55-cfe3-40fc-9ded-d10e2dbeff66"
JET = "c3a54625-cd67-489e-a8e7-0a5a0ff4e31b"
12 changes: 12 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
using ChaoticDynamicalSystemLibrary
using Test
using Aqua, JET

@testset "ChaoticDynamicalSystemLibrary.jl" begin
# Write your tests here.

@testset "Code quality (Aqua.jl)" begin
Aqua.test_all(
ChaoticDynamicalSystemLibrary;
ambiguities=(imported=false),
)
end

@testset "Code linting (JET.jl)" begin
JET.test_package(ChaoticDynamicalSystemLibrary; target_defined_modules = true)
end
end

0 comments on commit 600d780

Please sign in to comment.