Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Best practices for extra CRAN checks? #21

Open
dgkf opened this issue Jul 5, 2024 · 1 comment
Open

Best practices for extra CRAN checks? #21

dgkf opened this issue Jul 5, 2024 · 1 comment

Comments

@dgkf
Copy link

dgkf commented Jul 5, 2024

Hi chefs of the CRAN cookbook πŸ‘©β€πŸ³

I've often wondered what the best path would be for distributing developer-side extra CRAN checks.

I'm frequently guilty of not documenting all return types or including examples in non-exported functions and I feel sorry for the CRAN folks that frequently have to remind me to satisfy these easily satisfied checks.

For my own common pitfalls I have a little script I run on my side (when I remember) to try to get ahead of this, but I'm wondering if there's a better way to build up a library of additional checks.

  • There's already R CMD check --as-cran, but it seems to lag behind CRAN's policies
  • Would it be worth packaging a few of these checks in a place where they can be co-developed with the CRAN team?
  • Maybe there are existing tools that I'm just not aware of?

Any ideas on how we can make it easier to satisfy the easily automated checks?

@llrs
Copy link
Member

llrs commented Jul 8, 2024

While I am not a "chef" of this book, I am not sure this is the place to discuss this.
The goal of this CRANcookbook is to document common problems already existing when submitting to CRAN: your example of missing return value of the documentation is already included.
A better suited place might have been the R repository working group, until it changed goals...

However, I'll start answering from the last one to the first question.

  • It could be worth to explore setting new checks that the developers and the community want. But they are busy and we all need to agree that it is worth to add a new check and deal with the consequences (R core checks code if it breaks x% of packages).
  • It might lag but not by much as all CRAN core members are part of the R core and do often modify the R source code. Anything that doesn't come from the CRAN team will be in the same problem. There is the example of BiocCheck that distributes Bioconductor checks to be used.
  • There was recently a post in Mastodon listing several extra checks.
    The CRAN team provides a checklist and several tools to check before submitting to CRAN from the windows checker, or MacOS devel checkers. They have also helped set up r-hub, which now has evolved to rhub2 option.

I hope this helps.

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

No branches or pull requests

2 participants