Skip to content

Commit c1b223d

Browse files
authored
Merge pull request #1169 from isaacsas/enable_SI_on_1.11
Try to enable SI on 1.11
2 parents 40953ac + 7d48e6c commit c1b223d

File tree

8 files changed

+23
-17
lines changed

8 files changed

+23
-17
lines changed

Project.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,15 @@ GraphMakie = "1ecd5474-83a3-4783-bb4f-06765db800d2"
3434
HomotopyContinuation = "f213a82b-91d6-5c5d-acf7-10f1c761b327"
3535
Makie = "ee78f7c6-11fb-53f2-987a-cfe4a2b5a57a"
3636
NetworkLayout = "46757867-2c16-5918-afeb-47bfcb05e46a"
37+
StructuralIdentifiability = "220ca800-aa68-49bb-acd8-6037fa93a544"
38+
3739

3840
[extensions]
3941
CatalystBifurcationKitExtension = "BifurcationKit"
4042
CatalystCairoMakieExtension = "CairoMakie"
4143
CatalystGraphMakieExtension = ["GraphMakie", "NetworkLayout", "Makie"]
4244
CatalystHomotopyContinuationExtension = "HomotopyContinuation"
45+
CatalystStructuralIdentifiabilityExtension = "StructuralIdentifiability"
4346

4447
[compat]
4548
BifurcationKit = "0.4.4"
@@ -66,6 +69,7 @@ Requires = "1.0"
6669
RuntimeGeneratedFunctions = "0.5.12"
6770
SciMLBase = "2.57.2"
6871
Setfield = "1"
72+
StructuralIdentifiability = "0.5.11"
6973
SymbolicUtils = "3.8.1"
7074
Symbolics = "6.22"
7175
Unitful = "1.12.4"

docs/Project.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ SpecialFunctions = "276daf66-3868-5448-9aa4-cd146d93841b"
4242
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
4343
SteadyStateDiffEq = "9672c7b4-1e72-59bd-8a11-6ac3964bc41f"
4444
StochasticDiffEq = "789caeaf-c7a9-5a7d-9973-96adeb23e2a0"
45+
StructuralIdentifiability = "220ca800-aa68-49bb-acd8-6037fa93a544"
4546
Symbolics = "0c5d862f-8b57-4792-8d23-62f2024744c7"
4647

4748
[compat]
@@ -87,4 +88,5 @@ SpecialFunctions = "2.4"
8788
StaticArrays = "1.9"
8889
SteadyStateDiffEq = "2.2"
8990
StochasticDiffEq = "6.65"
91+
StructuralIdentifiability = "0.5.11"
9092
Symbolics = "6.22"

docs/pages.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ pages = Any[
4848
"inverse_problems/petab_ode_param_fitting.md",
4949
"inverse_problems/optimization_ode_param_fitting.md",
5050
"inverse_problems/behaviour_optimisation.md",
51-
# "inverse_problems/structural_identifiability.md",
51+
"inverse_problems/structural_identifiability.md",
5252
"inverse_problems/global_sensitivity_analysis.md",
5353
"Examples" => Any[
5454
"inverse_problems/examples/ode_fitting_oscillation.md"
File renamed without changes.

ext/CatalystStructuralIdentifiabilityExtension/structural_identifiability_extension.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,9 @@ function SI.assess_identifiability(rs::ReactionSystem, args...;
113113
funcs_to_check = make_ftc(funcs_to_check, conseqs, vars)
114114

115115
# Computes identifiability and converts it to a easy to read form.
116-
out = SI.assess_identifiability(osys, args...; measured_quantities,
116+
# The `::ODESystem` designation fixes: https://github.com/SciML/StructuralIdentifiability.jl/issues/360,
117+
# however, the exact mechanisms of this is still not fully clear.
118+
out = SI.assess_identifiability(osys::ODESystem, args...; measured_quantities,
117119
funcs_to_check, kwargs...)
118120
return make_output(out, funcs_to_check, consconsts)
119121
end

test/extensions/Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ ModelingToolkit = "961ee093-0014-501f-94e3-6117800e7a78"
1010
OrdinaryDiffEqDefault = "50262376-6c5a-4cf5-baba-aaf4f84d72d7"
1111
OrdinaryDiffEqTsit5 = "b1df2697-797e-41e3-8120-5422d3b24e4a"
1212
SteadyStateDiffEq = "9672c7b4-1e72-59bd-8a11-6ac3964bc41f"
13-
# StructuralIdentifiability = "220ca800-aa68-49bb-acd8-6037fa93a544"
13+
StructuralIdentifiability = "220ca800-aa68-49bb-acd8-6037fa93a544"

test/reactionsystem_core/custom_crn_functions.jl

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -101,20 +101,20 @@ end
101101
# Tests `ReactionSystem`s.
102102
let
103103
@species x(t) y(t)
104-
@parameters k v n
104+
@parameters k v n
105105
rs1 = @reaction_network rs begin
106106
mm(x, v, k), 0 --> x
107107
mmr(x, v, k), 0 --> x
108108
hill(x, v, k, n), 0 --> x
109109
hillr(x, v, k, n), 0 --> x
110-
hillar(x, y, v, k, n), 0 --> x
110+
hillar(x, y, v, k, n), 0 --> x
111111
end
112112
rs2 = @reaction_network rs begin
113113
v * x / (x + k), 0 --> x
114114
v * k / (x + k), 0 --> x
115115
v * (x^n) / (x^n + k^n), 0 --> x
116116
v * (k^n) / (x^n + k^n), 0 --> x
117-
v * (x^n) / (x^n + y^n + k^n), 0 --> x
117+
v * (x^n) / (x^n + y^n + k^n), 0 --> x
118118
end
119119

120120
@test Catalyst.expand_registered_functions(rs1) == rs2
@@ -123,14 +123,14 @@ end
123123
# Tests `Reaction`s.
124124
let
125125
@species x(t) y(t)
126-
@parameters k v n
127-
126+
@parameters k v n
127+
128128
r1 = @reaction mm(x, v, k), 0 --> x
129129
r2 = @reaction mmr(x, v, k), 0 --> x
130130
r3 = @reaction hill(x, v, k, n), 0 --> x
131131
r4 = @reaction hillr(x, v, k, n), 0 --> x
132132
r5 = @reaction hillar(x, y, v, k, n), 0 --> x + y
133-
133+
134134
@test isequal(Catalyst.expand_registered_functions(r1).rate, v * x / (x + k))
135135
@test isequal(Catalyst.expand_registered_functions(r2).rate, v * k / (x + k))
136136
@test isequal(Catalyst.expand_registered_functions(r3).rate, v * (x^n) / (x^n + k^n))
@@ -143,14 +143,14 @@ end
143143
let
144144
@parameters T
145145
@variables X(T) Y(T)
146-
@parameters K V N
147-
146+
@parameters K V N
147+
148148
eq1 = 0 ~ mm(X, V, K)
149149
eq2 = 0 ~ mmr(X, V, K)
150150
eq3 = 0 ~ hill(X, V, K, N)
151151
eq4 = 0 ~ hillr(X, V, K, N)
152152
eq5 = 0 ~ hillar(X, Y, V, K, N)
153-
153+
154154
@test isequal(Catalyst.expand_registered_functions(eq1), 0 ~ V * X / (X + K))
155155
@test isequal(Catalyst.expand_registered_functions(eq2), 0 ~ V * K / (X + K))
156156
@test isequal(Catalyst.expand_registered_functions(eq3), 0 ~ V * (X^N) / (X^N + K^N))
@@ -166,7 +166,7 @@ let
166166
@parameters v K
167167
eqs = [
168168
Reaction(mm(X,v,K), [], [X]),
169-
mm(V,v,K) ~ V + 1
169+
mm(V,v,K) ~ V + 1
170170
]
171171
@named rs = ReactionSystem(eqs, t)
172172

@@ -211,7 +211,7 @@ let
211211
(v * (X^n) / (X^n + K^n) > 1000.0) => [X ~ v * (K^n) / (X^n + K^n) + 2]
212212
]
213213
continuous_events = ModelingToolkit.SymbolicContinuousCallback.(continuous_events)
214-
discrete_events = ModelingToolkit.SymbolicDiscreteCallback.(discrete_events)
214+
discrete_events = ModelingToolkit.SymbolicDiscreteCallback.(discrete_events)
215215
@test isequal(only(Catalyst.get_rxs(rs_expanded)).rate, v0 + v * (X^n) / (X^n + Y^n + K^n))
216216
@test isequal(get_continuous_events(rs_expanded), continuous_events)
217217
@test isequal(get_discrete_events(rs_expanded), discrete_events)

test/runtests.jl

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,7 @@ end
8080
@time @safetestset "Graph visualization" begin include("extensions/graphmakie.jl") end
8181
@time @safetestset "BifurcationKit Extension" begin include("extensions/bifurcation_kit.jl") end
8282
@time @safetestset "HomotopyContinuation Extension" begin include("extensions/homotopy_continuation.jl") end
83-
84-
# BROKEN
85-
# @time @safetestset "Structural Identifiability Extension" begin include("extensions/structural_identifiability.jl") end
83+
@time @safetestset "Structural Identifiability Extension" begin include("extensions/structural_identifiability.jl") end
8684

8785
# Tests stability computation (but requires the HomotopyContinuation extension).
8886
#@time @safetestset "Steady State Stability Computations" begin include("extensions/stability_computation.jl") end

0 commit comments

Comments
 (0)