-
Notifications
You must be signed in to change notification settings - Fork 32
Add ModelQuantity.get_sym, make ModelQuantity.get_id return str
#3001
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
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3001 +/- ##
==========================================
- Coverage 76.70% 76.03% -0.68%
==========================================
Files 309 309
Lines 19891 19893 +2
Branches 1498 1498
==========================================
- Hits 15258 15125 -133
- Misses 4620 4755 +135
Partials 13 13
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
95c0fcc to
209fc78
Compare
| identifier of the ModelQuantity | ||
| """ | ||
| return self._identifier | ||
| return ( |
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.
This looks more like a get_name than a get_id to me.
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.
The amici IDs correspond to sympy names (Symbol.name). The AMICI names can be different and don't have to be unique. get_name is just below.
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.
Ah I see, that sounds like we can replace most if not all strip_pysb(c.get_symbol) and str(c.get_sym()) with c.get_id() then and get rid of strip_pysb.
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.
That would be great. I was about to ask whether we can get rid of strip_pysb somehow. I'd keep that for a separate PR.
Distinguish between `id: str` and `symbol: sp.Symbol`. The old behavior (`def get_id(self) -> sp.Symbol`) was confusing. Fix inconsistent type for `AlgebraicEquation` symbol/id. Closes AMICI-dev#2940.
209fc78 to
861a135
Compare
Distinguish between
id: strandsymbol: sp.Symbol. The old behavior (def get_id(self) -> sp.Symbol) was confusing.Fix inconsistent type for
AlgebraicEquationsymbol/id.Closes #2940.