Skip to content

Commit ef5f0cc

Browse files
authored
Merge branch 'SciML:master' into detailedbalance
2 parents c8c1364 + bef4566 commit ef5f0cc

File tree

60 files changed

+1607
-568
lines changed

Some content is hidden

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

60 files changed

+1607
-568
lines changed

.github/workflows/CI.yml

Lines changed: 0 additions & 44 deletions
This file was deleted.

.github/workflows/Documentation.yml

Lines changed: 49 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,25 +7,68 @@ on:
77
tags: '*'
88
pull_request:
99

10+
permissions:
11+
actions: write # Allows the workflow to delete old caches created by previous runs, ensuring efficient cache management and preventing the cache from growing indefinitely. https://github.com/julia-actions/cache?tab=readme-ov-file#cache-retention
12+
contents: read
13+
14+
concurrency:
15+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
16+
cancel-in-progress: true
17+
1018
jobs:
1119
build:
1220
runs-on: ubuntu-latest
1321
steps:
14-
- uses: actions/checkout@v4
15-
- uses: julia-actions/setup-julia@latest
22+
- name: Checkout
23+
uses: actions/checkout@v4
24+
25+
# Install binary dependencies needed for GLMakie to run in a headless environment
26+
# xvfb: Creates a virtual frame buffer to simulate a display
27+
# libgl1, mesa-utils, freeglut3-dev, xorg-dev, libxrandr-dev, libxinerama-dev, libxcursor-dev, libxi-dev, libxext-dev: Required libraries for OpenGL rendering
28+
- name: Install binary dependencies
29+
run: sudo apt-get update && sudo apt-get install -y xvfb libgl1 mesa-utils freeglut3-dev xorg-dev libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libxext-dev
30+
31+
- name: Install Julia
32+
uses: julia-actions/setup-julia@latest
1633
with:
1734
version: '1'
35+
36+
# Cache to speed up subsequent runs
37+
- uses: julia-actions/cache@v2
38+
with:
39+
cache-name: docs-cache
40+
41+
# Install Julia package dependencies for the documentation project
1842
- name: Install dependencies
19-
run: julia --project=docs/ -e 'ENV["JULIA_PKG_SERVER"] = ""; using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()'
43+
run: >
44+
DISPLAY=:0 xvfb-run -s '-screen 0 1024x768x24' julia --project=docs/ -e 'ENV["JULIA_PKG_SERVER"] = ""; using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()'
45+
46+
# Build and deploy the documentation using xvfb to simulate a display for GLMakie
47+
# xvfb-run: Runs Julia with a virtual display to support OpenGL rendering
48+
# --server-args: Configures the virtual display resolution and color depth
2049
- name: Build and deploy
2150
env:
22-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # For authentication with GitHub Actions token
51+
GKSwstype: "100" # Specifies the workstation type for GR framework rendering, https://discourse.julialang.org/t/generation-of-documentation-fails-qt-qpa-xcb-could-not-connect-to-display/60988/7
52+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Required for permissions to deploy documentation
2353
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} # For authentication with SSH deploy key
24-
GKSwstype: "100" # https://discourse.julialang.org/t/generation-of-documentation-fails-qt-qpa-xcb-could-not-connect-to-display/60988
25-
run: julia --project=docs/ --code-coverage=user docs/make.jl
54+
run: >
55+
DISPLAY=:0 xvfb-run -s '-screen 0 1024x768x24'
56+
julia --project=docs --color=yes --code-coverage=user docs/make.jl
57+
58+
- name: Upload site as artifact
59+
uses: actions/upload-artifact@v4
60+
with:
61+
name: docs-artifact
62+
path: ./docs/build
63+
retention-days: 3
64+
compression-level: 9
65+
overwrite: true
66+
2667
- uses: julia-actions/julia-processcoverage@v1
68+
2769
- uses: codecov/codecov-action@v4
2870
with:
2971
file: lcov.info
3072
token: ${{ secrets.CODECOV_TOKEN }}
3173
fail_ci_if_error: false
74+

.github/workflows/FormatCheck.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ on:
1111
jobs:
1212
format-check:
1313
name: "Format Check"
14-
uses: "SciML/.github/.github/workflows/format-check.yml@v1"
14+
uses: "SciML/.github/.github/workflows/format-suggestions-on-pr.yml@v1"

.github/workflows/Test.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: "Tests"
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- master
7+
paths-ignore:
8+
- 'docs/**'
9+
push:
10+
branches:
11+
- master
12+
paths-ignore:
13+
- 'docs/**'
14+
15+
concurrency:
16+
# Skip intermediate builds: always, but for the master branch.
17+
# Cancel intermediate builds: always, but for the master branch.
18+
group: ${{ github.workflow }}-${{ github.ref }}
19+
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}
20+
21+
jobs:
22+
tests:
23+
name: "Tests"
24+
strategy:
25+
fail-fast: false
26+
matrix:
27+
version:
28+
- "1"
29+
- "lts"
30+
- "pre"
31+
group:
32+
- Core
33+
- IO
34+
- Spatial
35+
- Extensions
36+
uses: "SciML/.github/.github/workflows/tests.yml@v1"
37+
with:
38+
julia-version: "${{ matrix.version }}"
39+
group: "${{ matrix.group }}"
40+
secrets: "inherit"

HISTORY.md

Lines changed: 106 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,113 @@
11
# Breaking updates and feature summaries across releases
22

33
## Catalyst unreleased (master branch)
4+
- The Catalyst release process is changing; certain core dependencies of
5+
Catalyst will now be capped to ensure Catalyst releases are only installed
6+
with versions of dependencies for which Catalyst CI and doc build tests pass
7+
(at the time the release is made). If you need a dependency version increased,
8+
please open an issue and we can update it and make a new Catalyst release once
9+
testing against the newer dependency version is complete.
10+
- Array symbolics support is more consistent with ModelingToolkit v9. Parameter
11+
arrays are no longer scalarized by Catalyst, while species and variables
12+
arrays still are (as in ModelingToolkit). As such, parameter arrays should now
13+
be specified as arrays in value mappings, i.e.
14+
```julia
15+
@parameters k[1:4]
16+
pmap = [k => rand(4)]
17+
```
18+
While one can still manually scalarize a parameter array, it is recommended
19+
*not* to do this as it has signifcant performance costs with ModelingToolkit
20+
v9. Note, scalarized parameter arrays passed to the two-argument
21+
`ReactionSystem` constructor may become unscalarized.
22+
- Scoped species/variables/parameters are now treated similar to the latest MTK
23+
releases (≥ 9.49).
24+
- The structural identifiability extension is currently disabled due to issues
25+
StructuralIdentifiability has with Julia 1.10.5 and 1.11.
26+
- A tutorial on making interactive plot displays using Makie has been added.
27+
- The BifurcationKit extension has been updated to v.4.
28+
29+
## Catalyst 14.4.1
30+
- Support for user-defined functions on the RHS when providing coupled equations
31+
for CRNs using the @equations macro. For example, the following now works:
32+
```julia
33+
using Catalyst
34+
f(A, t) = 2*A*t
35+
rn = @reaction_network begin
36+
@equations D(A) ~ f(A,t)
37+
end
38+
```
39+
Note that user-defined functions will not work on the LHS of equations.
40+
41+
## Catalyst 14.4
42+
- Symbolics 6 support.
43+
44+
45+
46+
## Catalyst 14.3
47+
- Support for simulating stochastic chemical kinetics models with explicitly
48+
time-dependent propensities (i.e. where the resulting `JumpSystem` contains
49+
`VariableRateJump`s). As such `JumpProblem`s need to be defined over
50+
`ODEProblem`s or `SDEProblem`s instead of `DiscreteProblem`s we have
51+
introduced a new input struct, `JumpInputs`, that handles selecting via
52+
analysis of the generated `JumpSystem`, i.e. one can now say
53+
```julia
54+
using Catalyst, OrdinaryDiffEq, JumpProcesses, Plots
55+
rn = @reaction_network begin
56+
k*(1 + sin(t)), 0 --> A
57+
end
58+
jinput = JumpInputs(rn, [:A => 0], (0.0, 10.0), [:k => .5])
59+
# note that jinput.prob isa ODEProblem
60+
jprob = JumpProblem(jinput)
61+
sol = solve(jprob, Tsit5())
62+
plot(sol, idxs = :A)
463

64+
rn = @reaction_network begin
65+
k, 0 --> A
66+
end
67+
jinput = JumpInputs(rn, [:A => 0], (0.0, 10.0), [:k => .5])
68+
# note that jinput.prob isa DiscreteProblem
69+
jprob = JumpProblem(jinput)
70+
sol = solve(jprob)
71+
plot(sol, idxs = :A)
72+
```
73+
When calling solve for problems with explicit time-dependent propensities,
74+
i.e. where `jinput.prob isa ODEProblem`, note that one must currently
75+
explicitly select an ODE solver to handle time-stepping and integrating the
76+
time-dependent propensities.
77+
- Note that solutions to jump problems with explicit time-dependent
78+
propensities, i.e. a `JumpProblem` over an `ODEProblem`, require manual
79+
selection of the variables to plot. That is, currently `plot(sol)` will error
80+
in this case due to limitations in the SciMLBase plot recipe.
81+
82+
## Catalyst 14.2
83+
- Support for auto-algorithm selection in `JumpProblem`s. For systems with only
84+
propensities that do not have an explicit time-dependence (i.e. that are not
85+
`VariableRateJump`s in JumpProcesses), one can now run model simulations via
86+
```julia
87+
using Catalyst, JumpProcesses
88+
model = @reaction_network begin
89+
kB, S + E --> SE
90+
kD, SE --> S + E
91+
kP, SE --> P + E
92+
end
93+
u0 = [:S => 50, :E => 10, :SE => 0, :P => 0]
94+
tspan = (0., 200.)
95+
ps = [:kB => 0.01, :kD => 0.1, :kP => 0.1]
96+
dprob = DiscreteProblem(model, u0, tspan, ps)
97+
jprob = JumpProblem(model, dprob)
98+
sol = solve(jprob)
99+
```
100+
For small systems this will just use Gillespie's `Direct` method, transitioning to using `RSSA` and `RSSACR` as system size increase. Once can still manually select a given SSA, but no longer needs to specify `SSAStepper` when calling `solve`, i.e.
101+
```julia
102+
# use the SortingDirect method instead
103+
jprob = JumpProblem(model, dprob, SortingDirect())
104+
sol = solve(jprob)
105+
```
106+
- Latexify recipe improvements including display fixes for array symbolics.
107+
- Deficiency one and concentration robustness checks.
5108

