From 5aaf2e7ad73c72c525f4cc2038d4f7779d5e5a65 Mon Sep 17 00:00:00 2001 From: Pavlo Date: Mon, 17 Apr 2023 16:45:27 +0300 Subject: [PATCH] #1839 test implementation 2 --- NAMESPACE | 1 + NEWS.md | 4 +++ R/my_first_fcn.R | 8 +++--- _pkgdown.yml | 5 ++++ docs/pkgdown.yml | 9 ++++--- man/hello_admiral.Rd | 31 +++++++++++++++++++++++ renv/settings.json | 22 ++++++++++++++++ {R => tests/testthat}/test-my_first_fcn.R | 4 +-- 8 files changed, 74 insertions(+), 10 deletions(-) create mode 100644 man/hello_admiral.Rd create mode 100644 renv/settings.json rename {R => tests/testthat}/test-my_first_fcn.R (65%) diff --git a/NAMESPACE b/NAMESPACE index 3a11e1f716..b9e7451bb7 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -140,6 +140,7 @@ export(get_many_to_one_dataset) export(get_not_mapped) export(get_one_to_many_dataset) export(get_summary_records) +export(hello_admiral) export(impute_dtc_dt) export(impute_dtc_dtm) export(lastalive_censor) diff --git a/NEWS.md b/NEWS.md index 3875615549..dcb638e1b9 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,7 @@ +# admiral test + +Hello :-) + # admiral 0.11.0 ## New Features diff --git a/R/my_first_fcn.R b/R/my_first_fcn.R index f9fe36d5c0..c29cebe88e 100644 --- a/R/my_first_fcn.R +++ b/R/my_first_fcn.R @@ -14,10 +14,10 @@ #' @examples #' hello_admiral(hw = FALSE) #' -hello_admiral <- function (hw = TRUE) { +hello_admiral <- function(hw = TRUE) { if (hw) { - message ("Welcome to the admiral family!") } - else { - message ("Welcome to the admiral family!") + message("Welcome to the admiral family!") + } else { + message("Welcome to the admiral family!") } } diff --git a/_pkgdown.yml b/_pkgdown.yml index bf41840fc4..ccaa8654c3 100644 --- a/_pkgdown.yml +++ b/_pkgdown.yml @@ -17,6 +17,11 @@ news: reference: - title: Derivations for Adding Variables + +- subtitle: All hellos + contents: + - has_keyword("der_adxx") + - subtitle: All ADaMs contents: - has_keyword("der_gen") diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml index 9abc5c52eb..d2e67a16f4 100644 --- a/docs/pkgdown.yml +++ b/docs/pkgdown.yml @@ -1,4 +1,4 @@ -pandoc: 2.14.0.3 +pandoc: 2.19.2 pkgdown: 2.0.6 pkgdown_sha: ~ articles: @@ -19,7 +19,8 @@ articles: queries_dataset: queries_dataset.html questionnaires: questionnaires.html visits_periods: visits_periods.html -last_built: 2023-03-02T20:56Z +last_built: 2023-04-17T13:16Z urls: - reference: https://pharmaverse.github.io/admiral/cran-release/reference - article: https://pharmaverse.github.io/admiral/cran-release/articles + reference: https://pharmaverse.github.io/admiral/reference + article: https://pharmaverse.github.io/admiral/articles + diff --git a/man/hello_admiral.Rd b/man/hello_admiral.Rd new file mode 100644 index 0000000000..029e03982b --- /dev/null +++ b/man/hello_admiral.Rd @@ -0,0 +1,31 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/my_first_fcn.R +\name{hello_admiral} +\alias{hello_admiral} +\title{Derive Extension Example #' +Says hello admiral} +\usage{ +hello_admiral(hw = TRUE) +} +\arguments{ +\item{hw}{TRUE or FALSE} +} +\value{ +Happy Message +} +\description{ +Derive Extension Example #' +Says hello admiral +} +\details{ +Something Something +} +\examples{ +hello_admiral(hw = FALSE) + +} +\author{ +Open Source +} +\concept{der_adxx} +\keyword{der_adxx} diff --git a/renv/settings.json b/renv/settings.json new file mode 100644 index 0000000000..269f74fca1 --- /dev/null +++ b/renv/settings.json @@ -0,0 +1,22 @@ +{ + "bioconductor.version": [], + "external.libraries": [], + "ignored.packages": [ + "admiral", + "admiraldev", + "admiral.test", + "admiralci" + ], + "package.dependency.fields": [ + "Imports", + "Depends", + "LinkingTo" + ], + "r.version": [], + "snapshot.type": "custom", + "use.cache": true, + "vcs.ignore.cellar": true, + "vcs.ignore.library": true, + "vcs.ignore.local": true, + "vcs.manage.ignores": true +} diff --git a/R/test-my_first_fcn.R b/tests/testthat/test-my_first_fcn.R similarity index 65% rename from R/test-my_first_fcn.R rename to tests/testthat/test-my_first_fcn.R index 007c237943..b1f7233e19 100644 --- a/R/test-my_first_fcn.R +++ b/tests/testthat/test-my_first_fcn.R @@ -1,11 +1,11 @@ -test_that ("hello admiral greets without hw", { +test_that("hello admiral greets without hw", { expect_message( hello_admiral(), "^Welcome to the admiral family!\\n" ) }) -test_that ("hello admiral greets with hw", { +test_that("hello admiral greets with hw", { expect_message( hello_admiral(TRUE), "^Welcome to the admiral family!\\n"