plant
plant copied to clipboard
Update scaffolder for strategy inheritance
The new approach to model inheritance (#267) requires some changes to the scaffolder.
- [ ] Pass in an additional
Environment
template - e.g.FF16r
uses theFF16_Environment
- [ ] Use inheritance approach demonstrated in
FF16r
to overload theFF16
class, rather than copy theFF16
strategy wholesale - [ ] Don't add RcppR6 bindings or tests for components that are reused (i.e. the scaffolder should not generate any mention of
FF16r_Environment
because it doesn't exist)
The inherited environmental also needs to be registered by the scaffolder. We can see why in the test-cohort.R
logic:
for (x in names(strategy_types)) {
s <- strategy_types[[x]]()
e <- environment_types[[x]]
...
}
where the FF16r environment has been registered, but not FF16ppa:
> names(strategy_types)
[1] "FF16" "FF16ppa" "FF16r" "K93"
> environment_types
$FF16
[1] "FF16_Env"
$FF16r
[1] "FF16_Env"
$K93
[1] "K93_Env"
EDIT: this part should be resolved in #289.