Closed hadley closed 2 years ago
The problem is:
load(test_path("data", "test_object.RData"))
test_that("regular usage", {
expect_equal(extract_parameter_dials(mod_param, "lambda"), penalty(), ignore_function_env = TRUE)
expect_equal(extract_parameter_dials(mod_param, "mixture"), mixture(c(0.05, 1)))
expect_equal(extract_parameter_dials(rec_param, "wts"), spline_degree(c(1, 15)))
expect_equal(extract_parameter_dials(rec_param, "disp"), spline_degree(c(1, 15)))
expect_equal(extract_parameter_dials(wflow_param, "lambda"), penalty(), ignore_function_env = TRUE)
expect_equal(extract_parameter_dials(wflow_param, "mixture"), mixture(c(0.05, 1)))
expect_equal(extract_parameter_dials(wflow_param, "wts"), spline_degree(c(1, 15)))
expect_equal(extract_parameter_dials(wflow_param, "disp"), spline_degree(c(1, 15)))
})
Since you're comparing a scales::trans
object created with an old version and the new version of scales. This seems to be some sort of regression test, and I'm not sure what you're worried about regressing so I don't think I can fix it without further advice.
I think the reason we did this is because mod_param
, rec_param
, and wflow_param
relied on parsnip, recipes, and workflows respectively to generate these objects. dials doesn't import any of these packages so we just created the objects and saved them.
At the end of the day, all 3 of these objects are just parameters
objects from dials, they don't contain anything specific to those packages in them, so as long as we test dials:::extract_parameter_dials.parameters()
in some other way with a parameters object created through dials, I don't think we need these tests (or the data objects created from here https://github.com/tidymodels/dials/tree/main/data-raw) at all? @hfrick does that sound right?
yup, I've cleaned that up now 👍
Do you mind doing a patch release so I can submit scales to CRAN this week?
sure, no problem!
This issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with a reprex: https://reprex.tidyverse.org) and link to this issue.
Looks like maybe you've accidentally store some scales function in the package and it gets compared to the current version?