Skip to content

Fix SBML import for parameters with piecewise initial assignments#2980

Merged
dweindl merged 1 commit intoAMICI-dev:mainfrom
dweindl:fix_w_in_triggers
Oct 17, 2025
Merged

Fix SBML import for parameters with piecewise initial assignments#2980
dweindl merged 1 commit intoAMICI-dev:mainfrom
dweindl:fix_w_in_triggers

Conversation

@dweindl
Copy link
Member

@dweindl dweindl commented Oct 16, 2025

Parameters that are targets of parameter-dependent initial assignments are currently implemented as w expressions. Those symbols are currently not supported in event triggers. Previously, w symbols were only substituted in a subset of root functions, resulting in compilation failures due to undefined symbols for such models. Now w symbols are substituted in all trigger functions.

Fixes PEtab v2 import for Smith_BMCSystBiol2013.

Also, add NULL to the list of reserved symbols, fixing macro-redefinition compiler warnings when importing Smith_BMCSystBiol2013.

@dweindl dweindl self-assigned this Oct 16, 2025
@codecov
Copy link

codecov bot commented Oct 16, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 75.79%. Comparing base (a666ef9) to head (010d1da).
⚠️ Report is 111 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2980      +/-   ##
==========================================
- Coverage   76.51%   75.79%   -0.72%     
==========================================
  Files         307      307              
  Lines       19992    19991       -1     
  Branches     1500     1500              
==========================================
- Hits        15296    15153     -143     
- Misses       4683     4825     +142     
  Partials       13       13              
Flag Coverage Δ
cpp 71.96% <100.00%> (-0.04%) ⬇️
cpp_python 38.21% <100.00%> (-0.01%) ⬇️
petab 39.26% <66.66%> (-0.02%) ⬇️
python 69.53% <100.00%> (-0.04%) ⬇️
sbmlsuite-jax ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
python/sdist/amici/de_model.py 92.35% <100.00%> (-0.43%) ⬇️
python/sdist/amici/import_utils.py 81.64% <100.00%> (-2.90%) ⬇️

... and 6 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Parameters that are targets of parameter-dependent initial assignments are currently implemented as `w` expressions.
Those symbols are currently not supported in event triggers.
Previously, `w` symbols were only substituted in a subset of root functions, resulting in compilation failures due to undefined symbols for such models.
Now `w` symbols are substituted in all trigger functions.

Fixes PEtab v2 import for `Smith_BMCSystBiol2013`.

Also, add `NULL` to the list of reserved symbols, fixing macro-redefinition compiler warnings when importing `Smith_BMCSystBiol2013`.
@dweindl dweindl marked this pull request as ready for review October 17, 2025 06:16
@dweindl dweindl requested a review from a team as a code owner October 17, 2025 06:16
@dweindl dweindl added this pull request to the merge queue Oct 17, 2025
Merged via the queue into AMICI-dev:main with commit 9f3f704 Oct 17, 2025
23 of 24 checks passed
@dweindl dweindl deleted the fix_w_in_triggers branch October 17, 2025 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants