Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use rstantools - Fix Build/Export Errors #625

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 17 additions & 37 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,61 +14,41 @@ jobs:
R-CMD-check:
runs-on: ${{ matrix.config.os }}

name: ${{ matrix.config.rstan }} RStan - ${{ matrix.config.os }} (${{ matrix.config.r }})
name: ${{ matrix.config.rstan }} R CMD CHECK - ${{ matrix.config.os }} (${{ matrix.config.r }})

strategy:
fail-fast: false
matrix:
config:
- {os: macOS-latest, r: 'devel', rstan: 'CRAN'}
- {os: macOS-latest, r: 'release', rstan: 'CRAN'}
- {os: windows-latest, r: 'devel', rstan: 'CRAN'}
- {os: windows-latest, r: 'release', rstan: 'CRAN'}
- {os: ubuntu-latest, r: 'devel', rstan: 'CRAN'}
- {os: ubuntu-latest, r: 'release', rstan: 'CRAN'}
- {os: ubuntu-latest, r: 'oldrel', rstan: 'CRAN'}

- {os: macOS-latest, r: 'release', rstan: 'Preview'}
- {os: windows-latest, r: 'release', rstan: 'Preview'}
- { os: macOS-latest, r: 'devel' }
- { os: macOS-latest, r: 'release' }
- { os: macOS-latest, r: 'oldrel' }
- { os: windows-latest, r: 'devel' }
- { os: windows-latest, r: 'release' }
- { os: windows-latest, r: 'oldrel' }
- { os: ubuntu-latest, r: 'devel' }
- { os: ubuntu-latest, r: 'release' }
- { os: ubuntu-latest, r: 'oldrel' }
env:
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
RSPM: ${{ matrix.config.rspm }}
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
TESTTHAT_CPUS: 4

steps:
- uses: n1hility/cancel-previous-runs@v2
- uses: n1hility/cancel-previous-runs@master
with:
token: ${{ secrets.GITHUB_TOKEN }}
workflow: R-CMD-check.yaml
if: "!startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/master'"

- uses: actions/checkout@v3
- uses: actions/checkout@main

- uses: r-lib/actions/setup-r@v2
- uses: r-lib/actions/setup-r@v2-branch
with:
r-version: ${{ matrix.config.r }}

- uses: r-lib/actions/setup-pandoc@v2
- uses: r-lib/actions/setup-r-dependencies@v2
- uses: r-lib/actions/setup-pandoc@v2-branch
- uses: r-lib/actions/setup-r-dependencies@v2-branch
with:
cache-version: 2
extra-packages: any::rcmdcheck any::betareg any::HSAUR3 any::biglm any::gamm4 any::V8

- name: Install RStan Preview if Needed
run: |
if ("${{ matrix.config.rstan }}" == "Preview") {
install.packages("rstan", repos = c("https://mc-stan.org/r-packages/", getOption("repos")))
}
shell: Rscript {0}

- uses: r-lib/actions/check-r-package@v2
with:
args: 'c("--no-manual", "--as-cran", "--ignore-vignettes")'
build_args: '"--no-build-vignettes"'

