Repository navigation
docs: Guard each chunk of the work-queue vignette so that checks without a server skip it - #679
Merged
Merged
Conversation
…out a server skip it Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Hr1rd43pnoHuAnGBgMih89
Member
Author
Accepted limitationsA clean review found nothing above Low. Static
Generated by Claude Code |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This implements the decision on #677 ("Fix guard.", #677 (comment)).
R CMD checkruns the vignette's code by tanglingvignettes/work-queue.Rmdafresh withknitr::purl()in a new process. That static tangle never runs the setup chunk, so theeval = RPostgres::postgresHasDefault()set there throughknitr::opts_chunk$set()has no effect, every chunk is tangled as live code, and a check without a PostgreSQL server fails atdbConnect()when it runs the vignette's code (for instance with_R_CHECK_VIGNETTES_SKIP_RUN_MAYBE_=false, as in R-hub'sgcc-asanrun). The commented-outinst/doc/work-queue.Rin a tarball built without a server does not help, because the check does not use it.Chunk-header options are evaluated by the static tangle too, so this PR puts
eval = RPostgres::postgresHasDefault()on each chunk after the setup chunk, keeping their other options, and drops the now redundantevalentry fromopts_chunk$set()so that the guard lives in one kind of place.Verified without a server: a static
knitr::purl()gives no livedbConnect();R CMD buildand thenR CMD check --no-manualwith_R_CHECK_VIGNETTES_SKIP_RUN_MAYBE_=falsereport "running R code from vignettes ... OK" and Status: OK. With a local server, the vignette still renders with its output.Generated by Claude Code