diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index 0528262..14159b7 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -1,4 +1,4 @@ -# Workflow derived from https://github.com/r-lib/actions/tree/master/examples +# 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 on: push: @@ -18,7 +18,7 @@ jobs: fail-fast: false matrix: config: - - {os: macOS-latest, r: 'release'} + - {os: macos-latest, r: 'release'} - {os: windows-latest, r: 'release'} - {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'} - {os: ubuntu-latest, r: 'release'} @@ -29,30 +29,22 @@ jobs: R_KEEP_PKG_SOURCE: yes steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - - uses: r-lib/actions/setup-pandoc@v1 + - uses: r-lib/actions/setup-pandoc@v2 - - uses: r-lib/actions/setup-r@v1 + - 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@v1 + - uses: r-lib/actions/setup-r-dependencies@v2 with: - extra-packages: rcmdcheck + extra-packages: any::rcmdcheck + needs: check - - uses: r-lib/actions/check-r-package@v1 - - - name: Show testthat output - if: always() - run: find check -name 'testthat.Rout*' -exec cat '{}' \; || true - shell: bash - - - name: Upload check results - if: failure() - uses: actions/upload-artifact@main + - uses: r-lib/actions/check-r-package@v2 with: - name: ${{ runner.os }}-r${{ matrix.config.r }}-results - path: check + upload-snapshots: true + build_args: 'c("--no-manual","--compact-vignettes=gs+qpdf")' diff --git a/.github/workflows/test-coverage.yaml b/.github/workflows/test-coverage.yaml index 3c0da1c..21b8a93 100644 --- a/.github/workflows/test-coverage.yaml +++ b/.github/workflows/test-coverage.yaml @@ -1,4 +1,4 @@ -# Workflow derived from https://github.com/r-lib/actions/tree/master/examples +# 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 on: push: @@ -15,16 +15,36 @@ jobs: GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - - uses: r-lib/actions/setup-r@v1 + - uses: r-lib/actions/setup-r@v2 with: use-public-rspm: true - - uses: r-lib/actions/setup-r-dependencies@v1 + - uses: r-lib/actions/setup-r-dependencies@v2 with: - extra-packages: covr + extra-packages: any::covr + needs: coverage - name: Test coverage - run: covr::codecov() + run: | + covr::codecov( + quiet = FALSE, + clean = FALSE, + install_path = file.path(normalizePath(Sys.getenv("RUNNER_TEMP"), winslash = "/"), "package") + ) shell: Rscript {0} + + - name: Show testthat output + if: always() + run: | + ## -------------------------------------------------------------------- + find '${{ runner.temp }}/package' -name 'testthat.Rout*' -exec cat '{}' \; || true + shell: bash + + - name: Upload test results + if: failure() + uses: actions/upload-artifact@v4 + with: + name: coverage-test-failures + path: ${{ runner.temp }}/package diff --git a/DESCRIPTION b/DESCRIPTION index 1db0421..9e0a545 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -19,13 +19,14 @@ License: GPL (>= 3) Imports: googledrive, googlesheets4, - readxl + readxl, + stringi Suggests: spelling Encoding: UTF-8 Language: en-GB LazyData: true Roxygen: list(markdown = TRUE) -RoxygenNote: 7.1.2 +RoxygenNote: 7.3.1 URL: https://panukatan.io/openmarawi/, https://github.com/panukatan/openmarawi BugReports: https://github.com/panukatan/openmarawi/issues diff --git a/NAMESPACE b/NAMESPACE index a1309a8..8788c7e 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -13,3 +13,4 @@ importFrom(googledrive,drive_ls) importFrom(googlesheets4,gs4_deauth) importFrom(googlesheets4,read_sheet) importFrom(readxl,read_xls) +importFrom(stringi,stri_detect) diff --git a/R/openmarawi.R b/R/openmarawi.R index c777c1e..f2c92ac 100644 --- a/R/openmarawi.R +++ b/R/openmarawi.R @@ -18,6 +18,7 @@ #' @importFrom googledrive drive_deauth drive_ls drive_get #' @importFrom googlesheets4 gs4_deauth read_sheet #' @importFrom readxl read_xls +#' @importFrom stringi stri_detect #' # ################################################################################ diff --git a/README.Rmd b/README.Rmd index bf72cce..4417516 100644 --- a/README.Rmd +++ b/README.Rmd @@ -18,7 +18,7 @@ knitr::opts_chunk$set( [![Project Status: WIP – Initial development is in progress, but there has not yet been a stable, usable release suitable for the public.](https://www.repostatus.org/badges/latest/wip.svg)](https://www.repostatus.org/#wip) [![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental) -[![R-CMD-check](https://github.com/panukatan/openmarawi/workflows/R-CMD-check/badge.svg)](https://github.com/panukatan/openmarawi/actions) +[![R-CMD-check](https://github.com/panukatan/openmarawi/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/panukatan/openmarawi/actions/workflows/R-CMD-check.yaml) [![test-coverage](https://github.com/panukatan/openmarawi/actions/workflows/test-coverage.yaml/badge.svg)](https://github.com/panukatan/openmarawi/actions/workflows/test-coverage.yaml) [![CodeFactor](https://www.codefactor.io/repository/github/panukatan/openmarawi/badge)](https://www.codefactor.io/repository/github/panukatan/openmarawi) diff --git a/README.md b/README.md index 10d0420..a09b3cb 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ has not yet been a stable, usable release suitable for the public.](https://www.repostatus.org/badges/latest/wip.svg)](https://www.repostatus.org/#wip) [![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental) -[![R-CMD-check](https://github.com/panukatan/openmarawi/workflows/R-CMD-check/badge.svg)](https://github.com/panukatan/openmarawi/actions) +[![R-CMD-check](https://github.com/panukatan/openmarawi/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/panukatan/openmarawi/actions/workflows/R-CMD-check.yaml) [![test-coverage](https://github.com/panukatan/openmarawi/actions/workflows/test-coverage.yaml/badge.svg)](https://github.com/panukatan/openmarawi/actions/workflows/test-coverage.yaml) [![CodeFactor](https://www.codefactor.io/repository/github/panukatan/openmarawi/badge)](https://www.codefactor.io/repository/github/panukatan/openmarawi) @@ -30,8 +30,7 @@ of Marawi City. diff --git a/man/marawi_get.Rd b/man/marawi_get.Rd index dd56f61..5d7bfe8 100644 --- a/man/marawi_get.Rd +++ b/man/marawi_get.Rd @@ -72,7 +72,5 @@ marawi_get_lanao_all() } \author{ -Ernest Guevarra - Ernest Guevarra } diff --git a/man/openmarawi.Rd b/man/openmarawi.Rd index ff7313c..056fe06 100644 --- a/man/openmarawi.Rd +++ b/man/openmarawi.Rd @@ -2,8 +2,8 @@ % Please edit documentation in R/openmarawi.R \docType{package} \name{openmarawi} -\alias{openmarawi} \alias{openmarawi-package} +\alias{openmarawi} \title{An Interface to the Open Marawi Database} \description{ The citizens of Marawi have a right to the data and maps about their home