- name: Upload check results
if: failure()
uses: actions/upload-artifact@main
with:
name: ${{ runner.os }}-r${{ matrix.config.r }}-results
path: check
- uses: r-lib/actions/check-r-package@v2-branch
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,15 @@ src/stan_files/*.hpp
src/rstanarm.so
src/rstanarm.dll
src/init.o
man/*.Rd
!man/rstanarm-internal.Rd
vignettes/*.R
!vignettes/*.Rmd
vignettes/*.html
vignettes/*_files
.DS_Store
revdep/*
*.o
*.cc
*.h
src/Makevars
R/stanmodels.R
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,4 @@ UseLTO: true
NeedsCompilation: yes
URL: https://mc-stan.org/rstanarm/, https://discourse.mc-stan.org
BugReports: https://github.com/stan-dev/rstanarm/issues
RoxygenNote: 7.2.3
RoxygenNote: 7.3.1
37 changes: 0 additions & 37 deletions R/stanmodels.R

This file was deleted.

5 changes: 0 additions & 5 deletions R/zzz.R
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,6 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

.onLoad <- function(libname, pkgname) {
modules <- paste0("stan_fit4", names(stanmodels), "_mod")
for (m in modules) loadModule(m, what = TRUE)
}

.onAttach <- function(...) {
ver <- utils::packageVersion("rstanarm")
packageStartupMessage("This is rstanarm version ", ver)
Expand Down
5 changes: 0 additions & 5 deletions cleanup

This file was deleted.

7 changes: 0 additions & 7 deletions cleanup.win

This file was deleted.

2 changes: 2 additions & 0 deletions configure
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#! /bin/sh
"${R_HOME}/bin/Rscript" -e "rstantools::rstan_config()"
62 changes: 0 additions & 62 deletions configure.ac

This file was deleted.

2 changes: 2 additions & 0 deletions configure.win
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#! /bin/sh
"${R_HOME}/bin${R_ARCH_BIN}/Rscript.exe" -e "rstantools::rstan_config()"
File renamed without changes.
4 changes: 2 additions & 2 deletions src/stan_files/bernoulli.stan → inst/stan/bernoulli.stan
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include /pre/Columbia_copyright.stan
#include /pre/license.stan
#include /include/Columbia_copyright.stan
#include /include/license.stan

// GLM for a Bernoulli outcome
functions {
Expand Down
4 changes: 2 additions & 2 deletions src/stan_files/binomial.stan → inst/stan/binomial.stan
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include /pre/Columbia_copyright.stan
#include /pre/license.stan
#include /include/Columbia_copyright.stan
#include /include/license.stan

// GLM for a binomial outcome
functions {
Expand Down
4 changes: 2 additions & 2 deletions src/stan_files/continuous.stan → inst/stan/continuous.stan
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include /pre/Columbia_copyright.stan
#include /pre/license.stan
#include /include/Columbia_copyright.stan
#include /include/license.stan

// GLM for a Gaussian, Gamma, inverse Gaussian, or Beta outcome
functions {
Expand Down
4 changes: 2 additions & 2 deletions src/stan_files/count.stan → inst/stan/count.stan
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include /pre/Columbia_copyright.stan
#include /pre/license.stan
#include /include/Columbia_copyright.stan
#include /include/license.stan

// GLM for a count outcome
functions {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions src/stan_files/jm.stan → inst/stan/jm.stan
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include /pre/Columbia_copyright.stan
#include /pre/Brilleman_copyright.stan
#include /pre/license.stan
#include /include/Columbia_copyright.stan
#include /include/Brilleman_copyright.stan
#include /include/license.stan

// Shared parameter joint model
functions {
Expand Down
4 changes: 2 additions & 2 deletions src/stan_files/lm.stan → inst/stan/lm.stan
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include /pre/Columbia_copyright.stan
#include /pre/license.stan
#include /include/Columbia_copyright.stan
#include /include/license.stan

// GLM for a Gaussian outcome with no link function
functions {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions src/stan_files/mvmer.stan → inst/stan/mvmer.stan
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include /pre/Columbia_copyright.stan
#include /pre/Brilleman_copyright.stan
#include /pre/license.stan
#include /include/Columbia_copyright.stan
#include /include/Brilleman_copyright.stan
#include /include/license.stan

// Multivariate GLM with correlated group-specific terms
functions {
Expand Down
4 changes: 2 additions & 2 deletions src/stan_files/polr.stan → inst/stan/polr.stan
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include /pre/Columbia_copyright.stan
#include /pre/license.stan
#include /include/Columbia_copyright.stan
#include /include/license.stan

// GLM for an ordinal outcome with coherent priors
functions {
Expand Down
File renamed without changes.
File renamed without changes.
46 changes: 46 additions & 0 deletions man/QR-argument.Rd

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

41 changes: 41 additions & 0 deletions man/adapt_delta.Rd

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

Loading
Loading