earthlab/rslurm

rslurm fails CRAN checks on Windows

Closed this issue · 3 comments

I just tried to submit a new release of rslurm to CRAN. It passed all checks on Debian but failed on Windows. This is because the testthat.R unit tests failed. I don't think that's too surprising because Slurm can't run on Windows (so I hadn't run R CMD check on Windows before submitting). But I am not sure why this hasn't caused issues in the past with previous releases.

I found this on CRAN repository policy:

Package authors should make all reasonable efforts to provide cross-platform portable code. Packages will not normally be accepted that do not run on at least two of the major R platforms. Cases for Windows-only packages will be considered, but CRAN may not be the most appropriate place to host them.

Again, I am not sure why this wasn't an issue in the past. @pmarchand1 @itcarroll do you remember anything about this?

I can include a comment with the new submission that the package is not intended to run on Windows. Or we could include something in the unit tests to suppress testing on Windows?

The previous version 0.5.0 somehow passed on all operating systems: https://cran.r-project.org/web/checks/check_results_rslurm.html including the tests.

Idea: add testthat::skip_on_os("windows") to all tests, or the manual alternative:

WINDOWS <- .Platform$OS.type == "windows"

then in each test include if (WINDOWS) skip("Only test on unix systems")

It's just odd that this was not needed in the past.

Should all be fixed by #69 which also fixes some other related small issues.