Skip to content

Commit

Permalink
Merge pull request #51 from wjakethompson/doc-cleanup
Browse files Browse the repository at this point in the history
Clean up documentation
  • Loading branch information
wjakethompson authored Jan 8, 2025
2 parents 4304305 + e96015e commit 01dd138
Show file tree
Hide file tree
Showing 57 changed files with 310 additions and 472 deletions.
21 changes: 12 additions & 9 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
# 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
name: R-CMD-check.yaml

permissions: read-all

jobs:
R-CMD-check:
Expand All @@ -16,25 +19,24 @@ jobs:
fail-fast: false
matrix:
config:
- {os: macOS-latest, r: 'release', rtools: ''}
- {os: windows-latest, r: 'release', rtools: '43'}
- {os: ubuntu-latest, r: 'devel', rtools: '', http-user-agent: 'release'}
- {os: ubuntu-latest, r: 'release', rtools: ''}
- {os: ubuntu-latest, r: 'oldrel-1', rtools: ''}
- {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@v3
- uses: actions/checkout@v4

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

- uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.config.r }}
rtools-version: ${{ matrix.config.rtools }}
http-user-agent: ${{ matrix.config.http-user-agent }}
use-public-rspm: true
extra-repositories: https://mc-stan.org/r-packages/
Expand All @@ -57,3 +59,4 @@ jobs:
- uses: r-lib/actions/check-r-package@v2
with:
upload-snapshots: true
build_args: 'c("--no-manual","--compact-vignettes=gs+qpdf")'
10 changes: 6 additions & 4 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
# 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: lint
name: lint.yaml

permissions: read-all

jobs:
lint:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-r@v2
with:
Expand Down
14 changes: 9 additions & 5 deletions .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
# 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
name: pkgdown.yaml

permissions: read-all

jobs:
pkgdown:
Expand All @@ -17,9 +20,10 @@ jobs:
group: pkgdown-${{ github.event_name != 'pull_request' || github.run_id }}
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

permissions:
contents: write
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

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

Expand All @@ -43,7 +47,7 @@ jobs:

- name: Deploy to GitHub pages 🚀
if: github.event_name != 'pull_request'
uses: JamesIves/github-pages-deploy-action@v4.4.1
uses: JamesIves/github-pages-deploy-action@v4.5.0
with:
clean: false
branch: gh-pages
Expand Down
17 changes: 11 additions & 6 deletions .github/workflows/pr-commands.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
# 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:
issue_comment:
types: [created]

name: Commands
name: pr-commands.yaml

permissions: read-all

jobs:
document:
Expand All @@ -11,9 +15,10 @@ jobs:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

permissions:
contents: write
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: r-lib/actions/pr-fetch@v2
with:
Expand All @@ -22,7 +27,6 @@ jobs:
- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true
extra-repositories: https://mc-stan.org/r-packages/

- uses: r-lib/actions/setup-r-dependencies@v2
with:
Expand Down Expand Up @@ -50,9 +54,10 @@ jobs:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

permissions:
contents: write
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: r-lib/actions/pr-fetch@v2
with:
Expand Down
21 changes: 17 additions & 4 deletions .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
@@ -1,19 +1,22 @@
# 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: test-coverage

permissions: read-all

jobs:
test-coverage:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-r@v2
with:
Expand All @@ -25,6 +28,7 @@ jobs:
cache-version: 3
extra-packages: |
any::covr
any::xml2
github::stan-dev/cmdstanr
upgrade: 'TRUE'
needs: coverage
Expand All @@ -37,7 +41,7 @@ jobs:

