Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix _collect_heaviside_roots for sympy.Heaviside arguments #2549

Merged
merged 3 commits into from
Oct 18, 2024

Conversation

dweindl
Copy link
Member

@dweindl dweindl commented Oct 17, 2024

Since b7a3e91, if dxdt was a sympy.Heaviside, it wasn't correctly processed, because only its arguments were checked. That means, root-finding would not be enabled for this discontinuity.

This would happen if a Rule or KineticLaw is a plain Piecewise function (not embedded inside a more complex expression).

Fixes #2545.

The bug was exposed only after the previous release, this did not affect any former amici releases.

Previously, if dxdt was a sympy.Heaviside, it wasn't correctly processed, because only its arguments were checked.
That means, root-finding would not be enabled for this discontinuity.

This would happen if a Rule or KineticLaw is a plain Piecewise function (not embedded inside a more complex expression).

Fixes AMICI-dev#2545.
@dweindl dweindl requested a review from a team as a code owner October 17, 2024 11:20
Copy link

codecov bot commented Oct 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 77.74%. Comparing base (9f821d9) to head (7d30945).
Report is 1 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #2549      +/-   ##
===========================================
- Coverage    77.79%   77.74%   -0.06%     
===========================================
  Files          325      325              
  Lines        21058    21852     +794     
  Branches      1473     1473              
===========================================
+ Hits         16383    16988     +605     
- Misses        4648     4837     +189     
  Partials        27       27              
Flag Coverage Δ
cpp 73.61% <100.00%> (+0.09%) ⬆️
cpp_python 34.20% <100.00%> (+0.14%) ⬆️
petab 37.06% <100.00%> (+<0.01%) ⬆️
python 72.38% <100.00%> (+0.03%) ⬆️

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.53% <100.00%> (ø)

... and 83 files with indirect coverage changes

@dweindl dweindl merged commit c8778e5 into AMICI-dev:develop Oct 18, 2024
18 of 20 checks passed
@dweindl dweindl deleted the fix_2545_heaviside branch October 18, 2024 05:23
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