brad-cannell / codebookr

Create Codebooks From Data Frames
https://brad-cannell.github.io/codebookr/
Other
25 stars 5 forks source link

CRAN package check failing #40

Closed mbcann01 closed 5 months ago

mbcann01 commented 1 year ago

Overview

On 2023-03-08 I received an email from Kurt Hornik (CRAN) letting me know that codebookr was no longer passing an automated package check.

https://cran.r-project.org/web/checks/check_results_codebookr.html

Specifically, there was 1 warning and 1 note:

S3 generic warning

checking S3 generic/method consistency ... WARNING
cb_summary_stats_to_ft:
  function(df, ...)
cb_summary_stats_to_ft.summary_many_cats:
  function(df, col_width)

cb_summary_stats_to_ft:
  function(df, ...)
cb_summary_stats_to_ft.summary_numeric:
  function(df, col_width)

cb_summary_stats_to_ft:
  function(df, ...)
cb_summary_stats_to_ft.summary_time:
  function(df, col_width)

cb_summary_stats_to_ft:
  function(df, ...)
cb_summary_stats_to_ft.summary_few_cats:
  function(df, col_width)
See section ‘Generic functions and methods’ in the ‘Writing R
Extensions’ manual.

I think I fixed this warning by adding ... to each of the methods as discussed here.

CURL note

checking dependencies in R code ... NOTE
Initiating curl with CURL_SSL_BACKEND: openssl

I think I can just ignore this one.

Build check issues

Of course, after fixing the S3 generic warning, other build check issues came up.

Maintainer note

checking CRAN incoming feasibility ... [17s] NOTE
Maintainer: 'Brad Cannell <brad.cannell@gmail.com>'

I'm just adding this note to cran-comments.md and not taking any action.

Long-running example(s)

checking examples ... [16s] NOTE
Examples with CPU (user + system) or elapsed time > 10s
         user system elapsed
codebook 12.1      1   13.78

It looks like the codebook() function example take a long time to run. I need to find a way to shorten it.

In #18, I got feedback from CRAN about a different issue, but it seems applicable here.

\dontrun{} should only be used if the example really cannot be executed
(e.g. because of missing additional software, missing API keys, ...) by
the user. That's why wrapping examples in \dontrun{} adds the comment
("# Not run:") as a warning for the user.
Does not seem necessary.
Please unwrap the examples if they are executable in < 5 sec, or replace
\dontrun{} with \donttest{}.

So, it seems like I should be able to wrap the codebook() example code with \dontrun{} and that should be permissible because it is not executable in < 5 secs. Add that last part to cran-comments.md.

flextable dependency error

I'm not sure why this is coming up. I've never had it before and I didn't make any changes to the flextable code.

* checking package dependencies ... ERROR
Package required but not available: 'flextable'

See section 'The DESCRIPTION file' in the 'Writing R Extensions'
manual.

It looks like this could be a problem with the Windows server that is being used for testing. Not my package. I'm going to try submitting to CRAN without doing anything and see what happens.

Tasks