Re: [R-pkg-devel] Installed image not found in Debian

2021-05-11 Thread Jeff Newmiller
Why aren't you using system.file()?

On May 11, 2021 1:45:37 PM PDT, Tiago Olivoto  wrote:
>Dear all,
>I just submitted a new package 'pliman' (
>https://github.com/TiagoOlivoto/pliman) and it does not pass the
>incoming
>checks automatically.
>I have some images that are under '/inst/tmp_images' to be installed
>with
>the package. In some examples and Vignettes, I use the helper function
>image_pliman() <
>https://github.com/TiagoOlivoto/pliman/blob/master/R/utils_imagem.R#L125>
>to get the patch of a given image
>
>Then, I use image_import() <
>https://github.com/TiagoOlivoto/pliman/blob/master/R/utils_imagem.R#L69>
>to
>import the image into R.
>
>All tests passed in Windows <
>https://win-builder.r-project.org/incoming_pretest/pliman_0.1.0_20210511_212904/Windows/00check.log>
>but an error was got in Debian <
>https://win-builder.r-project.org/incoming_pretest/pliman_0.1.0_20210511_212904/Debian/00check.log
>>
>The error occurs when image_import () has been called, for example
>
>image_import(image_pliman("soybean_touch.jpg"))
>Error:  'soybean_touch' not found in
>.//srv/hornik/tmp/CRAN/pliman.Rcheck/pliman/tmp_images
>
>It seems that this error comes from this check <
>https://github.com/TiagoOlivoto/pliman/blob/master/R/utils_imagem.R#L92-L97>
>that checks if the image name is available in the directory. Please,
>see a
>toy example with my data.
>
># Get the patch of the image
>image <- image_pliman("soybean_touch.jpg")
>image
>[1]
>"E:/Documents/R/win-library/4.0/pliman/tmp_images/soybean_touch.jpg"
>
># Get the directory of the image
>img_dir <- file_dir(image)
>> img_dir
>[1] "E:/Documents/R/win-library/4.0/pliman/tmp_images"
>
># Get all files in the directory
>> all_files <- sapply(list.files(img_dir), file_name)
>> all_files
>background.jpgla_back.jpgla_leaf.jpg  la_leaves.JPG
>  "background"  "la_back"  "la_leaf""la_leaves"
>la_pattern.JPGla_temp.jpg objects_300dpi.jpg   sev_back.jpg
>  "la_pattern"  "la_temp"   "objects_300dpi" "sev_back"
>sev_healthy.jpg   sev_leaf.jpgsev_leaf_nb.jpg 
>sev_sympt.jpg
> "sev_healthy" "sev_leaf"  "sev_leaf_nb""sev_sympt"
> soy_green.jpg  soybean_grain.jpg  soybean_touch.jpg
>   "soy_green""soybean_grain""soybean_touch"
>
># Get the name of the image and check if it is in the directory
>> img_name <- file_name(image)
>> img_name
>[1] "soybean_touch"
>
>if(!grepl("http", img_dir, fixed = TRUE) & !img_name %in% all_files){
>  stop(" '", img_name, "' not found in ", img_dir,  call. = FALSE)
>}
>
>In this case, there is no error since  "soybean_touch" is in
>'all_files'
>
>I have no idea how to fix this issue and why this error occurs only on
>Debian and not on Windows. Any suggestion to fix the error and/or
>improve
>the code will be welcome!
>Thanks in advance,
>Tiago
>
>   [[alternative HTML version deleted]]
>
>__
>R-package-devel@r-project.org mailing list
>https://stat.ethz.ch/mailman/listinfo/r-package-devel

-- 
Sent from my phone. Please excuse my brevity.

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


Re: [R-pkg-devel] Unable to get past CRAN submission checks for package cubature

2021-05-11 Thread brodie gaslam via R-package-devel
At the risk of only being mildly (if at all) helpful, I was able
to reproduce your warnings on Rhub, which has the same compiler,
with:

    rhub::check('cubature_2.0.4.1.tar.gz', platform='windows-x86_64-release')

Absent feedback from CRAN you could try tweaking your code so that
it does not produce those warnings while no changing behavior.
Obviously, iterating with rhub is not the easiest way to do this,
but might be easier than trying to get GCC 8.3.

For reference, you might be hitting:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88273

Maybe you knew that already but it might be useful for others to be
aware there is an actual bug that at least is in the general area
that affects GCC 8.2-8.3.

Best,

B.




On Monday, May 10, 2021, 4:01:36 PM EDT, Balasubramanian Narasimhan 
 wrote: 





I submitted a minor update of cubature (suggesting rmarkdown for 
vignettes) and received a message that the package generated warnings. 
However, the warnings were noted to be untrustworthy (see email below). 
I noted this in the submission comments as well as the reply to the 
auto-check email.

It appears that I am unable to get beyond the auto-check service. Any 
suggestions?

-Naras

 Forwarded Message 

Subject:     Re: [CRAN-pretest-archived] CRAN submission cubature 2.0.4.2
Date:     Thu, 6 May 2021 12:51:37 -0700
From:     Balasubramanian Narasimhan 
To:     cran-submissi...@r-project.org, na...@stat.stanford.edu



Dear CRAN,

As explained in my submission comment, the warning is noted to be flaky 
in the message below.

Thank you.

-Naras

On 18/03/2021 13:05, Kurt Hornik wrote:

>> Uwe Ligges writes:
>
>> Dear Naras,
>> your package cubature shows compiler warnings under Windows:
>> 
>
>> Any chance getting rid of these? Please try and resubmit.
>
> Interestingly, r-release-macos shows this too ...

I think -Warray-bounds is known to be flaky in earlier compilers.  I do 
not see this on macOS with Apple Clang 11.5 (latest for High Sierra) or 
12.4 (current) and nor does Tomas for GCC 10 on Windows.


-- 
Brian D. Ripley, rip...@stats.ox.ac.uk
Emeritus Professor of Applied Statistics, University of Oxford
On 5/6/21 12:27 PM, lig...@statistik.tu-dortmund.de wrote:
> Dear maintainer,
>  
> package cubature_2.0.4.2.tar.gz does not pass the incoming checks 
> automatically, please see the following pre-tests:
> Windows:
> Status: 1 WARNING
> Debian:
> Status: OK
>  
> Last released version's CRAN status: WARN: 3, NOTE: 10
> See:
>  
> CRAN Web:
>  
> Please fix all problems and resubmit a fixed version via the webform.
> If you are not sure how to fix the problems shown, please ask for help on the 
> R-package-devel mailing list:
> 
> If you are fairly certain the rejection is a false positive, please reply-all 
> to this message and explain.
>  
> More details are given in the directory:
> 
> The files will be removed after roughly 7 days.
>  
> *** Strong rev. depends ***: ALTopt apTreeshape bivquant BNSP calibrator 
> clusteredinterference coga cold dbmss DRAYL dvmisc ei equivalenceTest 
> fMultivar GAS GB2 GPCMlasso GRCdata highfrequency hyper2 ICAOD inctools 
> MCMCglmm MIRES MMDCopula MWright NonNorMvtDist np OBASpatial ODS optimStrat 
> PCMRS planar pooling Power2Stage PowerTOST ProFit QGglmm robustlmm skedastic 
> SphericalCubature spNetwork statsr SurvDisc symmoments TCIU tseriesEntropy 
> UPCM vines WLinfer yuima
>  
> Best regards,
> CRAN teams' auto-check service
>
> Flavor: r-devel-linux-x86_64-debian-gcc, r-devel-windows-ix86+x86_64
> Check: CRAN incoming feasibility, Result: Note_to_CRAN_maintainers
>    Maintainer: 'Balasubramanian Narasimhan'
>
> Flavor: r-devel-windows-ix86+x86_64
> Check: whether package can be installed, Result: WARNING
>    Found the following significant warnings:
>      ./src/common/Random.c:105:5: warning: 'memcpy' pointer overflow between 
>offset 0 and size [4294967292, 2147483647] [-Warray-bounds]
>      ./src/common/Random.c:105:5: warning: 'memcpy' pointer overflow between 
>offset 0 and size [-4, 9223372036854775807] [-Warray-bounds]
>    See 'd:/RCompile/CRANincoming/R-devel/cubature.Rcheck/00install.out' for 
>details.

    [[alternative HTML version deleted]]

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

__
R-package-devel@r-project.org mailing list

[R-pkg-devel] Installed image not found in Debian

2021-05-11 Thread Tiago Olivoto
Dear all,
I just submitted a new package 'pliman' (
https://github.com/TiagoOlivoto/pliman) and it does not pass the incoming
checks automatically.
I have some images that are under '/inst/tmp_images' to be installed with
the package. In some examples and Vignettes, I use the helper function
image_pliman() <
https://github.com/TiagoOlivoto/pliman/blob/master/R/utils_imagem.R#L125>
to get the patch of a given image

Then, I use image_import() <
https://github.com/TiagoOlivoto/pliman/blob/master/R/utils_imagem.R#L69> to
import the image into R.

All tests passed in Windows <
https://win-builder.r-project.org/incoming_pretest/pliman_0.1.0_20210511_212904/Windows/00check.log>
but an error was got in Debian <
https://win-builder.r-project.org/incoming_pretest/pliman_0.1.0_20210511_212904/Debian/00check.log
>
The error occurs when image_import () has been called, for example

image_import(image_pliman("soybean_touch.jpg"))
Error:  'soybean_touch' not found in
.//srv/hornik/tmp/CRAN/pliman.Rcheck/pliman/tmp_images

It seems that this error comes from this check <
https://github.com/TiagoOlivoto/pliman/blob/master/R/utils_imagem.R#L92-L97>
that checks if the image name is available in the directory. Please, see a
toy example with my data.

# Get the patch of the image
image <- image_pliman("soybean_touch.jpg")
image
[1] "E:/Documents/R/win-library/4.0/pliman/tmp_images/soybean_touch.jpg"

# Get the directory of the image
img_dir <- file_dir(image)
> img_dir
[1] "E:/Documents/R/win-library/4.0/pliman/tmp_images"

# Get all files in the directory
> all_files <- sapply(list.files(img_dir), file_name)
> all_files
background.jpgla_back.jpgla_leaf.jpg  la_leaves.JPG
  "background"  "la_back"  "la_leaf""la_leaves"
la_pattern.JPGla_temp.jpg objects_300dpi.jpg   sev_back.jpg
  "la_pattern"  "la_temp"   "objects_300dpi" "sev_back"
   sev_healthy.jpg   sev_leaf.jpgsev_leaf_nb.jpg  sev_sympt.jpg
 "sev_healthy" "sev_leaf"  "sev_leaf_nb""sev_sympt"
 soy_green.jpg  soybean_grain.jpg  soybean_touch.jpg
   "soy_green""soybean_grain""soybean_touch"

# Get the name of the image and check if it is in the directory
> img_name <- file_name(image)
> img_name
[1] "soybean_touch"

if(!grepl("http", img_dir, fixed = TRUE) & !img_name %in% all_files){
  stop(" '", img_name, "' not found in ", img_dir,  call. = FALSE)
}

In this case, there is no error since  "soybean_touch" is in 'all_files'

I have no idea how to fix this issue and why this error occurs only on
Debian and not on Windows. Any suggestion to fix the error and/or improve
the code will be welcome!
Thanks in advance,
Tiago

[[alternative HTML version deleted]]

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