-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable pattern matching with compartments #570
base: master
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #570 +/- ##
==========================================
+ Coverage 78.28% 78.43% +0.15%
==========================================
Files 106 106
Lines 11253 11301 +48
==========================================
+ Hits 8809 8864 +55
+ Misses 2444 2437 -7
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM overall, though it's been a while since I worked with compartments. Ideally it'd be good to see test coverage for the two lines highlighted by codecov - particularly pysb/core.py line 956.
Ah! turns out adding the edges in line 956 is actually not even necessary, simply adding the species compartment node to the graph is sufficient. Removed the respective lines, added a test for the value error and simplified the code a bit further. |
Enable
RulePatternMatcher
andSpeciesPatternMatcher
for models with compartments. Support was already there, just removedNotImplementedError
- this is validated by includingmove_connected
, which contains species with compartments, in the test_all_species generated test.