diff --git a/.Rbuildignore b/.Rbuildignore index 47ed739..fd18cfe 100755 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -29,3 +29,4 @@ this_data.rds \.png ^CRAN-RELEASE$ ^Meta$ +^\.github$ diff --git a/.github/.gitignore b/.github/.gitignore new file mode 100644 index 0000000..2d19fc7 --- /dev/null +++ b/.github/.gitignore @@ -0,0 +1 @@ +*.html diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml new file mode 100644 index 0000000..eddfeab --- /dev/null +++ b/.github/workflows/R-CMD-check.yaml @@ -0,0 +1,64 @@ +# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples + +on: + push: + branches: [main, master, develop] + pull_request: + +name: R-CMD-check.yaml + +permissions: read-all + +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-r@v2 + with: + use-public-rspm: true + + - name: Add cmdstanr repo + run: | + writeLines('options(repos = c(cmdstanr = "https://stan-dev.r-universe.dev", getOption(\"repos\")))', file("~/.Rprofile", "ab")) + shell: Rscript {0} + + - name: Install cmdstanr + run: | + Rscript -e 'install.packages("cmdstanr", repos = c("https://stan-dev.r-universe.dev", getOption("repos")))' + + - name: Fix toolchain + run: | + Rscript -e 'cmdstanr::check_cmdstan_toolchain(fix = TRUE)' + + - name: Install CmdStan + run: | + Rscript -e 'cmdstanr::install_cmdstan(cores = 1)' + + - 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","--no-build-vignettes")' diff --git a/DESCRIPTION b/DESCRIPTION index 3bf1129..c435392 100755 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -13,7 +13,7 @@ Description: Offers item-response theory (IRT) ideal-point estimation for binary License: GPL Depends: methods, - R (>= 3.4.0) + R (>= 3.5.0) Imports: dplyr, svDialogs, @@ -34,14 +34,15 @@ Imports: ggthemes, posterior, R.rsp, - Rcpp + Rcpp, + cmdstanr Suggests: loo, - lubridate, - cmdstanr + lubridate Encoding: UTF-8 LazyData: true NeedsCompilation: yes SystemRequirements: GNU make +Additional_repositories: https://stan-dev.r-universe.dev VignetteBuilder: R.rsp RoxygenNote: 7.3.2