From ef54190900e43c6ac5ed688e1a03eefa5b7a549c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Ver=C3=ADssimo?= <211358+averissimo@users.noreply.github.com> Date: Tue, 13 Feb 2024 13:01:51 +0100 Subject: [PATCH 1/5] remove magrittr from depends and re-export pipe --- DESCRIPTION | 1 - NAMESPACE | 3 ++- R/reexport-dplyr.R | 2 ++ R/teal.transform-package.R | 2 +- man/reexports.Rd | 16 ++++++++++++++++ 5 files changed, 21 insertions(+), 3 deletions(-) create mode 100644 R/reexport-dplyr.R create mode 100644 man/reexports.Rd diff --git a/DESCRIPTION b/DESCRIPTION index 4f33b6ec..7f664bfb 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -19,7 +19,6 @@ URL: https://insightsengineering.github.io/teal.transform/, https://github.com/insightsengineering/teal.transform/ BugReports: https://github.com/insightsengineering/teal.transform/issues Depends: - magrittr (>= 1.5), R (>= 3.6) Imports: checkmate (>= 2.1.0), diff --git a/NAMESPACE b/NAMESPACE index 49700e8d..4c783712 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -33,6 +33,7 @@ S3method(value_choices,character) S3method(value_choices,data.frame) S3method(variable_choices,character) S3method(variable_choices,data.frame) +export("%>%") export(add_no_selected_choices) export(all_choices) export(check_no_multiple_selection) @@ -66,5 +67,5 @@ export(split_by_sep) export(value_choices) export(variable_choices) import(shiny) +importFrom(dplyr,"%>%") importFrom(lifecycle,badge) -importFrom(magrittr,"%>%") diff --git a/R/reexport-dplyr.R b/R/reexport-dplyr.R new file mode 100644 index 00000000..bf8c0e2a --- /dev/null +++ b/R/reexport-dplyr.R @@ -0,0 +1,2 @@ +#' @export +dplyr::`%>%` diff --git a/R/teal.transform-package.R b/R/teal.transform-package.R index 27b4722f..d20107ac 100644 --- a/R/teal.transform-package.R +++ b/R/teal.transform-package.R @@ -3,6 +3,6 @@ "_PACKAGE" #' @import shiny -#' @importFrom magrittr %>% #' @importFrom lifecycle badge +#' @importFrom dplyr %>% NULL diff --git a/man/reexports.Rd b/man/reexports.Rd new file mode 100644 index 00000000..8a49802e --- /dev/null +++ b/man/reexports.Rd @@ -0,0 +1,16 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/reexport-dplyr.R +\docType{import} +\name{reexports} +\alias{reexports} +\alias{\%>\%} +\title{Objects exported from other packages} +\keyword{internal} +\description{ +These objects are imported from other packages. Follow the links +below to see their documentation. + +\describe{ + \item{dplyr}{\code{\link[dplyr:reexports]{\%>\%}}} +}} + From 9cd2a9d3214f26a7282880ff2f73d117bb90f486 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Ver=C3=ADssimo?= <211358+averissimo@users.noreply.github.com> Date: Tue, 13 Feb 2024 13:05:38 +0100 Subject: [PATCH 2/5] reorder importFrom tag --- R/teal.transform-package.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/teal.transform-package.R b/R/teal.transform-package.R index d20107ac..8734e6e6 100644 --- a/R/teal.transform-package.R +++ b/R/teal.transform-package.R @@ -3,6 +3,6 @@ "_PACKAGE" #' @import shiny -#' @importFrom lifecycle badge #' @importFrom dplyr %>% +#' @importFrom lifecycle badge NULL From 0340f2e78c6e9f0e166967ebefd157ca19b2adc9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Ver=C3=ADssimo?= <211358+averissimo@users.noreply.github.com> Date: Tue, 13 Feb 2024 14:37:42 +0100 Subject: [PATCH 3/5] remove from precommit and verdepcheck --- .pre-commit-config.yaml | 1 - DESCRIPTION | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index bedf5015..24e8c585 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -19,7 +19,6 @@ repos: - dplyr - lifecycle - logger - - magrittr - methods - rlang - shiny diff --git a/DESCRIPTION b/DESCRIPTION index 7f664bfb..fe3cefee 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -45,7 +45,7 @@ VignetteBuilder: knitr RdMacros: lifecycle -Config/Needs/verdepcheck: tidyverse/magrittr, mllg/checkmate, +Config/Needs/verdepcheck: mllg/checkmate, tidyverse/dplyr, r-lib/lifecycle, daroczig/logger, r-lib/rlang, rstudio/rmarkdown, rstudio/shiny, daattali/shinyjs, rstudio/shinyvalidate, insightsengineering/teal.data, From 84bfb72dbf3381f36ca205158185e31c4c331b60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Ver=C3=ADssimo?= <211358+averissimo@users.noreply.github.com> Date: Wed, 14 Feb 2024 15:53:24 +0100 Subject: [PATCH 4/5] docs: adds NEWS entry about magrittr removal --- NEWS.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/NEWS.md b/NEWS.md index 8b91fa37..c7cda63f 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,7 +1,12 @@ # teal.transform 0.4.0.9018 +### Breaking changes + +* Namespace from `magrittr` package is no longer available when loading `teal.transform`. Only re-exports pipe `%>%` operator from `dplyr` package. + ### Miscellaneous +* Removed `magrittr` from package dependencies. * Specified minimal version of package dependencies. # teal.transform 0.4.0 From b0317c93a755458e035acb1b814aa69a1a3a5b8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Ver=C3=ADssimo?= <211358+averissimo@users.noreply.github.com> Date: Thu, 15 Feb 2024 10:56:19 +0100 Subject: [PATCH 5/5] chore: move reexport of pipe operator to teal.transform-package.R --- R/reexport-dplyr.R | 2 -- R/teal.transform-package.R | 3 +++ man/reexports.Rd | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) delete mode 100644 R/reexport-dplyr.R diff --git a/R/reexport-dplyr.R b/R/reexport-dplyr.R deleted file mode 100644 index bf8c0e2a..00000000 --- a/R/reexport-dplyr.R +++ /dev/null @@ -1,2 +0,0 @@ -#' @export -dplyr::`%>%` diff --git a/R/teal.transform-package.R b/R/teal.transform-package.R index 8734e6e6..3a646cdc 100644 --- a/R/teal.transform-package.R +++ b/R/teal.transform-package.R @@ -6,3 +6,6 @@ #' @importFrom dplyr %>% #' @importFrom lifecycle badge NULL + +#' @export +dplyr::`%>%` diff --git a/man/reexports.Rd b/man/reexports.Rd index 8a49802e..4a4a50fd 100644 --- a/man/reexports.Rd +++ b/man/reexports.Rd @@ -1,5 +1,5 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/reexport-dplyr.R +% Please edit documentation in R/teal.transform-package.R \docType{import} \name{reexports} \alias{reexports}