Skip to content

ExperimentsToSbmlConverter: don't compensate assignment-rule species on compartment resize - #651

Open
dweindl wants to merge 2 commits into
PEtab-dev:mainfrom
dweindl:experiments_to_sbml_assignment_rule_species
Open

dweindl wants to merge 2 commits into
PEtab-dev:mainfrom
dweindl:experiments_to_sbml_assignment_rule_species

Conversation

@dweindl

@dweindl dweindl commented Dec 1, 2026

Copy link
Copy Markdown
Member

When a period implemented as an event changes a compartment size, ExperimentsToSbmlConverter adds event assignments to keep the concentrations of the contained species. Species that are assignment rule targets were included, which produced invalid SBML (libSBML error 10306). Their values are determined by the rule, so they need no compensation and are now skipped.

Assignment rule targets are collected once per event, so the check stays linear in model size.

Fixes #646.

🤖 Generated with Claude Code

dweindl and others added 2 commits December 1, 2026 12:08
When a period implemented as an event changes a compartment size,
`ExperimentsToSbmlConverter` adds event assignments to keep the
concentrations of contained species. Species that are assignment rule
targets were included, producing invalid SBML (libSBML error 10306).
Their values are determined by the rule, so they need no compensation.

Assignment rule targets are collected once per event, so the check
stays linear in model size.

Fixes PEtab-dev#646.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dweindl dweindl self-assigned this Dec 1, 2026
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.45%. Comparing base (4aca22f) to head (d583780).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #651   +/-   ##
=======================================
  Coverage   80.44%   80.45%           
=======================================
  Files          75       75           
  Lines        8596     8599    +3     
  Branches     1568     1568           
=======================================
+ Hits         6915     6918    +3     
  Misses       1191     1191           
  Partials      490      490           

☔ 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.

@dweindl
dweindl marked this pull request as ready for review December 1, 2026 13:25
@dweindl
dweindl requested a review from a team as a code owner December 1, 2026 13:25
@dweindl
dweindl requested a review from PaulJonasJost December 1, 2026 13:25
@dweindl dweindl added this to the v0.11.0 milestone Dec 2, 2026

This branch has not been deployed

No deployments
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.

ExperimentsToSbmlConverter: compartment size change creates event assignments for assignment-rule species (invalid SBML)

2 participants