From 7583546f017e02e949e7cbb26980f0f5ad5a3d97 Mon Sep 17 00:00:00 2001 From: Damian Betebenner Date: Tue, 3 Dec 2024 16:27:10 -1000 Subject: [PATCH] Updating startup message --- .github/workflows/check-standard.yaml | 23 +++++++++++++++++------ DESCRIPTION | 4 ++-- R/zzz.R | 21 ++++++++++++++++----- inst/CITATION | 4 ++-- man/cfaTools-package.Rd | 4 ++-- 5 files changed, 39 insertions(+), 17 deletions(-) diff --git a/.github/workflows/check-standard.yaml b/.github/workflows/check-standard.yaml index d780c7b..6fa6710 100644 --- a/.github/workflows/check-standard.yaml +++ b/.github/workflows/check-standard.yaml @@ -1,5 +1,3 @@ -# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples -# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help on: push: branches: [main, master] @@ -18,9 +16,9 @@ jobs: fail-fast: false matrix: config: - - {os: macOS-latest, r: 'release'} + - {os: macos-latest, r: 'release'} - {os: windows-latest, r: 'release'} - - {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'} + - {os: ubuntu-latest, r: 'devel'} - {os: ubuntu-latest, r: 'release'} - {os: ubuntu-latest, r: 'oldrel-1'} @@ -29,12 +27,17 @@ jobs: R_KEEP_PKG_SOURCE: yes steps: + - name: Install Homebrew + if: runner.os == 'macOS' + run: | + /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" + - name: Install XQUARTZ dependencies on MacOS if: runner.os == 'macOS' run: | brew install --cask xquartz - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - uses: r-lib/actions/setup-pandoc@v2 @@ -44,6 +47,14 @@ jobs: http-user-agent: ${{ matrix.config.http-user-agent }} use-public-rspm: true + # Cache R packages to speed up builds + - name: Cache R packages + uses: actions/cache@v3 + with: + path: ~/.cache/R + key: ${{ runner.os }}-r-${{ matrix.config.r }}-${{ hashFiles('**/DESCRIPTION') }} + restore-keys: ${{ runner.os }}-r-${{ matrix.config.r }} + - uses: r-lib/actions/setup-r-dependencies@v2 with: extra-packages: any::rcmdcheck @@ -51,4 +62,4 @@ jobs: - uses: r-lib/actions/check-r-package@v2 with: - upload-snapshots: true + upload-snapshots: true \ No newline at end of file diff --git a/DESCRIPTION b/DESCRIPTION index 3e39044..b006f13 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: cfaTools -Version: 0.0-1.994 -Date: 2021-11-21 +Version: 0.0-2.0 +Date: 2024-12-3 Title: Center for Assessment Tools for Large Scale Educational Assessment Analysis Description: Center for Assessment developed Tools for Large Scale Educational Assessment. Authors@R: c(person(given=c("Damian", "W."), family="Betebenner", email="dbetebenner@nciea.org", role=c("aut", "cre")), diff --git a/R/zzz.R b/R/zzz.R index f49afa9..527c03a 100644 --- a/R/zzz.R +++ b/R/zzz.R @@ -2,9 +2,20 @@ function(libname, pkgname) { } -`.onAttach` <- -function(libname, pkgname) { - if (interactive()) { - packageStartupMessage(magenta$bold('cfaTools',paste(paste0(unlist(strsplit(as.character(packageVersion("cfaTools")), "[.]")), c(".", "-", ".", "")), collapse=""),' (11-21-2021). For help: >help("cfaTools") or visit https://centerforassessment.github.io/cfaTools')) - } +.onAttach <- function(libname, pkgname) { + if (interactive()) { + # Extract version information + version <- utils::packageVersion("cfaTools") + + # Define a friendly startup message + message_text <- paste0( + magenta(bold("\uD83C\uDF89 cfaTools v", version)), " - ", toOrdinal::toOrdinalDate("2024-12-3"), "\n", + "\U1F4A1 Tip: ", magenta(bold("> help(\"cfaTools\")")), "\n", + "\U1F310 Docs: ", magenta(bold("https://centerforassessment.github.io/cfaTools")), "\n", + "\u2728 Happy cfaTooling!" + ) + + # Display the startup message + packageStartupMessage(message_text) + } } diff --git a/inst/CITATION b/inst/CITATION index 56216b3..d36a35f 100644 --- a/inst/CITATION +++ b/inst/CITATION @@ -4,11 +4,11 @@ citEntry(entry = "Manual", title = "{cfaTools}: Center for Assessment Tools for Large Scale Educational Assessment Analysis", author = personList(as.person("Damian W. Betebenner"), as.person("Adam R. Van Iwaarden"), as.person("Nathan Dadey"), as.person("Joseph Martineau")), year = "2021", - note = "R package version 0.0-1.994", + note = "R package version 0.0-2.0", url = "https://centerforassessment.github.io/cfaTools/", textVersion = paste("Damian W. Betebenner, Adam R. Van Iwaarden, Nathan Dadey and Joseph Martineau (2021).", "cfaTools: Center for Assessment Tools for Large Scale Educational Assessment Analysis", - "(R package version 0.0-1.994", + "(R package version 0.0-2.0", "URL https://centerforassessment.github.io/cfaTools/") ) diff --git a/man/cfaTools-package.Rd b/man/cfaTools-package.Rd index fd5b472..c7c2c89 100644 --- a/man/cfaTools-package.Rd +++ b/man/cfaTools-package.Rd @@ -12,8 +12,8 @@ Center for Assessment developed Tools for Large Scale Educational Assessment. \tabular{ll}{ Package: \tab cfaTools\cr Type: \tab Package\cr -Version: \tab 0.0-1.994\cr -Date: \tab 2021-11-21\cr +Version: \tab 0.0-2.0\cr +Date: \tab 2024-12-3\cr License: \tab GPL-3\cr LazyLoad: \tab yes\cr }