Skip to content

Commit 1f8523a

Browse files
committed
Merge remote-tracking branch 'origin/master' into cycles
2 parents 77ab981 + 134041d commit 1f8523a

File tree

90 files changed

+2821
-1982
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

90 files changed

+2821
-1982
lines changed

.github/workflows/CI.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
group:
1515
- Core
1616
version:
17-
- '1.10.2'
17+
- '1'
1818
steps:
1919
- uses: actions/checkout@v4
2020
- uses: julia-actions/setup-julia@v2
@@ -37,7 +37,7 @@ jobs:
3737
with:
3838
file: lcov.info
3939
token: ${{ secrets.CODECOV_TOKEN }}
40-
fail_ci_if_error: true
40+
fail_ci_if_error: false
4141
- uses: coverallsapp/github-action@master
4242
with:
4343
github-token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/Documentation.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
- uses: actions/checkout@v4
1515
- uses: julia-actions/setup-julia@latest
1616
with:
17-
version: '1.10.2'
17+
version: '1'
1818
- name: Install dependencies
1919
run: julia --project=docs/ -e 'ENV["JULIA_PKG_SERVER"] = ""; using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()'
2020
- name: Build and deploy
@@ -28,4 +28,4 @@ jobs:
2828
with:
2929
file: lcov.info
3030
token: ${{ secrets.CODECOV_TOKEN }}
31-
fail_ci_if_error: true
31+
fail_ci_if_error: false

.github/workflows/FormatCheck.yml

Lines changed: 4 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: format-check
1+
name: "Format Check"
22

33
on:
44
push:
@@ -9,34 +9,6 @@ on:
99
pull_request:
1010

1111
jobs:
12-
build:
13-
runs-on: ${{ matrix.os }}
14-
strategy:
15-
matrix:
16-
julia-version: [1]
17-
julia-arch: [x86]
18-
os: [ubuntu-latest]
19-
steps:
20-
- uses: julia-actions/setup-julia@latest
21-
with:
22-
version: ${{ matrix.julia-version }}
23-
24-
- uses: actions/checkout@v4
25-
- name: Install JuliaFormatter and format
26-
# This will use the latest version by default but you can set the version like so:
27-
#
28-
# julia -e 'using Pkg; Pkg.add(PackageSpec(name="JuliaFormatter", version="0.13.0"))'
29-
run: |
30-
julia -e 'using Pkg; Pkg.add(PackageSpec(name="JuliaFormatter", version="1.0.32"))'
31-
julia -e 'using JuliaFormatter; format(".", verbose=true)'
32-
- name: Format check
33-
run: |
34-
julia -e '
35-
out = Cmd(`git diff --name-only`) |> read |> String
36-
if out == ""
37-
exit(0)
38-
else
39-
@error "Some files have not been formatted !!!"
40-
write(stdout, out)
41-
exit(1)
42-
end'
12+
format-check:
13+
name: "Format Check"
14+
uses: "SciML/.github/.github/workflows/format-check.yml@v1"

.github/workflows/Invalidations.yml

Lines changed: 3 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -4,37 +4,10 @@ on:
44
pull_request:
55

66
concurrency:
7-
# Skip intermediate builds: always.
8-
# Cancel intermediate builds: always.
97
group: ${{ github.workflow }}-${{ github.ref }}
108
cancel-in-progress: true
119

1210
jobs:
13-
evaluate:
14-
# Only run on PRs to the default branch.
15-
# In the PR trigger above branches can be specified only explicitly whereas this check should work for master, main, or any other default branch
16-
if: github.base_ref == github.event.repository.default_branch
17-
runs-on: ubuntu-latest
18-
steps:
19-
- uses: julia-actions/setup-julia@v2
20-
with:
21-
version: '1'
22-
- uses: actions/checkout@v4
23-
- uses: julia-actions/julia-buildpkg@v1
24-
- uses: julia-actions/julia-invalidations@v1
25-
id: invs_pr
26-
27-
- uses: actions/checkout@v4
28-
with:
29-
ref: ${{ github.event.repository.default_branch }}
30-
- uses: julia-actions/julia-buildpkg@v1
31-
- uses: julia-actions/julia-invalidations@v1
32-
id: invs_default
33-
34-
- name: Report invalidation counts
35-
run: |
36-
echo "Invalidations on default branch: ${{ steps.invs_default.outputs.total }} (${{ steps.invs_default.outputs.deps }} via deps)" >> $GITHUB_STEP_SUMMARY
37-
echo "This branch: ${{ steps.invs_pr.outputs.total }} (${{ steps.invs_pr.outputs.deps }} via deps)" >> $GITHUB_STEP_SUMMARY
38-
- name: Check if the PR does increase number of invalidations
39-
if: steps.invs_pr.outputs.total > steps.invs_default.outputs.total
40-
run: exit 1
11+
evaluate-invalidations:
12+
name: "Evaluate Invalidations"
13+
uses: "SciML/.github/.github/workflows/invalidations.yml@v1"

