Skip to content

Commit

Permalink
butcher version 0.3.4 (#274)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
juliasilge authored Apr 11, 2024
1 parent 57f7ec0 commit 58a6595
Show file tree
Hide file tree
Showing 10 changed files with 48 additions and 54 deletions.
8 changes: 4 additions & 4 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -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")),
Expand Down Expand Up @@ -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
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
4 changes: 3 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# butcher (development version)
# butcher 0.3.4

* Submit to CRAN for new HTML reference manuals.

# butcher 0.3.3

Expand Down
2 changes: 2 additions & 0 deletions R/docs.R
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,8 @@ locate_help_doc <- function(x, package) {
}
}

#' @export
#' @keywords internal
as.character.dev_topic <- function(x, ...) {
sub("[.]Rd$", "", x$path)
}
Expand Down
2 changes: 1 addition & 1 deletion README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -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).

Expand Down
34 changes: 17 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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/).
1 change: 0 additions & 1 deletion man/butcher-package.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 0 additions & 22 deletions revdep/README.md
Original file line number Diff line number Diff line change
@@ -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

2 changes: 1 addition & 1 deletion revdep/cran.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
26 changes: 19 additions & 7 deletions tests/testthat/test-mda.R
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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)
Expand Down

0 comments on commit 58a6595

Please sign in to comment.