You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
PySBModel.is_state_variable: require compartments for models with compartments #593
PySBModel.is_state_variable checks that all sites are specified (#592), but it accepts species without a compartment even if the model has compartments (e.g., A() in a model with compartment c1). Species of such models always carry a compartment, so these names will never match an actual species. Using pysb.ComplexPattern.is_concrete() instead of MonomerPattern.is_site_concrete() would reject them. This changes behaviour (tests/v1/test_model_pysb.py::test_pysb_model currently asserts is_state_variable("A()") is True for such a model), so it needs a changelog entry.
Possibly related: is_state_variable only checks whether a name is a valid species pattern. It doesn't check whether the model's rules generate that species, or whether all monomers of a complex are connected (A(b=None) % B(a=None) is accepted).
Activity