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
Add fail/warn mechanism to ColumnObjects and ParamFunctions (#16)
- As discussed in [GETTSIM
#1055](ttsim-dev/gettsim#1055), we sometimes
want to fail or issue a warning if a certain node is visited in the
graph. This PR adds a mechanism for that along with corresponding tests
- Implementation:
- All `ColumnObjects` and `ParamFunctions` are endowed with attributes
`warn_msg_if_included: str | None = None` and `fail_msg_if_included: str
| None = None`.
- These are checked by a corresponding fail/warn function each, which
depends on the TT DAG and the specialised environment without tree logic
and with derived functions (guaranteed to catch the correct type of
object)
- For warn functions, only unique messages are displayed. E.g., in the
GETTSIM example triggering this, we have at least three functions, which
all have the same message.
- As we visited that code, we realised that `tt_dag` is a better name
for `tax_transfer_dag` as we are using that abbreviation much more
extensively that 'tax_transfer' by now. Renamed, same for
`tax_transfer_function` -> `tt_function`.
0 commit comments