Closed pawelru closed 1 year ago
tern
CRAN check warnings:
Version contains large components (0.7.8.9017)
Unknown, possibly misspelled, fields in DESCRIPTION: 'Remotes'
Strong dependencies not in mainstream repositories: nestcolor
Suggests or Enhances not in mainstream repositories: scda, scda.2022
prop_diff_test.R
file:
Found the following (possibly) invalid URLs:
URL: https://onlinelibrary.wiley.com/doi/abs/10.1002/bimj.4710220305
From: man/prop_diff_test.Rd
Status: Error
Message: libcurl error code 60:
schannel: CertGetCertificateChain trust error CERT_TRUST_IS_UNTRUSTED_ROOT
(Status without verification: Service Unavailable)
During insightsengineering/coredev-tasks/issues/334 activity, we enabled --as-cran
to these repos:
The rest will have to wait until we publish to GRAN as noted here: https://github.com/insightsengineering/coredev-tasks/issues/334#issuecomment-1261901486
Since we're now in a new increment, can I propose on closing this issue so we can clean up the board? I will create another roadmap card as continuation so we won't overlook the unresolved item. This next card will be "Deploy to GRAN" and we probably need to refine it for better game plan.
Okey so it seems that you guys did it for a zero-external-depentency packages and there are just few of them. It's good but I would love to have it enabled for all...
Googled this topic for a while and I have found https://stackoverflow.com/questions/66849936/make-cran-r-package-suggest-github-r-package which points to https://github.com/eddelbuettel/drat repo. It seems that there is a workaround to hide "not in mainstream repositories" note. Is this something that could help us to achieve the goal?
UPDATE
So I have tried with the external repo (we already have one in https://github.com/insightsengineering/depository) but it seems that it does not do the trick. Even though package found, I still have a WARNING:
* checking CRAN incoming feasibility ... WARNING
Maintainer: ‘John Doe <john.doe@email.com>’
New submission
Strong dependencies not in mainstream repositories:
teal.widgets
Availability using Additional_repositories specification:
teal.widgets yes https://insightsengineering.github.io/depository/2022_06_09/
I consider this blocked by https://github.com/insightsengineering/coredev-tasks/issues/365. Once we completed this we can enable --as-cran
for every repo and silent some of the warnings.
@cicdguy @donyunardi
I have yet another idea. Instead of trying to hide detected warnings - can we find a way how to silent those?
I came across following resource: https://cran.r-project.org/doc/manuals/r-release/R-ints.html#Tools. There you can find list of env var that disable some of the checks. --as-cran
turn on many flags but we can deactivate some that we don't like - so essentially got ~80% of the scope provided by --as-cran
which is something that we want I believe.
default run on example of teal.widgets
🍎 : teal.code (main) $ unset _R_CHECK_CRAN_INCOMING_REMOTE_ _R_CHECK_SYSTEM_CLOCK_ _R_CHECK_CRAN_INCOMING_; R CMD BUILD .; R CMD CHECK ../teal.code_0.2.0.9000.tar.gz --no-manual --as-cran
* checking for file ‘./DESCRIPTION’ ... OK
* preparing ‘teal.code’:
* checking DESCRIPTION meta-information ... OK
* installing the package to build vignettes
* creating vignettes ... OK
* checking for LF line-endings in source and make files and shell scripts
* checking for empty or unneeded directories
* building ‘teal.code_0.2.0.9007.tar.gz’
* using log directory ‘/Users/ruckip/Documents/repo/insightsengineering/teal.code/teal.code.Rcheck’
* using R version 4.2.1 (2022-06-23)
* using platform: x86_64-apple-darwin17.0 (64-bit)
* using session charset: UTF-8
* using options ‘--no-manual --as-cran’
* checking for file ‘teal.code/DESCRIPTION’ ... OK
* checking extension type ... Package
* this is package ‘teal.code’ version ‘0.2.0.9000’
* package encoding: UTF-8
* checking CRAN incoming feasibility ... WARNING
Maintainer: ‘Dawid Kaledkowski <dawid.kaledkowski@roche.com>’
New submission
Version contains large components (0.2.0.9000)
Unknown, possibly misspelled, fields in DESCRIPTION:
‘Remotes’
Strong dependencies not in mainstream repositories:
teal.widgets
Availability using Additional_repositories specification:
teal.widgets yes https://insightsengineering.github.io/depository/2022_06_09/
The Date field is over a month old.
Size of tarball: 5392185 bytes
* checking package namespace information ... OK
* checking package dependencies ... OK
* checking if this is a source package ... OK
* checking if there is a namespace ... OK
* checking for executable files ... OK
* checking for hidden files and directories ... OK
* checking for portable file names ... OK
* checking for sufficient/correct file permissions ... OK
* checking whether package ‘teal.code’ can be installed ... OK
* checking installed package size ... OK
* checking package directory ... OK
* checking for future file timestamps ... NOTE
unable to verify current time
* checking ‘build’ directory ... OK
* checking DESCRIPTION meta-information ... OK
* checking top-level files ... OK
* checking for left-over files ... OK
* checking index information ... OK
* checking package subdirectories ... OK
* checking R files for non-ASCII characters ... OK
* checking R files for syntax errors ... OK
* checking whether the package can be loaded ... OK
* checking whether the package can be loaded with stated dependencies ... OK
* checking whether the package can be unloaded cleanly ... OK
* checking whether the namespace can be loaded with stated dependencies ... OK
* checking whether the namespace can be unloaded cleanly ... OK
* checking use of S3 registration ... OK
* checking dependencies in R code ... OK
* checking S3 generic/method consistency ... OK
* checking replacement functions ... OK
* checking foreign function calls ... OK
* checking R code for possible problems ... OK
* checking Rd files ... OK
* checking Rd metadata ... OK
* checking Rd line widths ... OK
* checking Rd cross-references ... OK
* checking for missing documentation entries ... OK
* checking for code/documentation mismatches ... OK
* checking Rd \usage sections ... OK
* checking Rd contents ... OK
* checking for unstated dependencies in examples ... OK
* checking installed files from ‘inst/doc’ ... OK
* checking files in ‘vignettes’ ... OK
* checking examples ... OK
* checking for unstated dependencies in ‘tests’ ... OK
* checking tests ...
Running ‘testthat.R’
OK
* checking for unstated dependencies in vignettes ... OK
* checking package vignettes in ‘inst/doc’ ... OK
* checking re-building of vignette outputs ... OK
* checking for non-standard things in the check directory ... OK
* checking for detritus in the temp directory ... OK
* DONE
Status: 1 WARNING, 1 NOTE
run with few env vars:
🍎 : teal.code (main) $ export _R_CHECK_CRAN_INCOMING_REMOTE_=FALSE _R_CHECK_SYSTEM_CLOCK_=FALSE _R_CHECK_CRAN_INCOMING_=FALSE; R CMD BUILD .; R CMD CHECK ../teal.code_0.2.0.9000.tar.gz --no-manual --as-cran
* checking for file ‘./DESCRIPTION’ ... OK
* preparing ‘teal.code’:
* checking DESCRIPTION meta-information ... OK
* installing the package to build vignettes
* creating vignettes ... OK
* checking for LF line-endings in source and make files and shell scripts
* checking for empty or unneeded directories
* building ‘teal.code_0.2.0.9007.tar.gz’
* using log directory ‘/Users/ruckip/Documents/repo/insightsengineering/teal.code/teal.code.Rcheck’
* using R version 4.2.1 (2022-06-23)
* using platform: x86_64-apple-darwin17.0 (64-bit)
* using session charset: UTF-8
* using options ‘--no-manual --as-cran’
* checking for file ‘teal.code/DESCRIPTION’ ... OK
* checking extension type ... Package
* this is package ‘teal.code’ version ‘0.2.0.9000’
* package encoding: UTF-8
* checking package namespace information ... OK
* checking package dependencies ... OK
* checking if this is a source package ... OK
* checking if there is a namespace ... OK
* checking for executable files ... OK
* checking for hidden files and directories ... OK
* checking for portable file names ... OK
* checking for sufficient/correct file permissions ... OK
* checking whether package ‘teal.code’ can be installed ... OK
* checking installed package size ... OK
* checking package directory ... OK
* checking for future file timestamps ... OK
* checking ‘build’ directory ... OK
* checking DESCRIPTION meta-information ... OK
* checking top-level files ... OK
* checking for left-over files ... OK
* checking index information ... OK
* checking package subdirectories ... OK
* checking R files for non-ASCII characters ... OK
* checking R files for syntax errors ... OK
* checking whether the package can be loaded ... OK
* checking whether the package can be loaded with stated dependencies ... OK
* checking whether the package can be unloaded cleanly ... OK
* checking whether the namespace can be loaded with stated dependencies ... OK
* checking whether the namespace can be unloaded cleanly ... OK
* checking dependencies in R code ... OK
* checking S3 generic/method consistency ... OK
* checking replacement functions ... OK
* checking foreign function calls ... OK
* checking R code for possible problems ... OK
* checking Rd files ... OK
* checking Rd metadata ... OK
* checking Rd line widths ... OK
* checking Rd cross-references ... OK
* checking for missing documentation entries ... OK
* checking for code/documentation mismatches ... OK
* checking Rd \usage sections ... OK
* checking Rd contents ... OK
* checking for unstated dependencies in examples ... OK
* checking installed files from ‘inst/doc’ ... OK
* checking files in ‘vignettes’ ... OK
* checking examples ... OK
* checking for unstated dependencies in ‘tests’ ... OK
* checking tests ...
Running ‘testthat.R’
OK
* checking for unstated dependencies in vignettes ... OK
* checking package vignettes in ‘inst/doc’ ... OK
* checking re-building of vignette outputs ... OK
* checking for non-standard things in the check directory ... OK
* checking for detritus in the temp directory ... OK
* DONE
Status: OK
Oh cool, this is a nice discovery @pawelru. This way we can add a feature in the R CMD Check
workflow to bypass specific types of checks.
Great findings! I support this. With this, we don't need to create a block-list file anymore insightsengineering/coredev-tasks/issues/365 ?
With this, we don't need to create a block-list file anymore https://github.com/insightsengineering/coredev-tasks/issues/365 ?
That's the goal but I am not 100% sure if that's enough. Let's see. It would be great if we can achieve --as-cran
without custom-buil feature of a block-list.
So I suggest the following: let's revisit once again feasibility of adding --as-cran
everywhere. Let's try not to use custom-built block-list but use env-var instead. It would be great to have consistent list of envvar across trepos (preferably in r.pkg.template) but I am leaving this for you to decide. Please just note that there might be some meaningful error message discovered that we don't want to block but we do want to resolve instead. Here, I assume that dev team is happy to assist.
@cicdguy can you please put that into the plans? Thanks!
You're in luck. This feature already exists: https://github.com/insightsengineering/r.pkg.template/blob/main/.github/workflows/build-check-install.yaml#L79-L88
Here one can add one or more environment variables such as the one you stated above. We can set a generic set (like the one you used above in your example) as the default, and others can override/customize it in their workflows if needed.
All of teal framework already has --as-cran enabled in CI. If other packages also being done, then we can close this.
Yes, all packages already have this: https://github.com/search?q=org%3Ainsightsengineering+--as-cran+language%3AYAML&type=code&l=YAML
There is an agreement about going into the CRAN in the long term (to exact date so far) and the very first step would be to make our packages passing more restrictive
--as-cran
checks. The goal for this epic is to make necessary adjustment into the codebase so that all the packages would pass it. Once done - please turn it on in our CIList of the tasks:
refactor@main
branch should be merged intomain
Handling example data (feel free to move these into a different epic)