Skip to content

Commit

Permalink
Merge branch 'master' into doc_figure_update
Browse files Browse the repository at this point in the history
  • Loading branch information
TorkelE committed Jun 15, 2024
2 parents d5f303a + cc2a777 commit 1f969c5
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "Catalyst"
uuid = "479239e8-5488-4da2-87a7-35f2df7eef83"
version = "13.5.1"
version = "14.0.0-DEV"

[deps]
Combinatorics = "861a8166-3701-5b0c-9a16-15d98fcdc6aa"
Expand Down
2 changes: 1 addition & 1 deletion src/reactionsystem_conversions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -798,7 +798,7 @@ function _symbol_to_var(sys, sym)
if hasproperty(sys, sym)
var = getproperty(sys, sym, namespace = false)
else
strs = split(String(sym), "") # need to check if this should be split of not!!!
strs = split(String(sym), ModelingToolkit.NAMESPACE_SEPARATOR) # need to check if this should be split of not!!!
if length(strs) > 1
var = getproperty(sys, Symbol(strs[1]), namespace = false)
for str in view(strs, 2:length(strs))
Expand Down
4 changes: 2 additions & 2 deletions test/dsl/dsl_options.jl
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ let
@test plot(sol; idxs=:X).series_list[1].plotattributes[:y][end] 10.0
@test plot(sol; idxs=[X, Y]).series_list[2].plotattributes[:y][end] 3.0
@test plot(sol; idxs=[rn.X, rn.Y]).series_list[2].plotattributes[:y][end] 3.0
@test_broken plot(sol; idxs=[:X, :Y]).series_list[2].plotattributes[:y][end] 3.0 # (https://github.com/SciML/ModelingToolkit.jl/issues/2778)
@test plot(sol; idxs=[:X, :Y]).series_list[2].plotattributes[:y][end] 3.0 # (https://github.com/SciML/ModelingToolkit.jl/issues/2778)
end

# Compares programmatic and DSL system with observables.
Expand Down Expand Up @@ -950,4 +950,4 @@ let
rl = oderatelaw(reactions(rn3)[1]; combinatoric_ratelaw)
@unpack k1, A = rn3
@test isequal(rl, k1*A^2)
end
end
6 changes: 4 additions & 2 deletions test/upstream/mtk_structure_indexing.jl
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ end

# Tests problem indexing and updating.
let
for prob in [deepcopy(problems); deepcopy(eproblems)]
@test_broken false # Currently does not work for nonlinearproblems and their ensemble problems (https://github.com/SciML/SciMLBase.jl/issues/720).
for prob in [deepcopy([oprob, sprob, dprob, jprob, ssprob]); deepcopy([eoprob, esprob, edprob, ejprob, essprob])]
# Get u values (including observables).
@test prob[X] == prob[model.X] == prob[:X] == 4
@test prob[XY] == prob[model.XY] == prob[:XY] == 9
Expand Down Expand Up @@ -253,7 +254,8 @@ let

# Handles nonlinear and steady state solutions differently.
let
for sol in deepcopy([nsol, sssol])
@test_broken false # Currently a problem for nonlinear solutions and steady state solutions (https://github.com/SciML/SciMLBase.jl/issues/720).
for sol in deepcopy([])
# Get u values.
@test sol[X] == sol[model.X] == sol[:X]
@test sol[XY] == sol[model.XY][1] == sol[:XY]
Expand Down

0 comments on commit 1f969c5

Please sign in to comment.