From 3897843722a28d0606000339e41dc063827d624b Mon Sep 17 00:00:00 2001 From: Liming <36079400+clarkliming@users.noreply.github.com> Date: Mon, 22 May 2023 20:24:56 +0800 Subject: [PATCH] [skip vbump] prepare for CRAN release (#32) close #31 update for cran release --------- Co-authored-by: 27856297+dependabot-preview[bot]@users.noreply.github.com <27856297+dependabot-preview[bot]@users.noreply.github.com> --- DESCRIPTION | 10 +++++----- NEWS.md | 2 +- R/sascfg.R | 3 +++ R/utils.R | 5 +++++ inst/WORDLIST | 2 +- man/get_sas_cfg.Rd | 3 +++ man/get_sas_session.Rd | 3 +++ man/install_saspy.Rd | 3 +++ man/sas_session_ssh.Rd | 3 +++ man/sascfg.Rd | 3 +++ 10 files changed, 30 insertions(+), 7 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 2f3a58b..600cd00 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Type: Package Package: sasr -Title: SAS Interface in R -Version: 0.1.1 +Title: 'SAS' Interface +Version: 0.1.2 Date: 2023-04-26 Authors@R: c( person("Liming", "Li", , "liming.li@roche.com", role = c("aut", "cre")), @@ -9,9 +9,9 @@ Authors@R: c( person("Isaac", "Gravestock", , "isaac.gravestock@roche.com", role = c("aut")), person("F. Hoffmann-La Roche AG", role = c("cph", "fnd")) ) -Description: Provides a SAS interface in R, through 'SASpy'() and 'reticulate'(). - This package helps you create SAS sessions, execute SAS code in remote SAS servers, retrieve execution results and log, and exchange datasets between SAS and R. - It also helps you to install 'SASpy' and create a configuration file for the connection. Please review the 'SASpy' license file as instructed so that you comply with its separate and independent license. +Description: Provides a 'SAS' interface, through 'SASPy'() and 'reticulate'(). + This package helps you create 'SAS' sessions, execute 'SAS' code in remote 'SAS' servers, retrieve execution results and log, and exchange datasets between 'SAS' and 'R'. + It also helps you to install 'SASPy' and create a configuration file for the connection. Please review the 'SASPy' license file as instructed so that you comply with its separate and independent license. License: Apache License 2.0 URL: https://github.com/insightsengineering/sasr/ BugReports: https://github.com/insightsengineering/sasr/issues diff --git a/NEWS.md b/NEWS.md index 5da7384..a8b7c64 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,4 @@ -# sasr 0.1.1 +# sasr 0.1.2 * First CRAN version of the package. * The package facilitates the execution of SAS code from R. diff --git a/R/sascfg.R b/R/sascfg.R index c33b9bc..de34c56 100644 --- a/R/sascfg.R +++ b/R/sascfg.R @@ -12,6 +12,8 @@ #' @param sascfg (`character`)\cr target file of configuration. #' @param options (`list`)\cr additional list of arguments to pass to `ssh` command. #' +#' @return No return value. +#' #' @export #' @details #' `host` and `saspath` are required to connect to remote SAS server. Other arguments can follow default. @@ -27,4 +29,5 @@ sascfg <- function(name = "default", host, saspath, ssh = system("which ssh", in writeLines(sprintf("SAS_config_names=['%s']", name), con = f) writeLines(sprintf("%s=%s", name, toString(r_to_py(lst))), f) close(f) + invisible() } diff --git a/R/utils.R b/R/utils.R index 1d50782..c540159 100644 --- a/R/utils.R +++ b/R/utils.R @@ -6,6 +6,7 @@ #' @param method (`character`)\cr method to install `saspy`. #' @param conda (`character`)\cr path to `conda` executable. #' +#' @return No return value. #' @export install_saspy <- function(method = "auto", conda = "auto") { msg <- paste0( @@ -114,6 +115,7 @@ validate_sascfg <- function(sascfg) { #' @details this function is designed to facilitate the R users programming practice #' of function oriented programming instead of object oriented programmings. #' +#' @return A new SAS session if there are no previous SAS session, or the last SAS session created. #' @export get_sas_session <- function() { if (is.null(.sasr_env$.sas_session)) { @@ -139,6 +141,7 @@ get_sas_session <- function() { #' #' @param sascfg (`character`)\cr SAS session configuration. #' +#' @return SAS session. #' @export sas_session_ssh <- function(sascfg = get_sas_cfg()) { validate_sascfg(sascfg) @@ -156,6 +159,8 @@ sas_session_ssh <- function(sascfg = get_sas_cfg()) { #' the `sascfg_personal.py` file under current directory. If it does not exist, it will #' search this file under home directory. If this file does not exist, NULL will be returned. #' +#' @return The file path of default SAS configuration file, or NULL if not found. +#' #' @export get_sas_cfg <- function() { default_cfg <- getOption("sascfg", "sascfg_personal.py") diff --git a/inst/WORDLIST b/inst/WORDLIST index 2b3ee26..8520220 100644 --- a/inst/WORDLIST +++ b/inst/WORDLIST @@ -3,7 +3,7 @@ Hoffmann LST Reticulate SASdata -SASpy +SASPy Sabanes Viya funder diff --git a/man/get_sas_cfg.Rd b/man/get_sas_cfg.Rd index 13c2700..397bde3 100644 --- a/man/get_sas_cfg.Rd +++ b/man/get_sas_cfg.Rd @@ -6,6 +6,9 @@ \usage{ get_sas_cfg() } +\value{ +The file path of default SAS configuration file, or NULL if not found. +} \description{ \ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#experimental}{\figure{lifecycle-experimental.svg}{options: alt='[Experimental]'}}}{\strong{[Experimental]}} Obtain the file path of the SAS configuration file. diff --git a/man/get_sas_session.Rd b/man/get_sas_session.Rd index 2913d6b..d12c933 100644 --- a/man/get_sas_session.Rd +++ b/man/get_sas_session.Rd @@ -6,6 +6,9 @@ \usage{ get_sas_session() } +\value{ +A new SAS session if there are no previous SAS session, or the last SAS session created. +} \description{ \ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#experimental}{\figure{lifecycle-experimental.svg}{options: alt='[Experimental]'}}}{\strong{[Experimental]}} Obtain the last session or default session. diff --git a/man/install_saspy.Rd b/man/install_saspy.Rd index 54b021c..0b9073c 100644 --- a/man/install_saspy.Rd +++ b/man/install_saspy.Rd @@ -11,6 +11,9 @@ install_saspy(method = "auto", conda = "auto") \item{conda}{(\code{character})\cr path to \code{conda} executable.} } +\value{ +No return value. +} \description{ \ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#experimental}{\figure{lifecycle-experimental.svg}{options: alt='[Experimental]'}}}{\strong{[Experimental]}} Install \code{saspy} module in \code{reticulate}. diff --git a/man/sas_session_ssh.Rd b/man/sas_session_ssh.Rd index 914197b..58d78cf 100644 --- a/man/sas_session_ssh.Rd +++ b/man/sas_session_ssh.Rd @@ -9,6 +9,9 @@ sas_session_ssh(sascfg = get_sas_cfg()) \arguments{ \item{sascfg}{(\code{character})\cr SAS session configuration.} } +\value{ +SAS session. +} \description{ \ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#experimental}{\figure{lifecycle-experimental.svg}{options: alt='[Experimental]'}}}{\strong{[Experimental]}} Create a SAS ssh session. diff --git a/man/sascfg.Rd b/man/sascfg.Rd index 6687d4a..65fe8f6 100644 --- a/man/sascfg.Rd +++ b/man/sascfg.Rd @@ -32,6 +32,9 @@ sascfg( \item{sascfg}{(\code{character})\cr target file of configuration.} } +\value{ +No return value. +} \description{ \ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#experimental}{\figure{lifecycle-experimental.svg}{options: alt='[Experimental]'}}}{\strong{[Experimental]}} Create SAS session configuration file based on argument.