Skip to content

get_model_for_condition: don't remove rate rules for condition-table overrides - #520

Merged
dweindl merged 1 commit into
PEtab-dev:mainfrom
dweindl:fix-197-rate-rules
Sep 22, 2026
Merged

dweindl merged 1 commit into
PEtab-dev:mainfrom
dweindl:fix-197-rate-rules

Conversation

@dweindl

@dweindl dweindl commented Sep 21, 2026

Copy link
Copy Markdown
Member

🤖

get_model_for_condition removed any SBML rule (including rate rules) for a species/compartment/parameter overridden in the condition table. For rate-rule targets, this turned dynamic species into constants instead of just setting their initial value.

Only assignment rules are removed now; rate rules are left in place.

Fixes #197

@codecov-commenter

codecov-commenter commented Sep 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 76.14%. Comparing base (334b271) to head (a65b405).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #520   +/-   ##
=======================================
  Coverage   76.14%   76.14%           
=======================================
  Files          67       67           
  Lines        7524     7526    +2     
  Branches     1341     1341           
=======================================
+ Hits         5729     5731    +2     
  Misses       1294     1294           
  Partials      501      501           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

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

…overrides

`get_model_for_condition` removed *any* SBML rule (including rate rules)
for a species/compartment/parameter overridden in the condition table.
For rate-rule targets, this turned dynamic species into constants
instead of just setting their initial value.

Only assignment rules are removed now; rate rules are left in place.

Fixes PEtab-dev#197

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@dweindl
dweindl marked this pull request as ready for review September 22, 2026 06:20
@dweindl
dweindl requested a review from a team as a code owner September 22, 2026 06:20
@dweindl
dweindl merged commit 02fd94e into PEtab-dev:main Sep 22, 2026
7 checks passed
@dweindl
dweindl deleted the fix-197-rate-rules branch September 22, 2026 06:42
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.

petab.get_model_for_condition may remove rateRules where it shouldn't

3 participants