6109
## Catalyst 14.1.1
7-
The expansion of `ReactionSystem` models to spatial lattices has been enabled. Here follows a
110+
The expansion of `ReactionSystem` models to spatial lattices has been enabled. Here follows a
8111
simple example where a Brusselator model is expanded to a 20x20 grid of compartments, with diffusion
9112
for species X, and then simulated using ODEs. Finally, an animation of the simulation is created.
10113
```julia
@@ -35,8 +138,8 @@ The addition of spatial modelling in Catalyst contains a large number of new fea
35138
described in the [corresponding documentation](https://docs.sciml.ai/Catalyst/stable/spatial_modelling/lattice_reaction_systems/).
36139

37140
## Catalyst 14.0.1
38-
Bug fix to address that independent variables, like time, should now be `@parameters`
39-
according to MTKv9. Converted internal time variables to consistently use `default_t()`
141+
Bug fix to address that independent variables, like time, should now be `@parameters`
142+
according to MTKv9. Converted internal time variables to consistently use `default_t()`
40143
to hopefully avoid such issues going forward.
41144

42145
## Catalyst 14.0

Project.toml

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "Catalyst"
22
uuid = "479239e8-5488-4da2-87a7-35f2df7eef83"
3-
version = "14.1.1-DEV"
3+
version = "14.4.1"
44

55
[deps]
66
Combinatorics = "861a8166-3701-5b0c-9a16-15d98fcdc6aa"
@@ -23,6 +23,7 @@ RuntimeGeneratedFunctions = "7e49a35a-f44a-4d26-94aa-eba1b4ca6b47"
2323
SciMLBase = "0bca4576-84f4-4d90-8ffe-ffa030f20462"
2424
Setfield = "efcf1570-3423-57d1-acb7-fd33fddbac46"
2525
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
26+
SymbolicUtils = "d1185830-fcd6-423d-90d6-eec64667417b"
2627
Symbolics = "0c5d862f-8b57-4792-8d23-62f2024744c7"
2728
Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d"
2829

@@ -31,14 +32,14 @@ BifurcationKit = "0f109fa4-8a5d-4b75-95aa-f515264e7665"
3132
CairoMakie = "13f3f980-e62b-5c42-98c6-ff1f3baf88f0"
3233
GraphMakie = "1ecd5474-83a3-4783-bb4f-06765db800d2"
3334
HomotopyContinuation = "f213a82b-91d6-5c5d-acf7-10f1c761b327"
34-
StructuralIdentifiability = "220ca800-aa68-49bb-acd8-6037fa93a544"
35+
# StructuralIdentifiability = "220ca800-aa68-49bb-acd8-6037fa93a544"
3536

3637
[extensions]
3738
CatalystBifurcationKitExtension = "BifurcationKit"
3839
CatalystCairoMakieExtension = "CairoMakie"
3940
CatalystGraphMakieExtension = "GraphMakie"
4041
CatalystHomotopyContinuationExtension = "HomotopyContinuation"
41-
CatalystStructuralIdentifiabilityExtension = "StructuralIdentifiability"
42+
# CatalystStructuralIdentifiabilityExtension = "StructuralIdentifiability"
4243

4344
[compat]
4445
BifurcationKit = "0.3"
@@ -47,39 +48,37 @@ Combinatorics = "1.0.2"
4748
DataStructures = "0.18"
4849
DiffEqBase = "6.83.0"
4950
DocStringExtensions = "0.8, 0.9"
50-
DynamicPolynomials = "0.5"
51-
DynamicQuantities = "0.13.2"
51+
DynamicPolynomials = "0.5, 0.6"
52+
DynamicQuantities = "0.13.2, 1"
5253
GraphMakie = "0.5"
5354
Graphs = "1.4"
5455
HomotopyContinuation = "2.9"
55-
JumpProcesses = "9.3.2"
56+
JumpProcesses = "9.13.2"
5657
LaTeXStrings = "1.3.0"
57-
Latexify = "0.14, 0.15, 0.16"
58+
Latexify = "0.16.5"
5859
MacroTools = "0.5.5"
59-
ModelingToolkit = "9.16.0"
60+
ModelingToolkit = "9.32"
6061
Parameters = "0.12"
6162
Reexport = "0.2, 1.0"
6263
Requires = "1.0"
6364
RuntimeGeneratedFunctions = "0.5.12"
64-
SciMLBase = "2.46"
65+
SciMLBase = "< 2.57.2"
6566
Setfield = "1"
66-
StructuralIdentifiability = "0.5.8"
67-
Symbolics = "5.30.1"
67+
# StructuralIdentifiability = "0.5.8"
68+
SymbolicUtils = "2.1.2, 3.3.0"
69+
Symbolics = "5.30.1, 6"
6870
Unitful = "1.12.4"
6971
julia = "1.10"
7072

7173
[extras]
72-
BifurcationKit = "0f109fa4-8a5d-4b75-95aa-f515264e7665"
73-
CairoMakie = "13f3f980-e62b-5c42-98c6-ff1f3baf88f0"
7474
DiffEqCallbacks = "459566f4-90b8-5000-8ac3-15dfb0a30def"
7575
DomainSets = "5b8099bc-c8ec-5219-889f-1d9e522a28bf"
76-
GraphMakie = "1ecd5474-83a3-4783-bb4f-06765db800d2"
7776
Graphviz_jll = "3c863552-8265-54e4-a6dc-903eb78fde85"
78-
HomotopyContinuation = "f213a82b-91d6-5c5d-acf7-10f1c761b327"
7977
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
8078
Logging = "56ddb016-857b-54e1-b83d-db4d58db5568"
8179
NonlinearSolve = "8913a72c-1f9b-4ce2-8d82-65094dcecaec"
8280
OrdinaryDiffEq = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed"
81+
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
8382
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
8483
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
8584
SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f"
@@ -90,9 +89,11 @@ StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
9089
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
9190
SteadyStateDiffEq = "9672c7b4-1e72-59bd-8a11-6ac3964bc41f"
9291
StochasticDiffEq = "789caeaf-c7a9-5a7d-9973-96adeb23e2a0"
93-
StructuralIdentifiability = "220ca800-aa68-49bb-acd8-6037fa93a544"
9492
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
9593
Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d"
9694

9795
[targets]
98-
test = ["BifurcationKit", "CairoMakie", "DiffEqCallbacks", "DomainSets", "Graphviz_jll", "HomotopyContinuation", "Logging", "GraphMakie", "NonlinearSolve", "OrdinaryDiffEq", "Plots", "Random", "SafeTestsets", "SciMLBase", "SciMLNLSolve", "StableRNGs", "StaticArrays", "Statistics", "SteadyStateDiffEq", "StochasticDiffEq", "StructuralIdentifiability", "Test", "Unitful"]
96+
test = ["DiffEqCallbacks", "DomainSets", "Graphviz_jll", "Logging", "NonlinearSolve",
97+
"OrdinaryDiffEq", "Pkg", "Plots", "Random", "SafeTestsets", "SciMLBase", "SciMLNLSolve",
98+
"StableRNGs", "StaticArrays", "Statistics", "SteadyStateDiffEq", "StochasticDiffEq",
99+
"Test", "Unitful"]

0 commit comments

Comments
 (0)