diff --git a/DESCRIPTION b/DESCRIPTION index 293cf50..88eef92 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,14 +1,14 @@ Package: ojoutils Title: A Collection of Nifty Functions and Objects for OJO Analysts -Version: 0.2.1 +Version: 0.3.0 Authors@R: c( person("Brancen", "Gregory", , "brancengregory@gmail.com", role = c("aut", "cre")), - person("Andrew", "Bell", , "abell@okpolicy.org", role = "aut")) + person("Andrew", "Bell", , "abell@okpolicy.org", role = "aut"), + person("Mason", "Counts", , "mcounts@okpolicy.org", role = "aut")) Description: We find ourselves repeating the same simple tasks or running a series of R commands over and over again. No more! License: GPL (>= 3) Encoding: UTF-8 Roxygen: list(markdown = TRUE) -RoxygenNote: 7.3.3 Imports: arrow, cli, @@ -47,3 +47,4 @@ Config/rextendr/version: 0.5.0 SystemRequirements: Cargo (Rust's package manager), rustc >= 1.65.0, xz Depends: R (>= 4.2) +Config/roxygen2/version: 8.0.0 diff --git a/NEWS.md b/NEWS.md index d422dfa..adfbc35 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,30 @@ +# ojoutils 0.3.0 (2026-05-04) + +## Breaking Changes + +- `ojo_use_template()` has been completely rewritten with a new API: + - Changed from separate `base_dir` and `project_name` parameters to a single `path` parameter + - Project names must now be in **kebab-case** format (lowercase letters, numbers, and hyphens only) + - Automatically creates the directory if it doesn't exist + - Aborts with an error if the directory already exists and is non-empty + +## New Features + +- `ojo_use_template()` now supports **full interactive mode** - when called without arguments in an interactive R session, it prompts for: + - Project name (with kebab-case validation) + - Parent directory location + - Template type (website or report) +- Added support for two distinct templates: + - `"website"` (default) - Multi-page Quarto website from `okpolicy-website-template` + - `"report"` - Single-page Quarto report from `okpolicy-report-template` +- New `cli_yeah()` helper function for interactive yes/no confirmations with styled cli output + +## Improvements + +- Template validation uses `rlang::arg_match()` for better error messages +- Friendly template names ("website", "report") are mapped internally to GitHub repository specs +- Extracted CLI helper functions to `R/cli.R` for reuse across the package + # ojoutils 0.2.0 (2026-04-23) - Adds Google Cloud Storage (GCS) utilities: `gcs_auth_bucket()`, `gcs_read_csv()`, `gcs_write_csv()`, `gcs_list_objects()`, and `tar_gcs_csv()` for working with GCS via the arrow package. diff --git a/man/gcs_read_csv.Rd b/man/gcs_read_csv.Rd index 94f9dba..ff11290 100644 --- a/man/gcs_read_csv.Rd +++ b/man/gcs_read_csv.Rd @@ -46,6 +46,6 @@ data <- gcs_read_csv("my-project-data", "processed/sales_2024.csv") } \seealso{ -\code{\link[arrow:read_delim_arrow]{arrow::read_csv_arrow()}} for reading options, +\code{\link[arrow:read_csv_arrow]{arrow::read_csv_arrow()}} for reading options, \code{\link[janitor:clean_names]{janitor::clean_names()}} for name cleaning details } diff --git a/man/ojo_counties.Rd b/man/ojo_counties.Rd index ea2622b..182980f 100644 --- a/man/ojo_counties.Rd +++ b/man/ojo_counties.Rd @@ -1,16 +1,11 @@ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/county.R -\docType{data} \name{ojo_counties} \alias{ojo_counties} \title{Oklahoma Counties} -\format{ -An object of class \code{character} of length 77. -} \usage{ ojo_counties } \description{ Oklahoma Counties } -\keyword{datasets} diff --git a/man/ojoutils-package.Rd b/man/ojoutils-package.Rd index 3228b07..14dde4f 100644 --- a/man/ojoutils-package.Rd +++ b/man/ojoutils-package.Rd @@ -20,7 +20,9 @@ Useful links: Authors: \itemize{ + \item Brancen Gregory \email{brancengregory@gmail.com} \item Andrew Bell \email{abell@okpolicy.org} + \item Mason Counts \email{mcounts@okpolicy.org} } }