florianhartig / DHARMa

Diagnostics for HierArchical Regession Models
http://florianhartig.github.io/DHARMa/
200 stars 21 forks source link

Update gh action + document with roxygen2 + replace `T` -> `TRUE`, `F` by `FALSE` to satisfy R CMD CHECK #400

Closed olivroy closed 1 week ago

olivroy commented 5 months ago

If it works, will close #326.

The failures appear to be related to an old version of the Matrix package that is cached. Maybe requiring a recent Matrix version in DESCRIPTION should solve the CI failures. I saw the same issues last month with the broom package.

On the first run, the Matrix version was 1.6-1.1 (released in September 2023).

I added a dependency on 1.6-2 (this can probably be reverted later if this causes issues)

florianhartig commented 5 months ago

Thanks a lot for this - I'll look into this to see if it solves the issue!

olivroy commented 5 months ago

Actions seem fixed. However, the error seems weird. Is there somewhere in your workflow where you disallow using T instead of TRUE? Because this is the error it encounters:

 Error in ifelse(absoluteDeviation == TRUE, "Residual spread [2*abs(res - 0.5)]",  : 
    T used instead of TRUE

I have never seen this before, so this is likely not due to the actions, but I may be mistaken

Maybe removing the check with args: 'c("--no-multiarch", "--no-manual")' will solve the issue.

Oh, according to Hadley Wickham in a stack overflow answer, you are not allowed to have T and F in a CRAN package, so these errors appear genuine, and should be easy to fix!

olivroy commented 5 months ago

I updated the .rd file manually, but you would get the same from devtools::document(), and if there are no similar cases, builds should succeed now.

florianhartig commented 5 months ago

It's actually good that it throws the error. The error is because of a CRAN policy that one can't use T in the help files. I believe this was not flagged on the old checks, usually this issue then came later when uploading to CRAN.

I have pushed an update to main to fix this.

The .RD files are created dynamically, so the change to the .RD doesn't do anything, but it also doesn't hurt!

Thanks a lot, this is very helpful!

olivroy commented 5 months ago

After devtools::document(), it should work as expected! I think you reuse that piece of code in many .Rd files.

olivroy commented 1 month ago

@florianhartig I updated the PR to change many T -> TRUE and F -> FALSE. CI should become green now!

olivroy commented 1 week ago

@florianhartig the current failure is due to 0.4.6.x being an incorrect version. I changed it to 0.4.6.9000 a version number commonly used by R package developers to signify a development version. https://r-pkgs.org/lifecycle.html#sec-lifecycle-version-number-tidyverse

florianhartig commented 1 week ago

Ok, this seems to be fine, will merge now, thanks for the help!

Fixes #326

olivroy commented 1 week ago

Thanks for merging! It got a bit bumpier than expected! Sorry about that. Cheers and let me know if you have questions!