Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[skip vbump] v0.1.3 release #51

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
Type: Package
Package: sasr
Title: 'SAS' Interface
Version: 0.1.3
Date: 2025-02-20
Version: 0.1.4
Date: 2025-02-26
Authors@R: c(
person("Liming", "Li", , "clark.liming@google.com", role = c("aut", "cre")),
person("Liming", "Li", , "clark.liming@gmail.com", role = c("aut", "cre")),
person("Daniel", "Sabanes Bove", , "daniel.sabanesbove@gmail.com", role = "aut"),
person("Isaac", "Gravestock", , "isaac.gravestock@roche.com", role = "aut"),
person("F. Hoffmann-La Roche AG", role = c("cph", "fnd"))
Expand Down
2 changes: 1 addition & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# sasr 0.1.3
# sasr 0.1.4

* Add a basic SAS engine for knitr.
* Update `sas_session` to allow finer control over the sas session.
Expand Down
5 changes: 4 additions & 1 deletion R/sas_engine.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
#' SAS engine function
#' @param options See knitr documentation on engines.
sas_engine <- function(options) {
if (!requireNamespace("knitr", quietly = TRUE)) {
stop("Please install knitr to use the SAS engine.")
}
if (options$eval) {
ret <- sasr::run_sas(paste0(options$code, collapse = "\n"), results = "HTML")
if (identical(ret$LST, "")) {
Expand All @@ -13,5 +16,5 @@ sas_engine <- function(options) {
output <- NULL
}
options$results <- "asis"
engine_output(options, code = options$code, out = output)
knitr::engine_output(options, code = options$code, out = output)
}
2 changes: 1 addition & 1 deletion R/zzz.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ saspy <- NULL
.onLoad <- function(libname, pkgname) {
options("sascfg" = "sascfg_personal.py")
saspy <<- import("saspy", delay_load = TRUE)
if (require("knitr", quietly = TRUE)) {
if (requireNamespace("knitr", quietly = TRUE)) {
knitr::knit_engines$set(sas = sas_engine)
}
}
2 changes: 1 addition & 1 deletion man/sasr-package.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tests/testthat/test-rmarkdown.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
test_that("rmarkdown engine works", {
.sasr_env$.sas_session <- dummy_session
expect_snapshot(
rmarkdown::render(system.file("example.Rmd", package = "sasr"), quiet = TRUE)
rmarkdown::render(system.file("example.Rmd", package = "sasr"), quiet = TRUE, output_dir = tempdir()),
)
})
Loading