- name: Test coverage
run: |
covr::codecov(
cov <- covr::package_coverage(
quiet = FALSE,
clean = FALSE,
line_exclusions = list("src/stanExports_gqs_loglik.h",
Expand All @@ -50,6 +54,15 @@ jobs:
)
shell: Rscript {0}

- uses: codecov/codecov-action@v4
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
disable_search: true
token: ${{ secrets.CODECOV_TOKEN }}

- name: Show testthat output
if: always()
run: |
Expand All @@ -59,7 +72,7 @@ jobs:

- name: Upload test results
if: failure()
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: coverage-test-failures
path: ${{ runner.temp }}/package
2 changes: 1 addition & 1 deletion .github/workflows/update-citation-cff.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-r@v2
with:
Expand Down
6 changes: 4 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,13 @@ Suggests:
testthat (>= 3.0.0)
Additional_repositories: https://mc-stan.org/r-packages/
Config/testthat/edition: 3
Config/Needs/website: wjakethompson/wjake, showtext, ggdist, english
Config/Needs/website: r-dcm/rdcmtemplate, wjakethompson/wjake, showtext, ggdist, english
Config/Needs/documentation: openpharma/roxylint
Config/roxylint: list(linters = roxylint::tidy)
Encoding: UTF-8
Language: en-US
LazyData: true
Roxygen: list(markdown = TRUE)
Roxygen: list(markdown = TRUE, roclets = c("namespace", "rd", "roxylint::roxylint"))
RoxygenNote: 7.3.2
Biarch: true
SystemRequirements: GNU make
Expand Down
12 changes: 9 additions & 3 deletions R/data.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#' Examination for the Certificate of Proficiency in English (ECPE)
#' Examination for the Certificate of Proficiency in English
#'
#' This is data from the grammar section of the ECPE, administered annually by
#' This is data from the grammar section of the Examination for the Certificate
#' of Proficiency in English (\acronym{ECPE}), administered annually by
#' the English Language Institute at the University of Michigan. This data
#' contains responses to 28 questions from 2,922 respondents, which ask
#' respondents to complete a sentence with the correct word. This data set has
Expand All @@ -21,6 +22,8 @@
#' * `resp_id`: Respondent identifier
#' * `E1`-`E28`: Dichotomous item responses to the 28 ECPE items
#'
#' @concept Examination for the Certificate of Proficiency in English
#'
#' @references Buck, G., & Tatsuoka, K. K. (1998). Application of the rule-space
#' procedure to language testing: Examining attributes of a free response
#' listening test. *Language Testing, 15*(2), 119-157.
Expand Down Expand Up @@ -52,7 +55,7 @@
"ecpe_qmatrix"


#' MacReady & Dayton (1977) Multiplication Data
#' MacReady & Dayton (1977) multiplication data
#'
#' This is a small data set of multiplication item responses. This data contains
#' responses to 4 items from 142 respondents, which ask respondents to complete
Expand All @@ -64,6 +67,9 @@
#' * `respondent`: Respondent identifier
#' * `mdm1`-`mdm4`: Dichotomous item responses to the 4 multiplication items
#'
#' @concept MacReady
#' @concept Dayton
#'
#' @references MacReady, G. B., & Dayton, C. M. (1977). The use of probabilistic
#' models in the assessment of mastery. *Journal of Educational Statistics,
#' 2*(2), 99-120. \doi{10.2307/1164802}
Expand Down
16 changes: 9 additions & 7 deletions R/discrimination.R
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#' Item, attribute, and test-level discrimination indices
#'
#' The cognitive diagnostic index (CDI) is a measure of how well an assessment
#' is able to distinguish between attribute profiles. The index was originally
#' proposed by Henson & Douglas (2005) for item- and test-level discrimination,
#' and then expanded by Henson et al. (2008) to include attribute-level
#' discrimination indices.
#' The cognitive diagnostic index (\acronym{CDI}) is a measure of how well an
#' assessment is able to distinguish between attribute profiles.
#' The index was originally proposed by Henson & Douglas (2005) for item- and
#' test-level discrimination, and then expanded by Henson et al. (2008) to
#' include attribute-level discrimination indices.
#'
#' @param model The estimated model to be evaluated.
#' @param weight_prevalence Logical indicating whether the discrimination
Expand All @@ -29,9 +29,11 @@
#'
#' @return A list with two elements:
#' * `item_discrimination`: A [tibble][tibble::tibble-package] with one row
#' per item containing the CDI for the item and any relevant attributes.
#' per item containing the \acronym{CDI} for the item and any relevant
#' attributes.
#' * `test_discrimination`: A [tibble][tibble::tibble-package] with one row
#' containing the total CDI for the assessment and for each attribute.
#' containing the total \acronym{CDI} for the assessment and for each
#' attribute.
#' @export
#'
#' @references Henson, R., & Douglas, J. (2005). Test construction for cognitive
Expand Down
11 changes: 8 additions & 3 deletions R/extract.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#' Extract components of a `measrfit` object.
#' Extract components of a `measrfit` object
#'
#' @param model The estimated to extract information from.
#' @param ... Additional arguments passed to specific methods.
Expand All @@ -18,8 +18,8 @@ measr_extract <- function(model, ...) {
#' For `what = "odds_ratio_flags"` and
#' `what = "conditional_prob_flags"`, the compatibility interval used for
#' determining model fit flags to return. For example, a `ppmc_interval` of
#' 0.95 (the default) will return any PPMCs where the posterior predictive
#' *p*-value (ppp) is less than 0.025 or greater than 0.975.
#' 0.95 (the default) will return any \acronym{PPMC}s where the posterior
#' predictive *p*-value (ppp) is less than 0.025 or greater than 0.975.
#'
#' * `agreement`:
#'
Expand Down Expand Up @@ -100,6 +100,11 @@ measr_extract <- function(model, ...) {
#' Reliability information must first be added to the model using
#' [add_reliability()].
#'
#' @concept Sinharay
#' @concept Goodman
#' @concept Templin
#' @concept Bradshaw
#'
#' @return The extracted information. The specific structure will vary depending
#' on what is being extracted, but usually the returned object is a
#' [tibble][tibble::tibble-package] with the requested information.
Expand Down
Loading

0 comments on commit 01dd138

Please sign in to comment.