Repository navigation
Conversation
Implement the private entity classification for PySB models: components by their type, and species by their pattern. A pattern with all sites of all monomers specified and all bonds paired is a species, whether or not the model's rules generate it; in a model with compartments, it has to specify the compartment, as PySB requires for initial conditions. Species are constant if they have a fixed initial condition, and differential otherwise. Validation does not change yet: PySB species can only be referred to via mapping-table aliases, which `CheckModelEntityEligibility` does not resolve, and all other condition targets and parameter-table entries that the other validation tasks accept are constant. Relates to PEtab-dev#518. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #657 +/- ##
==========================================
+ Coverage 81.45% 81.52% +0.07%
==========================================
Files 76 76
Lines 8906 8942 +36
Branches 1631 1639 +8
==========================================
+ Hits 7254 7290 +36
Misses 1171 1171
Partials 481 481 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This branch has not been deployed
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.
Implement the private entity classification (
_iter_entities) for PySB models.Components are classified by their type: parameters and compartments are constant; observables and global expressions are algebraic quantities; monomers, rules, tags, and local expressions are not quantities.
Species are classified by their pattern: a pattern with all sites of all monomers specified and all bonds paired is a species, whether or not the model's rules generate it, and independently of network generation. In a model with compartments, the pattern has to specify the compartment, as PySB requires for initial conditions. Species are constant if they have a fixed initial condition (compared by pattern equivalence), and differential otherwise.
Validation does not change yet: PySB species can only be referred to via mapping-table aliases, which
CheckModelEntityEligibilitydoes not resolve yet, and all other condition targets and parameter-table entries that the other validation tasks accept are constant. Alias resolution will follow in a separate PR.Relates to #518.
🤖 Generated with Claude Code