-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Features - summary_heterogeneity() function to summarize the heterogeneity of the RoBMA models (prediction interval, tau, tau^2, I^2, and H^2) - check_RoBMA_convergence() function to check the convergence of the RoBMA models - adds informed prior distributions for binary and time-to-event outcomes via BayesTools 0.2.17 Fixes - checking and fixing the number of available cores upon loading the package (fixes: Error when parallel = TRUE #25) - update() function re-evaluates convergence checks of individual models (fixes: update() should update convergence checks on individual model level #34) - Updates vignettes (fixes: #31 and fixes #32) - Also add renv to hopefully fix unit tests
- Loading branch information
Showing
394 changed files
with
9,856 additions
and
2,493 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
^renv$ | ||
^renv\.lock$ | ||
^RoBMA\.Rproj$ | ||
^\.Rproj\.user$ | ||
^do-not-share$ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,107 +1,102 @@ | ||
# For help debugging build failures open an issue on the RStudio community with the 'github-actions' tag. | ||
# https://community.rstudio.com/new-topic?category=Package%20development&tags=github-actions | ||
name: R-CMD-tests | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- master | ||
- pre-release | ||
branches: [main, master, pre-release] | ||
pull_request: | ||
branches: | ||
- main | ||
- master | ||
- pre-release | ||
|
||
name: R-CMD-tests | ||
branches: [main, master, pre-release] | ||
|
||
jobs: | ||
R-CMD-check: | ||
build: | ||
runs-on: ${{ matrix.config.os }} | ||
|
||
name: ${{ matrix.config.os }} (${{ matrix.config.r }}) | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
config: | ||
- {os: windows-latest, r: 'release'} | ||
- {os: ubuntu-20.04, r: 'release'} | ||
# - {os: macOS-11.6.2, r: 'release'} # the release C++ version does not compile properly | ||
|
||
env: | ||
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true | ||
RSPM: ${{ matrix.config.rspm }} | ||
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- {os: ubuntu-latest, r: 'release'} | ||
- {os: macOS-latest, r: 'release'} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: r-lib/actions/setup-r@v2 | ||
- name: Setup R | ||
uses: r-lib/actions/setup-r@v2 | ||
with: | ||
r-version: ${{ matrix.config.r }} | ||
|
||
- uses: r-lib/actions/setup-pandoc@v2 | ||
# Install JAGS and system dependencies on Linux | ||
- name: Install System Dependencies (Linux) | ||
if: runner.os == 'Linux' | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y \ | ||
libssl-dev \ | ||
libcurl4-openssl-dev \ | ||
libxml2-dev \ | ||
libfontconfig1-dev \ | ||
libharfbuzz-dev \ | ||
libfribidi-dev \ | ||
libfreetype6-dev \ | ||
libpng-dev \ | ||
libtiff5-dev \ | ||
libjpeg-dev \ | ||
libcairo2-dev \ | ||
jags | ||
- name: Query dependencies | ||
# Install JAGS on Windows | ||
- name: Install JAGS (Windows) | ||
if: runner.os == 'Windows' | ||
shell: cmd | ||
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") | ||
shell: Rscript {0} | ||
curl -o jags-installer.exe -L https://sourceforge.net/projects/mcmc-jags/files/JAGS/4.x/Windows/JAGS-4.3.1.exe/download | ||
jags-installer.exe /S | ||
del jags-installer.exe | ||
- name: Restore R package cache | ||
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- | ||
# Set JAGS environment variables on Windows | ||
- name: Set JAGS environment variables (Windows) | ||
if: runner.os == 'Windows' | ||
shell: cmd | ||
run: | | ||
echo JAGS_ROOT=C:\Program Files\JAGS\JAGS-4.3.1>> %GITHUB_ENV% | ||
echo JAGS_MAJOR_VERSION=4>> %GITHUB_ENV% | ||
echo PATH=C:\Program Files\JAGS\JAGS-4.3.1\bin;%PATH%>> %GITHUB_ENV% | ||
- name: Install system dependencies | ||
if: runner.os == 'Linux' | ||
# Install JAGS on macOS | ||
- name: Install JAGS (macOS) | ||
if: runner.os == 'macOS' | ||
run: | | ||
while read -r cmd | ||
do | ||
eval sudo $cmd | ||
done < <(Rscript -e 'writeLines(remotes::system_requirements("ubuntu", "20.04"))') | ||
brew update | ||
brew install jags | ||
- name: Install JAGS (windows-latest) | ||
if: runner.os == 'Windows' | ||
# Find and Set JAGS Paths | ||
- name: Set Environment Variables (macOS) | ||
if: runner.os == 'macOS' | ||
run: | | ||
curl.exe -o wjags.exe --url https://deac-fra.dl.sourceforge.net/project/mcmc-jags/JAGS/4.x/Windows/JAGS-4.3.1.exe | ||
wjags.exe /S | ||
del wjags.exe | ||
shell: cmd | ||
JAGS_BIN=$(brew --prefix jags)/bin | ||
echo "JAGS_ROOT=$(brew --prefix jags)" >> $GITHUB_ENV | ||
echo "PATH=$JAGS_BIN:$PATH" >> $GITHUB_ENV | ||
echo "PKG_CONFIG_PATH=$(brew --prefix jags)/lib/pkgconfig" >> $GITHUB_ENV | ||
- name: Install JAGS (macOS-latest) | ||
# Create Symlink for jags-terminal (if necessary) | ||
- name: Create Symlink for jags-terminal (macOS) | ||
if: runner.os == 'macOS' | ||
run : | | ||
rm '/usr/local/bin/gfortran' | ||
brew install automake jags | ||
run: | | ||
sudo mkdir -p $(brew --prefix)/libexec | ||
sudo ln -s $(brew --prefix jags)/bin/jags $(brew --prefix)/libexec/jags-terminal | ||
- name: Install and test RoBMA (non-Windows) | ||
if: runner.os != 'Windows' | ||
env: | ||
_R_CHECK_CRAN_INCOMING_REMOTE_: false | ||
# Set up renv | ||
- name: Setup renv | ||
uses: r-lib/actions/setup-renv@v2 | ||
|
||
# Install the package | ||
- name: Install devtools and the RoBMA Package | ||
run: | | ||
remotes::install_deps(dependencies = TRUE) | ||
install.packages(c("rcmdcheck", "devtools", "testthat", "vdiffr")) | ||
install.packages(c('devtools', 'metaBMA', 'metafor', 'weightr', 'lme4', 'fixest', 'emmeans', 'metadat', 'vdiffr', 'testthat', 'covr', 'pandoc')) | ||
devtools::install() | ||
library(vdiffr) | ||
library(testthat) | ||
devtools::test() | ||
shell: Rscript {0}" | ||
shell: Rscript {0} | ||
|
||
- name: Install and test RoBMA (Windows) | ||
if: runner.os == 'Windows' | ||
env: | ||
_R_CHECK_CRAN_INCOMING_REMOTE_: false | ||
JAGS_ROOT: "/c/progra~1/JAGS/JAGS-4.3.1" | ||
JAGS_MAJOR_VERSION: 4 | ||
# Run tests | ||
- name: Run Tests | ||
run: | | ||
remotes::install_deps(dependencies = TRUE) | ||
install.packages(c("rcmdcheck", "devtools", "testthat", "vdiffr")) | ||
devtools::install() | ||
library(vdiffr) | ||
library(testthat) | ||
devtools::test() | ||
shell: Rscript {0} |
Oops, something went wrong.