Skip to content

Commit b611f53

Browse files
committed
Merge branch 'master' into gh-pages
2 parents 1bba349 + a4c5a88 commit b611f53

160 files changed

Lines changed: 15794 additions & 15476 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.Rbuildignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
^CRAN-SUBMISSION$
12
^CRAN-RELEASE$
23
^.*\.Rproj$
34
^\.Rproj\.user$

.github/workflows/R-CMD-check.yaml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@ on:
44
push:
55
branches: [main, master]
66
pull_request:
7-
branches: [main, master, patch-for-cran]
7+
branches: [main, master]
8+
9+
name: R-CMD-check.yaml
810

9-
name: R-CMD-check
11+
permissions: read-all
1012

1113
jobs:
1214
R-CMD-check:
@@ -29,7 +31,7 @@ jobs:
2931
R_KEEP_PKG_SOURCE: yes
3032

3133
steps:
32-
- uses: actions/checkout@v3
34+
- uses: actions/checkout@v4
3335

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

@@ -41,13 +43,10 @@ jobs:
4143

4244
- uses: r-lib/actions/setup-r-dependencies@v2
4345
with:
44-
extra-packages: |
45-
any::rcmdcheck
46-
any::BH
47-
any::RcppEigen
48-
any::vdiffr
46+
extra-packages: any::rcmdcheck, any::BH, any::RcppEigen, any::vdiffr
4947
needs: check
5048

5149
- uses: r-lib/actions/check-r-package@v2
5250
with:
5351
upload-snapshots: true
52+
build_args: 'c("--no-manual","--compact-vignettes=gs+qpdf")'

.github/workflows/test-coverage.yaml

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@ on:
44
push:
55
branches: [main, master]
66
pull_request:
7-
branches: [main, master, patch-for-cran]
87

9-
name: test-coverage
8+
name: test-coverage.yaml
9+
10+
permissions: read-all
1011

1112
jobs:
1213
test-coverage:
@@ -15,38 +16,46 @@ jobs:
1516
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
1617

1718
steps:
18-
- uses: actions/checkout@v3
19+
- uses: actions/checkout@v4
1920

2021
- uses: r-lib/actions/setup-r@v2
2122
with:
2223
use-public-rspm: true
2324

2425
- uses: r-lib/actions/setup-r-dependencies@v2
2526
with:
26-
extra-packages: |
27-
any::covr
28-
any::vdiffr
27+
extra-packages: any::covr, any::xml2, any::vdiffr
2928
needs: coverage
3029

3130
- name: Test coverage
3231
run: |
33-
covr::codecov(
32+
cov <- covr::package_coverage(
3433
quiet = FALSE,
3534
clean = FALSE,
36-
install_path = file.path(Sys.getenv("RUNNER_TEMP"), "package")
35+
install_path = file.path(normalizePath(Sys.getenv("RUNNER_TEMP"), winslash = "/"), "package")
3736
)
37+
covr::to_cobertura(cov)
3838
shell: Rscript {0}
3939

40+
- uses: codecov/codecov-action@v4
41+
with:
42+
# Fail if error if not on PR, or if on PR and token is given
43+
fail_ci_if_error: ${{ github.event_name != 'pull_request' || secrets.CODECOV_TOKEN }}
44+
file: ./cobertura.xml
45+
plugin: noop
46+
disable_search: true
47+
token: ${{ secrets.CODECOV_TOKEN }}
48+
4049
- name: Show testthat output
4150
if: always()
4251
run: |
4352
## --------------------------------------------------------------------
44-
find ${{ runner.temp }}/package -name 'testthat.Rout*' -exec cat '{}' \; || true
53+
find '${{ runner.temp }}/package' -name 'testthat.Rout*' -exec cat '{}' \; || true
4554
shell: bash
4655

4756
- name: Upload test results
4857
if: failure()
49-
uses: actions/upload-artifact@v3
58+
uses: actions/upload-artifact@v4
5059
with:
5160
name: coverage-test-failures
5261
path: ${{ runner.temp }}/package

DESCRIPTION

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
Package: bayesplot
22
Type: Package
33
Title: Plotting for Bayesian Models
4-
Version: 1.11.0
5-
Date: 2024-01-30
4+
Version: 1.12.0
5+
Date: 2025-04-09
66
Authors@R: c(person("Jonah", "Gabry", role = c("aut", "cre"), email = "jsg2201@columbia.edu"),
77
person("Tristan", "Mahr", role = "aut"),
88
person("Paul-Christian", "Bürkner", role = "ctb"),
@@ -37,6 +37,7 @@ Imports:
3737
rlang (>= 0.3.0),
3838
stats,
3939
tibble (>= 2.0.0),
40+
tidyr,
4041
tidyselect,
4142
utils
4243
Suggests:
@@ -55,7 +56,7 @@ Suggests:
5556
survival,
5657
testthat (>= 2.0.0),
5758
vdiffr (>= 1.0.2)
58-
RoxygenNote: 7.3.0
59+
RoxygenNote: 7.3.2
5960
VignetteBuilder: knitr
6061
Encoding: UTF-8
6162
Roxygen: list(markdown = TRUE)

NEWS.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,20 @@
1-
<!-- See http://style.tidyverse.org/news.html for advice on writing news -->
1+
# bayesplot 1.12.0
2+
3+
* Expand checking workflows to more platforms by @andrjohns (#324)
4+
* Skip tests depending on Suggested dependency rstantools if not installed by @MichaelChirico (#325)
5+
* Skip tests depending on Suggested dependency gridExtra if not installed by @MichaelChirico (#326)
6+
* Fix missing legends for unobserved levels in rhat and neff plots (#328)
7+
* Document problems with `ppc_stat` with `stat="mean"` (#329)
8+
* Ensure rank overlay plot starts at 0 even if not all bins present, thanks @sims1253 (#332)
9+
* Compatibility with ggplot2 3.6.0 by @teunbrand (#337)
10+
* Update GitHub actions workflows (#338)
11+
* Remove deprecated functions from `available_ppc()` (#340)
12+
* Fix missing counts in `ppc_bars_data()` by @TeemuSailynoja, thanks @famuvie (#342)
13+
14+
15+
# bayesplot 1.11.1
16+
17+
* Limit maximum number of evaluation points in `ppc_pit_ecdf` functions by default to 1000. by @TeemuSailynoja in #318
218

319
# bayesplot 1.11.0
420

R/available-module-functions.R

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,9 @@ print.bayesplot_function_list <- function(x, ...) {
130130
)
131131
}
132132

133+
# remove deprecated functions
134+
return_funs <- setdiff(return_funs, "ppc_loo_pit")
135+
133136
structure(
134137
return_funs,
135138
class = c("bayesplot_function_list", "character"),

R/helpers-ppc.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ adjust_gamma <- function(N,
319319
abort("Value of 'prob' must be in (0,1).")
320320
}
321321
if (is.null(interpolate_adj)) {
322-
if (K <= 200) {
322+
if (K <= 200 || N < 100) {
323323
interpolate_adj <- FALSE
324324
} else {
325325
interpolate_adj <- TRUE

R/mcmc-diagnostics.R

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,8 @@ mcmc_rhat <- function(rhat, ..., size = NULL) {
142142
mapping = aes(
143143
yend = .data$parameter,
144144
xend = ifelse(min(.data$value) < 1, 1, -Inf)),
145-
na.rm = TRUE) +
145+
na.rm = TRUE,
146+
show.legend = TRUE) +
146147
bayesplot_theme_get()
147148

148149
if (min(data$value) < 1) {
@@ -238,7 +239,8 @@ mcmc_neff <- function(ratio, ..., size = NULL) {
238239
fill = .data$rating)) +
239240
geom_segment(
240241
aes(yend = .data$parameter, xend = -Inf),
241-
na.rm = TRUE) +
242+
na.rm = TRUE,
243+
show.legend = TRUE) +
242244
diagnostic_points(size) +
243245
vline_at(
244246
c(0.1, 0.5, 1),
@@ -408,7 +410,7 @@ zero_pad_int <- function(xs) {
408410
}
409411

410412
diagnostic_points <- function(size = NULL) {
411-
args <- list(shape = 21, na.rm = TRUE)
413+
args <- list(shape = 21, na.rm = TRUE, show.legend = TRUE)
412414
do.call("geom_point", c(args, size = size))
413415
}
414416

@@ -454,7 +456,6 @@ diagnostic_colors <- function(diagnostic = c("rhat", "neff_ratio"),
454456
}
455457

456458
color_labels <- diagnostic_color_labels[[diagnostic]]
457-
458459
list(diagnostic = diagnostic,
459460
aesthetic = aesthetic,
460461
color_levels = color_levels,

R/mcmc-distributions.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ mcmc_violin <- function(
394394
set_hist_aes(freq),
395395
fill = get_color("mid"),
396396
color = get_color("mid_highlight"),
397-
size = .25,
397+
linewidth = .25,
398398
na.rm = TRUE,
399399
binwidth = binwidth,
400400
bins = bins,

R/mcmc-overview.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
#' an additional column `"Chain"` that contains the chain number (an integer)
2727
#' corresponding to each row in the data frame.
2828
#' * __draws__: Any of the `draws` formats supported by the
29-
#' \pkg{\link{posterior}} package.
29+
#' \pkg{posterior} package.
3030
#'
3131
#' __Note__: typically the user should *not* include warmup iterations
3232
#' in the object passed to **bayesplot** plotting functions, although for

0 commit comments

Comments
 (0)