RConsortium / r-repositories-wg

RC Working Group on Repositories
37 stars 8 forks source link

How much testing should happen in the repository? #4

Open MilesMcBain opened 2 years ago

MilesMcBain commented 2 years ago

I raise this as something that the community could benefit from hearing CRAN's perspective on, but also a high level question for future top-level repositories.

CRAN's current policy settings and activities seem to discourage exhaustive testing as part of CRAN's checks. This is because even a single test failure for trivial functionality on one uncommon platform can trigger a two-week "fix or be archived" ultimatum from CRAN. See {lubridate} for a recent example.

When these ultimatums land at inconvenient times, they can create stress for maintainers. There are many anecdotal reports, even from people in this working group, of skipping selected tests on CRAN to avoid the inconvenience.

CRAN's policy does not have much to say on the matter, except that:

Long-running tests and vignette code can be made optional for checking, but do ensure that the checks that are left do exercise all the features of the package

So the question is how much testing is appropriate for a core repository?

MilesMcBain commented 2 years ago

Putting my developer hat on:

I think it's most important to have tests running on the core repo that exercise your dependencies, because having them change underneath you is what will break core features of your package. The newer or faster-moving a dependency is, the more thorough you should be about testing code involving it on the core repository.

hadley commented 2 years ago

Answering from my perspective as tidyverse developer (i.e. this is the advice I'd give to my team, although they might not 100% agree with it):

wlandau commented 2 years ago

Taking a step back here, I think the underlying competing pressures would be greatly mitigated by the possible collaboration with R-hub. Thinking about an ideal world where every single CRAN machine is a container image that everyone else can access (including the Dockerfile). I think that would take out a lot of the guesswork in terms of figuring out what to test.