Conversation
…ption
R CMD check tangles each vignette to a .R file and sources it from a temp
working directory, where ../DESCRIPTION does not resolve. Use
utils::packageDescription("rworkflows", ...) in the package's own vignettes,
and a __PKG__ placeholder in inst/templates/{templateR,docker}.Rmd that
use_vignette_getstarted()/use_vignette_docker() substitute at write time.
Also guard those generators against a NULL/empty `package` (the previous
default silently produced a malformed file) and update the use_vignette_docker
demo in rworkflows.Rmd to pass package = "mypackage" so the chunk no longer
relies on a discoverable DESCRIPTION at vignette runtime.
action.yml and rworkflows_static.yml were on v4; the bundled example was on v3. v6.0.2 is the current latest. v5 moved the action onto Node.js 24 (requires runner >= v2.327.1, which all GitHub-hosted runners satisfy). v6 (PR actions/checkout#2286) writes git auth credentials to a separate .gitauth file instead of .git/config. Neither change affects this action — post-checkout we only run `git config --global --add safe.directory '*'` and pass GITHUB_TOKEN through the env, not from .git/config.
Replace `if(!is_gha()) skip_if_offline()` with `skip_if_offline(host=X)` where X is the host the test actually contacts: - bioconductor.org for bioc_r_versions / construct_runners / construct_cont / check_r_version / check_bioc_version - github.com for get_description / get_authors / get_hex / use_badges / use_workflow / infer_deps / fill_description / get_yaml / url_exists - raw.githubusercontent.com for gha_python_versions - conda.anaconda.org for the construct_conda_yml conda_create block For is_gha() gates that weren't about offline (infer_biocviews, get_description d7 == d1 expectation, get_hex hex3 == hex1 expectation, construct_conda_yml OS guard) the gate is removed and the assertion runs unconditionally; the get_description Bioc-repo block now skips on bioconductor.org instead of requiring is_gha() | is_rstudio(). All 195 tests pass with 0 skips locally.
Add bullets under the existing 1.0.12 section for: the vignette read.dcf fix and packageDescription/__PKG__ rewrite, the use_vignette_* package guard, the actions/checkout v6 bump, and the test refactor that swapped is_gha() gates for skip_if_offline(host=...).
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #155 +/- ##
==========================================
+ Coverage 85.48% 89.89% +4.40%
==========================================
Files 59 59
Lines 1206 1217 +11
==========================================
+ Hits 1031 1094 +63
+ Misses 175 123 -52 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Restore the is_gha() guard on the construct_conda_yml conda env-creation block that was dropped in ac61194. The block creates a real conda env under ~/miniforge3/envs/testenv and is intentionally GHA-only — running it on a developer machine leaves persistent state behind, and the test's own `condaenv_exists()` cleanup misses orphaned env directories, so subsequent runs fail with `prefix already exists`. is_gha() is the right gate here because the test is genuinely targeting the GHA environment (where setup-miniconda provides conda on PATH and the runner is fresh). Update the NEWS bullet to reflect that is_gha() is retained for this single test; everywhere else the gates are now host-specific skip_if_offline().
…uns network tests
…R CMD check
here::here("DESCRIPTION") doesn't anchor to the package when R CMD check
copies it to a temp dir lacking project markers, causing get_description,
get_hex, and infer_biocviews tests to fail. system.file() works in both
devtools::test() (source tree) and R CMD check (installed copy).
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.
Summary
read.dcf("../DESCRIPTION", ...)withutils::packageDescription("rworkflows", ...)in all five vignettes, and use a__PKG__placeholder ininst/templates/{templateR,docker}.Rmdthatuse_vignette_*substitutes at write time. The previous pattern failed underR CMD check'stools::checkVignettes(), which tangles each vignette to a.Rfile and sources it from a temp working directory where../DESCRIPTIONdoes not resolve.use_vignette_getstarted()/use_vignette_docker()now raise a clear error whenpackageisNULL/empty (previously they silently produced a malformed file). Therworkflows.Rmduse_vignette_dockerdemo now passespackage = "mypackage"for consistency with theuse_vignette_getstarteddemo above it.actions/checkoutfrom@v4to@v6inaction.ymlandrworkflows_static.yml; bump the bundled example workflow from@v3. v5 moved to Node.js 24 (requires runner ≥ v2.327.1, satisfied by all GitHub-hosted runners); v6 persists git auth credentials to a separate.gitauthfile rather than.git/config. Neither change affects this action's post-checkout steps.is_gha()gates with host-specificskip_if_offline(host=...)against the actual remote each test contacts (bioconductor.org,github.com,raw.githubusercontent.com,ghcr.io,conda.anaconda.org), then wrap eachskip_if_offlineinif (!is_gha())so CI always runs the network tests regardless of the offline probe and only local runs without network skip.is_gha()gates that weren't about offline (infer_biocviews, two equality checks inget_description/get_hex, theconstruct_conda_ymlOS guard) are removed and the assertions run unconditionally. All 195 tests pass locally with 0 skips and 0 failures.Test plan
R CMD build .thenR CMD check rworkflows_*.tar.gz --no-manualreturnsStatus: OK(verified locally with pandoc onPATH).devtools::test()passes with 0 failures and 0 skips when network is available.use_vignette_getstarted(package = "mypackage", save_dir = tempdir(), force_new = TRUE)anduse_vignette_docker(package = "mypackage", docker_org = "neurogenomics", save_dir = tempdir(), force_new = TRUE)produce vignettes containing"mypackage"(no residual__PKG__orread.dcf).actions/checkout@v6end-to-end (rworkflows_static.yml).🤖 Generated with Claude Code