Skip to content

Commit 03aeee6

Browse files
authored
Merge pull request #107 from SciML/pl/convert_promotelocals_expandfuns
use SBML converter that retains initialAssignment
2 parents 0f74dd5 + f766689 commit 03aeee6

File tree

8 files changed

+12
-9
lines changed

8 files changed

+12
-9
lines changed

Project.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "SBMLToolkit"
22
uuid = "86080e66-c8ac-44c2-a1a0-9adaadfe4a4e"
33
authors = ["paulflang", "anandijain"]
4-
version = "0.1.19"
4+
version = "0.1.20"
55

66
[deps]
77
Catalyst = "479239e8-5488-4da2-87a7-35f2df7eef83"
@@ -12,7 +12,7 @@ SymbolicUtils = "d1185830-fcd6-423d-90d6-eec64667417b"
1212
[compat]
1313
Catalyst = "12"
1414
MathML = "0.1"
15-
SBML = "1.3"
15+
SBML = "1.4"
1616
SymbolicUtils = "0.17, 0.18, 0.19"
1717
julia = "1.6"
1818

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ SBML models can be simulated with the following steps (note that `sol` is in abs
2727
SBMLToolkit.checksupport_file("my_model.xml")
2828
mdl = readSBML("my_model.xml", doc -> begin
2929
set_level_and_version(3, 2)(doc)
30-
convert_simplify_math(doc)
30+
convert_promotelocals_expandfuns(doc)
3131
end)
3232

3333
rs = ReactionSystem(mdl) # If you want to create a reaction system

docs/src/index.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ using SBMLToolkit, ModelingToolkit, OrdinaryDiffEq
2222
SBMLToolkit.checksupport_file("my_model.xml")
2323
mdl = readSBML("my_model.xml", doc -> begin
2424
set_level_and_version(3, 2)(doc)
25-
convert_simplify_math(doc)
25+
convert_promotelocals_expandfuns(doc)
2626
end)
2727
rs = ReactionSystem(mdl) # If you want to create a reaction system
2828
odesys = convert(ODESystem, rs) # Alternatively: ODESystem(mdl)

src/SBMLToolkit.jl

+4-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@ include("rules.jl")
1111
include("events.jl")
1212
include("utils.jl")
1313

14+
@deprecate convert_simplify_math convert_promotelocals_expandfuns
15+
1416
export ReactionSystem, ODESystem
15-
export readSBML, readSBMLFromString, set_level_and_version, convert_simplify_math
17+
export readSBML, readSBMLFromString, set_level_and_version, convert_simplify_math,
18+
convert_promotelocals_expandfuns
1619

1720
end

test/events.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const IV = Catalyst.DEFAULT_IV
99
function readmodel(sbml)
1010
SBMLToolkit.readSBMLFromString(sbml, doc -> begin
1111
set_level_and_version(3, 2)(doc)
12-
convert_simplify_math(doc)
12+
convert_promotelocals_expandfuns(doc)
1313
end)
1414
end
1515

test/rules.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const IV = Catalyst.DEFAULT_IV
1010
function readmodel(sbml)
1111
SBMLToolkit.readSBMLFromString(sbml, doc -> begin
1212
set_level_and_version(3, 2)(doc)
13-
convert_simplify_math(doc)
13+
convert_promotelocals_expandfuns(doc)
1414
end)
1515
end
1616

test/utils.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ using Test
55
function readmodel(sbml)
66
SBMLToolkit.readSBMLFromString(sbml, doc -> begin
77
set_level_and_version(3, 2)(doc)
8-
convert_simplify_math(doc)
8+
convert_promotelocals_expandfuns(doc)
99
end)
1010
end
1111

test/wuschel.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ sbml_url = "https://www.ebi.ac.uk/biomodels/model/download/MODEL1112100000.2?fil
99
sbml = String(take!(Downloads.download(sbml_url, IOBuffer())))
1010
m = readSBMLFromString(sbml, doc -> begin
1111
# set_level_and_version(3, 2)(doc) # fails on wuschel
12-
convert_simplify_math(doc) end)
12+
convert_promotelocals_expandfuns(doc) end)
1313
sys = ODESystem(m)
1414
@test length(equations(sys)) == 1012
1515
@test length(states(sys)) == 1012

0 commit comments

Comments
 (0)