Skip to content
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 Aqua and JET to the tests #1

Merged
merged 4 commits into from
Dec 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
6 changes: 6 additions & 0 deletions test/Project.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[deps]
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
ChaoticDynamicalSystemLibrary = "55704126-756f-498a-a54f-434b72ecbddd"
ComponentArrays = "b0b7db55-cfe3-40fc-9ded-d10e2dbeff66"
JET = "c3a54625-cd67-489e-a8e7-0a5a0ff4e31b"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
14 changes: 14 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,20 @@
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

if VERSION >= v"1.7"
@testset "Code linting (JET.jl)" begin
JET.test_package(ChaoticDynamicalSystemLibrary; target_defined_modules = true)
end
end
end
Loading