Add ModelQuantity.get_sym, make ModelQuantity.get_id return str#3001
Add ModelQuantity.get_sym, make ModelQuantity.get_id return str#3001dweindl merged 1 commit intoAMICI-dev:mainfrom
ModelQuantity.get_sym, make ModelQuantity.get_id return str#3001Conversation
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.
This looks more like a get_name than a get_id to me.
There was a problem hiding this comment.
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.
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.
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.