Skip to content

Commit

Permalink
Merge pull request #186 from UCD-SERG/check-doc-3
Browse files Browse the repository at this point in the history
Check doc 3
  • Loading branch information
chrisorwa authored Jul 16, 2024
2 parents be49297 + 6357e14 commit ca99c04
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 2 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/R-check-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
on:
push:
branches: [main, master]
pull_request:

name: "Documentation check"

jobs:
docs-check:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ github.token }}
steps:
- uses: actions/checkout@v4

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

- name: Install dependencies
uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::roxygen2
needs: roxygen2

- name: Document
run: roxygen2::roxygenise()
shell: Rscript {0}

- name: Check for changed files
run: |
git add --all
changes=$(git diff-index HEAD --name-only -- man/ NAMESPACE DESCRIPTION)
if [ -n "$changes" ]; then
echo "Changes found after documenting."
git --no-pager diff
echo "$changes"
echo "Please update documentation."
exit 1
else
echo "No changes found after documenting."
exit 0
fi
2 changes: 1 addition & 1 deletion R/est.incidence.by.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#' response model.
#'
#' @param pop_data [data.frame()] with cross-sectional serology data per antibody and age, and additional columns to identify possible `strata`.
#' @param strata Character vector of stratum-defining variables. Values must be variable names in `pop_data`.
#' @param strata [character()] vector of stratum-defining variables. Values must be variable names in `pop_data`.
#' @param curve_strata_varnames A subset of `strata`. Values must be variable names in `curve_params`. Default = "".
#' @param noise_strata_varnames A subset of `strata`. Values must be variable names in `noise_params`. Default = "".
#' @param num_cores Number of processor cores to use for calculations when computing by strata. If set to more than 1 and package \pkg{parallel} is available, then the computations are executed in parallel. Default = 1L.
Expand Down
2 changes: 1 addition & 1 deletion man/est.incidence.by.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ca99c04

Please sign in to comment.