Project.toml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
name = "Catalyst"
22
uuid = "479239e8-5488-4da2-87a7-35f2df7eef83"
3-
version = "13.5.1"
3+
version = "14.0.0-DEV"
44

55
[deps]
6+
Combinatorics = "861a8166-3701-5b0c-9a16-15d98fcdc6aa"
67
DataStructures = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8"
78
DiffEqBase = "2b5f629d-d688-5b77-993f-72d75c75574e"
89
DocStringExtensions = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae"
@@ -21,7 +22,6 @@ Requires = "ae029012-a4dd-5104-9daa-d747884805df"
2122
RuntimeGeneratedFunctions = "7e49a35a-f44a-4d26-94aa-eba1b4ca6b47"
2223
Setfield = "efcf1570-3423-57d1-acb7-fd33fddbac46"
2324
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
24-
SymbolicUtils = "d1185830-fcd6-423d-90d6-eec64667417b"
2525
Symbolics = "0c5d862f-8b57-4792-8d23-62f2024744c7"
2626
Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d"
2727

@@ -37,27 +37,28 @@ CatalystStructuralIdentifiabilityExtension = "StructuralIdentifiability"
3737

3838
[compat]
3939
BifurcationKit = "0.3"
40+
Combinatorics = "1.0.2"
4041
DataStructures = "0.18"
4142
DiffEqBase = "6.83.0"
4243
DocStringExtensions = "0.8, 0.9"
44+
DynamicPolynomials = "0.5"
4345
DynamicQuantities = "0.13.2"
4446
Graphs = "1.4"
4547
HomotopyContinuation = "2.9"
4648
JumpProcesses = "9.3.2"
4749
LaTeXStrings = "1.3.0"
4850
Latexify = "0.14, 0.15, 0.16"
4951
MacroTools = "0.5.5"
50-
ModelingToolkit = "9.11.0"
52+
ModelingToolkit = "9.16.0"
5153
Parameters = "0.12"
5254
Reexport = "0.2, 1.0"
5355
Requires = "1.0"
5456
RuntimeGeneratedFunctions = "0.5.12"
5557
Setfield = "1"
56-
StructuralIdentifiability = "0.5.1"
57-
SymbolicUtils = "1.0.3"
58-
Symbolics = "5.27"
58+
StructuralIdentifiability = "0.5.8"
59+
Symbolics = "5.30.1"
5960
Unitful = "1.12.4"
60-
julia = "1.9"
61+
julia = "1.10"
6162

6263
[extras]
6364
BifurcationKit = "0f109fa4-8a5d-4b75-95aa-f515264e7665"
@@ -66,6 +67,7 @@ DomainSets = "5b8099bc-c8ec-5219-889f-1d9e522a28bf"
6667
Graphviz_jll = "3c863552-8265-54e4-a6dc-903eb78fde85"
6768
HomotopyContinuation = "f213a82b-91d6-5c5d-acf7-10f1c761b327"
6869
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
70+
Logging = "56ddb016-857b-54e1-b83d-db4d58db5568"
6971
NonlinearSolve = "8913a72c-1f9b-4ce2-8d82-65094dcecaec"
7072
OrdinaryDiffEq = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed"
7173
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
@@ -82,4 +84,4 @@ Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
8284
Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d"
8385

8486
[targets]
85-
test = ["BifurcationKit", "DiffEqCallbacks", "DomainSets", "Graphviz_jll", "HomotopyContinuation", "NonlinearSolve", "OrdinaryDiffEq", "Plots", "Random", "SafeTestsets", "SciMLBase", "SciMLNLSolve", "StableRNGs", "Statistics", "SteadyStateDiffEq", "StochasticDiffEq", "StructuralIdentifiability", "Test", "Unitful"]
87+
test = ["BifurcationKit", "DiffEqCallbacks", "DomainSets", "Graphviz_jll", "HomotopyContinuation", "Logging", "NonlinearSolve", "OrdinaryDiffEq", "Plots", "Random", "SafeTestsets", "SciMLBase", "SciMLNLSolve", "StableRNGs", "Statistics", "SteadyStateDiffEq", "StochasticDiffEq", "StructuralIdentifiability", "Test", "Unitful"]

