From 692caba54abf04aa0656a0f9a1ea31c796deae6a Mon Sep 17 00:00:00 2001 From: Alex Chubaty Date: Thu, 23 May 2024 23:49:30 -0600 Subject: [PATCH 1/2] redoc for previous changes/updates --- man/climr-package.Rd | 2 +- man/data-option-lists.Rd | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/man/climr-package.Rd b/man/climr-package.Rd index 18d89d3..17668bd 100644 --- a/man/climr-package.Rd +++ b/man/climr-package.Rd @@ -15,7 +15,7 @@ Authors: \itemize{ \item Colin Mahony \email{Colin.Mahony@gov.bc.ca} (\href{https://orcid.org/0000-0002-6111-5675}{ORCID}) \item Bruno Tremblay \email{bruno@boostao.ca} (\href{https://orcid.org/0000-0002-2945-356X}{ORCID}) - \item Ceres Barros \email{ceres.barros@gov.bc.ca} (\href{https://orcid.org/0000-0003-4036-977X}{ORCID}) + \item Ceres Barros \email{ceres.barros@nrcan-rncan.gc.ca} (\href{https://orcid.org/0000-0003-4036-977X}{ORCID}) } Other contributors: diff --git a/man/data-option-lists.Rd b/man/data-option-lists.Rd index 59eb891..a4d8169 100644 --- a/man/data-option-lists.Rd +++ b/man/data-option-lists.Rd @@ -54,9 +54,9 @@ a character vector. \code{list_run} lists available runs for a given GCM. -\code{list_refmaps} lists available normals. +\code{list_refmaps} lists available reference maps of gridded climate normals -\code{list_obs_periods} lists available obs periods +\code{list_obs_periods} lists available observational periods \code{list_vars} lists climate variables @@ -67,7 +67,7 @@ a character vector. \code{list_gcm_hist_years} lists available years for obs projections' time series } \details{ -Currently available normals (\code{list_refmaps()}) are: +Currently available reference maps of gridded climate normals (\code{list_refmaps()}) are: \itemize{ \item "refmap_climatena" for Climate NA derived normals \item "refmap_prism" for British Columbia PRISM climatologies derived normals From 411fe1fc6f07f9c8c2bc9ccd6379b16c54c8089e Mon Sep 17 00:00:00 2001 From: Alex Chubaty Date: Thu, 23 May 2024 23:50:11 -0600 Subject: [PATCH 2/2] move packageStartupMessage to .onAttach per 'Good Practice' in `?.onAttach` --- R/climr-package.R | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/R/climr-package.R b/R/climr-package.R index 9c28599..be7a7a2 100644 --- a/R/climr-package.R +++ b/R/climr-package.R @@ -5,6 +5,17 @@ ## usethis namespace: end NULL +.onAttach <- function(libname, pkgname) { + packageStartupMessage( + "climr version 0.1.0 includes an overhaul of the naming conventions ", + "for variables, functions, parameters, and options. ", + "Call `data(name_changes)` for a table specifying the correspondence ", + "between old and new names. ", + "If you have used a previous version of climr you MUST call `cache_clear()` ", + "before using this one." + ) +} + # On load, instantiate either as new or from cache #' @importFrom data.table fwrite #' @importFrom RPostgres dbGetQuery @@ -13,7 +24,6 @@ NULL .onLoad <- function(libname, pkgname) { rInfoPath <- file.path(R_user_dir("climr", "data"), "run_info") - packageStartupMessage("climr version 0.1.0 includes an overhaul of the naming conventions for variables, functions, parameters, and options. Call `data(name_changes)` for a table specifying the correspondence between old and new names. If you have used a previous version of climr you MUST call `cache_clear()` before using this one.") dbCon <- data_connect() on.exit(try(pool::poolClose(dbCon)), add = TRUE)