From 2fe4c1e3ef794bba5b1a5ae1c4ee5fd727bb8567 Mon Sep 17 00:00:00 2001 From: Ernest Guevarra Date: Thu, 5 Jan 2023 11:14:54 +0000 Subject: [PATCH 1/4] Increment version number to 0.1.0.9000 --- DESCRIPTION | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 74b1215..9c8b627 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -2,7 +2,7 @@ Package: okapi Type: Package Title: Open Data Kit (ODK)-based Computer-assisted Personal Interviewing (CAPI) Tools -Version: 0.1.0 +Version: 0.1.0.9000 Authors@R: person(given = "Ernest", family = "Guevarra", comment = c(ORCID = "0000-0002-4887-4415"), @@ -25,7 +25,7 @@ Suggests: Encoding: UTF-8 Language: en-GB LazyData: true -RoxygenNote: 7.1.2 +RoxygenNote: 7.2.1 Roxygeon: list(markdown = TRUE) URL: https://rapidsurveys.io/okapi/, https://github.com/rapidsurveys/okapi BugReports: https://github.com/rapidsurveys/okapi/issues From f764ecbb1957a83c33cee9002e35c596587ae651 Mon Sep 17 00:00:00 2001 From: Ernest Guevarra Date: Sat, 21 Oct 2023 07:36:14 +0100 Subject: [PATCH 2/4] tidyup package dependencies --- DESCRIPTION | 5 +++-- NAMESPACE | 2 ++ R/okapi.R | 2 ++ R/ona_misc.R | 2 ++ README.Rmd | 16 ++++++++++------ inst/CITATION | 16 ++++++++++++++++ 6 files changed, 35 insertions(+), 8 deletions(-) create mode 100644 inst/CITATION diff --git a/DESCRIPTION b/DESCRIPTION index 9c8b627..b89940b 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -18,14 +18,15 @@ License: GPL-3 Imports: httr, tibble, - jsonlite + jsonlite, + askpass Suggests: spelling, covr Encoding: UTF-8 Language: en-GB LazyData: true -RoxygenNote: 7.2.1 +RoxygenNote: 7.2.3 Roxygeon: list(markdown = TRUE) URL: https://rapidsurveys.io/okapi/, https://github.com/rapidsurveys/okapi BugReports: https://github.com/rapidsurveys/okapi/issues diff --git a/NAMESPACE b/NAMESPACE index 65b3ccd..65cbbbd 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -6,6 +6,7 @@ export(kobo_get_data) export(kobo_list_assets) export(ona_auth_password) export(ona_auth_token) +export(ona_configure) export(ona_data_get) export(ona_data_list) export(ona_form_delete) @@ -19,6 +20,7 @@ export(ona_project_info) export(ona_project_list) export(ona_project_register) export(ona_project_share) +importFrom(askpass,askpass) importFrom(httr,GET) importFrom(httr,add_headers) importFrom(httr,authenticate) diff --git a/R/okapi.R b/R/okapi.R index d974fd1..f984472 100644 --- a/R/okapi.R +++ b/R/okapi.R @@ -16,6 +16,8 @@ #' @importFrom httr GET authenticate add_headers #' @importFrom tibble tibble #' @importFrom jsonlite fromJSON +#' @importFrom askpass askpass +#' #' # ################################################################################ diff --git a/R/ona_misc.R b/R/ona_misc.R index c1bbe59..0233dcb 100644 --- a/R/ona_misc.R +++ b/R/ona_misc.R @@ -7,6 +7,8 @@ #' #' @return An object of class request for HTTP requests #' +#' @export +#' # ################################################################################ diff --git a/README.Rmd b/README.Rmd index a355ed4..a6711e9 100644 --- a/README.Rmd +++ b/README.Rmd @@ -16,10 +16,11 @@ knitr::opts_chunk$set( # okapi: Open Data Kit (ODK)-based Computer-assisted Personal Interview (CAPI) Tools +[![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://www.tidyverse.org/lifecycle/#experimental) [![R-CMD-check](https://github.com/rapidsurveys/okapi/workflows/R-CMD-check/badge.svg)](https://github.com/rapidsurveys/okapi/actions) [![test-coverage](https://github.com/rapidsurveys/okapi/workflows/test-coverage/badge.svg)](https://github.com/rapidsurveys/okapi/actions) -[![Codecov test coverage](https://codecov.io/gh/rapidsurveys/okapi/branch/master/graph/badge.svg)](https://codecov.io/gh/rapidsurveys/okapi?branch=master) +[![Codecov test coverage](https://codecov.io/gh/rapidsurveys/okapi/branch/main/graph/badge.svg)](https://codecov.io/gh/rapidsurveys/okapi?branch=main) [![CodeFactor](https://www.codefactor.io/repository/github/rapidsurveys/okapi/badge)](https://www.codefactor.io/repository/github/rapidsurveys/okapi) @@ -27,10 +28,6 @@ Data collection using computer-assisted personal interviewing or CAPI tools is n ## Motivation and development history - -## What does `okapi` do? - - ## The ODK ecosystem ## What does `okapi` do? @@ -55,13 +52,20 @@ install.packages("okapi") You can install the development version of `okapi` from [GitHub](https://github.com/rapidsurveys/okapi) with: -```{r instal_github, eval = FALSE} +```{r install_github, eval = FALSE} if(!require(remotes)) install.packages("remotes") remotes::install_github("rapidsurveys/okapi") ``` ## Usage +## Citation + +If you find the `okapi` package useful, please cite using the suggested citation provided by a call to the `citation` function as follows: + +```{r cite} +citation("okapi") +``` ## Community guidelines diff --git a/inst/CITATION b/inst/CITATION new file mode 100644 index 0000000..5a378b3 --- /dev/null +++ b/inst/CITATION @@ -0,0 +1,16 @@ +citHeader("To cite okapi in publications use:") + +citEntry( + entry = "Manual", + title = "okapi: Open Data Kit (ODK)-based Computer-assisted Personal Interview (CAPI) Tools", + author = person("Ernest Guevarra"), + year = "2023", + note = "R package version 0.1.0.9000", + url = "https://rapidsurveys.io/okapi/", + textVersion = paste( + "Ernest Guevarra (2023).", + "okapi: Open Data Kit (ODK)-based Computer-assisted Personal Interview (CAPI) Tools", + "R package version 0.1.0.9000", + "URL https://rapidsurveys.io/okapi/" + ) +) From 33d31c6a5dddb49d3fa0fdb22a97c46d441629fa Mon Sep 17 00:00:00 2001 From: Ernest Guevarra Date: Sat, 21 Oct 2023 07:41:44 +0100 Subject: [PATCH 3/4] update github actions --- .github/workflows/R-CMD-check.yaml | 22 +++++++++---------- .github/workflows/test-coverage.yaml | 32 ++++++++++++++++++++++------ README.Rmd | 1 + 3 files changed, 38 insertions(+), 17 deletions(-) diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index 45c2125..a3ac618 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'} @@ -27,23 +27,23 @@ jobs: env: GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} R_KEEP_PKG_SOURCE: yes - ONA_USERNAME: okapi_bot - ONA_PASSWORD: ${{ secrets.ONA_PASSWORD }} - ONA_TOKEN: ${{ secrets.ONA_TOKEN }} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - 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 + - uses: r-lib/actions/check-r-package@v2 + with: + upload-snapshots: true diff --git a/.github/workflows/test-coverage.yaml b/.github/workflows/test-coverage.yaml index 3c0da1c..2c5bb50 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@v3 - - 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(Sys.getenv("RUNNER_TEMP"), "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@v3 + with: + name: coverage-test-failures + path: ${{ runner.temp }}/package diff --git a/README.Rmd b/README.Rmd index a6711e9..61cc061 100644 --- a/README.Rmd +++ b/README.Rmd @@ -22,6 +22,7 @@ knitr::opts_chunk$set( [![test-coverage](https://github.com/rapidsurveys/okapi/workflows/test-coverage/badge.svg)](https://github.com/rapidsurveys/okapi/actions) [![Codecov test coverage](https://codecov.io/gh/rapidsurveys/okapi/branch/main/graph/badge.svg)](https://codecov.io/gh/rapidsurveys/okapi?branch=main) [![CodeFactor](https://www.codefactor.io/repository/github/rapidsurveys/okapi/badge)](https://www.codefactor.io/repository/github/rapidsurveys/okapi) +[![R-CMD-check](https://github.com/rapidsurveys/okapi/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/rapidsurveys/okapi/actions/workflows/R-CMD-check.yaml) Data collection using computer-assisted personal interviewing or CAPI tools is now the standard approach for conducting surveys and studies. A wide range of CAPI systems are currently being used. The ability to interface with these systems helps in the overall data process. This package provides interface functions to CAPI systems based on the [Open Data Kit or ODK](https://getodk.org) technology. From cad9e1923b57bba6c9bbd04760b8948e53988b64 Mon Sep 17 00:00:00 2001 From: Ernest Guevarra Date: Sat, 21 Oct 2023 07:43:27 +0100 Subject: [PATCH 4/4] update README --- README.Rmd | 3 +-- README.md | 36 ++++++++++++++++++++++++++++++------ 2 files changed, 31 insertions(+), 8 deletions(-) diff --git a/README.Rmd b/README.Rmd index 61cc061..e5dd78f 100644 --- a/README.Rmd +++ b/README.Rmd @@ -18,11 +18,10 @@ 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://www.tidyverse.org/lifecycle/#experimental) -[![R-CMD-check](https://github.com/rapidsurveys/okapi/workflows/R-CMD-check/badge.svg)](https://github.com/rapidsurveys/okapi/actions) +[![R-CMD-check](https://github.com/rapidsurveys/okapi/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/rapidsurveys/okapi/actions/workflows/R-CMD-check.yaml) [![test-coverage](https://github.com/rapidsurveys/okapi/workflows/test-coverage/badge.svg)](https://github.com/rapidsurveys/okapi/actions) [![Codecov test coverage](https://codecov.io/gh/rapidsurveys/okapi/branch/main/graph/badge.svg)](https://codecov.io/gh/rapidsurveys/okapi?branch=main) [![CodeFactor](https://www.codefactor.io/repository/github/rapidsurveys/okapi/badge)](https://www.codefactor.io/repository/github/rapidsurveys/okapi) -[![R-CMD-check](https://github.com/rapidsurveys/okapi/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/rapidsurveys/okapi/actions/workflows/R-CMD-check.yaml) Data collection using computer-assisted personal interviewing or CAPI tools is now the standard approach for conducting surveys and studies. A wide range of CAPI systems are currently being used. The ability to interface with these systems helps in the overall data process. This package provides interface functions to CAPI systems based on the [Open Data Kit or ODK](https://getodk.org) technology. diff --git a/README.md b/README.md index d744658..398df36 100644 --- a/README.md +++ b/README.md @@ -5,12 +5,15 @@ +[![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://www.tidyverse.org/lifecycle/#experimental) -[![R-CMD-check](https://github.com/rapidsurveys/okapi/workflows/R-CMD-check/badge.svg)](https://github.com/rapidsurveys/okapi/actions) +[![R-CMD-check](https://github.com/rapidsurveys/okapi/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/rapidsurveys/okapi/actions/workflows/R-CMD-check.yaml) [![test-coverage](https://github.com/rapidsurveys/okapi/workflows/test-coverage/badge.svg)](https://github.com/rapidsurveys/okapi/actions) [![Codecov test -coverage](https://codecov.io/gh/rapidsurveys/okapi/branch/master/graph/badge.svg)](https://codecov.io/gh/rapidsurveys/okapi?branch=master) +coverage](https://codecov.io/gh/rapidsurveys/okapi/branch/main/graph/badge.svg)](https://codecov.io/gh/rapidsurveys/okapi?branch=main) [![CodeFactor](https://www.codefactor.io/repository/github/rapidsurveys/okapi/badge)](https://www.codefactor.io/repository/github/rapidsurveys/okapi) @@ -23,8 +26,6 @@ Data Kit or ODK](https://getodk.org) technology. ## Motivation and development history -## What does `okapi` do? - ## The ODK ecosystem ## What does `okapi` do? @@ -46,8 +47,7 @@ current set of functions perform the following tasks: