2024/04/11

|

|

After eight years, we are retiring the current version of R-hub, in favor of a better, faster, modern system. We call the new system R-hub v2. R-hub v2 runs R package checks on GitHub Actions. R-hub v2 works best if your R package is in a GitHub repository. This post helps you transition to R-hub v2 from the previous version.

This blog featured a post on mocking, the art of replacing a function with whatever fake we need for testing, years ago. Since then, we’ve entered a new decade, the second edition of Hadley Wickham’s and Jenny Bryan’s R packages book was published, and mocking returned to testthat, so it’s time for a new take/resources roundup!

Thanks a lot to Hannah Frick for useful feedback on this post!

Read more...

Does your package need the user to provide secrets, like API tokens, to work? Have you considered telling your package users about the keyring package, or even forcing them to use it?

The keyring package maintained by Gábor Csárdi is a package that accesses the system credential store from R: each operating system has a special place for storing secrets securely, that keyring knows how to interact with. The credential store can hold several keyrings, each keyring can be protected by a specific password and can hold several keys which are the secrets.

Read more...

We’ve both coincidentally dipped our toes in the wonderful world of pretty messaging with cli.

cli::cli_alert_success("marvellous package adopted!")
#>  marvellous package adopted!

In this post, we transform the hurdles we encountered in a series of tips so that your own journey might be slightly smoother, and also to encourage you to try out cli in your package!

Read more...

This post has been cross-posted on the Epiverse-TRACE blog.

In a previous post, we discussed a package dependency that goes slightly beyond the normal R package ecosystem dependency: R itself. Today, we step even further and discuss dependencies outside of R: system dependencies. This happens when packages rely on external software, such as how R packages integrating CUDA GPU computation in R require the CUDA library. In particular, we are going to talk about system dependencies in the context of automated testing: is there anything extra to do when setting continuous integration for your package with system dependencies? In particular, we will focus with the integration with GitHub Actions. How does it work behind the scenes? And how to work with edge cases?

Read more...