diff --git a/DESCRIPTION b/DESCRIPTION index 355d607..0a9674f 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -3,11 +3,11 @@ Title: Spread the Love for R Packages with Poetry Version: 2024.2.14 Authors@R: person("Romain", "François", email = "romain@tada.science", role = c("aut", "cre")) -Description: Spread the love for R packages with poetry. +Description: Uses 'ChatGPT' to create poems about R packages. + Currently contains the roses() function to make "roses are red, ..." style + poems and the prompt() function to only assemble the prompt without submitting + it to 'ChatGPT'. License: MIT + file LICENSE -Suggests: - testthat (>= 3.0.0) -Config/testthat/edition: 3 Encoding: UTF-8 Roxygen: list(markdown = TRUE) RoxygenNote: 7.3.1 diff --git a/R/roses.R b/R/roses.R index 7454498..ebcdfca 100644 --- a/R/roses.R +++ b/R/roses.R @@ -5,10 +5,10 @@ #' #' @param pkg A package #' @param hint extra information to add to the prompt -#' @param emoji Should the poem include empojis. +#' @param emoji Should the poem include emojis ? #' @param ... Passed to [openai::create_chat_completion()] #' -#' @return A poem generated by ChatGPT. +#' @return A poem generated by ChatGPT via [openai::create_chat_completion()] #' #' @importFrom glue glue #' @importFrom openai create_chat_completion @@ -16,6 +16,8 @@ #' prompt("dplyr") #' #' \dontrun{ +#' # this needs the OPENAI_API_KEY environment variable +#' # to be set. See https://irudnyts.github.io/openai/ #' roses("dplyr") #' } #' @export diff --git a/man/roses.Rd b/man/roses.Rd index 05a7d5b..133b235 100644 --- a/man/roses.Rd +++ b/man/roses.Rd @@ -14,12 +14,12 @@ prompt(pkg, hint = "", emoji = TRUE) \item{hint}{extra information to add to the prompt} -\item{emoji}{Should the poem include empojis.} +\item{emoji}{Should the poem include emojis ?} \item{...}{Passed to \code{\link[openai:create_chat_completion]{openai::create_chat_completion()}}} } \value{ -A poem generated by ChatGPT. +A poem generated by ChatGPT via \code{\link[openai:create_chat_completion]{openai::create_chat_completion()}} } \description{ Make a "roses are red ..." poem @@ -29,6 +29,8 @@ about an R package. prompt("dplyr") \dontrun{ + # this needs the OPENAI_API_KEY environment variable + # to be set. See https://irudnyts.github.io/openai/ roses("dplyr") } } diff --git a/tests/testthat.R b/tests/testthat.R deleted file mode 100644 index 60deb80..0000000 --- a/tests/testthat.R +++ /dev/null @@ -1,12 +0,0 @@ -# This file is part of the standard setup for testthat. -# It is recommended that you do not modify it. -# -# Where should you do additional test configuration? -# Learn more about the roles of various files in: -# * https://r-pkgs.org/testing-design.html#sec-tests-files-overview -# * https://testthat.r-lib.org/articles/special-files.html - -library(testthat) -library(valentine) - -test_check("valentine") diff --git a/tests/testthat/test-love.R b/tests/testthat/test-love.R deleted file mode 100644 index c300f40..0000000 --- a/tests/testthat/test-love.R +++ /dev/null @@ -1,3 +0,0 @@ -test_that("1 + 1", { - expect_equal(1 + 1, 2) -})