Repository navigation
Conversation
Because this pull request edits tests/testthat/test-report_intercept.R, the lint-changed-files check lints the whole file and fails on the existing top-level `<<-` assignments (assignment_linter). They are intentional, since insight::get_data() needs the data in the global environment, so mark them with `# nolint` as elsewhere in the package. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Copilot review overview
4 open issues
Thesetup-r-dependenciesaction (viapak::pkg_install()) typically supportsurl::https://...… · New The PR title/description primarily frames this as a CI-labeling fix for hypothesis-test tables, but… · Newgithub.head_refis empty forpushevents, which collapses all push runs into the same… · New The inline comment# v7.0.1foractions/checkoutappears inaccurate (the repository’s tagged… · New
1 file not reviewed
man/report.Rd: Generated file
What changed in this PR
Updates hypothesis-test reporting to preserve and display the original confidence level in report_table() outputs (fixing mislabeled CI headers when non-default conf.level is used), while also improving stability/diagnostic text formatting and CI workflows/testing robustness.
Changes:
- Preserve
htestconfidence levels in table metadata/headers and add regression tests for custom CI levels. - Fix SEM fit text formatting (keep signs/integer parts) and improve Bayesian diagnostics to handle multiple ESS column conventions.
- Rework CI GitHub Actions workflows and snapshot tests to reduce version-dependent flakiness (e.g., lavaan GFI).
| File | Description |
|---|---|
| vignettes/report_ai.Rmd | Wording tweak in vignette prose. |
| R/report.htest.R | Set CI level metadata on hypothesis-test tables based on the test’s original conf.level. |
| R/report_performance.R | Preserve sign/integer part when formatting fit indices (avoid truncating leading chars). |
| R/report_parameters.R | Support multiple ESS column names and improve “only when insufficient” filtering logic. |
| tests/testthat/test-report.htest-confidence.R | New regression coverage for non-default CI levels in htest tables. |
| tests/testthat/test-report_diagnostics.R | New unit tests for lavaan fit text and Bayesian diagnostic parameter text. |
| tests/testthat/test-report.lavaan.R | Stabilize lavaan snapshots by normalizing version-varying GFI in printed output. |
| tests/testthat/test-report.stanreg.R | Adjust snapshot to exclude diagnostics + add posterior-diagnostic consistency checks. |
| tests/testthat/test-report_intercept.R | Lint suppression for intentional global assignments used by tests. |
| tests/testthat/_snaps/windows/report.lavaan.md | Snapshot updated to reflect stabilized output (<GFI> placeholder). |
| tests/testthat/_snaps/windows/report.stanreg.md | Snapshot updated for include_diagnostic = FALSE. |
| NEWS.md | Changelog entry for CI header fix + diagnostic formatting fixes. |
| README.md | Stars badge link updated to point to repo root. |
| README.Rmd | Stars badge link updated to point to repo root. |
| inst/WORDLIST | Add terms to spelling whitelist. |
| lychee.toml | Exclude Cloudflare-protected URL from link checker. |
| .Rbuildignore | Exclude lychee.toml from package builds. |
| .github/workflows/test-coverage.yml | Inline coverage workflow steps; add concurrency + Windows setup. |
| .github/workflows/check-random-test-order.yml | Inline randomized test-order workflow steps; Windows runner setup. |
| .github/workflows/R-CMD-check.yml | Inline full R CMD check matrix with compatibility pinning + concurrency. |
Review effort: Lite
| "StanHeaders=url::https://cran.r-project.org/src/contrib/Archive/StanHeaders/StanHeaders_2.32.10.tar.gz" | ||
| ) | ||
| } else { | ||
| "" | ||
| } | ||
| cat("deriv=", deriv, "\n", file = Sys.getenv("GITHUB_OUTPUT"), append = TRUE, sep = "") | ||
| cat("matrix=", matrix_ref, "\n", file = Sys.getenv("GITHUB_OUTPUT"), append = TRUE, sep = "") | ||
| cat("stan=", stan, "\n", file = Sys.getenv("GITHUB_OUTPUT"), append = TRUE, sep = "") | ||
|
|
| # Adapted from easystats/workflows at 99ee8e98a43a5741c3301bff19434a85f01bf821. | ||
| # Keep the compatibility matrix and check settings aligned with the shared workflow. | ||
| name: R-CMD-check |
|
|
||
| name: R-CMD-check | ||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.head_ref }} |
| R_KEEP_PKG_SOURCE: yes | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #619 +/- ##
===========================================
+ Coverage 72.36% 87.35% +14.98%
===========================================
Files 54 55 +1
Lines 3684 5044 +1360
===========================================
+ Hits 2666 4406 +1740
+ Misses 1018 638 -380 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|



report_table(t.test(..., conf.level = 0.975))labeled the original interval bounds as 95%, while the narrative correctly reported 97.5%. Set the table's CI column and formatting metadata from the original test's confidence level.Regression tests cover 97.5% two-sided and one-sided t-tests, full and summary table headers, original interval bounds, and a 90% correlation interval.
Fixes #408.
Validation: All hypothesis-test tests pass, including 22 new assertions; changed R files have no lint findings.
Broader verification with all seven fixes combined: installed-package tests reported 757 passing expectations, 0 test warnings, and 17 skips. The only 2 failures are lavaan snapshots also reproduced on unchanged
main(622 passing expectations).R CMD checkpassed code, documentation, examples, and vignette-code checks; it retains the baseline snapshot error and 2 warnings because vignettes were intentionally not built. Independent review andgit diff --checkpassed.