diff --git a/CRAN-SUBMISSION b/CRAN-SUBMISSION index 996ac11..62d4409 100644 --- a/CRAN-SUBMISSION +++ b/CRAN-SUBMISSION @@ -1,3 +1,3 @@ -Version: 0.2.0 -Date: 2026-05-03 10:08:20 UTC -SHA: 5050672a73c3fc1230f54a75b9ccf9f6dde0d799 +Version: 0.2.1 +Date: 2026-05-08 12:38:25 UTC +SHA: 3e0889603be442d0972de2abc8fe49d4aabeb944 diff --git a/DESCRIPTION b/DESCRIPTION index d51adec..17e96ad 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: resultcheck Title: Result Stability Checks for Empirical R Projects -Version: 0.2.0.9000 +Version: 0.2.1 Authors@R: person("Dianyi", "Yang", , "dianyi.yang@politics.ox.ac.uk", role = c("aut", "cre", "ctb"), comment = c(ORCID = "0009-0004-4652-3429")) Description: @@ -13,7 +13,6 @@ Description: License: MIT + file LICENSE Encoding: UTF-8 Roxygen: list(markdown = TRUE) -RoxygenNote: 7.3.3 Imports: withr, rprojroot, @@ -28,3 +27,4 @@ Suggests: URL: https://github.com/kv9898/resultcheck/, https://kv9898.github.io/resultcheck/ BugReports: https://github.com/kv9898/resultcheck/issues VignetteBuilder: knitr +Config/roxygen2/version: 8.0.0 diff --git a/NEWS.md b/NEWS.md index 30539b1..9f9c2c7 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,4 @@ -# resultcheck (development version) +# resultcheck 0.2.1 * `snapshot()` now improves script-name detection in non-interactive and test contexts by skipping editor-context lookup there and relying on call-stack source references before falling back to `"interactive"`. diff --git a/cran-comments.md b/cran-comments.md index efd343b..6000627 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -4,20 +4,8 @@ ## Release summary -This is an update (0.1.4 → 0.2.0) that adds built-in class-based snapshot method defaults, improved script name detection, and fixes two Windows-specific bugs that caused test failures only under `R CMD check` (not via `testthat::test_local()` with pkgload). +This is a patch release (0.2.0 → 0.2.1) that fixes a bug in script name detection. -## Key changes since 0.1.4 +## Key changes since 0.2.0 -* `snapshot()` and `serialize_value()` now apply built-in class-based method defaults automatically when no explicit `method` argument is provided. Statistical model classes (e.g. `lm`, `glm`, `coxph`, `kmeans`) use `broom::tidy`, `broom::glance`, and/or `broom::augment` when broom is available. If broom is not installed, these defaults are silently skipped and the `print` + `str` fallback is used. User-configured class defaults that reference unavailable packages still raise an error. The full list of supported classes is in `inst/extdata/snapshot-method-defaults.R`. - -* `snapshot()` now defaults to both `print` and `str` when no method is specified and no class-based default applies. - -* Improved script name detection: `snapshot()` now uses `rstudioapi::getSourceEditorContext()$path` (in RStudio/Positron) as the primary method to detect the calling script name, falling back to a call-stack walk and then `"interactive"`. - -* Added "Get Started" vignette covering the typical workflow (project setup, snapshot creation/update, sandbox testing). - -* Added FAQ vignette covering common questions (tracking snapshot changes over time, dependency-driven result drift, git integration). - -* Fixed a Windows-specific bug in `detect_script_name()` where `normalizePath()` produced backslash separators that did not match the forward-slash paths produced by `dirname()`, causing the call-stack frame filter to never skip package-internal frames. Tests now pass identically on Windows and Linux/macOS. - -* Fixed a bug in `with_example()` where reference snapshots were serialized outside the example project directory, causing `find_root()` to fail and skip the built-in class defaults. This produced a method-resolution mismatch between the reference snapshot and the snapshot created by `snapshot()` inside the sandbox. +* Fixed a bug in `detect_script_name()` where the script name was not correctly detected in certain calling contexts, causing snapshot files to be written to the wrong location.