From 58a6595d0894121e7207816b663a80b1e7d95e79 Mon Sep 17 00:00:00 2001 From: Julia Silge Date: Thu, 11 Apr 2024 11:08:47 -0600 Subject: [PATCH] butcher version 0.3.4 (#274) * Release candidate 0.3.4 * Update custom model to use `new_model_spec()` * Add `set_encoding()` * Update DESCRIPTION * Increment version number to 0.3.4 --- DESCRIPTION | 8 ++++---- NAMESPACE | 1 + NEWS.md | 4 +++- R/docs.R | 2 ++ README.Rmd | 2 +- README.md | 34 +++++++++++++++++----------------- man/butcher-package.Rd | 1 - revdep/README.md | 22 ---------------------- revdep/cran.md | 2 +- tests/testthat/test-mda.R | 26 +++++++++++++++++++------- 10 files changed, 48 insertions(+), 54 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index ab281223..ca2530c9 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: butcher Title: Model Butcher -Version: 0.3.3.9000 +Version: 0.3.4 Authors@R: c( person("Joyce", "Cahoon", , "joyceyu48@gmail.com", role = "aut", comment = c(ORCID = "0000-0001-7217-4702")), @@ -76,9 +76,9 @@ Suggests: xrf VignetteBuilder: knitr -Config/Needs/check:bioc::mixOmics -Config/Needs/website:tidyverse/tidytemplate +Config/Needs/check: bioc::mixOmics +Config/Needs/website: tidyverse/tidytemplate Config/testthat/edition: 3 Encoding: UTF-8 Roxygen: list(markdown = TRUE) -RoxygenNote: 7.2.3 +RoxygenNote: 7.3.1 diff --git a/NAMESPACE b/NAMESPACE index ccecdb25..1a421ce3 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -1,5 +1,6 @@ # Generated by roxygen2: do not edit by hand +S3method(as.character,dev_topic) S3method(axe_call,C5.0) S3method(axe_call,KMeansCluster) S3method(axe_call,NaiveBayes) diff --git a/NEWS.md b/NEWS.md index 10414323..a05d2f02 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,6 @@ -# butcher (development version) +# butcher 0.3.4 + +* Submit to CRAN for new HTML reference manuals. # butcher 0.3.3 diff --git a/R/docs.R b/R/docs.R index a5e8a940..de2b7a7a 100644 --- a/R/docs.R +++ b/R/docs.R @@ -132,6 +132,8 @@ locate_help_doc <- function(x, package) { } } +#' @export +#' @keywords internal as.character.dev_topic <- function(x, ...) { sub("[.]Rd$", "", x$path) } diff --git a/README.Rmd b/README.Rmd index 3d2e08b4..8f3336d2 100644 --- a/README.Rmd +++ b/README.Rmd @@ -120,7 +120,7 @@ Check out the `vignette("available-axe-methods")` to see butcher's current cover This project is released with a [Contributor Code of Conduct](https://contributor-covenant.org/version/2/0/CODE_OF_CONDUCT.html). By contributing to this project, you agree to abide by its terms. -- For questions and discussions about tidymodels packages, modeling, and machine learning, please [post on RStudio Community](https://community.rstudio.com/new-topic?category_id=15&tags=tidymodels,question). +- For questions and discussions about tidymodels packages, modeling, and machine learning, please [post on RStudio Community](https://forum.posit.co/new-topic?category_id=15&tags=tidymodels,question). - If you think you have encountered a bug, please [submit an issue](https://github.com/tidymodels/butcher/issues). diff --git a/README.md b/README.md index 8ae87a8e..f786424b 100644 --- a/README.md +++ b/README.md @@ -149,11 +149,11 @@ weigh(small_lm) To make the most of your memory available, this package provides five S3 generics for you to remove parts of a model object: -- `axe_call()`: To remove the call object. -- `axe_ctrl()`: To remove controls associated with training. -- `axe_data()`: To remove the original training data. -- `axe_env()`: To remove environments. -- `axe_fitted()`: To remove fitted values. +- `axe_call()`: To remove the call object. +- `axe_ctrl()`: To remove controls associated with training. +- `axe_data()`: To remove the original training data. +- `axe_env()`: To remove environments. +- `axe_fitted()`: To remove fitted values. When you run `butcher()`, you execute all of these axing functions at once. Any kind of axing on the object will append a butchered class to @@ -183,18 +183,18 @@ This project is released with a [Contributor Code of Conduct](https://contributor-covenant.org/version/2/0/CODE_OF_CONDUCT.html). By contributing to this project, you agree to abide by its terms. -- For questions and discussions about tidymodels packages, modeling, - and machine learning, please [post on RStudio - Community](https://community.rstudio.com/new-topic?category_id=15&tags=tidymodels,question). +- For questions and discussions about tidymodels packages, modeling, and + machine learning, please [post on RStudio + Community](https://forum.posit.co/new-topic?category_id=15&tags=tidymodels,question). -- If you think you have encountered a bug, please [submit an - issue](https://github.com/tidymodels/butcher/issues). +- If you think you have encountered a bug, please [submit an + issue](https://github.com/tidymodels/butcher/issues). -- Either way, learn how to create and share a - [reprex](https://reprex.tidyverse.org/articles/articles/learn-reprex.html) - (a minimal, reproducible example), to clearly communicate about your - code. +- Either way, learn how to create and share a + [reprex](https://reprex.tidyverse.org/articles/articles/learn-reprex.html) + (a minimal, reproducible example), to clearly communicate about your + code. -- Check out further details on [contributing guidelines for tidymodels - packages](https://www.tidymodels.org/contribute/) and [how to get - help](https://www.tidymodels.org/help/). +- Check out further details on [contributing guidelines for tidymodels + packages](https://www.tidymodels.org/contribute/) and [how to get + help](https://www.tidymodels.org/help/). diff --git a/man/butcher-package.Rd b/man/butcher-package.Rd index 6f4c3faf..e9e00668 100644 --- a/man/butcher-package.Rd +++ b/man/butcher-package.Rd @@ -3,7 +3,6 @@ \docType{package} \name{butcher-package} \alias{butcher-package} -\alias{_PACKAGE} \title{Reduce the Size of Modeling Objects} \description{ Reduce the size of modeling objects after fitting. These parsed-down diff --git a/revdep/README.md b/revdep/README.md index 9d9e4118..52e12c71 100644 --- a/revdep/README.md +++ b/revdep/README.md @@ -1,24 +1,2 @@ -# Platform - -|field |value | -|:--------|:----------------------------------------| -|version |R version 4.2.2 (2022-10-31) | -|os |macOS Ventura 13.2.1 | -|system |aarch64, darwin20 | -|ui |RStudio | -|language |(EN) | -|collate |en_US.UTF-8 | -|ctype |en_US.UTF-8 | -|tz |America/Denver | -|date |2023-03-07 | -|rstudio |2022.12.0+353 Elsbeth Geranium (desktop) | -|pandoc |2.17.1.1 @ /usr/local/bin/pandoc | - -# Dependencies - -|package |old |new |Δ | -|:-------|:-----|:-----|:--| -|butcher |0.3.1 |0.3.2 |* | - # Revdeps diff --git a/revdep/cran.md b/revdep/cran.md index 25bb3c2c..02685234 100644 --- a/revdep/cran.md +++ b/revdep/cran.md @@ -1,6 +1,6 @@ ## revdepcheck results -We checked 6 reverse dependencies, comparing R CMD check results across CRAN and dev versions of this package. +We checked 8 reverse dependencies, comparing R CMD check results across CRAN and dev versions of this package. * We saw 0 new problems * We failed to check 0 packages diff --git a/tests/testthat/test-mda.R b/tests/testthat/test-mda.R index a9b6bd06..60f66e46 100644 --- a/tests/testthat/test-mda.R +++ b/tests/testthat/test-mda.R @@ -46,13 +46,14 @@ test_that("mda + custom parsnip model + predict() works", { stop("`mode` should be 'classification'", call. = FALSE) } args <- list(sub_classes = rlang::enquo(sub_classes)) - out <- list(args = args, - eng_args = NULL, - mode = mode, - method = NULL, - engine = NULL) - class(out) <- make_classes("mixture_da") - out + new_model_spec( + "mixture_da", + args = args, + eng_args = NULL, + mode = mode, + method = NULL, + engine = NULL + ) } set_fit( model = "mixture_da", @@ -65,6 +66,17 @@ test_that("mda + custom parsnip model + predict() works", { defaults = list() ) ) + set_encoding( + model = "mixture_da", + eng = "mda", + mode = "classification", + options = list( + predictor_indicators = "traditional", + compute_intercept = TRUE, + remove_intercept = TRUE, + allow_sparse_x = FALSE + ) + ) mda_fit <- mixture_da(sub_classes = 2) %>% set_engine("mda") %>% fit(Species ~ ., data = iris)