Skip to content

Cran fix release 1.3.0#464

Merged
d-morrison merged 20 commits into
mainfrom
CRAN-fix-release-1.3.0
Dec 11, 2025
Merged

Cran fix release 1.3.0#464
d-morrison merged 20 commits into
mainfrom
CRAN-fix-release-1.3.0

Conversation

@kristinawlai

Copy link
Copy Markdown
Collaborator

Fixing CRAN errors from expect_snapshot_data()

@kristinawlai kristinawlai self-assigned this Dec 3, 2025
@codecov

codecov Bot commented Dec 3, 2025

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

Files with missing lines Coverage Δ
R/check_strata.R 100.00% <ø> (ø)
R/expect_snapshot_data.R 100.00% <100.00%> (ø)
R/sim_pop_data.R 65.82% <ø> (ø)

... and 2 files with indirect coverage changes

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR addresses CRAN errors by converting expect_snapshot_data() from an internal function accessed via ssdtools::: to a properly exported function within the package. The function was copied from the ssdtools package with permission and is now included in the package's public API.

Key Changes

  • Added expect_snapshot_data() as an exported internal function with full implementation and documentation
  • Updated all test files to use the local expect_snapshot_data() instead of ssdtools:::expect_snapshot_data()
  • Updated auto-generated documentation files from roxygen2 7.3.3

Reviewed changes

Copilot reviewed 14 out of 23 changed files in this pull request and generated no comments.

Show a summary per file
File Description
R/expect_snapshot_data.R New file implementing the snapshot testing function for data frames, copied from ssdtools
R/check_strata.R Removed invalid @dev roxygen tag
tests/testthat/test-strata.R Updated to use local expect_snapshot_data() instead of ssdtools:::
tests/testthat/test-sim_pop_data_multi.R Updated to use local expect_snapshot_data() instead of ssdtools:::
tests/testthat/test-sim_pop_data.R Updated to use local expect_snapshot_data() with explicit name parameter
tests/testthat/test-as_sr_params.R Updated to use local expect_snapshot_data() instead of ssdtools:::
tests/testthat/test-analyze_sims.R Updated to use local expect_snapshot_data() instead of ssdtools:::
tests/testthat/test-ab.R Updated to use local expect_snapshot_data() and reformatted indentation
tests/testthat/_snaps/graph.curve.params/*.svg Added white background rectangles to SVG snapshots
tests/testthat/_snaps/autoplot.pop_data/*.svg Removed stroke-linejoin: miter attribute from legend rectangles
tests/testthat/_snaps/autoplot.curve_params/autoplot-curve-params.svg Added white background rectangle to SVG snapshot
man/expect_snapshot_data.Rd New documentation file for exported function
man/check_strata.Rd Removed \keyword{internal} tag
man/plot_curve_params_one_ab.Rd Auto-generated documentation updates from ggplot2 (includes typo fix)
NAMESPACE Added export for expect_snapshot_data
DESCRIPTION Version bump to 1.3.0.9060 and RoxygenNote update to 7.3.3
NEWS.md Added entry documenting the change

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@kristinawlai

Copy link
Copy Markdown
Collaborator Author

@d-morrison Checks pass except for pkgdown. I asked Copilot to explain the error and this is the response. This is my first time using it, so I'm hesitant to make a change based on Copilot, but what do you think?

The failure occurred during the pkgdown site deployment job, specifically while running quarto::quarto_render() in R. The key error is:

Error running quarto CLI from R. 
Caused by error in `quarto::quarto_render()`: 
✖ Error returned by quarto CLI.
! System command 'quarto' failed

This indicates that the Quarto CLI is either not installed or not available in the system PATH during the workflow run.

Solution:
Add a step to install Quarto before any calls to quarto::quarto_render(). You can insert the following step before running your R scripts in the pkgdown-build job:

- name: Install Quarto
  run: |
    wget https://github.com/quarto-dev/quarto-cli/releases/download/v1.4.550/quarto-1.4.550-linux-amd64.deb
    sudo dpkg -i quarto-1.4.550-linux-amd64.deb

Place this step after setting up R but before any rendering steps. This will ensure the quarto command line tool is present, resolving the "System command 'quarto' failed" error.

Relevant workflow file: .github/workflows/pkgdown.yaml (ref: 17cd0518e919390eee1e87a50eec4ab766414f6a).The failure occurred during the pkgdown site deployment job, specifically while running quarto::quarto_render() in R. The key error is:

Error running quarto CLI from R. 
Caused by error in `quarto::quarto_render()`: 
✖ Error returned by quarto CLI.
! System command 'quarto' failed

This indicates that the Quarto CLI is either not installed or not available in the system PATH during the workflow run.

Solution:
Add a step to install Quarto before any calls to quarto::quarto_render(). You can insert the following step before running your R scripts in the pkgdown-build job:

- name: Install Quarto
  run: |
    wget https://github.com/quarto-dev/quarto-cli/releases/download/v1.4.550/quarto-1.4.550-linux-amd64.deb
    sudo dpkg -i quarto-1.4.550-linux-amd64.deb

Place this step after setting up R but before any rendering steps. This will ensure the quarto command line tool is present, resolving the "System command 'quarto' failed" error.

Relevant workflow file: .github/workflows/pkgdown.yaml (ref: 17cd0518e919390eee1e87a50eec4ab766414f6a).

@d-morrison

Copy link
Copy Markdown
Member

@kristinawlai the key error message is:

image

if you run quarto::quarto_render(quiet = FALSE) on your local, you should get something like:

image

note that the file path begins with data-raw; quarto is trying to compile data-raw/test_sim_020425.qmd, which shouldn't be part of the pkgdown site. The solution is to ignore everything in data-raw:

https://github.com/UCD-SERG/serocalculator/pull/465/files#diff-469a07f57393912a9c17c3ea50ceebe991e32b008beb167a200b17e91fdac6d2R3-R4

@d-morrison d-morrison left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good! see comments

Comment thread R/check_strata.R Outdated
Comment thread pkgdown/_pkgdown.yml Outdated
Comment thread DESCRIPTION Outdated
kristinawlai and others added 5 commits December 10, 2025 12:15
Co-authored-by: Douglas Ezra Morrison <demorrison@ucdavis.edu>
Co-authored-by: Douglas Ezra Morrison <demorrison@ucdavis.edu>
Co-authored-by: Douglas Ezra Morrison <demorrison@ucdavis.edu>
@github-actions

github-actions Bot commented Dec 10, 2025

Copy link
Copy Markdown
Contributor

📕 Preview documentation for this PR has been cleaned up.

@kristinawlai

Copy link
Copy Markdown
Collaborator Author

@d-morrison This is ready to go and passes all checks + check_win_devel(). I'll update the version number to 1.3.1 for the CRAN release branch once this is merged into main.

@d-morrison d-morrison left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good - thanks!

@d-morrison d-morrison merged commit 4fc3b75 into main Dec 11, 2025
17 checks passed
@d-morrison d-morrison deleted the CRAN-fix-release-1.3.0 branch December 11, 2025 03:51
@d-morrison d-morrison mentioned this pull request Jun 4, 2026
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants