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

testing running the vignettes on GHA #208

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft
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
6 changes: 4 additions & 2 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,13 @@ jobs:
with:
extra-packages: |
any::rcmdcheck
any::BH
any::RcppEigen
needs: check

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

3 changes: 2 additions & 1 deletion R/helpers.R
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,8 @@ release_questions <- function() {
c(
"Have you updated references?",
"Have you updated inst/CITATION?",
"Have you updated the vignettes?"
"Have you updated the vignettes?",
"Have you tested building the vignettes on GitHub Actions?"
)
}
# nocov end
6 changes: 3 additions & 3 deletions vignettes/loo2-lfo.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ preds <- cbind(
)

ggplot(cbind(df, preds), aes(x = year, y = Estimate)) +
geom_smooth(aes(ymin = Q5, ymax = Q95), stat = "identity", size = 0.5) +
geom_smooth(aes(ymin = Q5, ymax = Q95), stat = "identity", linewidth = 0.5) +
geom_point(aes(y = y)) +
labs(
y = "Water Level (ft)",
Expand Down Expand Up @@ -321,7 +321,7 @@ The initial step for the exact computation is to calculate the log-predictive
densities by refitting the model many times:

```{r exact_loglik, results="hide"}
loglik_exact <- matrix(nrow = nsamples(fit), ncol = N)
loglik_exact <- matrix(nrow = ndraws(fit), ncol = N)
for (i in L:(N - 1)) {
past <- 1:i
oos <- i + 1
Expand Down Expand Up @@ -514,7 +514,7 @@ predict.

```{r exact_loglikm, results="hide"}
M <- 4
loglikm <- matrix(nrow = nsamples(fit), ncol = N)
loglikm <- matrix(nrow = ndraws(fit), ncol = N)
for (i in L:(N - M)) {
past <- 1:i
oos <- (i + 1):(i + M)
Expand Down
2 changes: 1 addition & 1 deletion vignettes/loo2-non-factorized.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,7 @@ is strong. In fact, summing over the pointwise ELPD values and leaving out the
fourth observation yields practically equivalent results for approximate and
exact LOO-CV:

````{r pt4}
```{r pt4}
without_pt_4 <- c(
approx = sum(psis_loo$pointwise[-4, "elpd_loo"]),
exact = sum(exact_elpds[-4])
Expand Down