From eafe65b900b5e723ee57364a90ddfa6105b4622a Mon Sep 17 00:00:00 2001 From: simonpcouch Date: Wed, 30 Oct 2024 11:10:01 -0500 Subject: [PATCH] add gallery of pal extensions --- DESCRIPTION | 3 +++ README.Rmd | 2 ++ README.md | 4 ++++ vignettes/gallery.Rmd | 32 ++++++++++++++++++++++++++++++++ 4 files changed, 41 insertions(+) create mode 100644 vignettes/gallery.Rmd diff --git a/DESCRIPTION b/DESCRIPTION index abc48a4..ef44f0f 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -27,9 +27,12 @@ Imports: rstudioapi, shiny Suggests: + commonmark, + DT, knitr, rmarkdown, testthat (>= 3.0.0), + tibble, withr Remotes: hadley/elmer diff --git a/README.Rmd b/README.Rmd index 41a29fa..70ccecd 100644 --- a/README.Rmd +++ b/README.Rmd @@ -69,6 +69,8 @@ As-is, the package provides ergonomic LLM assistants for R package development: * `"testthat"`: [Convert to testthat 3](https://simonpcouch.github.io/pal/reference/pal_testthat.html) * `"roxygen"`: [Document functions with roxygen](https://simonpcouch.github.io/pal/reference/pal_roxygen.html) +Users have also contributed a number of pals for a wide range of tasks--see `vignette("gallery", package = "pal")` for a gallery of user-contributed pals! + That said, all you need to create your own pal is a markdown file with some instructions on how you'd like it to work. See `prompt_new()` and `directory_load()` for more information, and [palpable](https://github.com/simonpcouch/palpable) for an example pal extension package. ## How much do pals cost? diff --git a/README.md b/README.md index ef1dbf4..bcc7f9d 100644 --- a/README.md +++ b/README.md @@ -83,6 +83,10 @@ development: - `"roxygen"`: [Document functions with roxygen](https://simonpcouch.github.io/pal/reference/pal_roxygen.html) +Users have also contributed a number of pals for a wide range of +tasks–see `vignette("gallery", package = "pal")` for a gallery of +user-contributed pals! + That said, all you need to create your own pal is a markdown file with some instructions on how you’d like it to work. See `prompt_new()` and `directory_load()` for more information, and diff --git a/vignettes/gallery.Rmd b/vignettes/gallery.Rmd new file mode 100644 index 0000000..d7fa01f --- /dev/null +++ b/vignettes/gallery.Rmd @@ -0,0 +1,32 @@ +--- +title: "Gallery" +output: rmarkdown::html_vignette +vignette: > + %\VignetteIndexEntry{Gallery} + %\VignetteEngine{knitr::rmarkdown} + %\VignetteEncoding{UTF-8} +--- + +

+ +```{r} +#| echo: false +#| eval: !expr rlang::is_installed(c("commonmark", "DT", "tibble")) +# Contributors: to add your pal to this table, add one row per pal in the +# following `tribble()` call. If you've authored a pal extension that includes +# multiple pals, include a row for each pal. +gallery <- + tibble::tribble( + ~description, ~role, ~interface, ~type, + "[Convert erroring code to use cli](https://simonpcouch.github.io/pal/reference/pal_cli.html)", "cli", "replace", "built-in", + "[Convert unit tests to testthat 3e](https://simonpcouch.github.io/pal/reference/pal_testthat.html)", "testthat", "replace", "built-in", + "[Template function documentation with roxygen](https://simonpcouch.github.io/pal/reference/pal_roxygen.html)", "roxygen", "prefix", "built-in", + "[Transition to Quarto-style chunk headers](https://gist.githubusercontent.com/hfrick/1ca8fc2cb2a4409b743e8120c6cc2223/raw/a9703edfbd4e83839af0278c33add1b33e243d02/quartochunk-replace.md)", "quartochunk", "replace", "markdown", + # silly example to be removed once there are other pal extension pkgs + "[Always reply 'beep bop boop'](https://github.com/simonpcouch/palpable)", "boop", "replace", "extension" + ) + +gallery$description <- sapply(gallery$description, commonmark::markdown_html) + +DT::datatable(gallery, escape = FALSE) +```