Closed Saityi closed 3 weeks ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 60.69%. Comparing base (
c7a0faf
) to head (c6cb155
). Report is 6 commits behind head on main.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Issue
Unary dynamic variable expressions that contain subexpressions, like
exp(a + b + c)
, are currently erroneously rejected. A user reported issues with a snippet with this structure:Solution
The 'simple' cases in dynamic variable assembling should only occur when the arguments are simple (i.e., non-expressions). If they are expressions, they should be recursively pulled apart to match the form required by the
StockAndFlowF
data type.Testing
Macro usages such as above should now work. I gave the original example a try and it seems to work now -- at the very least, it no longer throws an error.
Unit tests were added which replicate the previous issue with
is_binop_or_unary
(renamedis_simple_dyvar
).All previous tests appear to still pass (locally).