Repository navigation
v2 lint: check model entities as condition targets and parameters - #623
Merged
Merged
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #623 +/- ##
==========================================
+ Coverage 81.20% 81.45% +0.24%
==========================================
Files 75 76 +1
Lines 8793 8906 +113
Branches 1608 1631 +23
==========================================
+ Hits 7140 7254 +114
+ Misses 1172 1171 -1
Partials 481 481 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
dweindl
force-pushed
the
model-entities
branch
2 times, most recently
from
November 30, 2026 18:22
32d4cd5 to
bb736e1
Compare
dweindl
marked this pull request as ready for review
November 30, 2026 18:27
FFroehlich
approved these changes
Dec 1, 2026
Add a private classification of model entities (`petab._models._entities`, `Model._get_entity`, `Model._iter_entities`), implemented for SBML models: what an entity is (parameter, species, compartment, other quantity, non-quantity), how its value evolves (constant, differential, algebraic), and whether it is the target of an event assignment. Use it in the new v2 validation task `CheckModelEntityEligibility`, which reports errors for entities that PEtab v2 does not allow as condition targets or in the parameter table, e.g. targets of assignment rules or event assignments. To avoid duplicate errors, it skips IDs that `CheckValidConditionTargets` or `CheckValidParameterInConditionOrParameterTable` already reject. Models without classification support are skipped. Relates to PEtab-dev#518. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member
Author
This will be handled by libsbml in its next release (sbmlteam/libsbml#526). Not adding the less efficient Python-handling here. |
dweindl
force-pushed
the
model-entities
branch
from
December 2, 2026 08:48
bb736e1 to
c5ba123
Compare
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.
Adds a new v2 validation task
CheckModelEntityEligibility. It reports errors for model entities that the PEtab v2 specification does not allow as condition targets (e.g., targets of assignment rules) or in the parameter table (e.g., targets of rate rules or event assignments). IDs thatCheckValidConditionTargetsorCheckValidParameterInConditionOrParameterTablealready reject are not reported again; models without entity classification are skipped. Mapping-table aliases are not resolved.To support this, models can now classify their entities: what an entity is (model parameter, species, compartment, other quantity, non-quantity), whether its value is constant, differential, or algebraic, and whether it is event-assigned. This is private for now (
petab._models._entities,Model._get_entity,Model._iter_entities) and implemented for SBML models; PySB and BNGL follow separately. The PEtab v2 rules on top of this classification live inpetab/v2/lint.py. Variables determined by SBML algebraic rules are not detected yet.Relates to #518 (first step: private entity classification).
🤖 Generated with Claude Code