docs/Project.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ Symbolics = "0c5d862f-8b57-4792-8d23-62f2024744c7"
3939
BenchmarkTools = "1.5"
4040
BifurcationKit = "0.3.4"
4141
CairoMakie = "0.12"
42-
Catalyst = "13"
42+
Catalyst = "14"
4343
DataFrames = "1.6"
4444
DiffEqParamEstim = "2.2"
4545
Distributions = "0.25"
@@ -51,7 +51,7 @@ IncompleteLU = "0.2"
5151
JumpProcesses = "9.11"
5252
Latexify = "0.16"
5353
LinearSolve = "2.30"
54-
ModelingToolkit = "9.15"
54+
ModelingToolkit = "9.16.0"
5555
NonlinearSolve = "3.12"
5656
Optim = "1.9"
5757
Optimization = "3.25"
@@ -68,5 +68,5 @@ SpecialFunctions = "2.4"
6868
StaticArrays = "1.9"
6969
SteadyStateDiffEq = "2.2"
7070
StochasticDiffEq = "6.65"
71-
StructuralIdentifiability = "0.5.7"
72-
Symbolics = "5.28"
71+
StructuralIdentifiability = "0.5.8"
72+
Symbolics = "5.30.1"

docs/make.jl

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -31,17 +31,17 @@ include("pages.jl")
3131
# pages = pages)
3232

3333
makedocs(sitename = "Catalyst.jl",
34-
authors = "Samuel Isaacson",
35-
format = Documenter.HTML(; analytics = "UA-90474609-3",
36-
prettyurls = (get(ENV, "CI", nothing) == "true"),
37-
assets = ["assets/favicon.ico"],
38-
canonical = "https://docs.sciml.ai/Catalyst/stable/"),
39-
modules = [Catalyst, ModelingToolkit],
40-
doctest = false,
41-
clean = true,
42-
pages = pages,
43-
pagesonly = true,
44-
warnonly = true)
34+
authors = "Samuel Isaacson",
35+
format = Documenter.HTML(; analytics = "UA-90474609-3",
36+
prettyurls = (get(ENV, "CI", nothing) == "true"),
37+
assets = ["assets/favicon.ico"],
38+
canonical = "https://docs.sciml.ai/Catalyst/stable/"),
39+
modules = [Catalyst, ModelingToolkit],
40+
doctest = false,
41+
clean = true,
42+
pages = pages,
43+
pagesonly = true,
44+
warnonly = [:missing_docs])
4545

4646
deploydocs(repo = "github.com/SciML/Catalyst.jl.git";
47-
push_preview = true)
47+
push_preview = true)

docs/pages.jl

Lines changed: 14 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -2,70 +2,50 @@ pages = Any[
22
"Home" => "index.md",
33
"Introduction to Catalyst" => Any[
44
"introduction_to_catalyst/catalyst_for_new_julia_users.md",
5-
# "introduction_to_catalyst/introduction_to_catalyst.md"
6-
# Advanced introduction.
5+
"introduction_to_catalyst/introduction_to_catalyst.md"
76
],
87
"Model Creation and Properties" => Any[
98
"model_creation/dsl_basics.md",
109
"model_creation/dsl_advanced.md",
11-
#"model_creation/programmatic_CRN_construction.md",
12-
#"model_creation/compositional_modeling.md",
13-
#"model_creation/constraint_equations.md",
14-
# Events.
15-
#"model_creation/parametric_stoichiometry.md",# Distributed parameters, rates, and initial conditions.
16-
"model_creation/model_file_loading_and_export.md",# Distributed parameters, rates, and initial conditions.
17-
# Loading and writing models to files.
10+
"model_creation/programmatic_CRN_construction.md",
11+
"model_creation/compositional_modeling.md",
12+
"model_creation/constraint_equations.md",
13+
"model_creation/parametric_stoichiometry.md",
14+
"model_creation/model_file_loading_and_export.md",
1815
"model_creation/model_visualisation.md",
19-
#"model_creation/network_analysis.md",
16+
"model_creation/network_analysis.md",
2017
"model_creation/chemistry_related_functionality.md",
2118
"Model creation examples" => Any[
2219
"model_creation/examples/basic_CRN_library.md",
2320
"model_creation/examples/programmatic_generative_linear_pathway.md",
24-
#"model_creation/examples/hodgkin_huxley_equation.md",
25-
#"model_creation/examples/smoluchowski_coagulation_equation.md"
21+
"model_creation/examples/hodgkin_huxley_equation.md",
22+
"model_creation/examples/smoluchowski_coagulation_equation.md"
2623
]
2724
],
2825
"Model simulation" => Any[
2926
"model_simulation/simulation_introduction.md",
3027
"model_simulation/simulation_plotting.md",
3128
"model_simulation/simulation_structure_interfacing.md",
3229
"model_simulation/ensemble_simulations.md",
33-
# Stochastic simulation statistical analysis.
34-
"model_simulation/ode_simulation_performance.md",
35-
# SDE Performance considerations/advice.
36-
# Jump Performance considerations/advice.
37-
# Finite state projection
30+
"model_simulation/ode_simulation_performance.md"
3831
],
3932
"Steady state analysis" => Any[
4033
"steady_state_functionality/homotopy_continuation.md",
4134
"steady_state_functionality/nonlinear_solve.md",
42-
"steady_state_functionality/steady_state_stability_computation.md",
35+
"steady_state_functionality/steady_state_stability_computation.md",
4336
"steady_state_functionality/bifurcation_diagrams.md",
4437
"steady_state_functionality/dynamical_systems.md"
4538
],
4639
"Inverse Problems" => Any[
47-
# Inverse problems introduction.
4840
"inverse_problems/optimization_ode_param_fitting.md",
4941
# "inverse_problems/petab_ode_param_fitting.md",
50-
# ODE parameter fitting using Turing.
51-
# SDE/Jump fitting.
5242
"inverse_problems/behaviour_optimisation.md",
53-
"inverse_problems/structural_identifiability.md", # Broken on Julia v1.10.3, requires v1.10.2 or 1.10.4.
54-
# Practical identifiability.
43+
"inverse_problems/structural_identifiability.md",
5544
"inverse_problems/global_sensitivity_analysis.md",
5645
"Inverse problem examples" => Any[
5746
"inverse_problems/examples/ode_fitting_oscillation.md"
5847
]
5948
],
60-
"Spatial modelling" => Any[
61-
# Intro.
62-
# Lattice ODEs.
63-
# Lattice Jumps.
64-
],
65-
# "Developer Documentation" => Any[
66-
# # Contributor's guide.
67-
# # Repository structure.
68-
# ],
69-
#"FAQs" => "faqs.md",
70-
#"API" => "api.md"
49+
"FAQs" => "faqs.md",
50+
"API" => "api.md"
7151
]

