From 7823c8f41cbd8eb55cf06a585d80b22ac45b602c Mon Sep 17 00:00:00 2001 From: Glenda Yenni Date: Mon, 23 Sep 2024 15:03:17 -0600 Subject: [PATCH] Cleanup formatting code --- NAMESPACE | 3 --- R/utils-format-message.R | 36 ------------------------------------ _pkgdown.yml | 3 --- man/format_code.Rd | 17 ----------------- man/format_todo.Rd | 17 ----------------- man/format_value.Rd | 17 ----------------- 6 files changed, 93 deletions(-) delete mode 100644 R/utils-format-message.R delete mode 100644 man/format_code.Rd delete mode 100644 man/format_todo.Rd delete mode 100644 man/format_value.Rd diff --git a/NAMESPACE b/NAMESPACE index 0eb3e0cf..a31539c1 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -17,9 +17,6 @@ export(fcast_ndvi) export(fill_missing_ndvi) export(find_incomplete_censuses) export(forecasting_species) -export(format_code) -export(format_todo) -export(format_value) export(get_dataset_citation) export(get_default_data_path) export(get_future_newmoons) diff --git a/R/utils-format-message.R b/R/utils-format-message.R deleted file mode 100644 index 0e83aa1c..00000000 --- a/R/utils-format-message.R +++ /dev/null @@ -1,36 +0,0 @@ -#' Format content as a variable value -#' -#' @param ... strings -#' @return a formatted string to output -#' -#' @export -format_value <- function(...) -{ - x <- paste0(..., collapse = "") - x <- encodeString(x, quote = "'") - cli::col_blue(x) -} - -#' Format content as an action to be performed by the user -#' -#' @param ... strings -#' @return a formatted string to output -#' -#' @export -format_todo <- function(...) -{ - paste0(cli::col_red(cli::symbol$bullet), " ", ..., collapse = "") -} - -#' Format content as code -#' -#' @param ... strings -#' @return a formatted string to output -#' -#' @export -format_code <- function(...) -{ - x <- paste0(..., collapse = "") - x <- encodeString(x, quote = "`") - cli::col_silver(x) -} diff --git a/_pkgdown.yml b/_pkgdown.yml index 8d76d493..a5afb4b9 100644 --- a/_pkgdown.yml +++ b/_pkgdown.yml @@ -44,9 +44,6 @@ reference: - title: "Utilities" desc: "Formatting" contents: - - format_todo - - format_value - - format_code - na_conformer - return_if_null - rodent_species diff --git a/man/format_code.Rd b/man/format_code.Rd deleted file mode 100644 index d4d3ff58..00000000 --- a/man/format_code.Rd +++ /dev/null @@ -1,17 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/utils-format-message.R -\name{format_code} -\alias{format_code} -\title{Format content as code} -\usage{ -format_code(...) -} -\arguments{ -\item{...}{strings} -} -\value{ -a formatted string to output -} -\description{ -Format content as code -} diff --git a/man/format_todo.Rd b/man/format_todo.Rd deleted file mode 100644 index 1a17e717..00000000 --- a/man/format_todo.Rd +++ /dev/null @@ -1,17 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/utils-format-message.R -\name{format_todo} -\alias{format_todo} -\title{Format content as an action to be performed by the user} -\usage{ -format_todo(...) -} -\arguments{ -\item{...}{strings} -} -\value{ -a formatted string to output -} -\description{ -Format content as an action to be performed by the user -} diff --git a/man/format_value.Rd b/man/format_value.Rd deleted file mode 100644 index 75b14b24..00000000 --- a/man/format_value.Rd +++ /dev/null @@ -1,17 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/utils-format-message.R -\name{format_value} -\alias{format_value} -\title{Format content as a variable value} -\usage{ -format_value(...) -} -\arguments{ -\item{...}{strings} -} -\value{ -a formatted string to output -} -\description{ -Format content as a variable value -}