r-lib / devtools

Tools to make an R developer's life easier
https://devtools.r-lib.org
Other
2.37k stars 755 forks source link

Run examples in parallel via devtools #2522

Closed fh-mthomson closed 1 year ago

fh-mthomson commented 1 year ago

Is your feature request related to a problem? Please describe. Leveraging parallel testing via devtools::test() has been a game-changer for development workflows (e.g., reducing tests from 60 mins -> 10 mins for one package.). Thank you devtools/testthat folks!!

Describe the solution you'd like I'd love to similarly be able to run the following, with examples running in parallel:

devtools::check()
devtools::run_examples()

Describe alternatives you've considered N/A

Additional context N/A

jennybc commented 1 year ago

This is unlikely to happen or at least unlikely to be a priority. At least in terms of what's happening in check(), we are literally, eventually just calling R CMD check. So if it doesn't support running in parallel, then neither will check().

Perhaps run_examples() could but it's just not a very highly used function, so this might not come to pass.

In terms of CRAN packages, you have to keep your tests and examples pretty snappy no matter what. In your example of 60 minutes to 10 minutes for tests, is this a package that will never go to CRAN?

fh-mthomson commented 1 year ago

Thank you for the context, and appreciate that it may not be a priority!

Yes, definitely appreciate that this example is an outlier and thus won't be hosted on CRAN.

jennybc commented 1 year ago

OK I'm glad you understand. Since this is not going to happen perhaps ever and certainly not soon, I'm going to close for now.