Re: [R-pkg-devel] Package submission to CRAN not passing incoming checks

2024-04-23 Thread Ivan Krylov via R-package-devel
Dear Isaac,

В Mon, 22 Apr 2024 17:00:27 +
"Petersen, Isaac T"  пишет:

> This my first post--I read the posting guidelines, but my apologies
> in advance if I make a mistake.

Welcome to R-package-devel! You're doing just fine.

> 1) The first note <...> includes the contents of the LICENSE file

It's multiple NOTEs in a trench coat. Kasper has addressed the "large
version components" and the DOIs interpreted as file URIs, but there's
one more.

The ' + file LICENSE' syntax has two uses: (1)
for when the terms of the license is a template, requiring the author
of the software to substitute some information (e.g. the year and the
copyright holder for MIT) and (2) for when a package puts additional
restrictions on the base license.

(Hmm. Only case (2) is currently described at
; case
(1) is only described inside the license files.)

The CRAN team has expressed a preference for the package authors not to
put 2 twisty little copies of standard licenses, all slightly
different, inside their packages. Since you're not restricting CC BY
4.0, it's enough to say 'License: CC BY 4.0'. If you'd like a full copy
of the license text in your source code repository, that's fine, but
you'll need to list the file in .Rbuildignore:
https://cran.r-project.org/doc/manuals/R-exts.html#Building-package-tarballs

Speaking of the Creative Commons license: the choice of a license for
your code is obviously yours, but Creative Commons themselves recommend
against using their licenses for software:
.
I can't recommend you a license - that would be politically motivated
meddling in foreign affairs - but the lists linked by the CC FAQ and
Writing R Extensions section 1.1.2 should provide a good starting point.

> Here are the results from win-builder:
> https://win-builder.r-project.org/incoming_pretest/petersenlab_0.1.2-9033_20240415_212322/

There is one more NOTE:

>> * checking examples ... [437s/438s] NOTE
>> Examples with CPU (user + system) or elapsed time > 5s
>>user system elapsed
>> load_or_install 349.410 37.410 387.233
>> vwReg35.199  0.379  35.606
 
The examples are not only for the user to read in the help page; they
are also for the user to run example(vwReg) and see your code in action
(and for R CMD check to see whether they crash, including regularly on
CRAN).

For vwReg, try reducing the number of regressions you are running
(since your dataset is mtcars, which is already very compact).

For load_or_install, we have the additional issue that running
example(load_or_install) modifies the contents of the R library and the
search path, which belong to the user. The CRAN policy forbids such
modifications: 

