Skip to content

Commit dab300d

Browse files
Merge branch 'master' into fix/kde-correction-empty-vector
2 parents 90c1121 + a86c556 commit dab300d

8 files changed

Lines changed: 100 additions & 455 deletions

.github/workflows/test-coverage.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
covr::to_cobertura(cov)
4141
shell: Rscript {0}
4242

43-
- uses: codecov/codecov-action@v5
43+
- uses: codecov/codecov-action@v6
4444
with:
4545
# Fail if error if not on PR, or if on PR and token is given
4646
fail_ci_if_error: ${{ github.event_name != 'pull_request' || secrets.CODECOV_TOKEN }}

NEWS.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# bayesplot (development version)
22

33
* Validate user-provided `pit` values in `ppc_loo_pit_data()` using `validate_pit()` to reject invalid inputs (non-numeric, out of range, NAs) at the entry point instead of in internal helpers.
4+
* Fixed `is_chain_list()` to correctly reject empty lists instead of silently returning `TRUE`.
45
* Added unit tests for `mcmc_areas_ridges_data()`, `mcmc_parcoord_data()`, and `mcmc_trace_data()`.
56
* Added unit tests for `ppc_error_data()` and `ppc_loo_pit_data()` covering output structure, argument handling, and edge cases.
67
* Added vignette sections demonstrating `*_data()` companion functions for building custom ggplot2 visualizations (#435)
@@ -21,7 +22,7 @@
2122
* Default to `quantiles=100` for all dot plots by @behramulukir (#402)
2223
* Use `"neff_ratio"` consistently in diagnostic color scale helpers to avoid relying on partial matching of `"neff"`.
2324
* Replace `expand = c(mult, add)` with `ggplot2::expansion()` helper in scale functions for consistency with ggplot2 >= 3.3.0 style.
24-
* Replace uses of `geom_bar(stat = "identity")` with the more idiomatic ggplot2 form `geom_col()`
25+
* Replace uses of `geom_bar(stat = "identity")` with the more idiomatic ggplot2 form `geom_col()`
2526
* New function `ppc_rootogram_grouped` for grouped rootogram plots by @behramulukir and @jgabry (#419)
2627

2728
# bayesplot 1.15.0
@@ -38,7 +39,7 @@
3839

3940
# bayesplot 1.14.0
4041

41-
* PPC "avg" functions (`ppc_scatter_avg()`, `ppc_error_scatter_avg()`, etc.) gain a `stat` argument
42+
* PPC "avg" functions (`ppc_scatter_avg()`, `ppc_error_scatter_avg()`, etc.) gain a `stat` argument
4243
to set the averaging function. (Suggestion of #348, @kruschke).
4344
* `ppc_error_scatter_avg_vs_x(x = some_expression)` labels the x axis with `some_expression`.
4445
* New quantile dot plot functions `ppc_dots()` and `ppd_dots()` by @behramulukir (#357)
@@ -60,7 +61,7 @@
6061

6162
* Expand checking workflows to more platforms by @andrjohns (#324)
6263
* Skip tests depending on Suggested dependency rstantools if not installed by @MichaelChirico (#325)
63-
* Skip tests depending on Suggested dependency gridExtra if not installed by @MichaelChirico (#326)
64+
* Skip tests depending on Suggested dependency gridExtra if not installed by @MichaelChirico (#326)
6465
* Fix missing legends for unobserved levels in rhat and neff plots (#328)
6566
* Document problems with `ppc_stat` with `stat="mean"` (#329)
6667
* Ensure rank overlay plot starts at 0 even if not all bins present, thanks @sims1253 (#332)

R/helpers-mcmc.R

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,9 @@ df_with_chain2array <- function(x) {
247247
#' @param x object to check
248248
#' @return TRUE or FALSE
249249
is_chain_list <- function(x) {
250+
if (length(x) == 0) {
251+
return(FALSE)
252+
}
250253
check1 <- !is.data.frame(x) && is.list(x)
251254
dims <- try(sapply(x, function(chain) length(dim(chain))), silent=TRUE)
252255
if (inherits(dims, "try-error")) {

tests/testthat/_snaps/ppc-discrete/ppc-rootogram-grouped-style-discrete-facet-args-list-nrow-2-scales-free.svg

Lines changed: 0 additions & 165 deletions
This file was deleted.

tests/testthat/_snaps/ppc-discrete/ppc-rootogram-grouped-style-discrete-facet-args-list-nrow-2.svg

Lines changed: 0 additions & 159 deletions
This file was deleted.

0 commit comments

Comments
 (0)