mjskay / tidybayes

Bayesian analysis + tidy data + geoms (R package)
http://mjskay.github.io/tidybayes
GNU General Public License v3.0
710 stars 59 forks source link

Fix cran failures due to new brms #313

Closed mjskay closed 11 months ago

mjskay commented 11 months ago

See:


Hi Matthew,

CRAN complains about changes to worse in tidybayes with the new brms version. Can you perhaps check what is going on?

All the best Paul

---------- Forwarded message --------- Von: [ligges@statistik.tu-dortmund.de](mailto:ligges@statistik.tu-dortmund.de) Date: Do., 10. Aug. 2023 um 16:32 Uhr Subject: [CRAN-pretest-waiting] CRAN Submission brms 2.20.1 To: [paul.buerkner@gmail.com](mailto:paul.buerkner@gmail.com) Cc: [CRAN-submissions@r-project.org](mailto:CRAN-submissions@r-project.org)

Dear maintainer,

package brms_2.20.1.tar.gz has been auto-processed. The auto-check found problems when checking the first order strong reverse dependencies. Please reply-all and explain: Is this expected or do you need to fix anything in your package? If expected, have all maintainers of affected packages been informed well in advance? Are there false positives in our results?

Changes to worse in reverse dependencies Debian: https://win-builder.r-project.org/incoming_pretest/brms_2.20.1_20230809_170122/reverseDependencies/summary.txt tidybayes

Log dir: https://win-builder.r-project.org/incoming_pretest/brms_2.20.1_20230809_170122/ The files will be removed after roughly 7 days.

Pretests: Windows: https://win-builder.r-project.org/incoming_pretest/brms_2.20.1_20230809_170122/Windows/00check.log Debian: https://win-builder.r-project.org/incoming_pretest/brms_2.20.1_20230809_170122/Debian/00check.log

Last published version on CRAN:

CRAN Web: https://cran.r-project.org/package=brms

Best regards, CRAN teams' auto-check service Package check result: NOTE

Check: CRAN incoming feasibility, Result: NOTE Maintainer: ‘Paul-Christian Bürkner [paul.buerkner@gmail.com](mailto:paul.buerkner@gmail.com)

Suggests or Enhances not in mainstream repositories: cmdstanr Availability using Additional_repositories specification: cmdstanr yes https://mc-stan.org/r-packages/

Check: package dependencies, Result: NOTE Package suggested but not available for checking: ‘cmdstanr’

Changes to worse in reverse depends:

Package: tidybayes Check: tests New result: ERROR Running ‘testthat.R’ [127s/127s] Running the tests in ‘tests/testthat.R’ failed. Complete output:

This is necessary because some tests fail otherwise; see https://github.com/hadley/testthat/issues/144

Sys.setenv("R_TESTS" = "")

library(testthat) library(tidybayes)

test_check("tidybayes") [ FAIL 2 | WARN 5 | SKIP 6 | PASS 401 ]

══ Skipped tests (6) ═══════════════════════════════════════════════════════════
• On CRAN (6): 'test.geom_dotsinterval.R:23:3', 'test.geom_interval.R:22:3',
  'test.geom_pointinterval.R:21:3', 'test.stat_dist_slabinterval.R:23:3',
  'test.stat_eye.R:20:3', 'test.stat_eye.R:51:3'

══ Failed tests ════════════════════════════════════════════════════════════════
── Failure ('test.residual_draws.R:48:3'): [add_]residual_draws works on a simple brms model ──
residual_draws(m_hp, mtcars_tbl) not equal to `ref`.
Component ".residual": Mean relative difference: 1.017863
── Failure ('test.residual_draws.R:49:3'): [add_]residual_draws works on a simple brms model ──
add_residual_draws(mtcars_tbl, m_hp) not equal to `ref`.
Component ".residual": Mean relative difference: 1.057446

[ FAIL 2 | WARN 5 | SKIP 6 | PASS 401 ]
Deleting unused snapshots:
• test.geom_dotsinterval/stat-dotsh-with-a-group-with-1-dot.svg
• test.geom_interval/grouped-intervals-h-stat.svg
• test.geom_pointinterval/grouped-pointintervals-h-stat.svg
• test.stat_dist_slabinterval/ccdfintervalh-using-args.svg
• test.stat_eye/one-parameter-horizontal-eye-mode-hdi.svg
• test.stat_eye/one-parameter-horizontal-half-eye.svg
• test.stat_eye/one-parameter-vertical-eye.svg
• test.stat_eye/one-parameter-vertical-halfeye.svg
• test.stat_eye/two-parameter-factor-horizontal-eye-fill.svg
Error: Test failures
Execution halted

cc @paul-buerkner

mjskay commented 11 months ago

This appears to be due to the change in default value for the method parameter of residuals.brmsfit from "posterior_epred" to "posterior_predict" on line 92 here: https://github.com/paul-buerkner/brms/commit/4139e7fedcddf8959d00632fb42ab1fee98235f6

(I couldn't find a mention of this in NEWS, but was able to figure it out using git blame).

I fixed my test and will submit a fixed version of tidybayes to CRAN. I'll update here when that's done.

paul-buerkner commented 11 months ago

Thank you and sorry for causing any extra work!

mjskay commented 11 months ago

No prob! It was an excuse to fix another bug anyway :).

mjskay commented 11 months ago

Submitted to CRAN. I will update here when it is accepted.

mjskay commented 11 months ago

Fixed version of tidybayes (3.0.6) has been accepted and is on its way to CRAN.

paul-buerkner commented 11 months ago

Perfect, thank you!!