Examples in general should change as little of the global state of the
R session and the underlying computer as possible. I suggest wrapping
the example in \dontrun{} (since everything about load_or_install() is
about altering global state) and creating a test for the function in
tests/*.R.

The test should set up a new library under tempdir(), run
load_or_install(), check the outcomes (that the desired package is
attached, etc.) and clean up after itself. There's also the matter of
the package not failing without a connection to the Internet, which is
another CRAN policy requirement. You might have to bring a very small
test package in inst/extdata just for load_or_install() to install and
load it, so that R CMD check won't fail when running offline.

-- 
Best regards,
Ivan

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


Re: [R-pkg-devel] Package submission to CRAN not passing incoming checks

2024-04-22 Thread Kasper Daniel Hansen
1. The version number complaint is the use of 0.1.2-9033. It is complaining
about 9033. Personally, I would not use the - style, but that is a
personal choice I guess. R-exts says
  "The mandatory ‘Version’ field gives the version of the package. This is
a sequence of at least *two* (and usually three) non-negative integers
separated by single ‘.’ or ‘-’ characters. The canonical form is as shown
in the example, and a version such as ‘0.01’ or ‘0.01.0’ will be handled as
if it were ‘0.1-0’. It is *not* a decimal number, so for example 0.9 < 0.75
since 9 < 75."
2. Those are not URLs, they are DOIs. The Rd format has a \doi{} command
you should use
3. If your examples generate files, I would use the tempfile() command from
base R.

On Mon, Apr 22, 2024 at 8:25 PM Petersen, Isaac T <
isaac-t-peter...@uiowa.edu> wrote:

> Dear R-package-devel,
>
> This my first post--I read the posting guidelines, but my apologies in
> advance if I make a mistake.
>
> I am trying to post my R package to CRAN. I just submitted it to CRAN but
> received a note that the package "does not pass the incoming checks
> automatically".
>
> Here are the results from win-builder:
> https://win-builder.r-project.org/incoming_pretest/petersenlab_0.1.2-9033_20240415_212322/
>
> As far as I can tell, there are 3 notes to address. However, I'm not sure
> how to address them.
>
> 1) The first note appears to be "Version contains large components", which
> includes the contents of the LICENSE file (CC BY 4.0). I'm not sure if this
> is a problem that needs to be addressed (or how to address it).
>
> 2) The second note says:
>
> "Found the following (possibly) invalid file URIs:
>   URI: 10.1177/0146621613475471
> From: man/itemInformation.Rd
>   URI: 10.1177/0146621613475471
> From: man/standardErrorIRT.Rd"
>
> However, I verified that those DOIs resolve correctly, so I'm not sure how
> to address this note.
>
> 3) The third note (in the Debian but not Windows version) says:
>
> "* checking for non-standard things in the check directory ... NOTE
> Found the following files/directories:
>   ‘encryptionKey.RData’ ‘encrypytedCredentials.txt’"
>
> These files are generated in the examples for one of the functions to
> demonstrate how to read data using an encryption key:
> https://github.com/DevPsyLab/petersenlab/blob/9ece9d7dc32727c1315a03bc2810cc9c957971d1/R/readEncryptedData.R#L24.
> I'm not sure if this is a problem that needs to be addressed (or how to
> address it).
>
> The source code for my R package (petersenlab) is here:
> https://github.com/DevPsyLab/petersenlab
>
> Thanks very much in advance,
> Isaac
>
> [[alternative HTML version deleted]]
>
> __
> R-package-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-package-devel
>


-- 
Best,
Kasper

[[alternative HTML version deleted]]

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


[R-pkg-devel] Package submission to CRAN not passing incoming checks

2024-04-22 Thread Petersen, Isaac T
Dear R-package-devel,

This my first post--I read the posting guidelines, but my apologies in advance 
if I make a mistake.

I am trying to post my R package to CRAN. I just submitted it to CRAN but 
received a note that the package "does not pass the incoming checks 
automatically".

Here are the results from win-builder: 
https://win-builder.r-project.org/incoming_pretest/petersenlab_0.1.2-9033_20240415_212322/

As far as I can tell, there are 3 notes to address. However, I'm not sure how 
to address them.

1) The first note appears to be "Version contains large components", which 
includes the contents of the LICENSE file (CC BY 4.0). I'm not sure if this is 
a problem that needs to be addressed (or how to address it).

2) The second note says:

"Found the following (possibly) invalid file URIs:
  URI: 10.1177/0146621613475471
From: man/itemInformation.Rd
  URI: 10.1177/0146621613475471
From: man/standardErrorIRT.Rd"

However, I verified that those DOIs resolve correctly, so I'm not sure how to 
address this note.

3) The third note (in the Debian but not Windows version) says:

"* checking for non-standard things in the check directory ... NOTE
Found the following files/directories:
  �encryptionKey.RData� �encrypytedCredentials.txt�"

These files are generated in the examples for one of the functions to 
demonstrate how to read data using an encryption key: 
https://github.com/DevPsyLab/petersenlab/blob/9ece9d7dc32727c1315a03bc2810cc9c957971d1/R/readEncryptedData.R#L24.
 I'm not sure if this is a problem that needs to be addressed (or how to 
address it).

The source code for my R package (petersenlab) is here: 
https://github.com/DevPsyLab/petersenlab

Thanks very much in advance,
Isaac

[[alternative HTML version deleted]]

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel