Skip to content

Commit

Permalink
test: remove MTK as test dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
AayushSabharwal committed Sep 27, 2024
1 parent dfdd9ad commit 5c029b7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 12 deletions.
4 changes: 1 addition & 3 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ LinearAlgebra = "1.10"
Logging = "1.10"
Makie = "0.20, 0.21"
Markdown = "1.10"
ModelingToolkit = "8.75, 9"
PartialFunctions = "1.1"
PrecompileTools = "1.2"
Preferences = "1.3"
Expand Down Expand Up @@ -100,7 +99,6 @@ ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
DelayDiffEq = "bcd4f6db-9728-5f36-b5f7-82caef46ccdb"
ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210"
ModelingToolkit = "961ee093-0014-501f-94e3-6117800e7a78"
OrdinaryDiffEq = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed"
PartialFunctions = "570af359-4316-4cb7-8c74-252c00c2016b"
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
Expand All @@ -118,4 +116,4 @@ UnicodePlots = "b8865327-cd53-5732-bb35-84acbb429228"
Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f"

[targets]
test = ["Pkg", "Plots", "UnicodePlots", "PyCall", "PythonCall", "SafeTestsets", "Serialization", "Test", "StableRNGs", "StaticArrays", "StochasticDiffEq", "Aqua", "Zygote", "PartialFunctions", "DataFrames", "ModelingToolkit", "OrdinaryDiffEq", "ForwardDiff"]
test = ["Pkg", "Plots", "UnicodePlots", "PyCall", "PythonCall", "SafeTestsets", "Serialization", "Test", "StableRNGs", "StaticArrays", "StochasticDiffEq", "Aqua", "Zygote", "PartialFunctions", "DataFrames", "OrdinaryDiffEq", "ForwardDiff"]
17 changes: 8 additions & 9 deletions test/traits.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using SciMLBase, Test
using ModelingToolkit, OrdinaryDiffEq, DataFrames
using ModelingToolkit: t_nounits as t, D_nounits as D
using OrdinaryDiffEq, DataFrames, SymbolicIndexingInterface

@test SciMLBase.Tables.isrowtable(ODESolution)
@test SciMLBase.Tables.isrowtable(RODESolution)
Expand All @@ -10,13 +9,13 @@ using ModelingToolkit: t_nounits as t, D_nounits as D
@test !SciMLBase.Tables.isrowtable(SciMLBase.QuadratureSolution)
@test !SciMLBase.Tables.isrowtable(SciMLBase.OptimizationSolution)

@variables x(t) = 1
eqs = [D(x) ~ -x]
@named sys = ODESystem(eqs, t)
sys = complete(sys)
prob = ODEProblem(sys)
sol = solve(prob, Tsit5(), tspan = (0.0, 1.0))
function rhs(u, p, t)
return -u
end
sys = SymbolCache([:x], Symbol[], :t)
prob = ODEProblem(ODEFunction(rhs; sys), [1.0], (0.0, 1.0))
sol = solve(prob, Tsit5())
df = DataFrame(sol)
@test size(df) == (length(sol.u), 2)
@test df.timestamp == sol.t
@test df.x == sol[x]
@test df.x == sol[:x]

0 comments on commit 5c029b7

Please sign in to comment.