From 454e1a7f8e819ed93c4b18bd98b98c411672f064 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Ver=C3=ADssimo?= <211358+averissimo@users.noreply.github.com> Date: Tue, 30 Jan 2024 20:16:39 +0100 Subject: [PATCH 01/44] feat: remove uneeded depedencies --- DESCRIPTION | 4 ---- README.Rmd | 2 +- README.md | 4 ++-- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index b2201a55..74a44307 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -41,17 +41,13 @@ Imports: tm Suggests: admiral, - devtools, DT, knitr, labelled, - lintr, metacore, readxl, rmarkdown, - spelling, testthat (>= 3.0.0), - usethis, withr VignetteBuilder: knitr diff --git a/README.Rmd b/README.Rmd index 462f205c..d875a81f 100644 --- a/README.Rmd +++ b/README.Rmd @@ -46,7 +46,7 @@ install.packages("xportr") ### Development version: ```{r, eval = FALSE} -devtools::install_github("https://github.com/atorus-research/xportr.git", ref = "devel") +install.packages("teal", repos = c("https://pharmaverse.r-universe.dev", getOption("repos"))) ``` # What is xportr? diff --git a/README.md b/README.md index bebb06c8..214fca27 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,7 @@ install.packages("xportr") ### Development version: ``` r -devtools::install_github("https://github.com/atorus-research/xportr.git", ref = "devel") +install.packages("teal", repos = c("https://pharmaverse.r-universe.dev", getOption("repos"))) ``` # What is xportr? @@ -155,7 +155,7 @@ each function call. ``` r adsl %>% - xportr_metadata(var_spec, "ADSL") %>% + xportr_metadata(var_spec, "ADSL", verbose = "warn") %>% xportr_type() %>% xportr_length() %>% xportr_label() %>% From 278b098994e95acd3d2d365f50d013c3c2dd0d51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Ver=C3=ADssimo?= <211358+averissimo@users.noreply.github.com> Date: Tue, 30 Jan 2024 20:20:35 +0100 Subject: [PATCH 02/44] fix: remove unnecessary magrittr conditionals --- R/metadata.R | 12 ++--- man/metadata.Rd | 12 ++--- tests/testthat/test-metadata.R | 84 +++++++++++++++++----------------- 3 files changed, 51 insertions(+), 57 deletions(-) diff --git a/R/metadata.R b/R/metadata.R index e6060ece..92116eca 100644 --- a/R/metadata.R +++ b/R/metadata.R @@ -32,14 +32,12 @@ #' #' xportr_metadata(adlb, metadata, "test") #' -#' if (rlang::is_installed("magrittr")) { -#' library(magrittr) +#' library(magrittr) #' -#' adlb %>% -#' xportr_metadata(metadata, "test") %>% -#' xportr_type() %>% -#' xportr_order() -#' } +#' adlb %>% +#' xportr_metadata(metadata, "test") %>% +#' xportr_type() %>% +#' xportr_order() xportr_metadata <- function(.df, metadata = NULL, domain = NULL, diff --git a/man/metadata.Rd b/man/metadata.Rd index da5de14c..0c542e1e 100644 --- a/man/metadata.Rd +++ b/man/metadata.Rd @@ -49,12 +49,10 @@ adlb <- data.frame( xportr_metadata(adlb, metadata, "test") -if (rlang::is_installed("magrittr")) { - library(magrittr) +library(magrittr) - adlb \%>\% - xportr_metadata(metadata, "test") \%>\% - xportr_type() \%>\% - xportr_order() -} +adlb \%>\% + xportr_metadata(metadata, "test") \%>\% + xportr_type() \%>\% + xportr_order() } diff --git a/tests/testthat/test-metadata.R b/tests/testthat/test-metadata.R index 55c91cde..0bc0549e 100644 --- a/tests/testthat/test-metadata.R +++ b/tests/testthat/test-metadata.R @@ -743,49 +743,47 @@ test_that("xportr_*: Domain is kept in between calls", { # end test_that("`xportr_metadata()` results match traditional results", { - if (require(magrittr, quietly = TRUE)) { - test_dir <- tempdir() - - trad_path <- file.path(test_dir, "adsltrad.xpt") - metadata_path <- file.path(test_dir, "adslmeta.xpt") - - dataset_spec_low <- setNames(dataset_spec, tolower(names(dataset_spec))) - names(dataset_spec_low)[[2]] <- "label" - - var_spec_low <- setNames(var_spec, tolower(names(var_spec))) - names(var_spec_low)[[5]] <- "type" - - metadata_df <- adsl %>% - xportr_metadata(var_spec_low, "ADSL", verbose = "none") %>% - xportr_type() %>% - xportr_length() %>% - xportr_label() %>% - xportr_order() %>% - xportr_format() %>% - xportr_df_label(dataset_spec_low) %>% - xportr_write(metadata_path) - - trad_df <- adsl %>% - xportr_type(var_spec_low, "ADSL", verbose = "none") %>% - xportr_length(var_spec_low, "ADSL", verbose = "none") %>% - xportr_label(var_spec_low, "ADSL", verbose = "none") %>% - xportr_order(var_spec_low, "ADSL", verbose = "none") %>% - xportr_format(var_spec_low, "ADSL") %>% - xportr_df_label(dataset_spec_low, "ADSL") %>% - xportr_write(trad_path) - - expect_identical( - metadata_df, - structure( - trad_df, - `_xportr.df_metadata_` = var_spec_low, - `_xportr.df_verbose_` = "none" - ) - ) + test_dir <- tempdir() + + trad_path <- file.path(test_dir, "adsltrad.xpt") + metadata_path <- file.path(test_dir, "adslmeta.xpt") + + dataset_spec_low <- setNames(dataset_spec, tolower(names(dataset_spec))) + names(dataset_spec_low)[[2]] <- "label" - expect_identical( - haven::read_xpt(metadata_path), - haven::read_xpt(trad_path) + var_spec_low <- setNames(var_spec, tolower(names(var_spec))) + names(var_spec_low)[[5]] <- "type" + + metadata_df <- adsl %>% + xportr_metadata(var_spec_low, "ADSL", verbose = "none") %>% + xportr_type() %>% + xportr_length() %>% + xportr_label() %>% + xportr_order() %>% + xportr_format() %>% + xportr_df_label(dataset_spec_low) %>% + xportr_write(metadata_path) + + trad_df <- adsl %>% + xportr_type(var_spec_low, "ADSL", verbose = "none") %>% + xportr_length(var_spec_low, "ADSL", verbose = "none") %>% + xportr_label(var_spec_low, "ADSL", verbose = "none") %>% + xportr_order(var_spec_low, "ADSL", verbose = "none") %>% + xportr_format(var_spec_low, "ADSL") %>% + xportr_df_label(dataset_spec_low, "ADSL") %>% + xportr_write(trad_path) + + expect_identical( + metadata_df, + structure( + trad_df, + `_xportr.df_metadata_` = var_spec_low, + `_xportr.df_verbose_` = "none" ) - } + ) + + expect_identical( + haven::read_xpt(metadata_path), + haven::read_xpt(trad_path) + ) }) From 30ba898d83590df93b95fc908bb1591020597ff7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Ver=C3=ADssimo?= <211358+averissimo@users.noreply.github.com> Date: Tue, 30 Jan 2024 20:27:53 +0100 Subject: [PATCH 03/44] fix: linting project (adds workflow dispatch) --- .github/workflows/lint.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 85e6a1b3..7556a66f 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -9,6 +9,7 @@ on: pull_request: branches: - main + workflow_dispatch: jobs: lint: @@ -25,7 +26,6 @@ jobs: - uses: r-lib/actions/setup-r-dependencies@v2 with: extra-packages: any::lintr, local::. - needs: lint - name: Lint run: lintr::lint_package() From 394a6a5c0a85891ceec870a3278e2ea828e77639 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Ver=C3=ADssimo?= <211358+averissimo@users.noreply.github.com> Date: Tue, 30 Jan 2024 20:45:11 +0100 Subject: [PATCH 04/44] fix: cleanup pkgdown from SASxport --- .github/workflows/pkgdown.yaml | 25 +++---------------------- 1 file changed, 3 insertions(+), 22 deletions(-) diff --git a/.github/workflows/pkgdown.yaml b/.github/workflows/pkgdown.yaml index 967eb46d..227b1a87 100644 --- a/.github/workflows/pkgdown.yaml +++ b/.github/workflows/pkgdown.yaml @@ -17,29 +17,10 @@ jobs: - uses: r-lib/actions/setup-pandoc@v1 - - name: Query dependencies - run: | - install.packages('remotes') - saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2) - writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version") - shell: Rscript {0} - - - name: Restore R package cache - uses: actions/cache@v2 + - uses: r-lib/actions/setup-r-dependencies@v2 with: - path: ${{ env.R_LIBS_USER }} - key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }} - restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1- - - - name: Install dependencies - run: | - remotes::install_deps(dependencies = TRUE) - install.packages("pkgdown", type = "binary") - remotes::install_github("warnes/SASxport", ref = "master") - shell: Rscript {0} - - - name: Install package - run: R CMD INSTALL . + extra-packages: any::pkgdown, local::. + needs: website - name: Deploy package run: | From 101fc81197042960f22f3b1a32405e757fffda4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Ver=C3=ADssimo?= <211358+averissimo@users.noreply.github.com> Date: Tue, 30 Jan 2024 21:02:01 +0100 Subject: [PATCH 05/44] fix: updates to all --- .github/workflows/check-links.yml | 2 + .github/workflows/check-standard.yaml | 7 +++- .github/workflows/lint.yaml | 3 ++ .github/workflows/pkgdown.yaml | 1 + .github/workflows/spellcheck.yml | 60 ++++----------------------- .github/workflows/style.yml | 36 ++++++++++++++-- .github/workflows/test-coverage.yaml | 24 ++--------- .github/workflows/vbump.yaml | 1 + 8 files changed, 59 insertions(+), 75 deletions(-) diff --git a/.github/workflows/check-links.yml b/.github/workflows/check-links.yml index 21e50fa5..98197598 100644 --- a/.github/workflows/check-links.yml +++ b/.github/workflows/check-links.yml @@ -1,3 +1,4 @@ +--- name: Check URLs πŸ”— on: @@ -7,6 +8,7 @@ on: pull_request: branches: - main + workflow_dispatch: jobs: links: diff --git a/.github/workflows/check-standard.yaml b/.github/workflows/check-standard.yaml index 05c1b71c..ae9b1047 100644 --- a/.github/workflows/check-standard.yaml +++ b/.github/workflows/check-standard.yaml @@ -1,3 +1,4 @@ +--- # Workflow derived from https://github.com/r-lib/actions/tree/master/examples # Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help name: R-CMD-check πŸ“¦ @@ -9,6 +10,7 @@ on: pull_request: branches: - main + workflow_dispatch: jobs: R-CMD-check: @@ -30,6 +32,9 @@ jobs: GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} R_KEEP_PKG_SOURCE: yes + if: > + !contains(github.event.commits[0].message, '[skip checks]') + steps: - uses: actions/checkout@v3 @@ -43,6 +48,6 @@ jobs: - uses: r-lib/actions/setup-r-dependencies@v2 with: - extra-packages: rcmdcheck + extra-packages: any::rcmdcheck - uses: r-lib/actions/check-r-package@v2 diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 7556a66f..2548a242 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -1,3 +1,4 @@ +--- # Workflow derived from https://github.com/r-lib/actions/tree/v2/examples # Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help name: Check Lint 🧹 @@ -14,6 +15,8 @@ on: jobs: lint: runs-on: ubuntu-latest + if: > + !contains(github.event.commits[0].message, '[skip lint]') env: GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} steps: diff --git a/.github/workflows/pkgdown.yaml b/.github/workflows/pkgdown.yaml index 227b1a87..d43e5feb 100644 --- a/.github/workflows/pkgdown.yaml +++ b/.github/workflows/pkgdown.yaml @@ -1,3 +1,4 @@ +--- name: Deploy pkgdown site πŸ“œ on: diff --git a/.github/workflows/spellcheck.yml b/.github/workflows/spellcheck.yml index 5c7adb19..a5472a63 100644 --- a/.github/workflows/spellcheck.yml +++ b/.github/workflows/spellcheck.yml @@ -1,3 +1,4 @@ +--- name: Check Spelling πŸ†Ž on: @@ -8,56 +9,13 @@ on: pull_request: branches: - main - -concurrency: - group: spelling-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true + workflow_dispatch: jobs: - roxygen: - name: Spellcheck πŸ”  - runs-on: ubuntu-20.04 - env: - GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} - if: > - !contains(github.event.commits[0].message, '[skip spellcheck]') - && github.event.pull_request.draft == false - steps: - - name: Checkout repo πŸ›Ž - uses: actions/checkout@v3 - with: - persist-credentials: false - fetch-depth: 0 - - - name: Setup R πŸ“Š - uses: r-lib/actions/setup-r@v2 - with: - r-version: 4.1.3 - - - uses: actions/cache@v2 - if: startsWith(runner.os, 'Linux') - with: - path: ~/.local/share/renv - key: ${{ runner.os }}-renv-${{ hashFiles('**/renv.lock') }} - restore-keys: | - ${{ runner.os }}-renv- - - name: Query dependencies - run: | - install.packages('remotes') - saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2) - writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version") - shell: Rscript {0} - - - name: Install system dependencies - if: runner.os == 'Linux' - run: | - while read -r cmd - do - eval sudo $cmd - done < <(Rscript -e 'writeLines(remotes::system_requirements("ubuntu", "20.04"))') - - - name: Run Spellcheck πŸ‘Ÿ - uses: insightsengineering/r-spellcheck-action@v3 - with: - exclude: data/*,**/*.Rd,**/*.md,*.md - additional_options: "" + spelling: + name: Run Spellcheck πŸ‘Ÿ + uses: insightsengineering/r-spellcheck-action@v3 + secrets: + REPO_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + exclude: data/*,**/*.Rd,**/*.md,*.md diff --git a/.github/workflows/style.yml b/.github/workflows/style.yml index 410da4b5..acbfe208 100644 --- a/.github/workflows/style.yml +++ b/.github/workflows/style.yml @@ -1,3 +1,4 @@ +--- name: Check Style 🎨 on: @@ -7,6 +8,7 @@ on: pull_request: branches: - main + workflow_dispatch: concurrency: group: style-${{ github.event.pull_request.number || github.ref }} @@ -30,14 +32,42 @@ jobs: with: use-public-rspm: true - - name: Install styler πŸ–ŒοΈ - run: install.packages(c("styler", "knitr", "roxygen2"), repos = "https://cloud.r-project.org") + - name: Install dependencies + uses: r-lib/actions/setup-r-dependencies@v2 + with: + extra-packages: any::styler, any::roxygen2 + needs: styler + + - name: Enable styler cache + run: styler::cache_activate() shell: Rscript {0} + - name: Determine cache location + id: styler-location + run: | + cat( + "location=", + styler::cache_info(format = "tabular")$location, + "\n", + file = Sys.getenv("GITHUB_OUTPUT"), + append = TRUE, + sep = "" + ) + shell: Rscript {0} + + - name: Cache styler + uses: actions/cache@v4 + with: + path: ${{ steps.styler-location.outputs.location }} + key: ${{ runner.os }}-styler-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-styler- + ${{ runner.os }}- + - name: Run styler πŸ–ΌοΈ run: | detect <- styler::style_pkg(dry = "on") - if (TRUE %in% detect$changed) { + if (any(detect$changed)) { problems <- subset(detect$file, detect$changed == T) cat(paste("Styling errors found in", length(problems), "files\n")) cat("Please run `styler::style_pkg()` to fix the style\n") diff --git a/.github/workflows/test-coverage.yaml b/.github/workflows/test-coverage.yaml index 43ae648d..38c515b5 100644 --- a/.github/workflows/test-coverage.yaml +++ b/.github/workflows/test-coverage.yaml @@ -20,27 +20,11 @@ jobs: - uses: r-lib/actions/setup-pandoc@v1 - - name: Query dependencies - run: | - install.packages('remotes') - saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2) - writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version") - shell: Rscript {0} - - - name: Restore R package cache - uses: actions/cache@v2 + - name: Install R package dependencies + uses: r-lib/actions/setup-r-dependencies@v2 with: - path: ${{ env.R_LIBS_USER }} - key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }} - restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1- - - - name: Install dependencies - run: | - install.packages(c("remotes")) - remotes::install_deps(dependencies = TRUE) - remotes::install_cran("covr") - remotes::install_github("warnes/SASxport", ref = "master") - shell: Rscript {0} + # Necessary to avoid object usage linter errors. + extra-packages: local::., any::covr - name: Test coverage run: covr::codecov() diff --git a/.github/workflows/vbump.yaml b/.github/workflows/vbump.yaml index a2091019..11f9d4e5 100644 --- a/.github/workflows/vbump.yaml +++ b/.github/workflows/vbump.yaml @@ -1,3 +1,4 @@ +--- name: Version Bump ⬆️ on: From 4874088d7e6465a0ab605e237c2eb314b01370a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Ver=C3=ADssimo?= <211358+averissimo@users.noreply.github.com> Date: Tue, 30 Jan 2024 23:36:15 +0100 Subject: [PATCH 06/44] fix: yaml file for spellcheck had duplicate entry --- .github/workflows/spellcheck.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/spellcheck.yml b/.github/workflows/spellcheck.yml index a5472a63..50109423 100644 --- a/.github/workflows/spellcheck.yml +++ b/.github/workflows/spellcheck.yml @@ -9,7 +9,6 @@ on: pull_request: branches: - main - workflow_dispatch: jobs: spelling: From 9edd32c8ab9ec7e3ae46a4c0a3809b642aa0e1b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Ver=C3=ADssimo?= <211358+averissimo@users.noreply.github.com> Date: Tue, 30 Jan 2024 23:43:14 +0100 Subject: [PATCH 07/44] feat: spelling using generic job --- .github/workflows/spellcheck.yml | 29 ++++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/.github/workflows/spellcheck.yml b/.github/workflows/spellcheck.yml index 50109423..695bc501 100644 --- a/.github/workflows/spellcheck.yml +++ b/.github/workflows/spellcheck.yml @@ -13,8 +13,27 @@ on: jobs: spelling: name: Run Spellcheck πŸ‘Ÿ - uses: insightsengineering/r-spellcheck-action@v3 - secrets: - REPO_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - exclude: data/*,**/*.Rd,**/*.md,*.md + runs-on: ubuntu-latest + # exclude: data/*,**/*.Rd,**/*.md,*.md + if: > + !contains(github.event.commits[0].message, '[skip spellcheck]') + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Install R + uses: r-lib/actions/setup-r@v2 + + - name: Install R package dependencies + uses: r-lib/actions/setup-r-dependencies@v2 + with: + extra-packages: any::spelling + + - name: Spell Check + run: | + spell_check <- spelling::spell_check_package(use_wordlist = TRUE) + if (nrow(spell_check) > 0) { + print(spell_check) + } + quit(status = nrow(spell_check) > 0) + shell: Rscript {0} From 9b1b9a198d76e57e9f03fef7bfcf1d4a69ee65b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Ver=C3=ADssimo?= <211358+averissimo@users.noreply.github.com> Date: Tue, 30 Jan 2024 23:49:43 +0100 Subject: [PATCH 08/44] update wordlist --- NEWS.md | 2 +- README.md | 2 +- inst/WORDLIST | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/NEWS.md b/NEWS.md index d2114c91..048b7881 100644 --- a/NEWS.md +++ b/NEWS.md @@ -53,7 +53,7 @@ done to make the use of xportr functions more explicit. (#182) * Added function `xportr_metadata()` to explicitly set metadata at the start of a pipeline (#44) * Metadata order columns are now coerced to numeric by default in `xportr_order()` to prevent character sorting (#149) * Message is shown on `xportr_*` functions when the metadata being used has multiple variables with the same name in the same domain (#128) -* Fixed an issue with `xport_type()` where `DT`, `DTM` variables with a format specified in the metadata (e.g. date9., datetime20.) were being converted to numeric, which will cause a 10 year difference when reading it back by `read_xpt()`. SAS's uniform start date is 1960 whereas Linux's uniform start date is 1970 (#142). +* Fixed an issue with `xport_type()` where `DT`, `DTM` variables with a format specified in the metadata (e.g. `date9.`, `datetime20.`) were being converted to numeric, which will cause a 10 year difference when reading it back by `read_xpt()`. SAS's uniform start date is 1960 whereas Linux's uniform start date is 1970 (#142). * Fixed an issue with R's pipe `|>` that was causing functions to abort (#97) * Removed `<` and `>` as illegal characters in variable and dataset labels (#98) diff --git a/README.md b/README.md index 214fca27..31275d06 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ file(xpt)](https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/movefile/n1xbw As always, we welcome your feedback. If you spot a bug, would like to see a new feature, or if any documentation is unclear - submit an issue -on [xportr’s GitHub +on [xportr's GitHub page](https://github.com/atorus-research/xportr/issues). ## Installation diff --git a/inst/WORDLIST b/inst/WORDLIST index 494ba288..0737fcba 100644 --- a/inst/WORDLIST +++ b/inst/WORDLIST @@ -12,12 +12,12 @@ DCREASCD DM GSK JPT -Lifecycle MMSE ORCID PHUSE Pharma Repostiory +SAS's SASformat SASlength SAStype @@ -33,7 +33,6 @@ acrf adrg bootswatch chr -cli deliverables df iso @@ -41,6 +40,7 @@ magrittr metacore pre repo +sas sdrg validator validators From ff7aeeb8e236a885559ae6c0e5b10319cb777300 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Ver=C3=ADssimo?= <211358+averissimo@users.noreply.github.com> Date: Tue, 30 Jan 2024 23:52:15 +0100 Subject: [PATCH 09/44] fix: extra whitespace --- .github/workflows/style.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/style.yml b/.github/workflows/style.yml index acbfe208..79cd8f72 100644 --- a/.github/workflows/style.yml +++ b/.github/workflows/style.yml @@ -42,7 +42,7 @@ jobs: run: styler::cache_activate() shell: Rscript {0} - - name: Determine cache location + - name: Determine cache location id: styler-location run: | cat( From c7cdee26d25f70f54d8c468d86a6d7fa6074a558 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Ver=C3=ADssimo?= <211358+averissimo@users.noreply.github.com> Date: Tue, 30 Jan 2024 23:57:37 +0100 Subject: [PATCH 10/44] bumps action version --- .github/workflows/style.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/style.yml b/.github/workflows/style.yml index 79cd8f72..2bc5c4d2 100644 --- a/.github/workflows/style.yml +++ b/.github/workflows/style.yml @@ -23,7 +23,7 @@ jobs: && github.event.pull_request.draft == false steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: path: ${{ github.event.repository.name }} fetch-depth: 0 From e83204bb8d99d07afa10a60441bbb4c9cd172c64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Ver=C3=ADssimo?= <211358+averissimo@users.noreply.github.com> Date: Wed, 31 Jan 2024 00:03:09 +0100 Subject: [PATCH 11/44] revert: back to ie spellcheck action --- .github/workflows/spellcheck.yml | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/.github/workflows/spellcheck.yml b/.github/workflows/spellcheck.yml index 695bc501..f591e0d8 100644 --- a/.github/workflows/spellcheck.yml +++ b/.github/workflows/spellcheck.yml @@ -29,11 +29,5 @@ jobs: with: extra-packages: any::spelling - - name: Spell Check - run: | - spell_check <- spelling::spell_check_package(use_wordlist = TRUE) - if (nrow(spell_check) > 0) { - print(spell_check) - } - quit(status = nrow(spell_check) > 0) - shell: Rscript {0} + - name: Run Spelling Check test + uses: insightsengineering/r-spellcheck-action@v2 From e72cb0fc6ae2ead09adedb8b91a19733fb344dda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Ver=C3=ADssimo?= <211358+averissimo@users.noreply.github.com> Date: Wed, 31 Jan 2024 00:04:30 +0100 Subject: [PATCH 12/44] fix: styler error --- .github/workflows/style.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/style.yml b/.github/workflows/style.yml index 2bc5c4d2..2211c0a7 100644 --- a/.github/workflows/style.yml +++ b/.github/workflows/style.yml @@ -35,7 +35,7 @@ jobs: - name: Install dependencies uses: r-lib/actions/setup-r-dependencies@v2 with: - extra-packages: any::styler, any::roxygen2 + extra-packages: any::styler, any::roxygen2, local::. needs: styler - name: Enable styler cache From 7a86d3ae4ffed5fe8b71d90bf9eeffcf77cebb68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Ver=C3=ADssimo?= <211358+averissimo@users.noreply.github.com> Date: Wed, 31 Jan 2024 00:15:00 +0100 Subject: [PATCH 13/44] fix: remove path --- .github/workflows/style.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/style.yml b/.github/workflows/style.yml index 2211c0a7..82e2dbe3 100644 --- a/.github/workflows/style.yml +++ b/.github/workflows/style.yml @@ -25,14 +25,14 @@ jobs: steps: - uses: actions/checkout@v4 with: - path: ${{ github.event.repository.name }} fetch-depth: 0 - - uses: r-lib/actions/setup-r@v2 + - name: Setup R πŸ“Š + uses: r-lib/actions/setup-r@v2 with: use-public-rspm: true - - name: Install dependencies + - name: Install R package dependencies πŸ“¦ uses: r-lib/actions/setup-r-dependencies@v2 with: extra-packages: any::styler, any::roxygen2, local::. From 200e56eaa6b08c347030f246bbff0dd642dc77ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Ver=C3=ADssimo?= <211358+averissimo@users.noreply.github.com> Date: Wed, 31 Jan 2024 00:22:11 +0100 Subject: [PATCH 14/44] adds names to steps --- .github/workflows/check-links.yml | 3 ++- .github/workflows/check-standard.yaml | 14 ++++++++------ .github/workflows/lint.yaml | 8 +++++--- .github/workflows/pkgdown.yaml | 14 +++++++++----- .github/workflows/spellcheck.yml | 18 +++++++++++------- .github/workflows/test-coverage.yaml | 10 +++++----- 6 files changed, 40 insertions(+), 27 deletions(-) diff --git a/.github/workflows/check-links.yml b/.github/workflows/check-links.yml index 98197598..1af191af 100644 --- a/.github/workflows/check-links.yml +++ b/.github/workflows/check-links.yml @@ -17,7 +17,8 @@ jobs: if: > !contains(github.event.commits[0].message, '[skip links]') steps: - - uses: actions/checkout@v3 + - name: Checkout repository πŸ›Ž + uses: actions/checkout@v4 - name: Check URLs in docs πŸ“‘ uses: lycheeverse/lychee-action@v1.5.1 diff --git a/.github/workflows/check-standard.yaml b/.github/workflows/check-standard.yaml index ae9b1047..14013bf9 100644 --- a/.github/workflows/check-standard.yaml +++ b/.github/workflows/check-standard.yaml @@ -36,18 +36,20 @@ jobs: !contains(github.event.commits[0].message, '[skip checks]') steps: - - uses: actions/checkout@v3 + - name: Checkout repository πŸ›Ž + uses: actions/checkout@v4 - - uses: r-lib/actions/setup-pandoc@v2 - - - uses: r-lib/actions/setup-r@v2 + - name: Setup R πŸ“Š + uses: r-lib/actions/setup-r@v2 with: r-version: ${{ matrix.config.r }} http-user-agent: ${{ matrix.config.http-user-agent }} use-public-rspm: true - - uses: r-lib/actions/setup-r-dependencies@v2 + - name: Install R package dependencies πŸ“¦ + uses: r-lib/actions/setup-r-dependencies@v2 with: extra-packages: any::rcmdcheck - - uses: r-lib/actions/check-r-package@v2 + - name: Run R CMD check 🎯 + uses: r-lib/actions/check-r-package@v2 diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 2548a242..5f5cb64c 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -20,9 +20,11 @@ jobs: env: GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} steps: - - uses: actions/checkout@v3 + - name: Checkout repository πŸ›Ž + uses: actions/checkout@v4 - - uses: r-lib/actions/setup-r@v2 + - name: Setup R πŸ“Š + uses: r-lib/actions/setup-r@v2 with: use-public-rspm: true @@ -30,7 +32,7 @@ jobs: with: extra-packages: any::lintr, local::. - - name: Lint + - name: Run Linter πŸ‘Ÿ run: lintr::lint_package() shell: Rscript {0} env: diff --git a/.github/workflows/pkgdown.yaml b/.github/workflows/pkgdown.yaml index d43e5feb..e6c27271 100644 --- a/.github/workflows/pkgdown.yaml +++ b/.github/workflows/pkgdown.yaml @@ -12,18 +12,22 @@ jobs: env: GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} steps: - - uses: actions/checkout@v3 + - name: Checkout repository πŸ›Ž + uses: actions/checkout@v4 - - uses: r-lib/actions/setup-r@v2 + - name: Setup R πŸ“Š + uses: r-lib/actions/setup-r@v2 - - uses: r-lib/actions/setup-pandoc@v1 + - name: Install Pandoc + uses: r-lib/actions/setup-pandoc@v1 - - uses: r-lib/actions/setup-r-dependencies@v2 + - name: Install R package dependencies πŸ“¦ + uses: r-lib/actions/setup-r-dependencies@v2 with: extra-packages: any::pkgdown, local::. needs: website - - name: Deploy package + - name: Deploy package ☁️ run: | git config --local user.email "actions@github.com" git config --local user.name "GitHub Actions" diff --git a/.github/workflows/spellcheck.yml b/.github/workflows/spellcheck.yml index f591e0d8..3311daf7 100644 --- a/.github/workflows/spellcheck.yml +++ b/.github/workflows/spellcheck.yml @@ -12,22 +12,26 @@ on: jobs: spelling: - name: Run Spellcheck πŸ‘Ÿ + name: Run Spellcheck πŸ”  runs-on: ubuntu-latest - # exclude: data/*,**/*.Rd,**/*.md,*.md + if: > !contains(github.event.commits[0].message, '[skip spellcheck]') + steps: - - name: Checkout repository - uses: actions/checkout@v3 + - name: Checkout repository πŸ›Ž + uses: actions/checkout@v4 - - name: Install R + - name: Setup R πŸ“Š uses: r-lib/actions/setup-r@v2 - - name: Install R package dependencies + - name: Install R package dependencies πŸ“¦ uses: r-lib/actions/setup-r-dependencies@v2 with: extra-packages: any::spelling - - name: Run Spelling Check test + - name: Run Spellcheck πŸ‘Ÿ uses: insightsengineering/r-spellcheck-action@v2 + with: + exclude: data/*,**/*.Rd,**/*.md,*.md + additional_options: "" diff --git a/.github/workflows/test-coverage.yaml b/.github/workflows/test-coverage.yaml index 38c515b5..99b3da49 100644 --- a/.github/workflows/test-coverage.yaml +++ b/.github/workflows/test-coverage.yaml @@ -14,11 +14,11 @@ jobs: env: GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} steps: - - uses: actions/checkout@v3 + - name: Checkout repository πŸ›Ž + uses: actions/checkout@v4 - - uses: r-lib/actions/setup-r@v2 - - - uses: r-lib/actions/setup-pandoc@v1 + - name: Setup R πŸ“Š + uses: r-lib/actions/setup-r@v2 - name: Install R package dependencies uses: r-lib/actions/setup-r-dependencies@v2 @@ -26,6 +26,6 @@ jobs: # Necessary to avoid object usage linter errors. extra-packages: local::., any::covr - - name: Test coverage + - name: Run Test coverage πŸ‘Ÿ run: covr::codecov() shell: Rscript {0} From 01679855e193f63a6affa43c5a54aeaeefc16a64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Ver=C3=ADssimo?= <211358+averissimo@users.noreply.github.com> Date: Wed, 31 Jan 2024 00:23:18 +0100 Subject: [PATCH 15/44] fix: remove styler working directory --- .github/workflows/style.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/style.yml b/.github/workflows/style.yml index 82e2dbe3..61d5dfbe 100644 --- a/.github/workflows/style.yml +++ b/.github/workflows/style.yml @@ -74,4 +74,3 @@ jobs: quit(status = 1) } shell: Rscript {0} - working-directory: ${{ github.event.repository.name }} From b68751b1a0f6d2b4fa8ac11b4c537d516552aba8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Ver=C3=ADssimo?= <211358+averissimo@users.noreply.github.com> Date: Wed, 31 Jan 2024 00:31:02 +0100 Subject: [PATCH 16/44] fix: restore pandoc and update action version --- .github/workflows/check-standard.yaml | 3 +++ .github/workflows/pkgdown.yaml | 2 +- .github/workflows/spellcheck.yml | 3 +-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/check-standard.yaml b/.github/workflows/check-standard.yaml index 14013bf9..52f6a854 100644 --- a/.github/workflows/check-standard.yaml +++ b/.github/workflows/check-standard.yaml @@ -39,6 +39,9 @@ jobs: - name: Checkout repository πŸ›Ž uses: actions/checkout@v4 + - name: Install Pandoc + uses: r-lib/actions/setup-pandoc@v2 + - name: Setup R πŸ“Š uses: r-lib/actions/setup-r@v2 with: diff --git a/.github/workflows/pkgdown.yaml b/.github/workflows/pkgdown.yaml index e6c27271..28dbcbd8 100644 --- a/.github/workflows/pkgdown.yaml +++ b/.github/workflows/pkgdown.yaml @@ -19,7 +19,7 @@ jobs: uses: r-lib/actions/setup-r@v2 - name: Install Pandoc - uses: r-lib/actions/setup-pandoc@v1 + uses: r-lib/actions/setup-pandoc@v2 - name: Install R package dependencies πŸ“¦ uses: r-lib/actions/setup-r-dependencies@v2 diff --git a/.github/workflows/spellcheck.yml b/.github/workflows/spellcheck.yml index 3311daf7..ad9d1676 100644 --- a/.github/workflows/spellcheck.yml +++ b/.github/workflows/spellcheck.yml @@ -14,10 +14,9 @@ jobs: spelling: name: Run Spellcheck πŸ”  runs-on: ubuntu-latest - if: > !contains(github.event.commits[0].message, '[skip spellcheck]') - + && github.event.pull_request.draft == false steps: - name: Checkout repository πŸ›Ž uses: actions/checkout@v4 From bb11f919453305486f4bb81fa45f8405afee97cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Ver=C3=ADssimo?= <211358+averissimo@users.noreply.github.com> Date: Wed, 31 Jan 2024 00:35:54 +0100 Subject: [PATCH 17/44] style: consistent spacing in workflows --- .github/workflows/check-links.yml | 4 ++++ .github/workflows/check-standard.yaml | 1 + .github/workflows/lint.yaml | 3 +++ .github/workflows/pkgdown.yaml | 2 ++ .github/workflows/spellcheck.yml | 3 +++ .github/workflows/style.yml | 2 ++ .github/workflows/test-coverage.yaml | 6 ++++++ 7 files changed, 21 insertions(+) diff --git a/.github/workflows/check-links.yml b/.github/workflows/check-links.yml index 1af191af..dbdbd69c 100644 --- a/.github/workflows/check-links.yml +++ b/.github/workflows/check-links.yml @@ -13,9 +13,13 @@ on: jobs: links: name: Validate Links πŸ•ΈοΈ + runs-on: ubuntu-latest + if: > !contains(github.event.commits[0].message, '[skip links]') + && github.event.pull_request.draft == false + steps: - name: Checkout repository πŸ›Ž uses: actions/checkout@v4 diff --git a/.github/workflows/check-standard.yaml b/.github/workflows/check-standard.yaml index 52f6a854..ce68eef2 100644 --- a/.github/workflows/check-standard.yaml +++ b/.github/workflows/check-standard.yaml @@ -34,6 +34,7 @@ jobs: if: > !contains(github.event.commits[0].message, '[skip checks]') + && github.event.pull_request.draft == false steps: - name: Checkout repository πŸ›Ž diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 5f5cb64c..7c33ac7e 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -15,10 +15,13 @@ on: jobs: lint: runs-on: ubuntu-latest + if: > !contains(github.event.commits[0].message, '[skip lint]') + env: GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} + steps: - name: Checkout repository πŸ›Ž uses: actions/checkout@v4 diff --git a/.github/workflows/pkgdown.yaml b/.github/workflows/pkgdown.yaml index 28dbcbd8..6065b0c4 100644 --- a/.github/workflows/pkgdown.yaml +++ b/.github/workflows/pkgdown.yaml @@ -9,8 +9,10 @@ on: jobs: pkgdown: runs-on: macOS-latest + env: GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} + steps: - name: Checkout repository πŸ›Ž uses: actions/checkout@v4 diff --git a/.github/workflows/spellcheck.yml b/.github/workflows/spellcheck.yml index ad9d1676..dcba91ff 100644 --- a/.github/workflows/spellcheck.yml +++ b/.github/workflows/spellcheck.yml @@ -13,10 +13,13 @@ on: jobs: spelling: name: Run Spellcheck πŸ”  + runs-on: ubuntu-latest + if: > !contains(github.event.commits[0].message, '[skip spellcheck]') && github.event.pull_request.draft == false + steps: - name: Checkout repository πŸ›Ž uses: actions/checkout@v4 diff --git a/.github/workflows/style.yml b/.github/workflows/style.yml index 61d5dfbe..43097bb1 100644 --- a/.github/workflows/style.yml +++ b/.github/workflows/style.yml @@ -17,7 +17,9 @@ concurrency: jobs: style: name: Check code style πŸ§‘β€πŸŽ¨ + runs-on: ubuntu-latest + if: > !contains(github.event.commits[0].message, '[skip stylecheck]') && github.event.pull_request.draft == false diff --git a/.github/workflows/test-coverage.yaml b/.github/workflows/test-coverage.yaml index 99b3da49..9c561d47 100644 --- a/.github/workflows/test-coverage.yaml +++ b/.github/workflows/test-coverage.yaml @@ -11,8 +11,14 @@ on: jobs: test-coverage: runs-on: macOS-latest + + if: > + !contains(github.event.commits[0].message, '[skip coverage]') + && github.event.pull_request.draft == false + env: GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} + steps: - name: Checkout repository πŸ›Ž uses: actions/checkout@v4 From 2b9d814bc19e6c5158699342a67f03d4cdc8988c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Ver=C3=ADssimo?= <211358+averissimo@users.noreply.github.com> Date: Wed, 31 Jan 2024 00:43:28 +0100 Subject: [PATCH 18/44] style: standardization and adds concurrency for all but checks --- .github/workflows/check-links.yml | 7 ++++--- .github/workflows/check-standard.yaml | 7 +------ .github/workflows/lint.yaml | 8 +++++--- .github/workflows/pkgdown.yaml | 9 +++++++-- .github/workflows/spellcheck.yml | 7 ++++--- .github/workflows/style.yml | 3 --- .github/workflows/test-coverage.yaml | 10 ++++++---- 7 files changed, 27 insertions(+), 24 deletions(-) diff --git a/.github/workflows/check-links.yml b/.github/workflows/check-links.yml index dbdbd69c..1b3f3f2b 100644 --- a/.github/workflows/check-links.yml +++ b/.github/workflows/check-links.yml @@ -10,16 +10,17 @@ on: - main workflow_dispatch: +concurrency: + group: links-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + jobs: links: name: Validate Links πŸ•ΈοΈ - runs-on: ubuntu-latest - if: > !contains(github.event.commits[0].message, '[skip links]') && github.event.pull_request.draft == false - steps: - name: Checkout repository πŸ›Ž uses: actions/checkout@v4 diff --git a/.github/workflows/check-standard.yaml b/.github/workflows/check-standard.yaml index ce68eef2..761664fa 100644 --- a/.github/workflows/check-standard.yaml +++ b/.github/workflows/check-standard.yaml @@ -14,10 +14,8 @@ on: jobs: R-CMD-check: - runs-on: ${{ matrix.config.os }} - name: ${{ matrix.config.os }} (${{ matrix.config.r }}) - + runs-on: ${{ matrix.config.os }} strategy: fail-fast: false matrix: @@ -27,15 +25,12 @@ jobs: - { os: ubuntu-latest, r: "devel", http-user-agent: "release" } - { os: ubuntu-latest, r: "release" } - { os: ubuntu-latest, r: "oldrel-1" } - env: GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} R_KEEP_PKG_SOURCE: yes - if: > !contains(github.event.commits[0].message, '[skip checks]') && github.event.pull_request.draft == false - steps: - name: Checkout repository πŸ›Ž uses: actions/checkout@v4 diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 7c33ac7e..d4ed48c6 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -12,16 +12,18 @@ on: - main workflow_dispatch: +concurrency: + group: lint-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + jobs: lint: runs-on: ubuntu-latest - if: > !contains(github.event.commits[0].message, '[skip lint]') - + && github.event.pull_request.draft == false env: GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} - steps: - name: Checkout repository πŸ›Ž uses: actions/checkout@v4 diff --git a/.github/workflows/pkgdown.yaml b/.github/workflows/pkgdown.yaml index 6065b0c4..ff191a80 100644 --- a/.github/workflows/pkgdown.yaml +++ b/.github/workflows/pkgdown.yaml @@ -6,13 +6,18 @@ on: branches: - main +concurrency: + group: docs-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + jobs: pkgdown: runs-on: macOS-latest - env: GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} - + if: > + !contains(github.event.commits[0].message, '[skip docs]') + && github.event.pull_request.draft == false steps: - name: Checkout repository πŸ›Ž uses: actions/checkout@v4 diff --git a/.github/workflows/spellcheck.yml b/.github/workflows/spellcheck.yml index dcba91ff..0b8d0a0f 100644 --- a/.github/workflows/spellcheck.yml +++ b/.github/workflows/spellcheck.yml @@ -10,16 +10,17 @@ on: branches: - main +concurrency: + group: spelling-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + jobs: spelling: name: Run Spellcheck πŸ”  - runs-on: ubuntu-latest - if: > !contains(github.event.commits[0].message, '[skip spellcheck]') && github.event.pull_request.draft == false - steps: - name: Checkout repository πŸ›Ž uses: actions/checkout@v4 diff --git a/.github/workflows/style.yml b/.github/workflows/style.yml index 43097bb1..0247c61a 100644 --- a/.github/workflows/style.yml +++ b/.github/workflows/style.yml @@ -17,13 +17,10 @@ concurrency: jobs: style: name: Check code style πŸ§‘β€πŸŽ¨ - runs-on: ubuntu-latest - if: > !contains(github.event.commits[0].message, '[skip stylecheck]') && github.event.pull_request.draft == false - steps: - uses: actions/checkout@v4 with: diff --git a/.github/workflows/test-coverage.yaml b/.github/workflows/test-coverage.yaml index 9c561d47..18700621 100644 --- a/.github/workflows/test-coverage.yaml +++ b/.github/workflows/test-coverage.yaml @@ -8,17 +8,19 @@ on: branches: - main +concurrency: + group: coverage-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + jobs: test-coverage: - runs-on: macOS-latest - + name: Coverage πŸ“” + runs-on: ubuntu-latest if: > !contains(github.event.commits[0].message, '[skip coverage]') && github.event.pull_request.draft == false - env: GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} - steps: - name: Checkout repository πŸ›Ž uses: actions/checkout@v4 From 12f247385cddc925668bdd8815681664c9c8c74e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Ver=C3=ADssimo?= <211358+averissimo@users.noreply.github.com> Date: Wed, 31 Jan 2024 00:48:49 +0100 Subject: [PATCH 19/44] cleanup: doesn't need to install package --- .github/workflows/style.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/style.yml b/.github/workflows/style.yml index 0247c61a..17343cdf 100644 --- a/.github/workflows/style.yml +++ b/.github/workflows/style.yml @@ -34,7 +34,7 @@ jobs: - name: Install R package dependencies πŸ“¦ uses: r-lib/actions/setup-r-dependencies@v2 with: - extra-packages: any::styler, any::roxygen2, local::. + extra-packages: any::styler, any::roxygen2 needs: styler - name: Enable styler cache From c828c060c238a8e8c65dd2203acfeb7b89d473df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Ver=C3=ADssimo?= <211358+averissimo@users.noreply.github.com> Date: Wed, 31 Jan 2024 00:57:50 +0100 Subject: [PATCH 20/44] revert change --- R/metadata.R | 12 +++-- tests/testthat/test-metadata.R | 84 +++++++++++++++++----------------- 2 files changed, 50 insertions(+), 46 deletions(-) diff --git a/R/metadata.R b/R/metadata.R index 92116eca..e6060ece 100644 --- a/R/metadata.R +++ b/R/metadata.R @@ -32,12 +32,14 @@ #' #' xportr_metadata(adlb, metadata, "test") #' -#' library(magrittr) +#' if (rlang::is_installed("magrittr")) { +#' library(magrittr) #' -#' adlb %>% -#' xportr_metadata(metadata, "test") %>% -#' xportr_type() %>% -#' xportr_order() +#' adlb %>% +#' xportr_metadata(metadata, "test") %>% +#' xportr_type() %>% +#' xportr_order() +#' } xportr_metadata <- function(.df, metadata = NULL, domain = NULL, diff --git a/tests/testthat/test-metadata.R b/tests/testthat/test-metadata.R index 0bc0549e..55c91cde 100644 --- a/tests/testthat/test-metadata.R +++ b/tests/testthat/test-metadata.R @@ -743,47 +743,49 @@ test_that("xportr_*: Domain is kept in between calls", { # end test_that("`xportr_metadata()` results match traditional results", { - test_dir <- tempdir() - - trad_path <- file.path(test_dir, "adsltrad.xpt") - metadata_path <- file.path(test_dir, "adslmeta.xpt") - - dataset_spec_low <- setNames(dataset_spec, tolower(names(dataset_spec))) - names(dataset_spec_low)[[2]] <- "label" - - var_spec_low <- setNames(var_spec, tolower(names(var_spec))) - names(var_spec_low)[[5]] <- "type" - - metadata_df <- adsl %>% - xportr_metadata(var_spec_low, "ADSL", verbose = "none") %>% - xportr_type() %>% - xportr_length() %>% - xportr_label() %>% - xportr_order() %>% - xportr_format() %>% - xportr_df_label(dataset_spec_low) %>% - xportr_write(metadata_path) - - trad_df <- adsl %>% - xportr_type(var_spec_low, "ADSL", verbose = "none") %>% - xportr_length(var_spec_low, "ADSL", verbose = "none") %>% - xportr_label(var_spec_low, "ADSL", verbose = "none") %>% - xportr_order(var_spec_low, "ADSL", verbose = "none") %>% - xportr_format(var_spec_low, "ADSL") %>% - xportr_df_label(dataset_spec_low, "ADSL") %>% - xportr_write(trad_path) - - expect_identical( - metadata_df, - structure( - trad_df, - `_xportr.df_metadata_` = var_spec_low, - `_xportr.df_verbose_` = "none" + if (require(magrittr, quietly = TRUE)) { + test_dir <- tempdir() + + trad_path <- file.path(test_dir, "adsltrad.xpt") + metadata_path <- file.path(test_dir, "adslmeta.xpt") + + dataset_spec_low <- setNames(dataset_spec, tolower(names(dataset_spec))) + names(dataset_spec_low)[[2]] <- "label" + + var_spec_low <- setNames(var_spec, tolower(names(var_spec))) + names(var_spec_low)[[5]] <- "type" + + metadata_df <- adsl %>% + xportr_metadata(var_spec_low, "ADSL", verbose = "none") %>% + xportr_type() %>% + xportr_length() %>% + xportr_label() %>% + xportr_order() %>% + xportr_format() %>% + xportr_df_label(dataset_spec_low) %>% + xportr_write(metadata_path) + + trad_df <- adsl %>% + xportr_type(var_spec_low, "ADSL", verbose = "none") %>% + xportr_length(var_spec_low, "ADSL", verbose = "none") %>% + xportr_label(var_spec_low, "ADSL", verbose = "none") %>% + xportr_order(var_spec_low, "ADSL", verbose = "none") %>% + xportr_format(var_spec_low, "ADSL") %>% + xportr_df_label(dataset_spec_low, "ADSL") %>% + xportr_write(trad_path) + + expect_identical( + metadata_df, + structure( + trad_df, + `_xportr.df_metadata_` = var_spec_low, + `_xportr.df_verbose_` = "none" + ) ) - ) - expect_identical( - haven::read_xpt(metadata_path), - haven::read_xpt(trad_path) - ) + expect_identical( + haven::read_xpt(metadata_path), + haven::read_xpt(trad_path) + ) + } }) From 74554866450ed6530b3a3a6097bd2869f5e94e74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Ver=C3=ADssimo?= <211358+averissimo@users.noreply.github.com> Date: Wed, 31 Jan 2024 01:00:01 +0100 Subject: [PATCH 21/44] docs: revert change --- man/metadata.Rd | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/man/metadata.Rd b/man/metadata.Rd index 0c542e1e..da5de14c 100644 --- a/man/metadata.Rd +++ b/man/metadata.Rd @@ -49,10 +49,12 @@ adlb <- data.frame( xportr_metadata(adlb, metadata, "test") -library(magrittr) +if (rlang::is_installed("magrittr")) { + library(magrittr) -adlb \%>\% - xportr_metadata(metadata, "test") \%>\% - xportr_type() \%>\% - xportr_order() + adlb \%>\% + xportr_metadata(metadata, "test") \%>\% + xportr_type() \%>\% + xportr_order() +} } From 40d4e80235294ca3a4929c01819c380203c7934d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Ver=C3=ADssimo?= <211358+averissimo@users.noreply.github.com> Date: Wed, 31 Jan 2024 01:03:26 +0100 Subject: [PATCH 22/44] tmp: add spelling, linter and styling error --- R/df_label.R | 7 ++++++- man/xportr_df_label.Rd | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/R/df_label.R b/R/df_label.R index 81a115ec..6bebfcbf 100644 --- a/R/df_label.R +++ b/R/df_label.R @@ -1,6 +1,6 @@ #' Assign Dataset Label #' -#' Assigns dataset label from a dataset level metadata to a given data frame. +#' Assignadbcs dataset label from a dataset level metadata to a given data frame. #' This is stored in the 'label' attribute of the dataframe. #' #' @param metadata A data frame containing dataset. See 'Metadata' section for @@ -51,6 +51,11 @@ xportr_df_label <- function(.df, ) } + # start of temporary section to test linter and styling + # removeMe <- 2 # commmented code that will fail linter + if (FALSE) { 1 +2 } else {2+3} + # end of temporary section + ## Common section to detect default arguments domain <- domain %||% attr(.df, "_xportr.df_arg_") diff --git a/man/xportr_df_label.Rd b/man/xportr_df_label.Rd index 363c59c4..18a027ee 100644 --- a/man/xportr_df_label.Rd +++ b/man/xportr_df_label.Rd @@ -23,7 +23,7 @@ metadata now renamed with \code{metadata}} Data frame with label attributes. } \description{ -Assigns dataset label from a dataset level metadata to a given data frame. +Assignadbcs dataset label from a dataset level metadata to a given data frame. This is stored in the 'label' attribute of the dataframe. } \section{Metadata}{ From a649c198dbd46195cb5231bd4bfde205ece8c99f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Ver=C3=ADssimo?= <211358+averissimo@users.noreply.github.com> Date: Wed, 31 Jan 2024 01:06:51 +0100 Subject: [PATCH 23/44] Revert "tmp: add spelling, linter and styling error" This reverts commit 40d4e80235294ca3a4929c01819c380203c7934d. --- R/df_label.R | 7 +------ man/xportr_df_label.Rd | 2 +- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/R/df_label.R b/R/df_label.R index 6bebfcbf..81a115ec 100644 --- a/R/df_label.R +++ b/R/df_label.R @@ -1,6 +1,6 @@ #' Assign Dataset Label #' -#' Assignadbcs dataset label from a dataset level metadata to a given data frame. +#' Assigns dataset label from a dataset level metadata to a given data frame. #' This is stored in the 'label' attribute of the dataframe. #' #' @param metadata A data frame containing dataset. See 'Metadata' section for @@ -51,11 +51,6 @@ xportr_df_label <- function(.df, ) } - # start of temporary section to test linter and styling - # removeMe <- 2 # commmented code that will fail linter - if (FALSE) { 1 +2 } else {2+3} - # end of temporary section - ## Common section to detect default arguments domain <- domain %||% attr(.df, "_xportr.df_arg_") diff --git a/man/xportr_df_label.Rd b/man/xportr_df_label.Rd index 18a027ee..363c59c4 100644 --- a/man/xportr_df_label.Rd +++ b/man/xportr_df_label.Rd @@ -23,7 +23,7 @@ metadata now renamed with \code{metadata}} Data frame with label attributes. } \description{ -Assignadbcs dataset label from a dataset level metadata to a given data frame. +Assigns dataset label from a dataset level metadata to a given data frame. This is stored in the 'label' attribute of the dataframe. } \section{Metadata}{ From 4933aa53570aa1051b91ec8f83d89d99fd52d7ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Ver=C3=ADssimo?= <211358+averissimo@users.noreply.github.com> Date: Thu, 1 Feb 2024 15:16:59 +0100 Subject: [PATCH 24/44] pr: applies comments from @elimillera --- .github/workflows/spellcheck.yml | 2 +- README.Rmd | 2 +- README.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/spellcheck.yml b/.github/workflows/spellcheck.yml index 0b8d0a0f..05e2e52f 100644 --- a/.github/workflows/spellcheck.yml +++ b/.github/workflows/spellcheck.yml @@ -34,7 +34,7 @@ jobs: extra-packages: any::spelling - name: Run Spellcheck πŸ‘Ÿ - uses: insightsengineering/r-spellcheck-action@v2 + uses: insightsengineering/r-spellcheck-action@v3 with: exclude: data/*,**/*.Rd,**/*.md,*.md additional_options: "" diff --git a/README.Rmd b/README.Rmd index d875a81f..13198ed4 100644 --- a/README.Rmd +++ b/README.Rmd @@ -46,7 +46,7 @@ install.packages("xportr") ### Development version: ```{r, eval = FALSE} -install.packages("teal", repos = c("https://pharmaverse.r-universe.dev", getOption("repos"))) +install.packages("xportr", repos = c("https://pharmaverse.r-universe.dev", getOption("repos"))) ``` # What is xportr? diff --git a/README.md b/README.md index 31275d06..91721df5 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,7 @@ install.packages("xportr") ### Development version: ``` r -install.packages("teal", repos = c("https://pharmaverse.r-universe.dev", getOption("repos"))) +install.packages("xportr", repos = c("https://pharmaverse.r-universe.dev", getOption("repos"))) ``` # What is xportr? From 081eff028d91577e4d19680560db756629b54e0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Ver=C3=ADssimo?= <211358+averissimo@users.noreply.github.com> Date: Thu, 1 Feb 2024 18:03:40 +0100 Subject: [PATCH 25/44] docs: add to NEWS.md --- NEWS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NEWS.md b/NEWS.md index 048b7881..5d39ec72 100644 --- a/NEWS.md +++ b/NEWS.md @@ -3,8 +3,8 @@ ## New Features and Bug Fixes * `xportr_metadata()` can set `verbose` for a whole pipeline, i.e. setting `verbose` in `xportr_metadata()` will populate to all `xportr` functions. (#151) - * All `xportr` functions now have `verbose = NULL` as the default (#151) +* Remove unused packages from Suggests (#221) ## Documentation From 7177602734376fd555508b521b8a34ba463ebb46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Ver=C3=ADssimo?= <211358+averissimo@users.noreply.github.com> Date: Sat, 3 Feb 2024 00:51:32 +0100 Subject: [PATCH 26/44] only workflow to run on draft is check --- .github/workflows/check-links.yml | 6 +++++- .github/workflows/check-standard.yaml | 6 +++++- .github/workflows/lint.yaml | 8 ++++++-- .github/workflows/pkgdown.yaml | 7 ------- .github/workflows/spellcheck.yml | 8 ++++++-- .github/workflows/style.yml | 6 +++++- .github/workflows/test-coverage.yaml | 7 ++++++- 7 files changed, 33 insertions(+), 15 deletions(-) diff --git a/.github/workflows/check-links.yml b/.github/workflows/check-links.yml index 1b3f3f2b..7d12d902 100644 --- a/.github/workflows/check-links.yml +++ b/.github/workflows/check-links.yml @@ -6,6 +6,11 @@ on: branches: - main pull_request: + types: + - opened + - synchronize + - reopened + - ready_for_review branches: - main workflow_dispatch: @@ -20,7 +25,6 @@ jobs: runs-on: ubuntu-latest if: > !contains(github.event.commits[0].message, '[skip links]') - && github.event.pull_request.draft == false steps: - name: Checkout repository πŸ›Ž uses: actions/checkout@v4 diff --git a/.github/workflows/check-standard.yaml b/.github/workflows/check-standard.yaml index 761664fa..8ea5cb97 100644 --- a/.github/workflows/check-standard.yaml +++ b/.github/workflows/check-standard.yaml @@ -8,6 +8,11 @@ on: branches: - main pull_request: + types: + - opened + - synchronize + - reopened + - ready_for_review branches: - main workflow_dispatch: @@ -30,7 +35,6 @@ jobs: R_KEEP_PKG_SOURCE: yes if: > !contains(github.event.commits[0].message, '[skip checks]') - && github.event.pull_request.draft == false steps: - name: Checkout repository πŸ›Ž uses: actions/checkout@v4 diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index d4ed48c6..30166cf4 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -8,9 +8,14 @@ on: branches: - main pull_request: + types: + - opened + - synchronize + - reopened + - ready_for_review branches: - main - workflow_dispatch: + workflow_dispatch: concurrency: group: lint-${{ github.event.pull_request.number || github.ref }} @@ -21,7 +26,6 @@ jobs: runs-on: ubuntu-latest if: > !contains(github.event.commits[0].message, '[skip lint]') - && github.event.pull_request.draft == false env: GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} steps: diff --git a/.github/workflows/pkgdown.yaml b/.github/workflows/pkgdown.yaml index ff191a80..28dbcbd8 100644 --- a/.github/workflows/pkgdown.yaml +++ b/.github/workflows/pkgdown.yaml @@ -6,18 +6,11 @@ on: branches: - main -concurrency: - group: docs-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - jobs: pkgdown: runs-on: macOS-latest env: GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} - if: > - !contains(github.event.commits[0].message, '[skip docs]') - && github.event.pull_request.draft == false steps: - name: Checkout repository πŸ›Ž uses: actions/checkout@v4 diff --git a/.github/workflows/spellcheck.yml b/.github/workflows/spellcheck.yml index 05e2e52f..9f3b1f35 100644 --- a/.github/workflows/spellcheck.yml +++ b/.github/workflows/spellcheck.yml @@ -2,13 +2,18 @@ name: Check Spelling πŸ†Ž on: - workflow_dispatch: push: branches: - main pull_request: + types: + - opened + - synchronize + - reopened + - ready_for_review branches: - main + workflow_dispatch: concurrency: group: spelling-${{ github.event.pull_request.number || github.ref }} @@ -20,7 +25,6 @@ jobs: runs-on: ubuntu-latest if: > !contains(github.event.commits[0].message, '[skip spellcheck]') - && github.event.pull_request.draft == false steps: - name: Checkout repository πŸ›Ž uses: actions/checkout@v4 diff --git a/.github/workflows/style.yml b/.github/workflows/style.yml index 17343cdf..2a2fab77 100644 --- a/.github/workflows/style.yml +++ b/.github/workflows/style.yml @@ -6,6 +6,11 @@ on: branches: - main pull_request: + types: + - opened + - synchronize + - reopened + - ready_for_review branches: - main workflow_dispatch: @@ -20,7 +25,6 @@ jobs: runs-on: ubuntu-latest if: > !contains(github.event.commits[0].message, '[skip stylecheck]') - && github.event.pull_request.draft == false steps: - uses: actions/checkout@v4 with: diff --git a/.github/workflows/test-coverage.yaml b/.github/workflows/test-coverage.yaml index 18700621..f291b431 100644 --- a/.github/workflows/test-coverage.yaml +++ b/.github/workflows/test-coverage.yaml @@ -5,8 +5,14 @@ on: branches: - main pull_request: + types: + - opened + - synchronize + - reopened + - ready_for_review branches: - main + workflow_dispatch: concurrency: group: coverage-${{ github.event.pull_request.number || github.ref }} @@ -18,7 +24,6 @@ jobs: runs-on: ubuntu-latest if: > !contains(github.event.commits[0].message, '[skip coverage]') - && github.event.pull_request.draft == false env: GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} steps: From c8da1218a2f47bf3e0e9f3fd0e57a1b61d1f04b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Ver=C3=ADssimo?= <211358+averissimo@users.noreply.github.com> Date: Tue, 6 Feb 2024 17:29:26 +0100 Subject: [PATCH 27/44] ci: adds admiralci --- .github/workflows/check-links.yml | 4 ++++ .github/workflows/check-standard.yaml | 7 +++++++ .github/workflows/lint.yaml | 6 ++++++ .github/workflows/spellcheck.yml | 6 ++++++ .github/workflows/style.yml | 7 +++++++ .github/workflows/test-coverage.yaml | 14 +++++++++++++- 6 files changed, 43 insertions(+), 1 deletion(-) diff --git a/.github/workflows/check-links.yml b/.github/workflows/check-links.yml index 7d12d902..f3e3ffd0 100644 --- a/.github/workflows/check-links.yml +++ b/.github/workflows/check-links.yml @@ -48,3 +48,7 @@ jobs: **/*.yml env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + links_admiral: + name: Links + uses: pharmaverse/admiralci/.github/workflows/links.yml@main + if: github.event_name == 'pull_request' diff --git a/.github/workflows/check-standard.yaml b/.github/workflows/check-standard.yaml index 8ea5cb97..9ba55709 100644 --- a/.github/workflows/check-standard.yaml +++ b/.github/workflows/check-standard.yaml @@ -56,3 +56,10 @@ jobs: - name: Run R CMD check 🎯 uses: r-lib/actions/check-r-package@v2 + + check_admiral: + name: Check + uses: pharmaverse/admiralci/.github/workflows/r-cmd-check.yml@main + with: + error-on: warning # TODO: find a way to ignore specific notes + if: github.event_name == 'pull_request' diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 30166cf4..2d70f40d 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -46,3 +46,9 @@ jobs: shell: Rscript {0} env: LINTR_ERROR_ON_LINT: true + linter_admiral: + name: Lint + uses: pharmaverse/admiralci/.github/workflows/lintr.yml@main + if: github.event_name == 'pull_request' + with: + r-version: "release" diff --git a/.github/workflows/spellcheck.yml b/.github/workflows/spellcheck.yml index 9f3b1f35..d6fb735d 100644 --- a/.github/workflows/spellcheck.yml +++ b/.github/workflows/spellcheck.yml @@ -42,3 +42,9 @@ jobs: with: exclude: data/*,**/*.Rd,**/*.md,*.md additional_options: "" + spellcheck_admiral: + name: Spelling + uses: pharmaverse/admiralci/.github/workflows/spellcheck.yml@main + if: github.event_name == 'pull_request' + with: + r-version: "release" diff --git a/.github/workflows/style.yml b/.github/workflows/style.yml index 2a2fab77..2e143e07 100644 --- a/.github/workflows/style.yml +++ b/.github/workflows/style.yml @@ -77,3 +77,10 @@ jobs: quit(status = 1) } shell: Rscript {0} + style_admiral: + name: Code Style + uses: pharmaverse/admiralci/.github/workflows/style.yml@main + if: github.event_name == 'pull_request' + needs: get_r_version + with: + r-version: "release" diff --git a/.github/workflows/test-coverage.yaml b/.github/workflows/test-coverage.yaml index f291b431..1b168cfb 100644 --- a/.github/workflows/test-coverage.yaml +++ b/.github/workflows/test-coverage.yaml @@ -19,7 +19,7 @@ concurrency: cancel-in-progress: true jobs: - test-coverage: + coverage: name: Coverage πŸ“” runs-on: ubuntu-latest if: > @@ -42,3 +42,15 @@ jobs: - name: Run Test coverage πŸ‘Ÿ run: covr::codecov() shell: Rscript {0} + + coverage_admiral: + name: Code Coverage + uses: pharmaverse/admiralci/.github/workflows/code-coverage.yml@main + if: > + github.event_name != 'release' + with: + r-version: "true" + # Whether to skip code coverage badge creation + # Setting to 'false' will require you to create + # an orphan branch called 'badges' in your repository + skip-coverage-badges: true From 0037ab231f3e9b7d89ebe80d222fa2889a748e9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Ver=C3=ADssimo?= <211358+averissimo@users.noreply.github.com> Date: Tue, 6 Feb 2024 17:31:11 +0100 Subject: [PATCH 28/44] add (admiral) suffix to better test --- .github/workflows/check-links.yml | 2 +- .github/workflows/check-standard.yaml | 2 +- .github/workflows/lint.yaml | 2 +- .github/workflows/spellcheck.yml | 2 +- .github/workflows/style.yml | 2 +- .github/workflows/test-coverage.yaml | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/check-links.yml b/.github/workflows/check-links.yml index f3e3ffd0..85782806 100644 --- a/.github/workflows/check-links.yml +++ b/.github/workflows/check-links.yml @@ -49,6 +49,6 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} links_admiral: - name: Links + name: Links (admiral) uses: pharmaverse/admiralci/.github/workflows/links.yml@main if: github.event_name == 'pull_request' diff --git a/.github/workflows/check-standard.yaml b/.github/workflows/check-standard.yaml index 9ba55709..cd7b0340 100644 --- a/.github/workflows/check-standard.yaml +++ b/.github/workflows/check-standard.yaml @@ -58,7 +58,7 @@ jobs: uses: r-lib/actions/check-r-package@v2 check_admiral: - name: Check + name: Check (admiral) uses: pharmaverse/admiralci/.github/workflows/r-cmd-check.yml@main with: error-on: warning # TODO: find a way to ignore specific notes diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 2d70f40d..ad2c5118 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -47,7 +47,7 @@ jobs: env: LINTR_ERROR_ON_LINT: true linter_admiral: - name: Lint + name: Lint (admiral) uses: pharmaverse/admiralci/.github/workflows/lintr.yml@main if: github.event_name == 'pull_request' with: diff --git a/.github/workflows/spellcheck.yml b/.github/workflows/spellcheck.yml index d6fb735d..a7267a33 100644 --- a/.github/workflows/spellcheck.yml +++ b/.github/workflows/spellcheck.yml @@ -43,7 +43,7 @@ jobs: exclude: data/*,**/*.Rd,**/*.md,*.md additional_options: "" spellcheck_admiral: - name: Spelling + name: Spelling (admiral) uses: pharmaverse/admiralci/.github/workflows/spellcheck.yml@main if: github.event_name == 'pull_request' with: diff --git a/.github/workflows/style.yml b/.github/workflows/style.yml index 2e143e07..9a6d8339 100644 --- a/.github/workflows/style.yml +++ b/.github/workflows/style.yml @@ -78,7 +78,7 @@ jobs: } shell: Rscript {0} style_admiral: - name: Code Style + name: Code Style (admiral) uses: pharmaverse/admiralci/.github/workflows/style.yml@main if: github.event_name == 'pull_request' needs: get_r_version diff --git a/.github/workflows/test-coverage.yaml b/.github/workflows/test-coverage.yaml index 1b168cfb..30cdd3d6 100644 --- a/.github/workflows/test-coverage.yaml +++ b/.github/workflows/test-coverage.yaml @@ -44,7 +44,7 @@ jobs: shell: Rscript {0} coverage_admiral: - name: Code Coverage + name: Code Coverage (admiral) uses: pharmaverse/admiralci/.github/workflows/code-coverage.yml@main if: > github.event_name != 'release' From 46218e502c350cbb16d3ded26b0e0f778fff465d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Ver=C3=ADssimo?= <211358+averissimo@users.noreply.github.com> Date: Tue, 6 Feb 2024 17:36:44 +0100 Subject: [PATCH 29/44] fix: remove typo --- .github/workflows/style.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/style.yml b/.github/workflows/style.yml index 9a6d8339..dbdc097e 100644 --- a/.github/workflows/style.yml +++ b/.github/workflows/style.yml @@ -81,6 +81,5 @@ jobs: name: Code Style (admiral) uses: pharmaverse/admiralci/.github/workflows/style.yml@main if: github.event_name == 'pull_request' - needs: get_r_version with: r-version: "release" From ab1d077576e1418dd10a0703ae1bd1f4ccb33d0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Ver=C3=ADssimo?= <211358+averissimo@users.noreply.github.com> Date: Tue, 6 Feb 2024 17:49:37 +0100 Subject: [PATCH 30/44] move all admiral CI to 1 file --- .github/workflows/check-links.yml | 4 -- .github/workflows/check-standard.yaml | 7 --- .github/workflows/common.yaml | 75 +++++++++++++++++++++++++++ .github/workflows/lint.yaml | 6 --- .github/workflows/spellcheck.yml | 6 --- .github/workflows/style.yml | 6 --- .github/workflows/test-coverage.yaml | 12 ----- 7 files changed, 75 insertions(+), 41 deletions(-) create mode 100644 .github/workflows/common.yaml diff --git a/.github/workflows/check-links.yml b/.github/workflows/check-links.yml index 85782806..7d12d902 100644 --- a/.github/workflows/check-links.yml +++ b/.github/workflows/check-links.yml @@ -48,7 +48,3 @@ jobs: **/*.yml env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - links_admiral: - name: Links (admiral) - uses: pharmaverse/admiralci/.github/workflows/links.yml@main - if: github.event_name == 'pull_request' diff --git a/.github/workflows/check-standard.yaml b/.github/workflows/check-standard.yaml index cd7b0340..8ea5cb97 100644 --- a/.github/workflows/check-standard.yaml +++ b/.github/workflows/check-standard.yaml @@ -56,10 +56,3 @@ jobs: - name: Run R CMD check 🎯 uses: r-lib/actions/check-r-package@v2 - - check_admiral: - name: Check (admiral) - uses: pharmaverse/admiralci/.github/workflows/r-cmd-check.yml@main - with: - error-on: warning # TODO: find a way to ignore specific notes - if: github.event_name == 'pull_request' diff --git a/.github/workflows/common.yaml b/.github/workflows/common.yaml new file mode 100644 index 00000000..55833aa5 --- /dev/null +++ b/.github/workflows/common.yaml @@ -0,0 +1,75 @@ +--- + # Workflow derived from https://github.com/r-lib/actions/tree/v2/examples + # Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help + name: xportr CI/CD Workflows + +on: + # 'push' events are triggered when commits + # are pushed to one of these branches + push: + branches: + - main + tags: + - "v*" + # 'pull_request' events are triggered when PRs are + # created against one of these target branches. + pull_request: + types: + - opened + - synchronize + - reopened + - ready_for_review + branches: + - main + # 'workflow_dispatch' gives you the ability + # to run this workflow on demand, anytime + workflow_dispatch: + +concurrency: + group: common-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +jobs: + coverage: + name: Code Coverage (admiral) + uses: pharmaverse/admiralci/.github/workflows/code-coverage.yml@main + if: > + github.event_name != 'release' + with: + r-version: "release" + # Whether to skip code coverage badge creation + # Setting to 'false' will require you to create + # an orphan branch called 'badges' in your repository + skip-coverage-badges: true + style: + name: Code Style (admiral) + uses: pharmaverse/admiralci/.github/workflows/style.yml@main + if: github.event_name == 'pull_request' + with: + r-version: "release" + + check_admiral: + name: Check (admiral) + uses: pharmaverse/admiralci/.github/workflows/r-cmd-check.yml@main + with: + error-on: warning # TODO: find a way to ignore specific notes + if: github.event_name == 'pull_request' + + links_admiral: + name: Links (admiral) + uses: pharmaverse/admiralci/.github/workflows/links.yml@main + if: github.event_name == 'pull_request' + + linter_admiral: + name: Lint (admiral) + uses: pharmaverse/admiralci/.github/workflows/lintr.yml@main + if: github.event_name == 'pull_request' + with: + r-version: "release" + + spellcheck_admiral: + name: Spelling (admiral) + uses: pharmaverse/admiralci/.github/workflows/spellcheck.yml@main + if: github.event_name == 'pull_request' + with: + r-version: "release" diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index ad2c5118..30166cf4 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -46,9 +46,3 @@ jobs: shell: Rscript {0} env: LINTR_ERROR_ON_LINT: true - linter_admiral: - name: Lint (admiral) - uses: pharmaverse/admiralci/.github/workflows/lintr.yml@main - if: github.event_name == 'pull_request' - with: - r-version: "release" diff --git a/.github/workflows/spellcheck.yml b/.github/workflows/spellcheck.yml index a7267a33..9f3b1f35 100644 --- a/.github/workflows/spellcheck.yml +++ b/.github/workflows/spellcheck.yml @@ -42,9 +42,3 @@ jobs: with: exclude: data/*,**/*.Rd,**/*.md,*.md additional_options: "" - spellcheck_admiral: - name: Spelling (admiral) - uses: pharmaverse/admiralci/.github/workflows/spellcheck.yml@main - if: github.event_name == 'pull_request' - with: - r-version: "release" diff --git a/.github/workflows/style.yml b/.github/workflows/style.yml index dbdc097e..2a2fab77 100644 --- a/.github/workflows/style.yml +++ b/.github/workflows/style.yml @@ -77,9 +77,3 @@ jobs: quit(status = 1) } shell: Rscript {0} - style_admiral: - name: Code Style (admiral) - uses: pharmaverse/admiralci/.github/workflows/style.yml@main - if: github.event_name == 'pull_request' - with: - r-version: "release" diff --git a/.github/workflows/test-coverage.yaml b/.github/workflows/test-coverage.yaml index 30cdd3d6..e1d2e715 100644 --- a/.github/workflows/test-coverage.yaml +++ b/.github/workflows/test-coverage.yaml @@ -42,15 +42,3 @@ jobs: - name: Run Test coverage πŸ‘Ÿ run: covr::codecov() shell: Rscript {0} - - coverage_admiral: - name: Code Coverage (admiral) - uses: pharmaverse/admiralci/.github/workflows/code-coverage.yml@main - if: > - github.event_name != 'release' - with: - r-version: "true" - # Whether to skip code coverage badge creation - # Setting to 'false' will require you to create - # an orphan branch called 'badges' in your repository - skip-coverage-badges: true From 7a25c3ab15e49a70490e86eda201e2c9bec6b067 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Ver=C3=ADssimo?= <211358+averissimo@users.noreply.github.com> Date: Tue, 6 Feb 2024 17:50:39 +0100 Subject: [PATCH 31/44] typo --- .github/workflows/common.yaml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/common.yaml b/.github/workflows/common.yaml index 55833aa5..7aaa324e 100644 --- a/.github/workflows/common.yaml +++ b/.github/workflows/common.yaml @@ -1,7 +1,5 @@ --- - # Workflow derived from https://github.com/r-lib/actions/tree/v2/examples - # Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help - name: xportr CI/CD Workflows +name: xportr CI/CD Workflows on: # 'push' events are triggered when commits From d771e1fb0c39f14cdfbe8d95116260a0e8ca15c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Ver=C3=ADssimo?= <211358+averissimo@users.noreply.github.com> Date: Tue, 6 Feb 2024 18:19:25 +0100 Subject: [PATCH 32/44] ci: small improvements --- .github/workflows/check-links.yml | 16 ++++++++++++---- .github/workflows/check-standard.yaml | 18 +++++++++++++----- .github/workflows/common.yaml | 2 ++ .github/workflows/pkgdown.yaml | 2 ++ .github/workflows/style.yml | 16 ++++++++++++---- .github/workflows/test-coverage.yaml | 16 ++++++++++++---- 6 files changed, 53 insertions(+), 17 deletions(-) diff --git a/.github/workflows/check-links.yml b/.github/workflows/check-links.yml index 7d12d902..515a0a52 100644 --- a/.github/workflows/check-links.yml +++ b/.github/workflows/check-links.yml @@ -2,17 +2,25 @@ name: Check URLs πŸ”— on: + # 'push' events are triggered when commits + # are pushed to one of these branches push: branches: - main + tags: + - "v*" + # 'pull_request' events are triggered when PRs are + # created against one of these target branches. pull_request: types: - - opened - - synchronize - - reopened - - ready_for_review + - opened + - synchronize + - reopened + - ready_for_review branches: - main + # 'workflow_dispatch' gives you the ability + # to run this workflow on demand, anytime workflow_dispatch: concurrency: diff --git a/.github/workflows/check-standard.yaml b/.github/workflows/check-standard.yaml index 8ea5cb97..b15acc93 100644 --- a/.github/workflows/check-standard.yaml +++ b/.github/workflows/check-standard.yaml @@ -4,21 +4,29 @@ name: R-CMD-check πŸ“¦ on: + # 'push' events are triggered when commits + # are pushed to one of these branches push: branches: - main + tags: + - "v*" + # 'pull_request' events are triggered when PRs are + # created against one of these target branches. pull_request: types: - - opened - - synchronize - - reopened - - ready_for_review + - opened + - synchronize + - reopened + - ready_for_review branches: - main + # 'workflow_dispatch' gives you the ability + # to run this workflow on demand, anytime workflow_dispatch: jobs: - R-CMD-check: + check: name: ${{ matrix.config.os }} (${{ matrix.config.r }}) runs-on: ${{ matrix.config.os }} strategy: diff --git a/.github/workflows/common.yaml b/.github/workflows/common.yaml index 7aaa324e..9e70a89f 100644 --- a/.github/workflows/common.yaml +++ b/.github/workflows/common.yaml @@ -28,6 +28,8 @@ concurrency: cancel-in-progress: true jobs: + env: + release: "release" coverage: name: Code Coverage (admiral) uses: pharmaverse/admiralci/.github/workflows/code-coverage.yml@main diff --git a/.github/workflows/pkgdown.yaml b/.github/workflows/pkgdown.yaml index 28dbcbd8..31219893 100644 --- a/.github/workflows/pkgdown.yaml +++ b/.github/workflows/pkgdown.yaml @@ -2,6 +2,8 @@ name: Deploy pkgdown site πŸ“œ on: + # 'push' events are triggered when commits + # are pushed to one of these branches push: branches: - main diff --git a/.github/workflows/style.yml b/.github/workflows/style.yml index 2a2fab77..1c64c096 100644 --- a/.github/workflows/style.yml +++ b/.github/workflows/style.yml @@ -2,17 +2,25 @@ name: Check Style 🎨 on: + # 'push' events are triggered when commits + # are pushed to one of these branches push: branches: - main + tags: + - "v*" + # 'pull_request' events are triggered when PRs are + # created against one of these target branches. pull_request: types: - - opened - - synchronize - - reopened - - ready_for_review + - opened + - synchronize + - reopened + - ready_for_review branches: - main + # 'workflow_dispatch' gives you the ability + # to run this workflow on demand, anytime workflow_dispatch: concurrency: diff --git a/.github/workflows/test-coverage.yaml b/.github/workflows/test-coverage.yaml index e1d2e715..c06ffd57 100644 --- a/.github/workflows/test-coverage.yaml +++ b/.github/workflows/test-coverage.yaml @@ -1,17 +1,25 @@ name: Check Test Coverage πŸ§ͺ on: + # 'push' events are triggered when commits + # are pushed to one of these branches push: branches: - main + tags: + - "v*" + # 'pull_request' events are triggered when PRs are + # created against one of these target branches. pull_request: types: - - opened - - synchronize - - reopened - - ready_for_review + - opened + - synchronize + - reopened + - ready_for_review branches: - main + # 'workflow_dispatch' gives you the ability + # to run this workflow on demand, anytime workflow_dispatch: concurrency: From c1098e16efca3ec1065e9907048bcdd1c9b78173 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Ver=C3=ADssimo?= <211358+averissimo@users.noreply.github.com> Date: Tue, 6 Feb 2024 18:19:38 +0100 Subject: [PATCH 33/44] testing if CIs will catch errors --- R/messages.R | 4 ++++ R/metadata.R | 2 ++ man/length_log.Rd | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/R/messages.R b/R/messages.R index 50b4df7c..55660fdc 100644 --- a/R/messages.R +++ b/R/messages.R @@ -101,6 +101,8 @@ type_log <- function(meta_ordered, type_mismatch_ind, verbose) { #' Utility for Lengths #' +#' spellllling mistake +#' #' @param miss_vars Variables missing from metadata #' @param verbose Provides additional messaging for user #' @@ -110,6 +112,8 @@ length_log <- function(miss_vars, verbose) { assert_character(miss_vars) assert_choice(verbose, choices = .internal_verbose_choices) + if ( length(miss_vars) > 0 ) { TRUE && stop("this should trigger lint and styler"); 1+ 1 } + if (length(miss_vars) > 0) { cli_h2("Variable lengths missing from metadata.") cli_alert_success("{ length(miss_vars) } lengths resolved") diff --git a/R/metadata.R b/R/metadata.R index e6060ece..075007ac 100644 --- a/R/metadata.R +++ b/R/metadata.R @@ -6,6 +6,8 @@ #' details on the format of the metadata, see the 'Metadata' section for each #' function in question. #' +#' changing docs without updating documentation +#' #' @inheritParams xportr_length #' #' @return `.df` dataset with metadata and domain attributes set diff --git a/man/length_log.Rd b/man/length_log.Rd index 8b550292..49108ddd 100644 --- a/man/length_log.Rd +++ b/man/length_log.Rd @@ -15,5 +15,5 @@ length_log(miss_vars, verbose) Output to Console } \description{ -Utility for Lengths +spellllling mistake } From 87a48a4afa95d55b2dbe228796e5a17d97ec8af7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Ver=C3=ADssimo?= <211358+averissimo@users.noreply.github.com> Date: Tue, 6 Feb 2024 18:20:43 +0100 Subject: [PATCH 34/44] ci: corrects typo --- .github/workflows/common.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/common.yaml b/.github/workflows/common.yaml index 9e70a89f..7aaa324e 100644 --- a/.github/workflows/common.yaml +++ b/.github/workflows/common.yaml @@ -28,8 +28,6 @@ concurrency: cancel-in-progress: true jobs: - env: - release: "release" coverage: name: Code Coverage (admiral) uses: pharmaverse/admiralci/.github/workflows/code-coverage.yml@main From bf962798aad8ba66431de0fdc7ad18a5d6c68f4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Ver=C3=ADssimo?= <211358+averissimo@users.noreply.github.com> Date: Tue, 6 Feb 2024 18:39:21 +0100 Subject: [PATCH 35/44] ci: spellcheck wasn't running for documentation --- .github/workflows/spellcheck.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/spellcheck.yml b/.github/workflows/spellcheck.yml index 9f3b1f35..f5ad817a 100644 --- a/.github/workflows/spellcheck.yml +++ b/.github/workflows/spellcheck.yml @@ -40,5 +40,5 @@ jobs: - name: Run Spellcheck πŸ‘Ÿ uses: insightsengineering/r-spellcheck-action@v3 with: - exclude: data/*,**/*.Rd,**/*.md,*.md + exclude: data/* additional_options: "" From 9fe72a7a404046b284dc894c7e623288a4ff7a95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Ver=C3=ADssimo?= <211358+averissimo@users.noreply.github.com> Date: Tue, 6 Feb 2024 18:40:47 +0100 Subject: [PATCH 36/44] ci: test with a broken link --- R/messages.R | 1 + man/length_log.Rd | 1 + 2 files changed, 2 insertions(+) diff --git a/R/messages.R b/R/messages.R index 55660fdc..5ba12108 100644 --- a/R/messages.R +++ b/R/messages.R @@ -102,6 +102,7 @@ type_log <- function(meta_ordered, type_mismatch_ind, verbose) { #' Utility for Lengths #' #' spellllling mistake +#' a [link](http://thisisarandompagethatdoesntexit.com) #' #' @param miss_vars Variables missing from metadata #' @param verbose Provides additional messaging for user diff --git a/man/length_log.Rd b/man/length_log.Rd index 49108ddd..20ee21fc 100644 --- a/man/length_log.Rd +++ b/man/length_log.Rd @@ -16,4 +16,5 @@ Output to Console } \description{ spellllling mistake +a \href{http://thisisarandompagethatdoesntexit.com}{link} } From cec27e021bb3165b187c6abfc9f9f66651f2f9cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Ver=C3=ADssimo?= <211358+averissimo@users.noreply.github.com> Date: Tue, 6 Feb 2024 18:42:13 +0100 Subject: [PATCH 37/44] adds a non-tested function --- R/messages.R | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/R/messages.R b/R/messages.R index 5ba12108..6d047318 100644 --- a/R/messages.R +++ b/R/messages.R @@ -129,6 +129,18 @@ length_log <- function(miss_vars, verbose) { } } +#' @noRd +a_new_function <- function() { + "this is not tested" + 1+1 + 3+3 + 4+4 + 5+5 + 6+6 + 7+7 + "adding lines to make a dent on 100% test coverage" +} + #' Utility for Variable Labels #' #' @param miss_vars Missing variables in metadata From d778e8ed8f78e7d757f5cc047616908d7c5efcbf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Ver=C3=ADssimo?= <211358+averissimo@users.noreply.github.com> Date: Wed, 14 Feb 2024 15:03:40 +0100 Subject: [PATCH 38/44] ci: reusing workflows from admiralci --- .github/workflows/check-links.yml | 58 ------------------- .github/workflows/common.yaml | 68 +++++++++++++++++----- .github/workflows/lint.yaml | 48 --------------- .github/workflows/pkgdown.yaml | 36 ------------ .github/workflows/spellcheck.yml | 44 -------------- .github/workflows/style.yml | 87 ---------------------------- .github/workflows/test-coverage.yaml | 52 ----------------- .github/workflows/vbump.yaml | 15 ----- 8 files changed, 54 insertions(+), 354 deletions(-) delete mode 100644 .github/workflows/check-links.yml delete mode 100644 .github/workflows/lint.yaml delete mode 100644 .github/workflows/pkgdown.yaml delete mode 100644 .github/workflows/spellcheck.yml delete mode 100644 .github/workflows/style.yml delete mode 100644 .github/workflows/test-coverage.yaml delete mode 100644 .github/workflows/vbump.yaml diff --git a/.github/workflows/check-links.yml b/.github/workflows/check-links.yml deleted file mode 100644 index 515a0a52..00000000 --- a/.github/workflows/check-links.yml +++ /dev/null @@ -1,58 +0,0 @@ ---- -name: Check URLs πŸ”— - -on: - # 'push' events are triggered when commits - # are pushed to one of these branches - push: - branches: - - main - tags: - - "v*" - # 'pull_request' events are triggered when PRs are - # created against one of these target branches. - pull_request: - types: - - opened - - synchronize - - reopened - - ready_for_review - branches: - - main - # 'workflow_dispatch' gives you the ability - # to run this workflow on demand, anytime - workflow_dispatch: - -concurrency: - group: links-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -jobs: - links: - name: Validate Links πŸ•ΈοΈ - runs-on: ubuntu-latest - if: > - !contains(github.event.commits[0].message, '[skip links]') - steps: - - name: Checkout repository πŸ›Ž - uses: actions/checkout@v4 - - - name: Check URLs in docs πŸ“‘ - uses: lycheeverse/lychee-action@v1.5.1 - with: - fail: true - jobSummary: true - format: markdown - output: links-results.md - args: >- - --exclude-private - --exclude "https://github.com.*.git|lycheeverse.*" - --verbose - --no-progress - **/*.md - **/*.html - **/*.Rmd - **/*.yaml - **/*.yml - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/common.yaml b/.github/workflows/common.yaml index 7aaa324e..53fc550e 100644 --- a/.github/workflows/common.yaml +++ b/.github/workflows/common.yaml @@ -27,47 +27,87 @@ concurrency: group: common-${{ github.event.pull_request.number || github.ref }} cancel-in-progress: true +env: + R_VERSION: "release" + jobs: + # Get R version from environmental variable + # and use it in downstream jobs + get_r_version: + name: Get R version + runs-on: ubuntu-latest + outputs: + r-version: ${{ steps.get_r_version.outputs.R_VERSION }} + steps: + - name: Get R Version for Downstream Container Jobs + id: get_r_version + run: echo "R_VERSION=$R_VERSION" >> $GITHUB_OUTPUT + shell: bash + + # Test code coverage of R Package coverage: name: Code Coverage (admiral) uses: pharmaverse/admiralci/.github/workflows/code-coverage.yml@main if: > github.event_name != 'release' + needs: get_r_version with: - r-version: "release" + r-version: "${{ needs.get_r_version.outputs.r-version }}" # Whether to skip code coverage badge creation # Setting to 'false' will require you to create # an orphan branch called 'badges' in your repository skip-coverage-badges: true + + # Ensure that styling guidelines are followed style: name: Code Style (admiral) uses: pharmaverse/admiralci/.github/workflows/style.yml@main if: github.event_name == 'pull_request' + needs: get_r_version with: - r-version: "release" - - check_admiral: - name: Check (admiral) - uses: pharmaverse/admiralci/.github/workflows/r-cmd-check.yml@main - with: - error-on: warning # TODO: find a way to ignore specific notes - if: github.event_name == 'pull_request' + r-version: "${{ needs.get_r_version.outputs.r-version }}" - links_admiral: + # Ensure there are no broken URLs in the package documentation + links: name: Links (admiral) uses: pharmaverse/admiralci/.github/workflows/links.yml@main if: github.event_name == 'pull_request' - linter_admiral: + # Build the website and deploy to `gh-pages` branch + site: + name: Documentation + uses: pharmaverse/admiralci/.github/workflows/pkgdown.yml@main + if: github.event_name == 'push' || startsWith(github.ref, 'refs/tags/v') + needs: get_r_version + with: + r-version: "release" + skip-multiversion-docs: true + secrets: + GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} + + # Ensure there are no linter errors in the package + linter: name: Lint (admiral) uses: pharmaverse/admiralci/.github/workflows/lintr.yml@main if: github.event_name == 'pull_request' + needs: get_r_version with: - r-version: "release" + r-version: "${{ needs.get_r_version.outputs.r-version }}" - spellcheck_admiral: + # Ensure there are no spelling errors in the package + spellcheck: name: Spelling (admiral) uses: pharmaverse/admiralci/.github/workflows/spellcheck.yml@main if: github.event_name == 'pull_request' + needs: get_r_version with: - r-version: "release" + r-version: "${{ needs.get_r_version.outputs.r-version }}" + + # Bumps development version of the package + vbump: + name: Version Bump πŸ€œπŸ€› + if: github.event_name == 'push' + uses: insightsengineering/r.pkg.template/.github/workflows/version-bump.yaml@main + secrets: + REPO_GITHUB_TOKEN: ${{ secrets.REPO_GITHUB_TOKEN }} + diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml deleted file mode 100644 index 30166cf4..00000000 --- a/.github/workflows/lint.yaml +++ /dev/null @@ -1,48 +0,0 @@ ---- -# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples -# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help -name: Check Lint 🧹 - -on: - push: - branches: - - main - pull_request: - types: - - opened - - synchronize - - reopened - - ready_for_review - branches: - - main - workflow_dispatch: - -concurrency: - group: lint-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -jobs: - lint: - runs-on: ubuntu-latest - if: > - !contains(github.event.commits[0].message, '[skip lint]') - env: - GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} - steps: - - name: Checkout repository πŸ›Ž - uses: actions/checkout@v4 - - - name: Setup R πŸ“Š - uses: r-lib/actions/setup-r@v2 - with: - use-public-rspm: true - - - uses: r-lib/actions/setup-r-dependencies@v2 - with: - extra-packages: any::lintr, local::. - - - name: Run Linter πŸ‘Ÿ - run: lintr::lint_package() - shell: Rscript {0} - env: - LINTR_ERROR_ON_LINT: true diff --git a/.github/workflows/pkgdown.yaml b/.github/workflows/pkgdown.yaml deleted file mode 100644 index 31219893..00000000 --- a/.github/workflows/pkgdown.yaml +++ /dev/null @@ -1,36 +0,0 @@ ---- -name: Deploy pkgdown site πŸ“œ - -on: - # 'push' events are triggered when commits - # are pushed to one of these branches - push: - branches: - - main - -jobs: - pkgdown: - runs-on: macOS-latest - env: - GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} - steps: - - name: Checkout repository πŸ›Ž - uses: actions/checkout@v4 - - - name: Setup R πŸ“Š - uses: r-lib/actions/setup-r@v2 - - - name: Install Pandoc - uses: r-lib/actions/setup-pandoc@v2 - - - name: Install R package dependencies πŸ“¦ - uses: r-lib/actions/setup-r-dependencies@v2 - with: - extra-packages: any::pkgdown, local::. - needs: website - - - name: Deploy package ☁️ - run: | - git config --local user.email "actions@github.com" - git config --local user.name "GitHub Actions" - Rscript -e 'pkgdown::deploy_to_branch(new_process = FALSE)' diff --git a/.github/workflows/spellcheck.yml b/.github/workflows/spellcheck.yml deleted file mode 100644 index f5ad817a..00000000 --- a/.github/workflows/spellcheck.yml +++ /dev/null @@ -1,44 +0,0 @@ ---- -name: Check Spelling πŸ†Ž - -on: - push: - branches: - - main - pull_request: - types: - - opened - - synchronize - - reopened - - ready_for_review - branches: - - main - workflow_dispatch: - -concurrency: - group: spelling-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -jobs: - spelling: - name: Run Spellcheck πŸ”  - runs-on: ubuntu-latest - if: > - !contains(github.event.commits[0].message, '[skip spellcheck]') - steps: - - name: Checkout repository πŸ›Ž - uses: actions/checkout@v4 - - - name: Setup R πŸ“Š - uses: r-lib/actions/setup-r@v2 - - - name: Install R package dependencies πŸ“¦ - uses: r-lib/actions/setup-r-dependencies@v2 - with: - extra-packages: any::spelling - - - name: Run Spellcheck πŸ‘Ÿ - uses: insightsengineering/r-spellcheck-action@v3 - with: - exclude: data/* - additional_options: "" diff --git a/.github/workflows/style.yml b/.github/workflows/style.yml deleted file mode 100644 index 1c64c096..00000000 --- a/.github/workflows/style.yml +++ /dev/null @@ -1,87 +0,0 @@ ---- -name: Check Style 🎨 - -on: - # 'push' events are triggered when commits - # are pushed to one of these branches - push: - branches: - - main - tags: - - "v*" - # 'pull_request' events are triggered when PRs are - # created against one of these target branches. - pull_request: - types: - - opened - - synchronize - - reopened - - ready_for_review - branches: - - main - # 'workflow_dispatch' gives you the ability - # to run this workflow on demand, anytime - workflow_dispatch: - -concurrency: - group: style-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -jobs: - style: - name: Check code style πŸ§‘β€πŸŽ¨ - runs-on: ubuntu-latest - if: > - !contains(github.event.commits[0].message, '[skip stylecheck]') - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Setup R πŸ“Š - uses: r-lib/actions/setup-r@v2 - with: - use-public-rspm: true - - - name: Install R package dependencies πŸ“¦ - uses: r-lib/actions/setup-r-dependencies@v2 - with: - extra-packages: any::styler, any::roxygen2 - needs: styler - - - name: Enable styler cache - run: styler::cache_activate() - shell: Rscript {0} - - - name: Determine cache location - id: styler-location - run: | - cat( - "location=", - styler::cache_info(format = "tabular")$location, - "\n", - file = Sys.getenv("GITHUB_OUTPUT"), - append = TRUE, - sep = "" - ) - shell: Rscript {0} - - - name: Cache styler - uses: actions/cache@v4 - with: - path: ${{ steps.styler-location.outputs.location }} - key: ${{ runner.os }}-styler-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-styler- - ${{ runner.os }}- - - - name: Run styler πŸ–ΌοΈ - run: | - detect <- styler::style_pkg(dry = "on") - if (any(detect$changed)) { - problems <- subset(detect$file, detect$changed == T) - cat(paste("Styling errors found in", length(problems), "files\n")) - cat("Please run `styler::style_pkg()` to fix the style\n") - quit(status = 1) - } - shell: Rscript {0} diff --git a/.github/workflows/test-coverage.yaml b/.github/workflows/test-coverage.yaml deleted file mode 100644 index c06ffd57..00000000 --- a/.github/workflows/test-coverage.yaml +++ /dev/null @@ -1,52 +0,0 @@ -name: Check Test Coverage πŸ§ͺ - -on: - # 'push' events are triggered when commits - # are pushed to one of these branches - push: - branches: - - main - tags: - - "v*" - # 'pull_request' events are triggered when PRs are - # created against one of these target branches. - pull_request: - types: - - opened - - synchronize - - reopened - - ready_for_review - branches: - - main - # 'workflow_dispatch' gives you the ability - # to run this workflow on demand, anytime - workflow_dispatch: - -concurrency: - group: coverage-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -jobs: - coverage: - name: Coverage πŸ“” - runs-on: ubuntu-latest - if: > - !contains(github.event.commits[0].message, '[skip coverage]') - env: - GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} - steps: - - name: Checkout repository πŸ›Ž - uses: actions/checkout@v4 - - - name: Setup R πŸ“Š - uses: r-lib/actions/setup-r@v2 - - - name: Install R package dependencies - uses: r-lib/actions/setup-r-dependencies@v2 - with: - # Necessary to avoid object usage linter errors. - extra-packages: local::., any::covr - - - name: Run Test coverage πŸ‘Ÿ - run: covr::codecov() - shell: Rscript {0} diff --git a/.github/workflows/vbump.yaml b/.github/workflows/vbump.yaml deleted file mode 100644 index 11f9d4e5..00000000 --- a/.github/workflows/vbump.yaml +++ /dev/null @@ -1,15 +0,0 @@ ---- -name: Version Bump ⬆️ - -on: - push: - branches: - - main - -jobs: - vbump: - name: Version Bump πŸ€œπŸ€› - if: github.event_name == 'push' - uses: insightsengineering/r.pkg.template/.github/workflows/version-bump.yaml@main - secrets: - REPO_GITHUB_TOKEN: ${{ secrets.REPO_GITHUB_TOKEN }} From a82c4ac7f078b80498cf5efb621eac09f8ac162b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Ver=C3=ADssimo?= <211358+averissimo@users.noreply.github.com> Date: Wed, 14 Feb 2024 15:08:46 +0100 Subject: [PATCH 39/44] Trigger CI From 2ef251520ce1ef243303dccd23500004fb60c22b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Ver=C3=ADssimo?= <211358+averissimo@users.noreply.github.com> Date: Wed, 14 Feb 2024 15:23:19 +0100 Subject: [PATCH 40/44] revert deliberate errors --- R/messages.R | 17 ----------------- R/metadata.R | 2 -- man/length_log.Rd | 3 +-- 3 files changed, 1 insertion(+), 21 deletions(-) diff --git a/R/messages.R b/R/messages.R index 6d047318..50b4df7c 100644 --- a/R/messages.R +++ b/R/messages.R @@ -101,9 +101,6 @@ type_log <- function(meta_ordered, type_mismatch_ind, verbose) { #' Utility for Lengths #' -#' spellllling mistake -#' a [link](http://thisisarandompagethatdoesntexit.com) -#' #' @param miss_vars Variables missing from metadata #' @param verbose Provides additional messaging for user #' @@ -113,8 +110,6 @@ length_log <- function(miss_vars, verbose) { assert_character(miss_vars) assert_choice(verbose, choices = .internal_verbose_choices) - if ( length(miss_vars) > 0 ) { TRUE && stop("this should trigger lint and styler"); 1+ 1 } - if (length(miss_vars) > 0) { cli_h2("Variable lengths missing from metadata.") cli_alert_success("{ length(miss_vars) } lengths resolved") @@ -129,18 +124,6 @@ length_log <- function(miss_vars, verbose) { } } -#' @noRd -a_new_function <- function() { - "this is not tested" - 1+1 - 3+3 - 4+4 - 5+5 - 6+6 - 7+7 - "adding lines to make a dent on 100% test coverage" -} - #' Utility for Variable Labels #' #' @param miss_vars Missing variables in metadata diff --git a/R/metadata.R b/R/metadata.R index 075007ac..e6060ece 100644 --- a/R/metadata.R +++ b/R/metadata.R @@ -6,8 +6,6 @@ #' details on the format of the metadata, see the 'Metadata' section for each #' function in question. #' -#' changing docs without updating documentation -#' #' @inheritParams xportr_length #' #' @return `.df` dataset with metadata and domain attributes set diff --git a/man/length_log.Rd b/man/length_log.Rd index 20ee21fc..8b550292 100644 --- a/man/length_log.Rd +++ b/man/length_log.Rd @@ -15,6 +15,5 @@ length_log(miss_vars, verbose) Output to Console } \description{ -spellllling mistake -a \href{http://thisisarandompagethatdoesntexit.com}{link} +Utility for Lengths } From aa2cc1613c79c8f200e6c1a4a8791654b9dc2e80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Ver=C3=ADssimo?= <211358+averissimo@users.noreply.github.com> Date: Wed, 14 Feb 2024 15:34:20 +0100 Subject: [PATCH 41/44] ci: remove admiral string that was helping identifying action on UI --- .github/workflows/common.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/common.yaml b/.github/workflows/common.yaml index 53fc550e..15c84c01 100644 --- a/.github/workflows/common.yaml +++ b/.github/workflows/common.yaml @@ -46,7 +46,7 @@ jobs: # Test code coverage of R Package coverage: - name: Code Coverage (admiral) + name: Code Coverage uses: pharmaverse/admiralci/.github/workflows/code-coverage.yml@main if: > github.event_name != 'release' @@ -60,7 +60,7 @@ jobs: # Ensure that styling guidelines are followed style: - name: Code Style (admiral) + name: Code Style uses: pharmaverse/admiralci/.github/workflows/style.yml@main if: github.event_name == 'pull_request' needs: get_r_version @@ -69,7 +69,7 @@ jobs: # Ensure there are no broken URLs in the package documentation links: - name: Links (admiral) + name: Links uses: pharmaverse/admiralci/.github/workflows/links.yml@main if: github.event_name == 'pull_request' @@ -87,7 +87,7 @@ jobs: # Ensure there are no linter errors in the package linter: - name: Lint (admiral) + name: Lint uses: pharmaverse/admiralci/.github/workflows/lintr.yml@main if: github.event_name == 'pull_request' needs: get_r_version @@ -96,7 +96,7 @@ jobs: # Ensure there are no spelling errors in the package spellcheck: - name: Spelling (admiral) + name: Spelling uses: pharmaverse/admiralci/.github/workflows/spellcheck.yml@main if: github.event_name == 'pull_request' needs: get_r_version From e4c6e72b707800d9ed9d11ab6927d1e9b8526398 Mon Sep 17 00:00:00 2001 From: bs832471 Date: Wed, 14 Feb 2024 16:08:40 +0000 Subject: [PATCH 42/44] chore: #221 update spelling --- inst/WORDLIST | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/inst/WORDLIST b/inst/WORDLIST index e7738dd7..5fcd3726 100644 --- a/inst/WORDLIST +++ b/inst/WORDLIST @@ -31,11 +31,21 @@ acrf adrg bootswatch chr +datetime deliverables df +durationdatetime +incompletedatetime +intervaldatetime iso magrittr metacore +num +partialdate +partialdatetime +partialtime +posixct +posixt pre repo sas From 0bea653904f99b62e30a55171b975024b3e9cc46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Ver=C3=ADssimo?= <211358+averissimo@users.noreply.github.com> Date: Wed, 14 Feb 2024 18:14:57 +0100 Subject: [PATCH 43/44] corrects typo --- DESCRIPTION | 2 +- R/xportr.R | 2 +- inst/WORDLIST | 1 - man/metadata.Rd | 2 +- man/xportr-package.Rd | 1 - man/xportr.Rd | 2 +- man/xportr_df_label.Rd | 2 +- man/xportr_format.Rd | 2 +- man/xportr_label.Rd | 2 +- man/xportr_length.Rd | 2 +- man/xportr_order.Rd | 2 +- man/xportr_type.Rd | 2 +- man/xportr_write.Rd | 2 +- 13 files changed, 11 insertions(+), 13 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 03b411b3..6f58e829 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -55,4 +55,4 @@ Config/testthat/edition: 3 Encoding: UTF-8 LazyData: true Roxygen: list(markdown = TRUE) -RoxygenNote: 7.2.3 +RoxygenNote: 7.3.1 diff --git a/R/xportr.R b/R/xportr.R index ed7c3ba1..003e5cce 100644 --- a/R/xportr.R +++ b/R/xportr.R @@ -2,7 +2,7 @@ #' #' @param .df A data frame of CDISC standard. #' @param var_metadata A data frame containing variable level metadata -#' @param domain Appropriate CDSIC dataset name, e.g. ADAE, DM. Used to subset +#' @param domain Appropriate CDISC dataset name, e.g. ADAE, DM. Used to subset #' the metadata object. If none is passed, then name of the dataset passed as #' .df will be used. #' @param verbose The action this function takes when an action is taken on the diff --git a/inst/WORDLIST b/inst/WORDLIST index 5fcd3726..5c516068 100644 --- a/inst/WORDLIST +++ b/inst/WORDLIST @@ -5,7 +5,6 @@ AE Atorus BMI CDISC -CDSIC Codelist Completers DCREASCD diff --git a/man/metadata.Rd b/man/metadata.Rd index 30918a0c..9df1c6c8 100644 --- a/man/metadata.Rd +++ b/man/metadata.Rd @@ -12,7 +12,7 @@ xportr_metadata(.df, metadata = NULL, domain = NULL, verbose = NULL) \item{metadata}{A data frame containing variable level metadata. See 'Metadata' section for details.} -\item{domain}{Appropriate CDSIC dataset name, e.g. ADAE, DM. Used to subset +\item{domain}{Appropriate CDISC dataset name, e.g. ADAE, DM. Used to subset the metadata object. If none is passed, then name of the dataset passed as .df will be used.} diff --git a/man/xportr-package.Rd b/man/xportr-package.Rd index 8f4327ff..2f38a255 100644 --- a/man/xportr-package.Rd +++ b/man/xportr-package.Rd @@ -3,7 +3,6 @@ \docType{package} \name{xportr-package} \alias{xportr-package} -\alias{_PACKAGE} \title{The \code{xportr} package} \description{ \code{xportr} is designed to be a clinical workflow friendly method for outputting diff --git a/man/xportr.Rd b/man/xportr.Rd index c810dae1..7e356559 100644 --- a/man/xportr.Rd +++ b/man/xportr.Rd @@ -21,7 +21,7 @@ xportr( \item{df_metadata}{A data frame containing dataset level metadata.} -\item{domain}{Appropriate CDSIC dataset name, e.g. ADAE, DM. Used to subset +\item{domain}{Appropriate CDISC dataset name, e.g. ADAE, DM. Used to subset the metadata object. If none is passed, then name of the dataset passed as .df will be used.} diff --git a/man/xportr_df_label.Rd b/man/xportr_df_label.Rd index 691de990..5f95d771 100644 --- a/man/xportr_df_label.Rd +++ b/man/xportr_df_label.Rd @@ -12,7 +12,7 @@ xportr_df_label(.df, metadata = NULL, domain = NULL, metacore = deprecated()) \item{metadata}{A data frame containing dataset. See 'Metadata' section for details.} -\item{domain}{Appropriate CDSIC dataset name, e.g. ADAE, DM. Used to subset +\item{domain}{Appropriate CDISC dataset name, e.g. ADAE, DM. Used to subset the metadata object. If none is passed, then name of the dataset passed as .df will be used.} diff --git a/man/xportr_format.Rd b/man/xportr_format.Rd index e085a345..0c00da1b 100644 --- a/man/xportr_format.Rd +++ b/man/xportr_format.Rd @@ -12,7 +12,7 @@ xportr_format(.df, metadata = NULL, domain = NULL, metacore = deprecated()) \item{metadata}{A data frame containing variable level metadata. See 'Metadata' section for details.} -\item{domain}{Appropriate CDSIC dataset name, e.g. ADAE, DM. Used to subset +\item{domain}{Appropriate CDISC dataset name, e.g. ADAE, DM. Used to subset the metadata object. If none is passed, then name of the dataset passed as .df will be used.} diff --git a/man/xportr_label.Rd b/man/xportr_label.Rd index eb03df81..a61e0583 100644 --- a/man/xportr_label.Rd +++ b/man/xportr_label.Rd @@ -18,7 +18,7 @@ xportr_label( \item{metadata}{A data frame containing variable level metadata. See 'Metadata' section for details.} -\item{domain}{Appropriate CDSIC dataset name, e.g. ADAE, DM. Used to subset +\item{domain}{Appropriate CDISC dataset name, e.g. ADAE, DM. Used to subset the metadata object. If none is passed, then name of the dataset passed as .df will be used.} diff --git a/man/xportr_length.Rd b/man/xportr_length.Rd index 8d034eb8..93425808 100644 --- a/man/xportr_length.Rd +++ b/man/xportr_length.Rd @@ -19,7 +19,7 @@ xportr_length( \item{metadata}{A data frame containing variable level metadata. See 'Metadata' section for details.} -\item{domain}{Appropriate CDSIC dataset name, e.g. ADAE, DM. Used to subset +\item{domain}{Appropriate CDISC dataset name, e.g. ADAE, DM. Used to subset the metadata object. If none is passed, then name of the dataset passed as .df will be used.} diff --git a/man/xportr_order.Rd b/man/xportr_order.Rd index 26b87f42..03617d4f 100644 --- a/man/xportr_order.Rd +++ b/man/xportr_order.Rd @@ -18,7 +18,7 @@ xportr_order( \item{metadata}{A data frame containing variable level metadata. See 'Metadata' section for details.} -\item{domain}{Appropriate CDSIC dataset name, e.g. ADAE, DM. Used to subset +\item{domain}{Appropriate CDISC dataset name, e.g. ADAE, DM. Used to subset the metadata object. If none is passed, then name of the dataset passed as .df will be used.} diff --git a/man/xportr_type.Rd b/man/xportr_type.Rd index 736fe0c6..05489fcf 100644 --- a/man/xportr_type.Rd +++ b/man/xportr_type.Rd @@ -18,7 +18,7 @@ xportr_type( \item{metadata}{A data frame containing variable level metadata. See 'Metadata' section for details.} -\item{domain}{Appropriate CDSIC dataset name, e.g. ADAE, DM. Used to subset +\item{domain}{Appropriate CDISC dataset name, e.g. ADAE, DM. Used to subset the metadata object. If none is passed, then name of the dataset passed as .df will be used.} diff --git a/man/xportr_write.Rd b/man/xportr_write.Rd index c6bd4a1d..bde66844 100644 --- a/man/xportr_write.Rd +++ b/man/xportr_write.Rd @@ -22,7 +22,7 @@ used as \code{xpt} name.} \item{metadata}{A data frame containing dataset. See 'Metadata' section for details.} -\item{domain}{Appropriate CDSIC dataset name, e.g. ADAE, DM. Used to subset +\item{domain}{Appropriate CDISC dataset name, e.g. ADAE, DM. Used to subset the metadata object. If none is passed, then name of the dataset passed as .df will be used.} From 87c212792c417882f571a6a50fdc62c6b0458d59 Mon Sep 17 00:00:00 2001 From: bms63 Date: Wed, 14 Feb 2024 17:44:23 +0000 Subject: [PATCH 44/44] [skip actions] Bump version to 0.3.1.9018 --- DESCRIPTION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index 6f58e829..a0b254df 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: xportr Title: Utilities to Output CDISC SDTM/ADaM XPT Files -Version: 0.3.1.9017 +Version: 0.3.1.9018 Authors@R: c( person("Eli", "Miller", , "Eli.Miller@AtorusResearch.com", role = c("aut", "cre"), comment = c(ORCID = "0000-0002-2127-9456")),