These are checklists used by the tidymodels team. If you want to use them to add models and/or engines in your own package, you will have to adapt them somewhat.
Copy these checklists into the corresponding GitHub issue.
* [ ] Document argument for the given step, `step_name()` will be used as example. * [ ] Add argument to `step_name()`, making sure that it is passed to `step_name_new()` in `add_step()`. * [ ] Add argument to `step_name_new()` and make sure it is passed to `step()`. * [ ] Make sure argument is passed to `step_umap_new()` in `prep.step_name()`. * [ ] Add the following code to `prep.step_name()`. This will prevent older recipes from breaking. ``` if (is.null(x$new_arg)) { x$new_arg <- default-value-for-new_arg } ``` * [ ] Add test to make sure you didn't mess up the above tasks. ``` test_that("backwards compatible for new_arg", { rec <- recipe(~ ., data = data_set_of_your_choice) %>% step_name(all_predictors()) %>% prep() exp <- bake(rec, data_set_of_your_choice) rec$steps[[1]]$new_arg <- NULL expect_identical( bake(rec, data_set_of_your_choice), exp ) }) ``` * [ ] Test that new argument works.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.