diff --git a/.Rbuildignore b/.Rbuildignore index 720f217..2285363 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -9,3 +9,4 @@ ^codecov\.yml$ ^_pkgdown\.yml$ ^README\.html$ +^CITATION\.cff$ diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index e053548..d6f8ad1 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -8,16 +8,16 @@ * Fork this repository to your Github account -* Clone your version on your account down to your machine from your account +* Clone your version to your machine -``` +```bash git clone https://github.com//okapi.git ``` * Make sure to track progress upstream i.e., on our version of `okapi` at `rapidsurveys/okapi`, by doing -``` +```bash git remote add upstream https://github.com/rapidsurveys/okapi.git ``` diff --git a/.github/workflows/mirror-codeberg.yaml b/.github/workflows/mirror-codeberg.yaml new file mode 100644 index 0000000..07804b9 --- /dev/null +++ b/.github/workflows/mirror-codeberg.yaml @@ -0,0 +1,19 @@ +name: Mirror to other git server +on: + push: + branches: + - main + tags: + - "*" +jobs: + mirror: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + - uses: yesolutions/mirror-action@master + with: + REMOTE: https://codeberg.org/rapidsurveys/okapi + GIT_USERNAME: ${{ secrets.CODEBERG_USERNAME }} + GIT_PASSWORD: ${{ secrets.CODEBERG_TOKEN }} diff --git a/.github/workflows/rhub.yaml b/.github/workflows/rhub.yaml new file mode 100644 index 0000000..74ec7b0 --- /dev/null +++ b/.github/workflows/rhub.yaml @@ -0,0 +1,95 @@ +# R-hub's generic GitHub Actions workflow file. It's canonical location is at +# https://github.com/r-hub/actions/blob/v1/workflows/rhub.yaml +# You can update this file to a newer version using the rhub2 package: +# +# rhub::rhub_setup() +# +# It is unlikely that you need to modify this file manually. + +name: R-hub +run-name: "${{ github.event.inputs.id }}: ${{ github.event.inputs.name || format('Manually run by {0}', github.triggering_actor) }}" + +on: + workflow_dispatch: + inputs: + config: + description: 'A comma separated list of R-hub platforms to use.' + type: string + default: 'linux,windows,macos' + name: + description: 'Run name. You can leave this empty now.' + type: string + id: + description: 'Unique ID. You can leave this empty now.' + type: string + +jobs: + + setup: + runs-on: ubuntu-latest + outputs: + containers: ${{ steps.rhub-setup.outputs.containers }} + platforms: ${{ steps.rhub-setup.outputs.platforms }} + + steps: + # NO NEED TO CHECKOUT HERE + - uses: r-hub/actions/setup@v1 + with: + config: ${{ github.event.inputs.config }} + id: rhub-setup + + linux-containers: + needs: setup + if: ${{ needs.setup.outputs.containers != '[]' }} + runs-on: ubuntu-latest + name: ${{ matrix.config.label }} + strategy: + fail-fast: false + matrix: + config: ${{ fromJson(needs.setup.outputs.containers) }} + container: + image: ${{ matrix.config.container }} + + steps: + - uses: r-hub/actions/checkout@v1 + - uses: r-hub/actions/platform-info@v1 + with: + token: ${{ secrets.RHUB_TOKEN }} + job-config: ${{ matrix.config.job-config }} + - uses: r-hub/actions/setup-deps@v1 + with: + token: ${{ secrets.RHUB_TOKEN }} + job-config: ${{ matrix.config.job-config }} + - uses: r-hub/actions/run-check@v1 + with: + token: ${{ secrets.RHUB_TOKEN }} + job-config: ${{ matrix.config.job-config }} + + other-platforms: + needs: setup + if: ${{ needs.setup.outputs.platforms != '[]' }} + runs-on: ${{ matrix.config.os }} + name: ${{ matrix.config.label }} + strategy: + fail-fast: false + matrix: + config: ${{ fromJson(needs.setup.outputs.platforms) }} + + steps: + - uses: r-hub/actions/checkout@v1 + - uses: r-hub/actions/setup-r@v1 + with: + job-config: ${{ matrix.config.job-config }} + token: ${{ secrets.RHUB_TOKEN }} + - uses: r-hub/actions/platform-info@v1 + with: + token: ${{ secrets.RHUB_TOKEN }} + job-config: ${{ matrix.config.job-config }} + - uses: r-hub/actions/setup-deps@v1 + with: + job-config: ${{ matrix.config.job-config }} + token: ${{ secrets.RHUB_TOKEN }} + - uses: r-hub/actions/run-check@v1 + with: + job-config: ${{ matrix.config.job-config }} + token: ${{ secrets.RHUB_TOKEN }} diff --git a/.github/workflows/test-coverage.yaml b/.github/workflows/test-coverage.yaml index e050312..0ab748d 100644 --- a/.github/workflows/test-coverage.yaml +++ b/.github/workflows/test-coverage.yaml @@ -34,15 +34,16 @@ jobs: clean = FALSE, install_path = file.path(normalizePath(Sys.getenv("RUNNER_TEMP"), winslash = "/"), "package") ) + print(cov) covr::to_cobertura(cov) shell: Rscript {0} - - uses: codecov/codecov-action@v4 + - uses: codecov/codecov-action@v5 with: # Fail if error if not on PR, or if on PR and token is given fail_ci_if_error: ${{ github.event_name != 'pull_request' || secrets.CODECOV_TOKEN }} - file: ./cobertura.xml - plugin: noop + files: ./cobertura.xml + plugins: noop disable_search: true token: ${{ secrets.CODECOV_TOKEN }} diff --git a/CITATION.cff b/CITATION.cff new file mode 100644 index 0000000..764d820 --- /dev/null +++ b/CITATION.cff @@ -0,0 +1,130 @@ +# -------------------------------------------- +# CITATION file created with {cffr} R package +# See also: https://docs.ropensci.org/cffr/ +# -------------------------------------------- + +cff-version: 1.2.0 +message: 'To cite package "okapi" in publications use:' +type: software +license: GPL-3.0-only +title: 'okapi: Open Data Kit (ODK)-based Computer-assisted Personal Interviewing (CAPI) + Tools' +version: 0.1.1.9000 +doi: 10.5281/zenodo.206914853 +abstract: 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 technology. +authors: +- family-names: Guevarra + given-names: Ernest + email: ernest@guevarra.io + orcid: https://orcid.org/0000-0002-4887-4415 +preferred-citation: + type: manual + title: 'okapi: Open Data Kit (ODK)-based Computer-assisted Personal Interview (CAPI) + Tools' + authors: + - name: Ernest Guevarra + year: '2026' + notes: R package version 0.1.1.9000 + url: https://rapidsurveys.io/okapi/ + doi: 10.5281/zenodo.206914853 +repository-code: https://github.com/rapidsurveys/okapi +url: https://rapidsurveys.io/okapi/ +contact: +- family-names: Guevarra + given-names: Ernest + email: ernest@guevarra.io + orcid: https://orcid.org/0000-0002-4887-4415 +keywords: +- capi +- kobotoolbox +- odk +- ona +- r +references: +- type: software + title: httr + abstract: 'httr: Tools for Working with URLs and HTTP' + notes: Imports + url: https://httr.r-lib.org/ + repository: https://CRAN.R-project.org/package=httr + authors: + - family-names: Wickham + given-names: Hadley + email: hadley@posit.co + year: '2026' + doi: 10.32614/CRAN.package.httr +- type: software + title: tibble + abstract: 'tibble: Simple Data Frames' + notes: Imports + url: https://tibble.tidyverse.org/ + repository: https://CRAN.R-project.org/package=tibble + authors: + - family-names: Müller + given-names: Kirill + email: kirill@cynkra.com + orcid: https://orcid.org/0000-0002-1416-3412 + - family-names: Wickham + given-names: Hadley + email: hadley@rstudio.com + year: '2026' + doi: 10.32614/CRAN.package.tibble +- type: software + title: jsonlite + abstract: 'jsonlite: A Simple and Robust JSON Parser and Generator for R' + notes: Imports + url: https://jeroen.r-universe.dev/jsonlite + repository: https://CRAN.R-project.org/package=jsonlite + authors: + - family-names: Ooms + given-names: Jeroen + email: jeroenooms@gmail.com + orcid: https://orcid.org/0000-0002-4035-0289 + year: '2026' + doi: 10.32614/CRAN.package.jsonlite +- type: software + title: askpass + abstract: 'askpass: Password Entry Utilities for R, Git, and SSH' + notes: Imports + url: https://r-lib.r-universe.dev/askpass + repository: https://CRAN.R-project.org/package=askpass + authors: + - family-names: Ooms + given-names: Jeroen + email: jeroenooms@gmail.com + orcid: https://orcid.org/0000-0002-4035-0289 + year: '2026' + doi: 10.32614/CRAN.package.askpass +- type: software + title: spelling + abstract: 'spelling: Tools for Spell Checking in R' + notes: Suggests + url: https://ropensci.r-universe.dev/spelling + repository: https://CRAN.R-project.org/package=spelling + authors: + - family-names: Ooms + given-names: Jeroen + email: jeroenooms@gmail.com + orcid: https://orcid.org/0000-0002-4035-0289 + - family-names: Hester + given-names: Jim + email: james.hester@rstudio.com + year: '2026' + doi: 10.32614/CRAN.package.spelling +- type: software + title: covr + abstract: 'covr: Test Coverage for Packages' + notes: Suggests + url: https://covr.r-lib.org + repository: https://CRAN.R-project.org/package=covr + authors: + - family-names: Hester + given-names: Jim + email: james.f.hester@gmail.com + year: '2026' + doi: 10.32614/CRAN.package.covr + diff --git a/DESCRIPTION b/DESCRIPTION index 430fe0f..1f17b8c 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.9000 +Version: 0.1.1.9000 Authors@R: person(given = "Ernest", family = "Guevarra", comment = c(ORCID = "0000-0002-4887-4415"), @@ -26,7 +26,7 @@ Suggests: Encoding: UTF-8 Language: en-GB LazyData: true -RoxygenNote: 7.3.2 +RoxygenNote: 7.3.3 Roxygen: list(markdown = TRUE) URL: https://rapidsurveys.io/okapi/,https://github.com/rapidsurveys/okapi BugReports: https://github.com/rapidsurveys/okapi/issues diff --git a/README.Rmd b/README.Rmd index f1d9741..9212b52 100644 --- a/README.Rmd +++ b/README.Rmd @@ -20,7 +20,7 @@ knitr::opts_chunk$set( [![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/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) +[![Codecov test coverage](https://codecov.io/gh/rapidsurveys/okapi/graph/badge.svg)](https://app.codecov.io/gh/rapidsurveys/okapi) [![CodeFactor](https://www.codefactor.io/repository/github/rapidsurveys/okapi/badge)](https://www.codefactor.io/repository/github/rapidsurveys/okapi) [![DOI](https://zenodo.org/badge/206914853.svg)](https://zenodo.org/badge/latestdoi/206914853) @@ -75,3 +75,7 @@ citation("okapi") Feedback, bug reports and feature requests are welcome; file issues or seek support [here](https://github.com/rapidsurveys/okapi/issues). If you would like to contribute to the package, please see our [contributing guidelines](https://rapidsurveys.io/okapi/CONTRIBUTING.html). This project is released with a [Contributor Code of Conduct](https://rapidsurveys.io/okapi/CODE_OF_CONDUCT.html). By participating in this project you agree to abide by its terms. + +  + +[![](https://github.com/rapidsurveys/ramOPmanual/blob/main/images/rapidsurveys_footer.png?raw=true)](https://rapidsurveys.io) diff --git a/README.md b/README.md index 7ff37d5..45a90d1 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](h [![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) +coverage](https://codecov.io/gh/rapidsurveys/okapi/graph/badge.svg)](https://app.codecov.io/gh/rapidsurveys/okapi) [![CodeFactor](https://www.codefactor.io/repository/github/rapidsurveys/okapi/badge)](https://www.codefactor.io/repository/github/rapidsurveys/okapi) [![DOI](https://zenodo.org/badge/206914853.svg)](https://zenodo.org/badge/latestdoi/206914853) @@ -26,8 +26,7 @@ package provides interface functions to CAPI systems based on the [Open Data Kit (ODK)](https://getodk.org) technology. + ## The ODK ecosystem --> ## What does the package do? @@ -53,7 +52,9 @@ Universe](https://rapidsurveys.r-universe.dev) with: ``` r install.packages( "okapi", - repos = c('https://rapidsurveys.r-universe.dev', 'https://cloud.r-project.org') + repos = c( + 'https://rapidsurveys.r-universe.dev', 'https://cloud.r-project.org' + ) ) ``` @@ -74,19 +75,19 @@ citation provided by a call to the `citation` function as follows: citation("okapi") #> To cite okapi in publications use: #> -#> Ernest Guevarra (2024). _okapi: Open Data Kit (ODK)-based +#> Ernest Guevarra (2026). _okapi: Open Data Kit (ODK)-based #> Computer-assisted Personal Interview (CAPI) Tools_. #> doi:10.5281/zenodo.206914853 -#> , R package -#> version 0.0.0.9000, . +#> , R package version +#> 0.1.1.9000, . #> #> A BibTeX entry for LaTeX users is #> #> @Manual{, #> title = {okapi: Open Data Kit (ODK)-based Computer-assisted Personal Interview (CAPI) Tools}, #> author = {{Ernest Guevarra}}, -#> year = {2024}, -#> note = {R package version 0.0.0.9000}, +#> year = {2026}, +#> note = {R package version 0.1.1.9000}, #> url = {https://rapidsurveys.io/okapi/}, #> doi = {10.5281/zenodo.206914853}, #> } @@ -103,3 +104,7 @@ guidelines](https://rapidsurveys.io/okapi/CONTRIBUTING.html). This project is released with a [Contributor Code of Conduct](https://rapidsurveys.io/okapi/CODE_OF_CONDUCT.html). By participating in this project you agree to abide by its terms. + +  + +[![](https://github.com/rapidsurveys/ramOPmanual/blob/main/images/rapidsurveys_footer.png?raw=true)](https://rapidsurveys.io) diff --git a/inst/CITATION b/inst/CITATION index 31f76b3..0d3357e 100644 --- a/inst/CITATION +++ b/inst/CITATION @@ -3,8 +3,8 @@ bibentry( header = "To cite okapi in publications use:", title = "okapi: Open Data Kit (ODK)-based Computer-assisted Personal Interview (CAPI) Tools", author = person("Ernest Guevarra"), - year = "2024", - note = "R package version 0.1.0.9000", + year = "2026", + note = "R package version 0.1.1.9000", url = "https://rapidsurveys.io/okapi/", doi = "10.5281/zenodo.206914853", ) \ No newline at end of file diff --git a/pkgdown/_pkgdown.yml b/pkgdown/_pkgdown.yml index 765a2f3..21544e0 100644 --- a/pkgdown/_pkgdown.yml +++ b/pkgdown/_pkgdown.yml @@ -8,17 +8,27 @@ development: template: bootstrap: 5 theme: breeze-light - ganalytics: "G-VQQX28ZSBV" bslib: bootswatch: sandstone primary: "#A41034" + includes: + in_header: | + + + navbar: bg: primary type: light structure: left: [home, intro, reference, articles, news] - right: [search, mastodon, linkedin, github] + right: [search, github] components: # articles: @@ -26,14 +36,6 @@ navbar: # menu: # - text: "Detecting haemoglobinaemia" # href: articles/haemoglobinaemia.html - mastodon: - icon: "fab fa-mastodon fa-lg" - aria-label: Mastodon - href: https://fosstodon.org/@katilingban - linkedin: - icon: "fab fa-linkedin fa-lg" - aria-label: LinkedIn - href: https://www.linkedin.com/company/katilingban home: links: