Skip to content

Only install {survMisc} when calculating test coverage - #377

Merged
yihui merged 1 commit into
Merck:mainfrom
jdblischak:survmisc-coverage
Sep 14, 2026
Merged

yihui merged 1 commit into
Merck:mainfrom
jdblischak:survmisc-coverage

Conversation

@jdblischak

Copy link
Copy Markdown
Collaborator

This is a minor follow-up to my previous PR #370 that dealt with the archived package {survMisc} (#359). In that PR I used the Config/Needs strategy to install {survMisc} only in our CI runs. The goal was to continue to run these tests during development while avoiding any problems with CRAN policies.

However, while I had confirmed that {survMisc} was installed, I had missed that the tests were still skipped in the R CMD check workflow. After some troubleshooting both locally and in GitHub Actions, it is my understanding that this is a fundamental limitation of R CMD check, and not a shortcoming of eg r-lib/actions/check-r-package. From what I can tell, R CMD check creates a temporary directory that only contains packages that are explicitly listed in Imports/Suggests/etc. Thus even though {survMisc} was installed, it was not available to {testthat} running inside of R CMD check.

However, since our coverage pipeline directly runs covr::package_coverage(), it does run those tests, which I feel is sufficient. To make it clear that the {survMisc}-related tests are only being run in the coverage workflow, I have updated DESCRIPTION and the workflow files accordingly.

@jdblischak
jdblischak requested a review from yihui September 14, 2026 18:33
@jdblischak jdblischak self-assigned this Sep 14, 2026
@jdblischak

Copy link
Copy Markdown
Collaborator Author

{testthat} output in test coverage log showing zero skipped tests:

[ FAIL 0 | WARN 1 | SKIP 0 | PASS 275 ]

@yihui yihui left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

From what I can tell, R CMD check creates a temporary directory that only contains packages that are explicitly listed in Imports/Suggests/etc.

Yes, that's true.

@yihui
yihui merged commit d94cdd0 into Merck:main Sep 14, 2026
9 checks passed
@jdblischak
jdblischak deleted the survmisc-coverage branch September 15, 2026 15:29
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.

2 participants