Skip to content

Commit

Permalink
Merge pull request #58 from rapidsurveys/dev
Browse files Browse the repository at this point in the history
upgrade project repository structure
  • Loading branch information
ernestguevarra authored Apr 13, 2024
2 parents 9e9fa00 + e38263c commit b581df1
Show file tree
Hide file tree
Showing 70 changed files with 626 additions and 8,840 deletions.
3 changes: 3 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,6 @@
^briefcase\.log$
^ODK Briefcase Storage$
^LICENSE\.md$
^pkgdown/_pkgdown\.yml$
^pkgdown$
^codecov\.yml$
50 changes: 50 additions & 0 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# 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:
branches: [main, master]
pull_request:
branches: [main, master]

name: R-CMD-check

jobs:
R-CMD-check:
runs-on: ${{ matrix.config.os }}

name: ${{ matrix.config.os }} (${{ matrix.config.r }})

strategy:
fail-fast: false
matrix:
config:
- {os: macos-latest, r: 'release'}
- {os: windows-latest, r: 'release'}
- {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

steps:
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-pandoc@v2

- 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
with:
extra-packages: any::rcmdcheck
needs: check

- uses: r-lib/actions/check-r-package@v2
with:
upload-snapshots: true
build_args: 'c("--no-manual","--compact-vignettes=gs+qpdf")'
83 changes: 0 additions & 83 deletions .github/workflows/check-standard.yaml

This file was deleted.

48 changes: 48 additions & 0 deletions .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# 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:
branches: [main, master]
pull_request:
branches: [main, master]
release:
types: [published]
workflow_dispatch:

name: pkgdown

jobs:
pkgdown:
runs-on: ubuntu-latest
# Only restrict concurrency for non-PR jobs
concurrency:
group: pkgdown-${{ github.event_name != 'pull_request' || github.run_id }}
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
permissions:
contents: write
steps:
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-pandoc@v2

- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::pkgdown, local::.
needs: website

- name: Build site
run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE)
shell: Rscript {0}

- name: Deploy to GitHub pages 🚀
if: github.event_name != 'pull_request'
uses: JamesIves/github-pages-deploy-action@v4.5.0
with:
clean: false
branch: gh-pages
folder: docs
60 changes: 31 additions & 29 deletions .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
@@ -1,48 +1,50 @@
# 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:
branches:
- main
- master
branches: [main, master]
pull_request:
branches:
- main
- master
branches: [main, master]

name: test-coverage

jobs:
test-coverage:
runs-on: macOS-latest
runs-on: ubuntu-latest
env:
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-pandoc@v1
- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::covr
needs: coverage

- name: Query dependencies
- name: Test coverage
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")
covr::codecov(
quiet = FALSE,
clean = FALSE,
install_path = file.path(normalizePath(Sys.getenv("RUNNER_TEMP"), winslash = "/"), "package")
)
shell: Rscript {0}

- name: Cache R packages
uses: actions/cache@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
- name: Show testthat output
if: always()
run: |
install.packages(c("remotes"))
remotes::install_deps(dependencies = TRUE)
remotes::install_cran("covr")
shell: Rscript {0}
## --------------------------------------------------------------------
find '${{ runner.temp }}/package' -name 'testthat.Rout*' -exec cat '{}' \; || true
shell: bash

- name: Test coverage
run: covr::codecov()
shell: Rscript {0}
- name: Upload test results
if: failure()
uses: actions/upload-artifact@v4
with:
name: coverage-test-failures
path: ${{ runner.temp }}/package
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,4 @@ vignettes/*.pdf
/*.jar
/revdep/.cache.rds
briefcase.log
docs
11 changes: 0 additions & 11 deletions .travis.yml

This file was deleted.

9 changes: 5 additions & 4 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: odkr
Type: Package
Title: 'Open Data Kit' ('ODK') R API
Version: 0.3.3
Version: 0.3.3.9000
Authors@R: c(
person("Ernest", "Guevarra", comment = c(ORCID = "0000-0002-4887-4415"),
email = "ernestgmd@gmail.com", role = c("aut", "cre", "cph")),
Expand All @@ -25,13 +25,14 @@ Imports:
curl,
rJava
Suggests:
testthat,
testthat (>= 3.0.0),
spelling,
covr
Encoding: UTF-8
Language: en-GB
LazyData: true
RoxygenNote: 7.1.1
RoxygenNote: 7.3.1
Roxygen: list(markdown = TRUE)
URL: https://github.com/rapidsurveys/odkr, https://rapidsurveys.io/odkr
URL: https://github.com/rapidsurveys/odkr, https://rapidsurveys.io/odkr,
BugReports: https://github.com/rapidsurveys/odkr/issues
Config/testthat/edition: 3
3 changes: 3 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# odkr 0.3.3.9000


# odkr 0.3.2.9000

This is the fifth release of `odkr` (third development release). In this version,
Expand Down
2 changes: 1 addition & 1 deletion R/export_data.R
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
#' @param split Logical. Should select multiple fields be split on export?
#' Default FALSE.
#' @param pem Path to pem key if using an encrypted form. Null by default.
#' @param pullBefore Logical. If set to true, pull before export. Defult FALSE.
#' @param pullBefore Logical. If set to true, pull before export. Default FALSE.
#' @param includeGeo Logical. If set to true, pull geojson. Default FALSE.
#'
#' @return CSV file in destination directory containing data from the pulled
Expand Down
7 changes: 4 additions & 3 deletions R/odkr.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,15 @@
#' from the mobile client ODK Collect when there is no internet connectivity,
#' when there is no ODK Aggregate Server set-up or when an ODK Aggregate
#' Server is not preferred. ODK Briefcase executable \code{.jar} file can be
#' downloaded from the OpenDataKit GitHub \href{https://github.com/getodk/briefcase/releases}{repo}.
#' downloaded from the OpenDataKit GitHub
#' \href{https://github.com/getodk/briefcase/releases}{repo}.
#'
#' As of ODK Briefcase version 1.4.4, a scriptable command line interface (CLI)
#' to the Java application has been available. This package provides an R
#' interface to ODK Briefcase via the available CLI to pull forms from a remote
#' ODK Aggregate Server or from a local ODK folder \code{/odk} collected from
#' mobile clients. This package requires Java 8 installed. Java 8 can be downloaded
#' \href{https://java.com/en/download/}{here}.
#' mobile clients. This package requires Java 8 installed. Java 8 can be
#' downloaded \href{https://java.com/en/download/}{here}.
#'
#' @keywords internal
#' @docType package
Expand Down
Loading

0 comments on commit b581df1

Please sign in to comment.