Re: [R-pkg-devel] Do you run R on Fedora or Debian?

2022-12-11 Thread Roy Mendelssohn - NOAA Federal via R-package-devel
Thanks.  Yes,  that is what I figured out last night.  I believe the problem is 
actually coming from rerddap,  not rerddapXtracto - which as I said creates a 
tempdir on first call.  I am submitting a new version of rerddap today,  as 
well as a new version of rerddapXtracto in the next few days.  I will look at 
hoardr and see if I can take it over.  I know hoardr uses R6 methods,  of which 
I know nothing,  maintaining it may be over my capabilities,  but I will give 
it a look.

I really appreciate the help several people have given me.  This is the best of 
what help-lists are suppose to be about.

-Roy

PS - If a do take over hoardr,  what is the process for becoming the new 
maintainer of a CRAN package



> On Dec 11, 2022, at 3:45 AM, Ivan Krylov  wrote:
> 
> On Sat, 10 Dec 2022 14:00:22 -0800
> Roy Mendelssohn - NOAA Federal via R-package-devel
>  wrote:
> 
>> CRAN has sent me a notice about the following:
>> 
>> https://www.stats.ox.ac.uk/pub/bdr/donttest/rerddapXtracto.out
>> 
>> I can not reproduce it.  I test on my Mac,  the cache space is
>> properly handled  (by a package outside mine).  Same with Debian on
>> r-hub.  I installed Fedora on a virtual machine, no problem  (it is
>> assigned a space in /tmp).
> 
> I've trace()d rerddap:::gen_key to notify me when a file with the cache
> key of 4f8f83808465a7f7619285e9871747af is being downloaded. Since
> digest::digest defaults to serialize = TRUE, this should only work with
> R-to-be-4.3.0 (I compiled R-devel r83400, same as in the failed check):
> 
> library(rerddapXtracto)
> trace(
> rerddap:::gen_key,
> quote({
>  if(digest::digest(ky) == '4f8f83808465a7f7619285e9871747af') {
>   cat('\n\nFound a match\n\n')
>   str(url); str(args); print(ky); str(digest::digest(ky))
>   message('\n\nFound a match\n\n')
>  }
> }),
> at = 3
> )
> example(rxtracto)
> example(rxtracto_3D)
> example(rxtractogon)
> 
> Surprisingly, there were no hits. I also tried copying and pasting all
> code from the vignette and even uncommenting the code marked as
> \dontrun{}, also with no results.
> 
> The code that actually creates these files lives in the rerddap
> package. The page at
> 
> says that packages are checked in parallel. What if an unlucky reverse
> dependency of rerddap was being checked at the same time as your
> package, making rerddapXtracto get its NOTE?
> 
> I cleaned ~/.cache/R, put the rerddap source package in a directory and
> ran:
> 
> (res <- tools::check_packages_in_dir(
> '.', check_args = '--run-donttest', reverse = list(recursive = TRUE),
> check_env = c(
>  "_R_CHECK_DONTTEST_EXAMPLES_=true",
>  "_R_CHECK_THINGS_IN_OTHER_DIRS_=true"
> )
> ))
> 
> I got a NOTE for plotdap!
> 
> * checking for new files in some other directories ... NOTE
> Found the following files/directories:
>  ‘~/.cache/R’ ‘~/.cache/R/rerddap’
>  ‘~/.cache/R/rerddap/1b43b4335f06b318b914ba2cc2f88872.nc’
>  ‘~/.cache/R/rerddap/4f8f83808465a7f7619285e9871747af.nc’
>  ‘~/.cache/R/rerddap/8cb244e059b86865b7933a3d9b72fe16.csv’
> 
> Looking at the examples for plotdap::add_griddap and
> plotdap::add_tabledap, I think that they may be responsible for the
> NOTE, because there's no pre-example cache setup and teardown. I also
> finally got a match from my tracing code by running
> example(add_griddap).
> 
> There's more than one way to do it right; my favourite would be to wrap
> the pre-example code and post-example code in \dontshow{}, changing the
> cache settings in the first block and restoring them in the second one.
> Everywhere else I would use on.exit(), but examples are special in
> their relationship with autoprinting and crashing there being
> disallowed, making this approach feasible.
> 
> -- 
> Best regards,
> Ivan

**
"The contents of this message do not reflect any position of the U.S. 
Government or NOAA."
**
Roy Mendelssohn
Supervisory Operations Research Analyst
NOAA/NMFS
Environmental Research Division
Southwest Fisheries Science Center
***Note new street address***
110 McAllister Way
Santa Cruz, CA 95060
Phone: (831)-420-3666
Fax: (831) 420-3980
e-mail: roy.mendelss...@noaa.gov www: https://www.pfeg.noaa.gov/

"Old age and treachery will overcome youth and skill."
"From those who have been given much, much will be expected" 
"the arc of the moral universe is long, but it bends toward justice" -MLK Jr.

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


Re: [R-pkg-devel] Do you run R on Fedora or Debian?

2022-12-11 Thread Ivan Krylov
On Sat, 10 Dec 2022 14:00:22 -0800
Roy Mendelssohn - NOAA Federal via R-package-devel
 wrote:

> CRAN has sent me a notice about the following:
> 
> https://www.stats.ox.ac.uk/pub/bdr/donttest/rerddapXtracto.out
> 
> I can not reproduce it.  I test on my Mac,  the cache space is
> properly handled  (by a package outside mine).  Same with Debian on
> r-hub.  I installed Fedora on a virtual machine, no problem  (it is
> assigned a space in /tmp).

I've trace()d rerddap:::gen_key to notify me when a file with the cache
key of 4f8f83808465a7f7619285e9871747af is being downloaded. Since
digest::digest defaults to serialize = TRUE, this should only work with
R-to-be-4.3.0 (I compiled R-devel r83400, same as in the failed check):

library(rerddapXtracto)
trace(
 rerddap:::gen_key,
 quote({
  if(digest::digest(ky) == '4f8f83808465a7f7619285e9871747af') {
   cat('\n\nFound a match\n\n')
   str(url); str(args); print(ky); str(digest::digest(ky))
   message('\n\nFound a match\n\n')
  }
 }),
 at = 3
)
example(rxtracto)
example(rxtracto_3D)
example(rxtractogon)

Surprisingly, there were no hits. I also tried copying and pasting all
code from the vignette and even uncommenting the code marked as
\dontrun{}, also with no results.

The code that actually creates these files lives in the rerddap
package. The page at

says that packages are checked in parallel. What if an unlucky reverse
dependency of rerddap was being checked at the same time as your
package, making rerddapXtracto get its NOTE?

I cleaned ~/.cache/R, put the rerddap source package in a directory and
ran:

(res <- tools::check_packages_in_dir(
 '.', check_args = '--run-donttest', reverse = list(recursive = TRUE),
 check_env = c(
  "_R_CHECK_DONTTEST_EXAMPLES_=true",
  "_R_CHECK_THINGS_IN_OTHER_DIRS_=true"
 )
))

I got a NOTE for plotdap!

* checking for new files in some other directories ... NOTE
Found the following files/directories:
  ‘~/.cache/R’ ‘~/.cache/R/rerddap’
  ‘~/.cache/R/rerddap/1b43b4335f06b318b914ba2cc2f88872.nc’
  ‘~/.cache/R/rerddap/4f8f83808465a7f7619285e9871747af.nc’
  ‘~/.cache/R/rerddap/8cb244e059b86865b7933a3d9b72fe16.csv’

Looking at the examples for plotdap::add_griddap and
plotdap::add_tabledap, I think that they may be responsible for the
NOTE, because there's no pre-example cache setup and teardown. I also
finally got a match from my tracing code by running
example(add_griddap).

There's more than one way to do it right; my favourite would be to wrap
the pre-example code and post-example code in \dontshow{}, changing the
cache settings in the first block and restoring them in the second one.
Everywhere else I would use on.exit(), but examples are special in
their relationship with autoprinting and crashing there being
disallowed, making this approach feasible.

-- 
Best regards,
Ivan

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


Re: [R-pkg-devel] no visible binding for global variable ‘degree_C’ - CRAN check note

2022-12-11 Thread Alexandre Courtiol
 set_units(T, "degree_C") ## using quotes will prevent the R CMD check note
and will still work in this case.

On Sun, 11 Dec 2022 at 05:13, EcoC2S - Irucka Embry 
wrote:

> In my iemisc package, I am using the units package.
>
> This is an example of how I am using the set_units function:
>
> T <- 20
>
> set_units(T, degree_C)
>
> Upon checking iemisc with devtools for CRAN submission, I receive the
> following note under "checking R code for possible problems":
>
> no visible binding for global variable ‘degree_C’
>
> Please tell me how to avoid that note in my R packages.
>
> Thank you.
>
> Irucka
>
> --
> --
> No fear, Only Love! / ¡No temas, solamente amor!
> -Irucka Ajani Embry, 15 March 2020
>
> Family Partners:
> http://www.sustainlex.org/
> https://www.schoolingsolutions.com/
>
>
> ---
>
> The business collaboration between EConsulting (tm)
> [https://www.econsultingllc.org/] and EcoC^2S, is Getting Back to
> Nature.
>
> Getting Back to Nature LocalHarvest --
> https://www.localharvest.org/getting-back-to-nature-M73453
> Getting Back to Nature -- https://www.gettingback2nature.farm/
>
> -- Irucka and his twin brother, Obiora, are featured in the Middle
> Tennessee Local Table Magazine Annual issue. The article discusses their
> family farm history and the current work that they are doing under
> Getting
> Back to Nature. The full magazine can be found here [the article begins
> on
> page 18 of the PDF document]:
>
> https://media.gettingback2nature.farm/pdf/LocalTable_ANNUAL_2020_lo_res.pdf
>
> -- Obiora and Irucka were interviewed separately in early 2020 for the
> Natural Resources Defense Council's (NRDC) "Regenerative Agriculture:
> Farm
> Policy for the 21st Century: Policy Recommendations to Advance
> Regenerative
> Agriculture" report written By Arohi Sharma, Lara Bryant, and Ellen Lee.
> The PDF report is available below:
>
>
> https://www.nrdc.org/sites/default/files/regenerative-agriculture-farm-policy-21st-century-report.pdf
>
> EcoC2S -- https://www.ecoccs.com/
> Principal, Irucka Embry, EIT
>
> Services:
> Growing Food
> Healthy Living Mentor
> Data Analysis with R
> R Training
> Chemistry and Mathematics Tutoring
> Free/Libre and Open Source Software (FLOSS) Consultation
>
> __
> R-package-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-package-devel
>


-- 
Alexandre Courtiol, www.datazoogang.de

[[alternative HTML version deleted]]

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


Re: [R-pkg-devel] Do you run R on Fedora or Debian?

2022-12-11 Thread Duncan Murdoch
I'm not sure I'm looking at the right versions, but it appears your 
package uses hoardr::hoard() for caching.  I looked for the source for 
hoardr::hoard, and found it at


 https://github.com/ropensci-archive/hoardr

It says the package has been "abandoned", with a version number slightly 
higher than the one on CRAN.


So conceivably your problem is caused by a bug in the hoardr package, 
and it looks like the authors of that package aren't going to deal with it.


Duncan Murdoch

On 10/12/2022 5:00 p.m., Roy Mendelssohn - NOAA Federal via 
R-package-devel wrote:

CRAN has sent me a notice about the following:

https://www.stats.ox.ac.uk/pub/bdr/donttest/rerddapXtracto.out

I can not reproduce it.  I test on my Mac,  the cache space is properly handled 
 (by a package outside mine).  Same with Debian on r-hub.  I installed Fedora 
on a virtual machine, no problem  (it is assigned a space in /tmp).  I would 
really appreciate it if someone who runs Debian or Fedora could test the 
following:

install.packages("rerddap",  dependencies = TRUE)
library(rerddap)
cache_setup(temp_dir = TRUE)

The last line should print where the cache is setup.  That is called at the 
start of all of my functions that do downloads.  If you could run that and send 
me the result I would appreciate it (snd privately no need to spam the list 
with that).  I am at a loss as to how to respond to CRAN because I can't 
reproduce that error on anything I can test.  The cacheing is actually done by 
the package 'crul'.

Thanks,

-Roy



**
"The contents of this message do not reflect any position of the U.S. Government or 
NOAA."
**
Roy Mendelssohn
Supervisory Operations Research Analyst
NOAA/NMFS
Environmental Research Division
Southwest Fisheries Science Center
***Note new street address***
110 McAllister Way
Santa Cruz, CA 95060
Phone: (831)-420-3666
Fax: (831) 420-3980
e-mail: roy.mendelss...@noaa.gov www: https://www.pfeg.noaa.gov/

"Old age and treachery will overcome youth and skill."
"From those who have been given much, much will be expected"
"the arc of the moral universe is long, but it bends toward justice" -MLK Jr.

__
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
https://stat.ethz.ch/mailman/listinfo/r-package-devel