Give PySB import the same reserved-name rename-and-restore as SBML - #3243
Merged
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3243 +/- ##
==========================================
- Coverage 78.32% 77.94% -0.38%
==========================================
Files 318 318
Lines 22183 22193 +10
Branches 1490 1490
==========================================
- Hits 17374 17298 -76
- Misses 4801 4887 +86
Partials 8 8
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
dweindl
force-pushed
the
fix-pysb-reserved-names
branch
from
September 5, 2026 11:44
4cd7f5d to
460dd97
Compare
Model quantities literally named one of AMICI's reserved array-parameter names (t, x, p, k, h, w, y) used to hit a hard ValueError on PySB/BNGL import, since only SbmlImporter renamed and restored these before embedding them. Apply the same rename at PySB's own symbol-minting sites (parameters, expressions/observables, and the stoichiometric matrix's derivative computation), sharing the disambiguation logic with SBML via a new helper. Drops the test_pysb_event "kk" workaround and the empty_compartments_block/ motor BNGL expected-failure special case, and adds regression coverage. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
dweindl
force-pushed
the
fix-pysb-reserved-names
branch
from
September 5, 2026 11:53
460dd97 to
2a5582a
Compare
dweindl
marked this pull request as ready for review
September 5, 2026 12:05
FFroehlich
approved these changes
Sep 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A model quantity literally named one of AMICI's reserved array-parameter
names (
t, x, p, k, h, w, y) used to hit a hardValueErroron PySB/BNGLimport, since only
SbmlImporterrenamed and restored these names beforeembedding them anywhere. This applies the same rename-and-restore at
PySB's own symbol-minting sites (parameters, expressions/observables, and
the stoichiometric matrix's derivative computation), sharing the
disambiguation logic with SBML via a new
resolve_reserved_symbol_renameshelper.
test_pysb_event"kk"workaround.empty_compartments_block/motorBNGL expected-failurespecial case -- both now import and simulate successfully.
test_pysb_reserved_names).🤖 Generated with Claude Code