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

DESC and README #684

Merged
merged 5 commits into from
Jul 7, 2022
Merged
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
10 changes: 10 additions & 0 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,16 @@ Suggests:
yaml
VignetteBuilder:
knitr
Remotes:
insightsengineering/teal.code@*release,
insightsengineering/teal.reporter@*release,
insightsengineering/teal.slice@*release,
insightsengineering/teal.data@*release,
insightsengineering/teal.logger@*release,
insightsengineering/teal.widgets@*release,
insightsengineering/teal.transform@*release,
insightsengineering/scda@*release,
insightsengineering/scda.2021@*release
RdMacros:
lifecycle
Config/Needs/website: insightsengineering/nesttemplate
Expand Down
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,18 @@ See these packages for more information about how to use the different parts of

## Installation

It is recommended that you [create and use a Github PAT](https://docs.github.com/en/github/authenticating-to-github/keeping-your-account-and-data-secure/creating-a-personal-access-token) to install the latest version of this package. Once you have the PAT, run the following:
For releases from August 2022 it is recommended that you [create and use a Github PAT](https://docs.github.com/en/github/authenticating-to-github/keeping-your-account-and-data-secure/creating-a-personal-access-token) to install the latest version of this package. Once you have the PAT, run the following:

```r
Sys.setenv(GITHUB_PAT = "your_access_token_here")
if (!require("devtools")) install.packages("devtools")
devtools::install_github("insightsengineering/teal@*release")
if (!require("remotes")) install.packages("remotes")
remotes::install_github("insightsengineering/teal@*release")
```

In order to run many of the examples you will also need to install the [`scda`](https://insightsengineering.github.io/scda) package.

A stable release of all `NEST` packages from June 2022 is also available [here](https://github.com/insightsengineering/depository#readme).

See package vignettes `browseVignettes(package = "teal")` for usage of this package.

## Acknowledgment
Expand Down
9 changes: 7 additions & 2 deletions tests/testthat/test-get_rcode.R
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
testthat::test_that("get_rcode returns header only for empty chunks", {
ch <- teal.code::chunks_new()

r_code_from_chunks <- get_rcode(chunks = ch)
r_code_from_header <- sprintf("\n\n%s\n", paste(get_rcode_header(), collapse = "\n"))

# removing the Date line from the header as the seconds may be different
# in the two strings
testthat::expect_identical(
get_rcode(chunks = ch),
sprintf("\n\n%s\n", paste(get_rcode_header(), collapse = "\n"))
strsplit(r_code_from_chunks, "\n")[[1]][c(1:5, 7:14)],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤡 if works then it works`:D

strsplit(r_code_from_header, "\n")[[1]][c(1:5, 7:14)]
)
})

Expand Down