Skip to content

test messaging about missing extensions #53

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Nov 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/GH-R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ jobs:
try(pak::pkg_install("tidymodels/tune"))
try(pak::pkg_install("tidymodels/workflows"))
try(pak::pkg_install("tidymodels/yardstick"))
try(pak::pkg_install("tidymodels/bonsai"))
try(pak::pkg_install("tidymodels/censored"))
try(pak::pkg_install("business-science/modeltime"))
shell: Rscript {0}

- uses: r-lib/actions/check-r-package@v2
Expand Down
3 changes: 3 additions & 0 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Depends:
tidymodels
Suggests:
baguette,
bonsai,
butcher,
C50,
censored,
Expand All @@ -30,6 +31,7 @@ Suggests:
mda,
mixOmics,
modeldata,
modeltime,
multilevelmod,
parallel,
parsnip,
Expand Down Expand Up @@ -68,3 +70,4 @@ Language: en-US
LazyData: true
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.1.1.9001
Config/testthat/start-first: parsnip-extension-messaging
304 changes: 304 additions & 0 deletions tests/testthat/_snaps/parsnip-extension-messaging.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,304 @@
# messaging with unknown implementation (bag tree, tidymodels/parsnip#793)

Code
bag_tree() %>% set_engine("rpart") %>% set_mode("regression")
Message <rlang_message>
! parsnip could not locate an implementation for `bag_tree` regression model specifications using the `rpart` engine.
i The parsnip extension package baguette implements support for this specification.
i Please install (if needed) and load to continue.
Output
Bagged Decision Tree Model Specification (regression)

Main Arguments:
cost_complexity = 0
min_n = 2

Computational engine: rpart


---

Code
bag_tree() %>% set_mode("censored regression")
Message <rlang_message>
! parsnip could not locate an implementation for `bag_tree` censored regression model specifications.
i The parsnip extension package censored implements support for this specification.
i Please install (if needed) and load to continue.
Output
Bagged Decision Tree Model Specification (censored regression)

Main Arguments:
cost_complexity = 0
min_n = 2

Computational engine: rpart


---

Code
bag_tree()
Message <rlang_message>
! parsnip could not locate an implementation for `bag_tree` model specifications.
i The parsnip extension packages censored and baguette implement support for this specification.
i Please install (if needed) and load to continue.
Output
Bagged Decision Tree Model Specification (unknown mode)

Main Arguments:
cost_complexity = 0
min_n = 2

Computational engine: rpart


---

Code
bag_tree() %>% set_engine("rpart")
Message <rlang_message>
! parsnip could not locate an implementation for `bag_tree` model specifications using the `rpart` engine.
i The parsnip extension packages censored and baguette implement support for this specification.
i Please install (if needed) and load to continue.
Output
Bagged Decision Tree Model Specification (unknown mode)

Main Arguments:
cost_complexity = 0
min_n = 2

Computational engine: rpart


---

Code
bag_tree() %>% set_mode("censored regression") %>% set_engine("rpart")
Output
Bagged Decision Tree Model Specification (censored regression)

Main Arguments:
cost_complexity = 0
min_n = 2

Computational engine: rpart


---

Code
bag_tree() %>% set_engine("rpart")
Output
Bagged Decision Tree Model Specification (unknown mode)

Main Arguments:
cost_complexity = 0
min_n = 2

Computational engine: rpart


---

Code
bag_tree() %>% set_mode("regression") %>% set_engine("rpart")
Message <rlang_message>
! parsnip could not locate an implementation for `bag_tree` regression model specifications using the `rpart` engine.
i The parsnip extension package baguette implements support for this specification.
i Please install (if needed) and load to continue.
Output
Bagged Decision Tree Model Specification (regression)

Main Arguments:
cost_complexity = 0
min_n = 2

Computational engine: rpart


---

Code
bag_tree() %>% set_mode("classification") %>% set_engine("C5.0")
Message <rlang_message>
! parsnip could not locate an implementation for `bag_tree` classification model specifications using the `C5.0` engine.
i The parsnip extension package baguette implements support for this specification.
i Please install (if needed) and load to continue.
Output
Bagged Decision Tree Model Specification (classification)

Main Arguments:
cost_complexity = 0
min_n = 2

Computational engine: C5.0


---

Code
bag_tree() %>% set_engine("C5.0")
Output
Bagged Decision Tree Model Specification (unknown mode)

Main Arguments:
cost_complexity = 0
min_n = 2

Computational engine: C5.0


# messaging with unknown implementation (decision tree, tidymodels/parsnip#793)

Code
decision_tree()
Output
Decision Tree Model Specification (unknown mode)

Computational engine: rpart


---

Code
decision_tree() %>% set_mode("censored regression")
Output
Decision Tree Model Specification (censored regression)

Computational engine: rpart


---

Code
decision_tree() %>% set_engine("partykit")
Output
Decision Tree Model Specification (unknown mode)

Computational engine: partykit


---

Code
decision_tree() %>% set_engine("partykit") %>% set_mode("regression")
Message <rlang_message>
! parsnip could not locate an implementation for `decision_tree` regression model specifications using the `partykit` engine.
i The parsnip extension package bonsai implements support for this specification.
i Please install (if needed) and load to continue.
Output
Decision Tree Model Specification (regression)

Computational engine: partykit


---

Code
decision_tree() %>% set_mode("censored regression") %>% set_engine("rpart")
Output
Decision Tree Model Specification (censored regression)

Computational engine: rpart


---

Code
decision_tree() %>% set_engine("partykit")
Output
Decision Tree Model Specification (unknown mode)

Computational engine: partykit


---

Code
decision_tree() %>% set_mode("regression") %>% set_engine("partykit")
Message <rlang_message>
! parsnip could not locate an implementation for `decision_tree` regression model specifications using the `partykit` engine.
i The parsnip extension package bonsai implements support for this specification.
i Please install (if needed) and load to continue.
Output
Decision Tree Model Specification (regression)

Computational engine: partykit


---

Code
decision_tree() %>% set_mode("regression") %>% set_engine("partykit")
Output
Decision Tree Model Specification (regression)

Computational engine: partykit


# missing implementation checks prompt conservatively with old objects (bag_tree)

Code
bt
Output
Bagged Decision Tree Model Specification (regression)

Main Arguments:
cost_complexity = 0
min_n = 2

Computational engine: rpart


---

Code
bt
Output
Bagged Decision Tree Model Specification (regression)

Main Arguments:
cost_complexity = 0
min_n = 2

Computational engine: rpart


# missing implementation checks prompt conservatively with old objects (decision_tree)

Code
dt
Output
Decision Tree Model Specification (unknown mode)

Computational engine: rpart


---

Code
dt_censored
Output
Decision Tree Model Specification (censored regression)

Computational engine: rpart


---

Code
dt_censored
Output
Decision Tree Model Specification (censored regression)

Computational engine: rpart


# missing implementation checks prompt conservatively with external objects (arima_boost)

Code
ab
Output
Time Series Model w/ XGBoost Error Specification (regression)


Loading