Skip to content

Commit

Permalink
Merge pull request #81 from tidymodels/RC-0.3.0
Browse files Browse the repository at this point in the history
Release Candidate 0.3.0
  • Loading branch information
EmilHvitfeldt authored Dec 22, 2024
2 parents 50d9194 + 4095b41 commit 4871989
Show file tree
Hide file tree
Showing 44 changed files with 68 additions and 13 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: orbital
Title: Predict with 'tidymodels' Workflows in Databases
Version: 0.2.0.9000
Version: 0.3.0.9000
Authors@R: c(
person("Emil", "Hvitfeldt", , "[email protected]", role = c("aut", "cre")),
person("Posit Software, PBC", role = c("cph", "fnd"))
Expand Down
12 changes: 7 additions & 5 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
# orbital (development version)

* `augment()` method for orbital object have been added. (#55)

* `orbital()` gained `prefix` argument to allow for renaming of prediction columns. (#59)

* `orbital()` now works with `logistic_reg()` models for class prediction and probability predictions. (#62, #66)
# orbital 0.3.0

* `orbital()` has gained `type` argument to change prediction type. (#66)

* `orbital()` now works with `logistic_reg(engine = "glm")` models for class prediction and probability predictions. (#62, #66)

* `orbital()` now works with `boost_tree(engine = "xgboost")` models for class prediction and probability predictions. (#71)

* `orbital()` now works with `decision_tree(engine = "partykit")` models for class prediction and probability predictions. (#77)

* `augment()` method for `orbital()` object have been added. (#55)

* `orbital()` gained `prefix` argument to allow for renaming of prediction columns. (#59)

# orbital 0.2.0

* Support for `step_dummy()`, `step_impute_mean()`, `step_impute_median()`, `step_impute_mode()`, `step_unknown()`, `step_novel()`, `step_other()`, `step_BoxCox()`, `step_inverse()`, `step_mutate()`, `step_sqrt()`, `step_indicate_na()`, `step_range()`, `step_intercept()`, `step_ratio()`, `step_lag()`, `step_log()`, `step_rename()` has been added. (#17)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ db_mtcars <- copy_to(con, mtcars)

predict(orbital_obj, db_mtcars)
#> # Source: SQL [?? x 1]
#> # Database: sqlite 3.46.0 []
#> # Database: sqlite 3.47.0 []
#> .pred
#> <dbl>
#> 1 22.6
Expand Down
1 change: 1 addition & 0 deletions tests/testthat/test-augment.R
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ test_that("SQLite - augment() works", {
skip_if_not_installed("workflows")
skip_if_not_installed("DBI")
skip_if_not_installed("RSQLite")
skip_on_cran()

mtcars <- dplyr::as_tibble(mtcars)

Expand Down
12 changes: 6 additions & 6 deletions tests/testthat/test-model-partykit.R
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
test_that("decision_tree(partykit) works with type = class", {
skip_if_not_installed("parsnip")
skip_if_not_installed("tidypredict")
skip_if_not_installed("bonsai")
library(bonsai)
skip_if_not_installed("bonsai")
library(bonsai)

mtcars$vs <- factor(mtcars$vs)

Expand All @@ -27,8 +27,8 @@ test_that("decision_tree(partykit) works with type = class", {
test_that("decision_tree(partykit) works with type = prob", {
skip_if_not_installed("parsnip")
skip_if_not_installed("tidypredict")
skip_if_not_installed("bonsai")
library(bonsai)
skip_if_not_installed("bonsai")
library(bonsai)

mtcars$vs <- factor(mtcars$vs)

Expand Down Expand Up @@ -59,8 +59,8 @@ test_that("decision_tree(partykit) works with type = prob", {
test_that("decision_tree(partykit) works with type = c(class, prob)", {
skip_if_not_installed("parsnip")
skip_if_not_installed("tidypredict")
skip_if_not_installed("bonsai")
library(bonsai)
skip_if_not_installed("bonsai")
library(bonsai)

mtcars$vs <- factor(mtcars$vs)

Expand Down
2 changes: 2 additions & 0 deletions tests/testthat/test-step_adasyn.R
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ test_that("SQLite - step_adasyn works", {
skip_if_not_installed("themis")
skip_if_not_installed("DBI")
skip_if_not_installed("RSQLite")
skip_on_cran()

mtcars_adasyn <- dplyr::as_tibble(mtcars)
mtcars_adasyn$vs <- as.factor(mtcars$vs)
Expand Down Expand Up @@ -107,6 +108,7 @@ test_that("duckdb - step_adasyn works", {
skip_if_not_installed("themis")
skip_if_not_installed("DBI")
skip_if_not_installed("RSQLite")
skip_on_cran()

mtcars_adasyn <- dplyr::as_tibble(mtcars)
mtcars_adasyn$vs <- as.factor(mtcars$vs)
Expand Down
1 change: 1 addition & 0 deletions tests/testthat/test-step_bin2factor.R
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ test_that("SQLite - step_bin2factor works", {
skip_if_not_installed("recipes")
skip_if_not_installed("DBI")
skip_if_not_installed("RSQLite")
skip_on_cran()

mtcars <- dplyr::as_tibble(mtcars)

Expand Down
1 change: 1 addition & 0 deletions tests/testthat/test-step_boxcox.R
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ test_that("SQLite - step_BoxCox works", {
skip_if_not_installed("recipes")
skip_if_not_installed("DBI")
skip_if_not_installed("RSQLite")
skip_on_cran()

mtcars <- dplyr::as_tibble(mtcars)

Expand Down
1 change: 1 addition & 0 deletions tests/testthat/test-step_bsmote.R
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ test_that("SQLite - step_bsmote works", {
skip_if_not_installed("themis")
skip_if_not_installed("DBI")
skip_if_not_installed("RSQLite")
skip_on_cran()

mtcars_bsmote <- dplyr::as_tibble(mtcars)
mtcars_bsmote$vs <- as.factor(mtcars$vs)
Expand Down
1 change: 1 addition & 0 deletions tests/testthat/test-step_center.R
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ test_that("SQLite - step_center works", {
skip_if_not_installed("recipes")
skip_if_not_installed("DBI")
skip_if_not_installed("RSQLite")
skip_on_cran()

mtcars <- dplyr::as_tibble(mtcars)

Expand Down
1 change: 1 addition & 0 deletions tests/testthat/test-step_discretize.R
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ test_that("SQLite - step_discretize works", {
skip_if_not_installed("recipes")
skip_if_not_installed("DBI")
skip_if_not_installed("RSQLite")
skip_on_cran()

mtcars_discretize <- dplyr::as_tibble(mtcars)
mtcars_discretize[1, ] <- NA
Expand Down
1 change: 1 addition & 0 deletions tests/testthat/test-step_downsample.R
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ test_that("SQLite - step_downsample works", {
skip_if_not_installed("themis")
skip_if_not_installed("DBI")
skip_if_not_installed("RSQLite")
skip_on_cran()

mtcars_downsample <- dplyr::as_tibble(mtcars)
mtcars_downsample$vs <- as.factor(mtcars$vs)
Expand Down
1 change: 1 addition & 0 deletions tests/testthat/test-step_dummy.R
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ test_that("SQLite - step_dummy works", {
skip_if_not_installed("recipes")
skip_if_not_installed("DBI")
skip_if_not_installed("RSQLite")
skip_on_cran()

mtcars1 <- dplyr::as_tibble(mtcars)

Expand Down
1 change: 1 addition & 0 deletions tests/testthat/test-step_impute_mean.R
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ test_that("SQLite - step_impute_mean works", {
skip_if_not_installed("recipes")
skip_if_not_installed("DBI")
skip_if_not_installed("RSQLite")
skip_on_cran()

mtcars_impute_mean <- dplyr::as_tibble(mtcars)
mtcars_impute_mean[2:4, ] <- NA
Expand Down
1 change: 1 addition & 0 deletions tests/testthat/test-step_impute_median.R
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ test_that("SQLite - step_impute_median works", {
skip_if_not_installed("recipes")
skip_if_not_installed("DBI")
skip_if_not_installed("RSQLite")
skip_on_cran()

mtcars_impute_median <- dplyr::as_tibble(mtcars)
mtcars_impute_median[2:4, ] <- NA
Expand Down
1 change: 1 addition & 0 deletions tests/testthat/test-step_impute_mode.R
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ test_that("SQLite - step_impute_mode works", {
skip_if_not_installed("recipes")
skip_if_not_installed("DBI")
skip_if_not_installed("RSQLite")
skip_on_cran()

mtcars_impute_mode <- dplyr::as_tibble(mtcars)
mtcars_impute_mode$gear <- letters[mtcars$gear]
Expand Down
1 change: 1 addition & 0 deletions tests/testthat/test-step_indicate_na.R
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ test_that("SQLite - step_indicate_na works", {
skip_if_not_installed("recipes")
skip_if_not_installed("DBI")
skip_if_not_installed("RSQLite")
skip_on_cran()

mtcars_indicate_na <- dplyr::as_tibble(mtcars)
mtcars_indicate_na[2:4, ] <- NA
Expand Down
1 change: 1 addition & 0 deletions tests/testthat/test-step_intercept.R
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ test_that("SQLite - step_intercept works", {
skip_if_not_installed("recipes")
skip_if_not_installed("DBI")
skip_if_not_installed("RSQLite")
skip_on_cran()

mtcars <- dplyr::as_tibble(mtcars)

Expand Down
1 change: 1 addition & 0 deletions tests/testthat/test-step_inverse.R
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ test_that("SQLite - step_inverse works", {
skip_if_not_installed("recipes")
skip_if_not_installed("DBI")
skip_if_not_installed("RSQLite")
skip_on_cran()

mtcars <- dplyr::as_tibble(mtcars)

Expand Down
1 change: 1 addition & 0 deletions tests/testthat/test-step_lag.R
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ test_that("SQLite - step_lag works", {
skip_if_not_installed("recipes")
skip_if_not_installed("DBI")
skip_if_not_installed("RSQLite")
skip_on_cran()

mtcars <- dplyr::as_tibble(mtcars)

Expand Down
1 change: 1 addition & 0 deletions tests/testthat/test-step_lencode_bayes.R
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ test_that("SQLite - step_lencode_bayes works", {
skip_if_not_installed("rstanarm")
skip_if_not_installed("DBI")
skip_if_not_installed("RSQLite")
skip_on_cran()

mtcars_lencode_bayes <- dplyr::as_tibble(mtcars)
mtcars_lencode_bayes$gear <- as.factor(mtcars_lencode_bayes$gear)
Expand Down
1 change: 1 addition & 0 deletions tests/testthat/test-step_lencode_glm.R
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ test_that("SQLite - step_lencode_glm works", {
skip_if_not_installed("recipes")
skip_if_not_installed("DBI")
skip_if_not_installed("RSQLite")
skip_on_cran()

mtcars_lencode_glm <- dplyr::as_tibble(mtcars)
mtcars_lencode_glm$gear <- as.factor(mtcars_lencode_glm$gear)
Expand Down
13 changes: 13 additions & 0 deletions tests/testthat/test-step_lencode_mixed.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
test_that("step_lencode_mixed works", {
skip_if_not_installed("recipes")
skip_if_not_installed("embed")
skip_if_not_installed("lme4")

mtcars <- dplyr::as_tibble(mtcars)
mtcars$gear <- as.factor(mtcars$gear)
Expand All @@ -23,6 +24,7 @@ test_that("step_lencode_mixed works", {
test_that("step_lencode_mixed only calculates what is sufficient", {
skip_if_not_installed("recipes")
skip_if_not_installed("embed")
skip_if_not_installed("lme4")

mtcars <- dplyr::as_tibble(mtcars)
mtcars$gear <- as.factor(mtcars$gear)
Expand All @@ -44,6 +46,7 @@ test_that("step_lencode_mixed only calculates what is sufficient", {
test_that("step_lencode_mixed works with empty selections", {
skip_if_not_installed("recipes")
skip_if_not_installed("embed")
skip_if_not_installed("lme4")

mtcars <- dplyr::as_tibble(mtcars)
mtcars$gear <- as.factor(mtcars$gear)
Expand All @@ -65,7 +68,10 @@ test_that("step_lencode_mixed works with empty selections", {

test_that("spark - step_lencode_mixed works", {
skip_if_not_installed("recipes")
skip_if_not_installed("embed")
skip_if_not_installed("lme4")
skip_if_not_installed("sparklyr")

skip_if(is.na(testthat_spark_env_version()))

mtcars_lencode_mixed <- dplyr::as_tibble(mtcars)
Expand All @@ -91,8 +97,11 @@ test_that("spark - step_lencode_mixed works", {

test_that("SQLite - step_lencode_mixed works", {
skip_if_not_installed("recipes")
skip_if_not_installed("embed")
skip_if_not_installed("lme4")
skip_if_not_installed("DBI")
skip_if_not_installed("RSQLite")
skip_on_cran()

mtcars_lencode_mixed <- dplyr::as_tibble(mtcars)
mtcars_lencode_mixed$gear <- as.factor(mtcars_lencode_mixed$gear)
Expand All @@ -119,6 +128,8 @@ test_that("SQLite - step_lencode_mixed works", {

test_that("duckdb - step_lencode_mixed works", {
skip_if_not_installed("recipes")
skip_if_not_installed("embed")
skip_if_not_installed("lme4")
skip_if_not_installed("DBI")
skip_if_not_installed("duckdb")

Expand Down Expand Up @@ -147,6 +158,8 @@ test_that("duckdb - step_lencode_mixed works", {

test_that("arrow - step_lencode_mixed works", {
skip_if_not_installed("recipes")
skip_if_not_installed("embed")
skip_if_not_installed("lme4")
skip_if_not_installed("arrow")

mtcars_lencode_mixed <- dplyr::as_tibble(mtcars)
Expand Down
1 change: 1 addition & 0 deletions tests/testthat/test-step_log.R
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ test_that("SQLite - step_log works", {
skip_if_not_installed("recipes")
skip_if_not_installed("DBI")
skip_if_not_installed("RSQLite")
skip_on_cran()

mtcars <- dplyr::as_tibble(mtcars)

Expand Down
1 change: 1 addition & 0 deletions tests/testthat/test-step_mutate.R
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ test_that("SQLite - step_mutate works", {
skip_if_not_installed("recipes")
skip_if_not_installed("DBI")
skip_if_not_installed("RSQLite")
skip_on_cran()

mtcars <- dplyr::as_tibble(mtcars)

Expand Down
1 change: 1 addition & 0 deletions tests/testthat/test-step_nearmiss.R
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ test_that("SQLite - step_nearmiss works", {
skip_if_not_installed("themis")
skip_if_not_installed("DBI")
skip_if_not_installed("RSQLite")
skip_on_cran()

mtcars_nearmiss <- dplyr::as_tibble(mtcars)
mtcars_nearmiss$vs <- as.factor(mtcars$vs)
Expand Down
1 change: 1 addition & 0 deletions tests/testthat/test-step_normalize.R
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ test_that("SQLite - step_normalize works", {
skip_if_not_installed("recipes")
skip_if_not_installed("DBI")
skip_if_not_installed("RSQLite")
skip_on_cran()

mtcars <- dplyr::as_tibble(mtcars)

Expand Down
1 change: 1 addition & 0 deletions tests/testthat/test-step_novel.R
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ test_that("SQLite - step_novel works", {
skip_if_not_installed("recipes")
skip_if_not_installed("DBI")
skip_if_not_installed("RSQLite")
skip_on_cran()

mtcars_novel <- dplyr::as_tibble(mtcars)
mtcars_novel$gear <- letters[mtcars$gear]
Expand Down
1 change: 1 addition & 0 deletions tests/testthat/test-step_other.R
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ test_that("SQLite - step_other works", {
skip_if_not_installed("recipes")
skip_if_not_installed("DBI")
skip_if_not_installed("RSQLite")
skip_on_cran()

mtcars_other <- dplyr::as_tibble(mtcars)
mtcars_other$gear <- letters[mtcars$gear]
Expand Down
1 change: 1 addition & 0 deletions tests/testthat/test-step_pca.R
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ test_that("SQLite - step_pca works", {
skip_if_not_installed("recipes")
skip_if_not_installed("DBI")
skip_if_not_installed("RSQLite")
skip_on_cran()

mtcars0 <- dplyr::as_tibble(mtcars)
mtcars0$hp <- NULL
Expand Down
1 change: 1 addition & 0 deletions tests/testthat/test-step_pca_sparse.R
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ test_that("SQLite - step_pca_sparse works", {
skip_if_not_installed("embed")
skip_if_not_installed("DBI")
skip_if_not_installed("RSQLite")
skip_on_cran()

mtcars0 <- dplyr::as_tibble(mtcars)
mtcars0$hp <- NULL
Expand Down
1 change: 1 addition & 0 deletions tests/testthat/test-step_pca_sparse_bayes.R
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ test_that("SQLite - step_pca_sparse_bayes works", {
skip_if_not_installed("VBsparsePCA")
skip_if_not_installed("DBI")
skip_if_not_installed("RSQLite")
skip_on_cran()

mtcars0 <- dplyr::as_tibble(mtcars)
mtcars0$hp <- NULL
Expand Down
1 change: 1 addition & 0 deletions tests/testthat/test-step_pca_truncated.R
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ test_that("SQLite - step_pca_truncated works", {
skip_if_not_installed("embed")
skip_if_not_installed("DBI")
skip_if_not_installed("RSQLite")
skip_on_cran()

mtcars0 <- dplyr::as_tibble(mtcars)
mtcars0$hp <- NULL
Expand Down
1 change: 1 addition & 0 deletions tests/testthat/test-step_range.R
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ test_that("SQLite - step_range works", {
skip_if_not_installed("recipes")
skip_if_not_installed("DBI")
skip_if_not_installed("RSQLite")
skip_on_cran()

mtcars <- dplyr::as_tibble(mtcars)

Expand Down
1 change: 1 addition & 0 deletions tests/testthat/test-step_ratio.R
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ test_that("SQLite - step_ratio works", {
skip_if_not_installed("recipes")
skip_if_not_installed("DBI")
skip_if_not_installed("RSQLite")
skip_on_cran()

mtcars <- dplyr::as_tibble(mtcars)

Expand Down
1 change: 1 addition & 0 deletions tests/testthat/test-step_rename.R
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ test_that("SQLite - step_rename works", {
skip_if_not_installed("recipes")
skip_if_not_installed("DBI")
skip_if_not_installed("RSQLite")
skip_on_cran()

mtcars <- dplyr::as_tibble(mtcars)

Expand Down
Loading

0 comments on commit 4871989

Please sign in to comment.