diff --git a/DESCRIPTION b/DESCRIPTION index a6a3067..daf9ea4 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -38,4 +38,4 @@ Remotes: val.meter=github::pharmaR/val.meter Encoding: UTF-8 Roxygen: list(markdown = TRUE) -RoxygenNote: 7.3.2 +RoxygenNote: 7.3.3 diff --git a/NAMESPACE b/NAMESPACE index 99579f0..a77cff8 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -1,6 +1,7 @@ # Generated by roxygen2: do not edit by hand export(action_disallow) +export(default_actions) export(last_rejected) export(last_rejected_permit) export(package_filter) diff --git a/R/actions.R b/R/actions.R index c5bf811..be5ac27 100644 --- a/R/actions.R +++ b/R/actions.R @@ -1,3 +1,7 @@ +#' A default set of package tools to impose actions upon +#' +#' @family actions +#' @export default_actions <- function() { x <- list( list( @@ -43,11 +47,17 @@ set_last_rejected <- function(pkgs) { last$rejected <- pkgs } +#' Retrieve the last package rejection, imposed by a criteria +#' +#' @family actions #' @export last_rejected <- function() { last$rejected } +#' Permit the last package rejection +#' +#' @family actions #' @export last_rejected_permit <- function(quiet = FALSE) { new_exceptions <- setdiff(last_rejected(), opt("exceptions")) @@ -62,6 +72,9 @@ last_rejected_permit <- function(quiet = FALSE) { invisible(new_exceptions) } +#' Disallow an action +#' +#' @family actions #' @export action_disallow <- function(pkgs, db, envir = parent.frame()) { pkgs_deps <- unlist(tools::package_dependencies( diff --git a/man/action_disallow.Rd b/man/action_disallow.Rd new file mode 100644 index 0000000..3211e80 --- /dev/null +++ b/man/action_disallow.Rd @@ -0,0 +1,18 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/actions.R +\name{action_disallow} +\alias{action_disallow} +\title{Disallow an action} +\usage{ +action_disallow(pkgs, db, envir = parent.frame()) +} +\description{ +Disallow an action +} +\seealso{ +Other actions: +\code{\link{default_actions}()}, +\code{\link{last_rejected}()}, +\code{\link{last_rejected_permit}()} +} +\concept{actions} diff --git a/man/default_actions.Rd b/man/default_actions.Rd new file mode 100644 index 0000000..76085f8 --- /dev/null +++ b/man/default_actions.Rd @@ -0,0 +1,18 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/actions.R +\name{default_actions} +\alias{default_actions} +\title{A default set of package tools to impose actions upon} +\usage{ +default_actions() +} +\description{ +A default set of package tools to impose actions upon +} +\seealso{ +Other actions: +\code{\link{action_disallow}()}, +\code{\link{last_rejected}()}, +\code{\link{last_rejected_permit}()} +} +\concept{actions} diff --git a/man/last_rejected.Rd b/man/last_rejected.Rd new file mode 100644 index 0000000..09f04fd --- /dev/null +++ b/man/last_rejected.Rd @@ -0,0 +1,18 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/actions.R +\name{last_rejected} +\alias{last_rejected} +\title{Retrieve the last package rejection, imposed by a criteria} +\usage{ +last_rejected() +} +\description{ +Retrieve the last package rejection, imposed by a criteria +} +\seealso{ +Other actions: +\code{\link{action_disallow}()}, +\code{\link{default_actions}()}, +\code{\link{last_rejected_permit}()} +} +\concept{actions} diff --git a/man/last_rejected_permit.Rd b/man/last_rejected_permit.Rd new file mode 100644 index 0000000..e9d736f --- /dev/null +++ b/man/last_rejected_permit.Rd @@ -0,0 +1,18 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/actions.R +\name{last_rejected_permit} +\alias{last_rejected_permit} +\title{Permit the last package rejection} +\usage{ +last_rejected_permit(quiet = FALSE) +} +\description{ +Permit the last package rejection +} +\seealso{ +Other actions: +\code{\link{action_disallow}()}, +\code{\link{default_actions}()}, +\code{\link{last_rejected}()} +} +\concept{actions} diff --git a/pkgdown/_pkgdown.yml b/pkgdown/_pkgdown.yml index 4357797..ddc13c2 100644 --- a/pkgdown/_pkgdown.yml +++ b/pkgdown/_pkgdown.yml @@ -71,6 +71,7 @@ reference: desc: > Behaviors to apply when packages fail to meet the expressed criteria. - contents: + - default_actions - action_disallow - last_rejected - last_rejected_permit