docs/src/api.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,37 +35,41 @@ corresponding chemical reaction ODE models, chemical Langevin equation SDE
3535
models, and stochastic chemical kinetics jump process models.
3636

3737
```@example ex1
38-
using Catalyst, DifferentialEquations, Plots
38+
using Catalyst, OrdinaryDiffEq, StochasticDiffEq, JumpProcesses, Plots
3939
t = default_t()
4040
@parameters β γ
4141
@species S(t) I(t) R(t)
4242
4343
rxs = [Reaction(β, [S,I], [I], [1,1], [2])
4444
Reaction(γ, [I], [R])]
4545
@named rs = ReactionSystem(rxs, t)
46+
rs = complete(rs)
4647
4748
u₀map = [S => 999.0, I => 1.0, R => 0.0]
4849
parammap = [β => 1/10000, γ => 0.01]
4950
tspan = (0.0, 250.0)
5051
5152
# solve as ODEs
5253
odesys = convert(ODESystem, rs)
54+
odesys = complete(odesys)
5355
oprob = ODEProblem(odesys, u₀map, tspan, parammap)
5456
sol = solve(oprob, Tsit5())
5557
p1 = plot(sol, title = "ODE")
5658
5759
# solve as SDEs
5860
sdesys = convert(SDESystem, rs)
61+
sdesys = complete(sdesys)
5962
sprob = SDEProblem(sdesys, u₀map, tspan, parammap)
60-
sol = solve(sprob, EM(), dt=.01)
63+
sol = solve(sprob, EM(), dt=.01, saveat = 2.0)
6164
p2 = plot(sol, title = "SDE")
6265
6366
# solve as jump process
6467
jumpsys = convert(JumpSystem, rs)
68+
jumpsys = complete(jumpsys)
6569
u₀map = [S => 999, I => 1, R => 0]
6670
dprob = DiscreteProblem(jumpsys, u₀map, tspan, parammap)
67-
jprob = JumpProblem(jumpsys, dprob, Direct())
68-
sol = solve(jprob, SSAStepper())
71+
jprob = JumpProblem(jumpsys, dprob, Direct(); save_positions = (false,false))
72+
sol = solve(jprob, SSAStepper(), saveat = 2.0)
6973
p3 = plot(sol, title = "jump")
7074
7175
plot(p1, p2, p3; layout = (3,1))
@@ -268,6 +272,7 @@ hillar
268272
```@docs
269273
Base.convert
270274
ModelingToolkit.structural_simplify
275+
set_default_noise_scaling
271276
```
272277

273278
## Chemistry-related functionalities

0 commit comments

Comments
 (0)