fix(docs): cache R dependencies immediately after installing them#516
fix(docs): cache R dependencies immediately after installing them#516Copilot wants to merge 10 commits into
Conversation
Replace the post-step cache save from r-lib/actions/setup-r-dependencies with explicit actions/cache/restore + actions/cache/save steps. This ensures the cache is saved before the Build docs step, so even if the workflow is cancelled or fails during rendering, the cache is preserved for the next run. Agent-Logs-Url: https://github.com/UCD-SERG/serocalculator/sessions/de780b35-1ac0-406a-b25f-d41f2847b7e5 Co-authored-by: d-morrison <2474437+d-morrison@users.noreply.github.com>
Codecov Report✅ All modified and coverable lines are covered by tests. |
There was a problem hiding this comment.
Pull request overview
Updates the documentation build workflow to persist the R package cache earlier (so cancellations during long doc builds don’t lose the cache), alongside a regenerated set of Rd documentation/link formatting changes and minor ignore-file updates.
Changes:
- Add explicit cache restore/save steps to the Docs workflow and disable
setup-r-dependenciesbuilt-in caching to avoid post-step-only saves. - Regenerate/update Rd files (primarily link targets/formatting and inherited parameter listings).
- Update ignore files and adjust package metadata related to roxygen output.
Reviewed changes
Copilot reviewed 3 out of 27 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| .github/workflows/docs.yaml | Adds early cache restore + pre-build cache save for R dependencies in docs workflow |
| DESCRIPTION | Adjusts roxygen-related metadata fields |
| .Rbuildignore | Ignores additional local/agent artifact files for package builds |
| .gitignore | Ignores .positai artifact file |
| man/simresp.tinf.Rd | Updates internal links in ... argument documentation |
| man/simcs.tinf.Rd | Updates link formatting for forwarded ... arguments |
| man/sim_pop_data.Rd | Updates forwarded-links and return-type link; removes some argument docs |
| man/sim_pop_data_multi.Rd | Updates link formatting; removes some inherited dot-params docs |
| man/serocalculator-package.Rd | Adds author entry |
| man/reexports.Rd | Adjusts ggplot2 reexport link target formatting |
| man/plot_curve_params_one_ab.Rd | Expands inherited ... argument documentation from ggplot2::geom_function() |
| man/load_sr_params.Rd | Updates tibble class link targets |
| man/load_pop_data.Rd | Updates tibble class link targets and internal link formatting |
| man/load_noise_params.Rd | Updates tibble class link targets |
| man/graph.curve.params.Rd | Minor Rd formatting/link output changes |
| man/graph_seroresponse_model_1.Rd | Updates internal link formatting for forwarded ... |
| man/graph_loglik.Rd | Updates internal link formatting for forwarded ... |
| man/est_seroincidence_by.Rd | Updates internal link formatting for forwarded ... |
| man/dot-nll.Rd | Updates internal link formatting for forwarded ... |
| man/count_strata.Rd | Updates tibble class link targets |
| man/autoplot.summary.seroincidence.by.Rd | Updates internal link formatting for forwarded ... |
| man/autoplot.seroincidence.by.Rd | Updates internal link formatting for forwarded ... |
| man/as_sr_params.Rd | Updates tibble class link targets |
| man/as_pop_data.Rd | Updates tibble class link targets |
| man/as_noise_params.Rd | Updates tibble class link targets |
| man/analyze_sims.Rd | Updates tibble class link targets |
| man/ab.Rd | Updates internal link formatting for forwarded ... |
Files not reviewed (23)
- man/ab.Rd: Language not supported
- man/analyze_sims.Rd: Language not supported
- man/as_noise_params.Rd: Language not supported
- man/as_pop_data.Rd: Language not supported
- man/as_sr_params.Rd: Language not supported
- man/autoplot.seroincidence.by.Rd: Language not supported
- man/autoplot.summary.seroincidence.by.Rd: Language not supported
- man/count_strata.Rd: Language not supported
- man/dot-nll.Rd: Language not supported
- man/est_seroincidence_by.Rd: Language not supported
- man/graph.curve.params.Rd: Language not supported
- man/graph_loglik.Rd: Language not supported
- man/graph_seroresponse_model_1.Rd: Language not supported
- man/load_noise_params.Rd: Language not supported
- man/load_pop_data.Rd: Language not supported
- man/load_sr_params.Rd: Language not supported
- man/plot_curve_params_one_ab.Rd: Language not supported
- man/reexports.Rd: Language not supported
- man/serocalculator-package.Rd: Language not supported
- man/sim_pop_data.Rd: Language not supported
- man/sim_pop_data_multi.Rd: Language not supported
- man/simcs.tinf.Rd: Language not supported
- man/simresp.tinf.Rd: Language not supported
Comments suppressed due to low confidence (1)
DESCRIPTION:84
DESCRIPTIONdrops the standardRoxygenNotefield and replaces it withConfig/roxygen2/version: 8.0.0. This is likely to cause theDocumentation checkworkflow (.github/workflows/R-check-docs.yml) to fail ifroxygen2::roxygenise()rewritesDESCRIPTIONback toRoxygenNote(and/or if other tooling expectsRoxygenNote).
Suggestion: keep RoxygenNote managed by roxygen2, and only add extra config fields if they are confirmed to be stable outputs of the roxygen2 version used in CI.
LazyData: true
NeedsCompilation: no
Roxygen: list(markdown = TRUE, roclets = c("collate", "rd", "namespace"))
Remotes:
d-morrison/snapr
Config/roxygen2/version: 8.0.0
|
@copilot apply changes based on the comments in this thread |
|
@copilot fix failing workflows |
- Revert man/ files and DESCRIPTION back to pre-808ee97 state, which had accidentally regenerated docs using roxygen2 8.0.0 instead of 7.3.3, causing curve_params and verbose to disappear from sim_pop_data.Rd, curve_params to disappear from sim_pop_data_multi.Rd ..., and fun/n/args/geom to be incorrectly added to plot_curve_params_one_ab.Rd - Add .claude to .gitignore alongside .positai Agent-Logs-Url: https://github.com/UCD-SERG/serocalculator/sessions/9e438bed-cf4c-4206-9fb0-9e39fc0978b8 Co-authored-by: d-morrison <2474437+d-morrison@users.noreply.github.com>
Done in commit
|
- Remove duplicate @inheritParams log_likelihood comment in sim_pop_data.R that caused roxygen2 8.0.0 parse error (subscript out of bounds) - Regenerate man/ files with roxygen2 8.0.0 (matching CI) to fix Documentation check - Add NEWS.md entry for docs workflow cache improvement (fixes changelog check) - Increment version to 1.4.0.9010 (fixes version-check workflow) - Add 'rlang' to inst/WORDLIST (fixes spellcheck workflow) - Remove duplicate 'Serological' entry from WORDLIST Agent-Logs-Url: https://github.com/UCD-SERG/serocalculator/sessions/552e56c7-f282-415b-94b5-9ccd8ad88ab4 Co-authored-by: d-morrison <2474437+d-morrison@users.noreply.github.com>
Fixed in commit
|
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 30 changed files in this pull request and generated 1 comment.
Files not reviewed (23)
- man/ab.Rd: Language not supported
- man/analyze_sims.Rd: Language not supported
- man/as_noise_params.Rd: Language not supported
- man/as_pop_data.Rd: Language not supported
- man/as_sr_params.Rd: Language not supported
- man/autoplot.seroincidence.by.Rd: Language not supported
- man/autoplot.summary.seroincidence.by.Rd: Language not supported
- man/count_strata.Rd: Language not supported
- man/dot-nll.Rd: Language not supported
- man/est_seroincidence_by.Rd: Language not supported
- man/graph.curve.params.Rd: Language not supported
- man/graph_loglik.Rd: Language not supported
- man/graph_seroresponse_model_1.Rd: Language not supported
- man/load_noise_params.Rd: Language not supported
- man/load_pop_data.Rd: Language not supported
- man/load_sr_params.Rd: Language not supported
- man/plot_curve_params_one_ab.Rd: Language not supported
- man/reexports.Rd: Language not supported
- man/serocalculator-package.Rd: Language not supported
- man/sim_pop_data.Rd: Language not supported
- man/sim_pop_data_multi.Rd: Language not supported
- man/simcs.tinf.Rd: Language not supported
- man/simresp.tinf.Rd: Language not supported
|
@copilot resolve the merge conflicts in this pull request |
…conflict Resolved conflict by keeping main's version that removes fun/n/args from ... docs (those args are now explicitly blocked with an informative error). Co-authored-by: d-morrison <2474437+d-morrison@users.noreply.github.com>
…line) Co-authored-by: d-morrison <2474437+d-morrison@users.noreply.github.com>
Done in commit |
|
@claude review |
|
@claude review |
|
Claude finished @d-morrison's task in 2m 59s —— View job PR Review
SummaryThe core fix — ensuring the R package cache is saved before the long
|
|
@claude fix issues (including workflow errors) |
|
Claude finished @d-morrison's task in 1m 53s —— View job Fixes Applied
Summary: Two issues resolved in commit
|
- Increment version past main branch (both were at 1.4.0.9010) - Add missing blank line before ## Compatibility in NEWS.md Co-authored-by: Douglas Ezra Morrison <d-morrison@users.noreply.github.com>
|
📖 https://UCD-SERG.github.io/serocalculator/preview/pr516/ |
The docs workflow saves its R package cache in a post-step, which is skipped when the job is cancelled (e.g., by
cancel-in-progress: truetriggering on a new push during the longBuild docsstep). This means a cold cache on every cancelled run.Changes
actions/cache/restore) added immediately aftersetup-r, before dependency installationsetup-r-dependencies(cache: false) to prevent duplicate/conflicting post-step savesactions/cache/save) added immediately afterInstall R packageand beforeBuild docs— ensuring the cache is persisted regardless of whether the subsequent build succeeds, fails, or is cancelledid: setup-rto thesetup-rstep to referenceinstalled-r-versionin the cache key.claudeto.gitignorealongside.positaito prevent accidental commits of editor/agent artifactsR/sim_pop_data.Rby removing a duplicate/malformed@inheritParamscomment that caused roxygen2 8.0.0 to fail with asubscript out of boundserrorman/files with roxygen2 8.0.0 (matching the CI environment), preserving full documentation forcurve_params,verbose, and all other parameters; merged upstream changes toplot_curve_params_one_ab.Rdthat removefun/n/argsfrom...docs (those args are now blocked with an informative error in the implementation)rlangtoinst/WORDLISTto account for new text introduced by roxygen2 8.0.0's expanded@inheritDotParamsoutputThank you for taking the time to submit a pull request!
To maximize the chances of acceptance:
-.testthat).For more information see Contributing.