-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
change to appease cran #403
Comments
…ppease cran and fixed a few minor tests. Issue #403
I believe this is just a matter of switching out: rappdirs::user_cache_dir("rnoaa") with tools::R_user_dir("rnoaa", which = "cache") Fixed it with #0ba86af. Ran tests and build checks. Merging into master and will do final checks before releasing to cran (and updating version as appropriate). |
👍🏽 |
Success, update now on CRAN |
Unfortunately the fix apparently was not successful/sufficient. This is from Brian Ripley:
@sckott - any ideas or suggestions on how to see if it’s writing to that folder on a Mac still? I don’t have one currently and am very new to docker. |
I would add skip_on_cran for this test block https://github.com/ropensci/rnoaa/blob/master/tests/testthat/test-ersst.R#L28-L36 - some of those test lines create the directory that he's so mad about - skipping those tests won't create it. Just ran tests on my mac, i'd also skip_on_cran all the tests that create these folders:
Other things: rappdirs is still used once in tests https://github.com/ropensci/rnoaa/blob/master/tests/testthat/test-ersst.R#L4 - so that should be removed, and rappdirs removed from imports - and this removed the onload file https://github.com/ropensci/rnoaa/blob/master/R/onload.R has the creation of these cache folder objects - but nothing in that file creates anything on disk, only creates the R objects to handle throughout the pkg |
Daniel,
Do you need something checked on a Mac?
Haven't done any coding in a long time (ie. in the dark ages before
github, etc) but I am presently running several Macpros on High Sierra,
Mojave and Catalina and may be able to help.
Could put one of the newer operating systems on a spare drive if needed.
Best
Ken
…On 11/24/21 10:13 AM, Daniel J. Hocking wrote:
Unfortunately the fix apparently was not successful/sufficient. This
is from Brian Ripley:
See the message below to the then maintainer of 'rnoaa'.
rnoaa has a new version and maintainer but still writes in the
prohibited area. It is now scheduled for archival on Nov 30. That
will necessitate archiving 'wildviz' which requires it, so please
move rnoaa to Suggests and use it conditionally before that date.
@sckott <https://github.com/sckott> - any ideas or suggestions on how
to see if it’s writing to that folder on a Mac still? I don’t have one
currently and am very new to docker.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#403 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFBHLFN5OBEIQJZBSDXODC3UNUFKRANCNFSM5HVZQ7XQ>.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
Thanks @sckott I completely missed that the rappdirs function was used above the individual tests in that script and was a bit panicked with the timeframe around the US holiday. I think it should be good now with rappdirs fully removed from the package in place of tools and those additional skip_on_cran test calls. @kjschaudt - I think it's good to go. If you have time in the next day or two to build the package, run the tests, and see if anything gets written to Thanks to both of you |
Daniel,
1) Which package should I build it from?
https://cran.r-project.org/src/contrib/rnoaa_1.3.7.tar.gz,
https://github.com/ropensci/rnoaa.git, or something else?
2) Is
https://github.com/ropensci/rnoaa/blob/master/tests/testthat/test-ersst.R#L28-L36
the correct test block?
I should be able to immediately test it on Catalina and Mojave where I
probably have all of the required compilers installed. If there is a
need, I could give High Sierra a test. Unclear about the time needed
to setup the newer versions of the OS.
…On 11/27/21 4:54 PM, Daniel J. Hocking wrote:
Thanks @sckott <https://github.com/sckott> I completely missed that
the rappdirs function was used above the individual tests in that
script and was a bit panicked with the timeframe around the US
holiday. I think it should be good now with rappdirs fully removed
from the package in place of tools and those additional skip_on_cran
test calls.
@kjschaudt <https://github.com/kjschaudt> - I think it's good to go.
If you have time in the next day or two to build the package, run the
tests, and see if anything gets written to |~/Library/Caches/R|, it
would definitely be appreciated. No worries if you don't have the
time. I'll plan to do the cran release the evening of 28 November
(tomorrow) or 29 November if you plan to try it but need another day.
Thanks to both of you
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#403 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFBHLFMCJRTVJS7VVPC4WRLUOFOQRANCNFSM5HVZQ7XQ>.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
Ken,
We have the package built and tested on the current version of Mac OS via GitHub actions, so I am confident that all the tests work, but CRAN doesn't like that cache file location and I'm not sure how to be sure without running it on a Mac. As such, I think just running it on Catalina (or whichever is most convenient for you) would be sufficient. But again, it's not a big deal if it's more hassle than it's worth. Thanks! |
Best way to install 1.3.8?
Following didn't work
install.packages("devtools")
devtools::install_github("rnoaa", "ropensci")
library('rnoaa')
…On 11/27/21 6:07 PM, Daniel J. Hocking wrote:
Ken,
1.
I know v1.3.7 on CRAN writes to an unapproved location, so it's
the current version on GitHub (1.3.8) that I want to make sure
doesn't write to that folder.
2.
Yes, that is the correct test block, but if possible also running
all the tests to see if anything ever gets written to
|~/Library/Caches/R| would be ideal. I use |devtools::test()| to
run them all on the version cloned from GitHub.
We have the package built and tested on the current version of Mac OS
via GitHub actions, so I am confident that all the tests work, but
CRAN doesn't like that cache file location and I'm not sure how to be
sure without running it on a Mac. As such, I think just running it on
Catalina (or whichever is most convenient for you) would be
sufficient. But again, it's not a big deal if it's more hassle than
it's worth.
Thanks!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#403 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFBHLFOSMGZ46JENSFFHBGLUOFXF5ANCNFSM5HVZQ7XQ>.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
This failed. Is there a better way to install 1.3.8?
library(githubinstall)
gh_install_packages("rnoaa", ref = "v1.3.8")
Select a number or, hit 0 to cancel.
1: Cesar-Urteaga/rnoaa An R package to get, clean, and visualize
earthquake data from the NOAA.
2: leighseverson/rnoaa R interface to many NOAA data APIs
http://ropensci.org/tutorials/rnoaa_tutorial.html (now with moar crunchy
meteo goodness!)
3: ropensci/rnoaa R interface to many NOAA data APIs
4: ropenscilabs/rnoaa R interface to many NOAA data APIs
http://ropensci.org/tutorials/rnoaa_tutorial.html (now with moar crunchy
meteo goodness!)
Selection: 3
Suggestion:
- ropensci/rnoaa R interface to many NOAA data APIs
Do you want to install the package (Y/n)? Y
Error: Failed to install 'unknown package' from GitHub:
HTTP error 404.
No commit found for the ref v1.3.8
Did you spell the repo owner (`ropensci`) and repo name (`rnoaa`)
correctly?
- If spelling is correct, check that you have the required
permissions to access the repo.
In addition: Warning message:
In fread(download_url, sep = "\t", header = FALSE, stringsAsFactors =
FALSE, :
Found and resolved improper quoting out-of-sample. First healed line
4848: <<Puriney honfleuR "Evening, honfleuR" by Seurat>>. If the
fields are not quoted (e.g. field separator does not appear within any
field), try quote="" to avoid this warning.
…On 11/27/21 6:07 PM, Daniel J. Hocking wrote:
Ken,
1.
I know v1.3.7 on CRAN writes to an unapproved location, so it's
the current version on GitHub (1.3.8) that I want to make sure
doesn't write to that folder.
2.
Yes, that is the correct test block, but if possible also running
all the tests to see if anything ever gets written to
|~/Library/Caches/R| would be ideal. I use |devtools::test()| to
run them all on the version cloned from GitHub.
We have the package built and tested on the current version of Mac OS
via GitHub actions, so I am confident that all the tests work, but
CRAN doesn't like that cache file location and I'm not sure how to be
sure without running it on a Mac. As such, I think just running it on
Catalina (or whichever is most convenient for you) would be
sufficient. But again, it's not a big deal if it's more hassle than
it's worth.
Thanks!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#403 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFBHLFOSMGZ46JENSFFHBGLUOFXF5ANCNFSM5HVZQ7XQ>.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
Daniel.
After doing the following, I found R wrote an empty folder (noaa_ersst)
to |~/Library/Caches/R|
Here's what I did
I appear to have loaded v1.3.8 using the following.
install_github("https://github.com/ropensci/rnoaa")
needed to install testthat to run test-errsst.r. Pasted that into a
local file and ran it.
context("ersst")
Error in context("ersst") : could not find function "context"
# delete any cached files
ersst_dir <- tools::R_user_dir("rnoaa/ersst", which = "cache")
Error: 'R_user_dir' is not an exported object from 'namespace:tools'
unlink(list.files(ersst_dir, full.names = TRUE))
Error in list.files(ersst_dir, full.names = TRUE) :
object 'ersst_dir' not found
test_that("errst works with valid character and numeric input", {
+ skip_on_cran()
+ skip_if_government_down()
+
+ vcr::use_cassette("ersst1", {
+ expect_is(ersst(year = 2016, month = 06), "ncdf4")
+ })
+
+ vcr::use_cassette("ersst2", {
+ expect_is(ersst(year = 2016, month = 7), "ncdf4")
+ })
+
+ vcr::use_cassette("ersst3", {
+ expect_is(ersst(year = "2016", month = 8), "ncdf4")
+ })
+
+ vcr::use_cassette("ersst4", {
+ expect_is(ersst(year = "2016", month = "09"), "ncdf4")
+ })
+ })
Error in test_that("errst works with valid character and numeric input", :
could not find function "test_that"
test_that("errst fails well", {
+ skip_on_cran()
+
+ expect_error(ersst(year = 2016), "argument \"month\" is missing")
+ expect_error(ersst(month = 10), "argument \"year\" is missing")
+ expect_error(ersst(year = 1853, month = 10), "year must be > 1853")
+ expect_error(ersst(year = 2015, month = 100),
+ "month must be a length 1 or 2 month value")
+ expect_error(ersst(year = 2015, month = 13),
+ "month must be a number between 1 and 12")
+ })
Error in test_that("errst fails well", { :
could not find function "test_that"
# delete any cached files
ersst_dir <- tools::R_user_dir("rnoaa/ersst", which = "cache")
Error: 'R_user_dir' is not an exported object from 'namespace:tools'
unlink(list.files(ersst_dir, full.names = TRUE))
Error in list.files(ersst_dir, full.names = TRUE) :
object 'ersst_dir' not found
test_that("errst works with valid character and numeric input", {
+ skip_on_cran()
+ skip_if_government_down()
+
+ vcr::use_cassette("ersst1", {
+ expect_is(ersst(year = 2016, month = 06), "ncdf4")
+ })
+
+ vcr::use_cassette("ersst2", {
+ expect_is(ersst(year = 2016, month = 7), "ncdf4")
+ })
+
+ vcr::use_cassette("ersst3", {
+ expect_is(ersst(year = "2016", month = 8), "ncdf4")
+ })
+
+ vcr::use_cassette("ersst4", {
+ expect_is(ersst(year = "2016", month = "09"), "ncdf4")
+ })
+ })
Error in test_that("errst works with valid character and numeric input", :
could not find function "test_that"
test_that("errst fails well", {
+ skip_on_cran()
+
+ expect_error(ersst(year = 2016), "argument \"month\" is missing")
+ expect_error(ersst(month = 10), "argument \"year\" is missing")
+ expect_error(ersst(year = 1853, month = 10), "year must be > 1853")
+ expect_error(ersst(year = 2015, month = 100),
+ "month must be a length 1 or 2 month value")
+ expect_error(ersst(year = 2015, month = 13),
+ "month must be a number between 1 and 12")
+ })
Error in test_that("errst fails well", { :
could not find function "test_that"
install.packages("testthat")
Error in install.packages : Updating loaded packages
Restarting R session...
install.packages("testthat")
trying URL
'https://cran.rstudio.com/bin/macosx/el-capitan/contrib/3.6/testthat_3.1.0.tgz'
Content type 'application/x-gzip' length 2929156 bytes (2.8 MB)
==================================================
downloaded 2.8 MB
The downloaded binary packages are in
/var/folders/jb/p65bzs357js0yj2vw80nz9rc0000gn/T//Rtmpd5mLDW/downloaded_packages
library(testthat)
library(devtools)
Loading required package: usethis
Attaching package: ‘devtools’
The following object is masked from ‘package:testthat’:
test_file
library(rnoaa)
context("ersst")
# delete any cached files
ersst_dir <- tools::R_user_dir("rnoaa/ersst", which = "cache")
Error: 'R_user_dir' is not an exported object from 'namespace:tools'
unlink(list.files(ersst_dir, full.names = TRUE))
Error in list.files(ersst_dir, full.names = TRUE) :
object 'ersst_dir' not found
test_that("errst works with valid character and numeric input", {
+ skip_on_cran()
+ skip_if_government_down()
+
+ vcr::use_cassette("ersst1", {
+ expect_is(ersst(year = 2016, month = 06), "ncdf4")
+ })
+
+ vcr::use_cassette("ersst2", {
+ expect_is(ersst(year = 2016, month = 7), "ncdf4")
+ })
+
+ vcr::use_cassette("ersst3", {
+ expect_is(ersst(year = "2016", month = 8), "ncdf4")
+ })
+
+ vcr::use_cassette("ersst4", {
+ expect_is(ersst(year = "2016", month = "09"), "ncdf4")
+ })
+ })
── Error (Line 3): errst works with valid character and numeric input
─────────────────────
Error in `skip_if_government_down()`: could not find function
"skip_if_government_down"
Error: Test failed
test_that("errst fails well", {
+ skip_on_cran()
+
+ expect_error(ersst(year = 2016), "argument \"month\" is missing")
+ expect_error(ersst(month = 10), "argument \"year\" is missing")
+ expect_error(ersst(year = 1853, month = 10), "year must be > 1853")
+ expect_error(ersst(year = 2015, month = 100),
+ "month must be a length 1 or 2 month value")
+ expect_error(ersst(year = 2015, month = 13),
+ "month must be a number between 1 and 12")
+ })
Test passed
…On 11/27/21 4:54 PM, Daniel J. Hocking wrote:
Thanks @sckott <https://github.com/sckott> I completely missed that
the rappdirs function was used above the individual tests in that
script and was a bit panicked with the timeframe around the US
holiday. I think it should be good now with rappdirs fully removed
from the package in place of tools and those additional skip_on_cran
test calls.
@kjschaudt <https://github.com/kjschaudt> - I think it's good to go.
If you have time in the next day or two to build the package, run the
tests, and see if anything gets written to |~/Library/Caches/R|, it
would definitely be appreciated. No worries if you don't have the
time. I'll plan to do the cran release the evening of 28 November
(tomorrow) or 29 November if you plan to try it but need another day.
Thanks to both of you
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#403 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFBHLFMCJRTVJS7VVPC4WRLUOFOQRANCNFSM5HVZQ7XQ>.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
Ken - thanks for your persistence with this!!! As a result, I think I might know what we need to change. Can you run each of the following and let me know the results: tools::R_user_dir("rnoaa") tools::R_user_dir("rnoaa", which = "cache") |
Running on Mojave,Rstudio 1.2.5033 Nothing written to the library cache.
Results of the 2 tests follow ==> Testing R file using 'testthat' ══
Testing RnoaaTEst.R
═════════════════════════════════════════════════════════ [ FAIL 1 |
WARN 0 | SKIP 0 | PASS 0 ] ── Error (RnoaaTEst.R:10:1): (code run
outside of `test_that()`) ─────────────── Error: 'R_user_dir' is not an
exported object from 'namespace:tools' Backtrace: 1. tools::R_user_dir
RnoaaTEst.R:10:0 2. base::getExportedValue(pkg, name) [ FAIL 1 | WARN 0
| SKIP 0 | PASS 0 ] Test complete ==> Testing R file using 'testthat' ══
Testing RnoaaTEst.R
═════════════════════════════════════════════════════════ [ FAIL 1 |
WARN 0 | SKIP 0 | PASS 0 ] ── Error (RnoaaTEst.R:10:1): (code run
outside of `test_that()`) ─────────────── Error: 'R_user_dir' is not an
exported object from 'namespace:tools' Backtrace: 1. tools::R_user_dir
RnoaaTEst.R:10:0 2. base::getExportedValue(pkg, name) [ FAIL 1 | WARN 0
| SKIP 0 | PASS 0 ] Test complete
…On 11/27/21 8:06 PM, Daniel J. Hocking wrote:
Ken - thanks for your persistence with this!!! As a result, I think I
might know what we need to change.
Can you run each of the following and let me know the results:
tools::R_user_dir("rnoaa")
tools::R_user_dir("rnoaa",which = "cache")
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#403 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFBHLFIDWMFZFZLDDDJFIW3UOGFBRANCNFSM5HVZQ7XQ>.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
Hmm, interesting. What about just these two lines outside of any test on Catalina? tools::R_user_dir("rnoaa") tools::R_user_dir("rnoaa", which = "cache") |
From the terminal, the R console or?
…On 11/27/21 8:31 PM, Daniel J. Hocking wrote:
Hmm, interesting. What about just these two lines outside of any test
on Catalina?
tools::R_user_dir("rnoaa")
tools::R_user_dir("rnoaa",which = "cache")
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#403 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFBHLFO44KH3DBWK6GBRHJLUOGH7PANCNFSM5HVZQ7XQ>.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
Not sure if I am properly loading the program from R since I have almost
0 experience with github, am an old school fortran coder who went to SAS
for 20 years and then R for the last 10.
Can't rule out an operator error on this side.
…On 11/27/21 8:31 PM, Daniel J. Hocking wrote:
tools::R_user_dir("rnoaa",which = "cache")
|
Each of those two lines can be run in the R console. Those are used internally in the package and are causing the problem. I'm thinking that the version without git and GitHub are great but there's certainly a learning curve. Same with R. It's so unstructured relative to many other programming languages and the package developments are so fast that it's almost too flexible. |
Not sure if I understand what you mean by "outside of any test". I
assume you meant for me not to make the library(testthat) or not call
devtools::test("test-errst.R")
Also not sure if I am correctly installing the file from github /
running the tests you requested. Willing to learn if you can pass
along specific commands.
Here's my last attempt. starting from a clean Rstudio session in
Mojave, here are the results.
First, nothing was written in library/cache/r
R version 3.6.3 (2020-02-29) -- "Holding the Windsock"
Copyright (C) 2020 The R Foundation for Statistical Computing
Platform: x86_64-apple-darwin15.6.0 (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
Natural language support but running in an English locale
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
library(githubinstall)
library(devtools)
Loading required package: usethis
install_github("https://github.com/ropensci/rnoaa")
Downloading GitHub repo ***@***.***
✓ checking for file
‘/private/var/folders/jb/p65bzs357js0yj2vw80nz9rc0000gn/T/Rtmp1z4uZ7/remotes13d11bf00dd1/ropensci-rnoaa-7a3c3c4/DESCRIPTION’
...
─ preparing ‘rnoaa’: (581ms)
✓ checking DESCRIPTION meta-information ...
─ checking for LF line-endings in source and make files and shell scripts
─ checking for empty or unneeded directories
Removed empty directory ‘rnoaa/vignettes’
─ looking to see if a ‘data/datalist’ file should be added
─ building ‘rnoaa_1.3.8.tar.gz’
* installing *source* package ‘rnoaa’ ...
** using staged installation
** R
** data
*** moving datasets to lazyload DB
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
*** copying figures
** building package indices
** testing if installed package can be loaded from temporary location
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation
path
* DONE (rnoaa)
library(rnoaa)
Registered S3 method overwritten by 'hoardr':
method from
print.cache_info httr
tools::R_user_dir("rnoaa")
Error: 'R_user_dir' is not an exported object from 'namespace:tools'
tools::R_user_dir("rnoaa", which = "cache")
Error: 'R_user_dir' is not an exported object from 'namespace:tools'
…On 11/27/21 8:31 PM, Daniel J. Hocking wrote:
Hmm, interesting. What about just these two lines outside of any test
on Catalina?
tools::R_user_dir("rnoaa")
tools::R_user_dir("rnoaa",which = "cache")
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#403 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFBHLFO44KH3DBWK6GBRHJLUOGH7PANCNFSM5HVZQ7XQ>.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
Thanks! What you ran is exactly what I was looking for. Interestingly and unfortunately the solution doesn’t appear to work on R 3.6 (that’s the namespace error).
Could you run those two lines on the Catalina system with R version >= 4.0?
Sent from a handheld device.
… On Nov 28, 2021, at 12:36 AM, kjschaudt ***@***.***> wrote:
Not sure if I understand what you mean by "outside of any test". I
assume you meant for me not to make the library(testthat) or not call
devtools::test("test-errst.R")
Also not sure if I am correctly installing the file from github /
running the tests you requested. Willing to learn if you can pass
along specific commands.
Here's my last attempt. starting from a clean Rstudio session in
Mojave, here are the results.
First, nothing was written in library/cache/r
R version 3.6.3 (2020-02-29) -- "Holding the Windsock"
Copyright (C) 2020 The R Foundation for Statistical Computing
Platform: x86_64-apple-darwin15.6.0 (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
Natural language support but running in an English locale
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
>library(githubinstall)
> library(devtools)
Loading required package: usethis
> install_github("https://github.com/ropensci/rnoaa")
Downloading GitHub repo ***@***.***
✓ checking for file
‘/private/var/folders/jb/p65bzs357js0yj2vw80nz9rc0000gn/T/Rtmp1z4uZ7/remotes13d11bf00dd1/ropensci-rnoaa-7a3c3c4/DESCRIPTION’
...
─ preparing ‘rnoaa’: (581ms)
✓ checking DESCRIPTION meta-information ...
─ checking for LF line-endings in source and make files and shell scripts
─ checking for empty or unneeded directories
Removed empty directory ‘rnoaa/vignettes’
─ looking to see if a ‘data/datalist’ file should be added
─ building ‘rnoaa_1.3.8.tar.gz’
* installing *source* package ‘rnoaa’ ...
** using staged installation
** R
** data
*** moving datasets to lazyload DB
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
*** copying figures
** building package indices
** testing if installed package can be loaded from temporary location
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation
path
* DONE (rnoaa)
> library(rnoaa)
Registered S3 method overwritten by 'hoardr':
method from
print.cache_info httr
> tools::R_user_dir("rnoaa")
Error: 'R_user_dir' is not an exported object from 'namespace:tools'
> tools::R_user_dir("rnoaa", which = "cache")
Error: 'R_user_dir' is not an exported object from 'namespace:tools'
>
On 11/27/21 8:31 PM, Daniel J. Hocking wrote:
>
> Hmm, interesting. What about just these two lines outside of any test
> on Catalina?
>
> tools::R_user_dir("rnoaa")
> tools::R_user_dir("rnoaa",which = "cache")
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <#403 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AFBHLFO44KH3DBWK6GBRHJLUOGH7PANCNFSM5HVZQ7XQ>.
> Triage notifications on the go with GitHub Mobile for iOS
> <https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
> or Android
> <https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
>
>
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
|
From R version 4.1.2 downloaded from the Microsoft Site, I get the
following errors trying to install what appears to be the required
librarys. Devtools, etc are not available. Will see if I can get
RStudio (with R4+) running on my test Catalina box.
R version 4.1.2 (2021-11-01) -- "Bird Hippie"
Copyright (C) 2021 The R Foundation for Statistical Computing
Platform: x86_64-apple-darwin17.0 (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
Natural language support but running in an English locale
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
[R.app GUI 1.70 (7405) x86_64-apple-darwin17.0]
install.packages("githubinstall")
Warning: unable to access index for repository
http://cran.revolutionanalytics.com/src/contrib:
cannot open URL
'http://cran.revolutionanalytics.com/src/contrib/PACKAGES'
Warning: unable to access index for repository
http://cran.revolutionanalytics.com/bin/macosx/contrib/4.1:
cannot open URL
'http://cran.revolutionanalytics.com/bin/macosx/contrib/4.1/PACKAGES'
Warning message:
package ‘githubinstall’ is not available for this version of R
A version of this package for your version of R might be available
elsewhere,
see the ideas at
https://cran.r-project.org/doc/manuals/r-patched/R-admin.html#Installing-packages
library(githubinstall)
Error in library(githubinstall) :
there is no package called ‘githubinstall’
install.packages("devtools")
Warning: unable to access index for repository
http://cran.revolutionanalytics.com/src/contrib:
cannot open URL
'http://cran.revolutionanalytics.com/src/contrib/PACKAGES'
Warning: unable to access index for repository
http://cran.revolutionanalytics.com/bin/macosx/contrib/4.1:
cannot open URL
'http://cran.revolutionanalytics.com/bin/macosx/contrib/4.1/PACKAGES'
Warning message:
package ‘devtools’ is not available for this version of R
A version of this package for your version of R might be available
elsewhere,
see the ideas at
https://cran.r-project.org/doc/manuals/r-patched/R-admin.html#Installing-packages
library(devtools)
Error in library(devtools) : there is no package called ‘devtools’
install_github("https://github.com/ropensci/rnoaa")
Error in install_github("https://github.com/ropensci/rnoaa") :
could not find function "install_github"
install.packages("testthat")
Warning: unable to access index for repository
http://cran.revolutionanalytics.com/src/contrib:
cannot open URL
'http://cran.revolutionanalytics.com/src/contrib/PACKAGES'
Warning: unable to access index for repository
http://cran.revolutionanalytics.com/bin/macosx/contrib/4.1:
cannot open URL
'http://cran.revolutionanalytics.com/bin/macosx/contrib/4.1/PACKAGES'
Warning message:
package ‘testthat’ is not available for this version of R
A version of this package for your version of R might be available
elsewhere,
see the ideas at
https://cran.r-project.org/doc/manuals/r-patched/R-admin.html#Installing-packages
…On 11/28/21 7:00 AM, Daniel J. Hocking wrote:
Thanks! What you ran is exactly what I was looking for. Interestingly
and unfortunately the solution doesn’t appear to work on R 3.6 (that’s
the namespace error).
Could you run those two lines on the Catalina system with R version >=
4.0?
Sent from a handheld device.
> On Nov 28, 2021, at 12:36 AM, kjschaudt ***@***.***> wrote:
>
>
> Not sure if I understand what you mean by "outside of any test". I
> assume you meant for me not to make the library(testthat) or not call
> devtools::test("test-errst.R")
>
> Also not sure if I am correctly installing the file from github /
> running the tests you requested. Willing to learn if you can pass
> along specific commands.
>
> Here's my last attempt. starting from a clean Rstudio session in
> Mojave, here are the results.
>
> First, nothing was written in library/cache/r
>
>
> R version 3.6.3 (2020-02-29) -- "Holding the Windsock"
> Copyright (C) 2020 The R Foundation for Statistical Computing
> Platform: x86_64-apple-darwin15.6.0 (64-bit)
>
> R is free software and comes with ABSOLUTELY NO WARRANTY.
> You are welcome to redistribute it under certain conditions.
> Type 'license()' or 'licence()' for distribution details.
>
> Natural language support but running in an English locale
>
> R is a collaborative project with many contributors.
> Type 'contributors()' for more information and
> 'citation()' on how to cite R or R packages in publications.
>
> Type 'demo()' for some demos, 'help()' for on-line help, or
> 'help.start()' for an HTML browser interface to help.
> Type 'q()' to quit R.
>
> >library(githubinstall)
> > library(devtools)
> Loading required package: usethis
> > install_github("https://github.com/ropensci/rnoaa")
> Downloading GitHub repo ***@***.***
> ✓ checking for file
>
‘/private/var/folders/jb/p65bzs357js0yj2vw80nz9rc0000gn/T/Rtmp1z4uZ7/remotes13d11bf00dd1/ropensci-rnoaa-7a3c3c4/DESCRIPTION’
> ...
> ─ preparing ‘rnoaa’: (581ms)
> ✓ checking DESCRIPTION meta-information ...
> ─ checking for LF line-endings in source and make files and shell
scripts
> ─ checking for empty or unneeded directories
> Removed empty directory ‘rnoaa/vignettes’
> ─ looking to see if a ‘data/datalist’ file should be added
> ─ building ‘rnoaa_1.3.8.tar.gz’
>
> * installing *source* package ‘rnoaa’ ...
> ** using staged installation
> ** R
> ** data
> *** moving datasets to lazyload DB
> ** inst
> ** byte-compile and prepare package for lazy loading
> ** help
> *** installing help indices
> *** copying figures
> ** building package indices
> ** testing if installed package can be loaded from temporary location
> ** testing if installed package can be loaded from final location
> ** testing if installed package keeps a record of temporary
installation
> path
> * DONE (rnoaa)
> > library(rnoaa)
> Registered S3 method overwritten by 'hoardr':
> method from
> print.cache_info httr
>
> > tools::R_user_dir("rnoaa")
> Error: 'R_user_dir' is not an exported object from 'namespace:tools'
>
> > tools::R_user_dir("rnoaa", which = "cache")
> Error: 'R_user_dir' is not an exported object from 'namespace:tools'
> >
>
>
>
>
> On 11/27/21 8:31 PM, Daniel J. Hocking wrote:
> >
> > Hmm, interesting. What about just these two lines outside of any test
> > on Catalina?
> >
> > tools::R_user_dir("rnoaa")
> > tools::R_user_dir("rnoaa",which = "cache")
> >
> > —
> > You are receiving this because you were mentioned.
> > Reply to this email directly, view it on GitHub
> >
<#403 (comment)>,
> > or unsubscribe
> >
<https://github.com/notifications/unsubscribe-auth/AFBHLFO44KH3DBWK6GBRHJLUOGH7PANCNFSM5HVZQ7XQ>.
> > Triage notifications on the go with GitHub Mobile for iOS
> >
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
> > or Android
> >
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
> >
> >
> —
> You are receiving this because you modified the open/close state.
> Reply to this email directly, view it on GitHub, or unsubscribe.
> Triage notifications on the go with GitHub Mobile for iOS or Android.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#403 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFBHLFOEAXCEBVAJM773ARLUOIRWDANCNFSM5HVZQ7XQ>.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
The test librarys loaded in R Studio but not R. Interesting to know.
tools::R_user_dir("rnoaa")
[1] "/Volumes/SG8GB/Users/schaudt/Library/Application
Support/org.R-project.R/R/rnoaa"
tools::R_user_dir("rnoaa", which = "cache")
[1] "/Volumes/SG8GB/Users/schaudt/Library/Caches/org.R-project.R/R/rnoaa"
devtools::test()
Error: Could not find package root. Is your working directory inside a
package?
####### installation of rnoaa 1.3.8 follows
R version 4.1.2 (2021-11-01) -- "Bird Hippie"
Copyright (C) 2021 The R Foundation for Statistical Computing
Platform: x86_64-apple-darwin17.0 (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
Natural language support but running in an English locale
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
[Workspace loaded from ~/.RData]
install.packages("githubinstall")
also installing the dependencies ‘credentials’, ‘gitcreds’, ‘ini’,
‘gert’, ‘gh’, ‘whisker’, ‘xopen’, ‘brew’, ‘commonmark’, ‘usethis’,
‘pkgbuild’, ‘rcmdcheck’, ‘roxygen2’, ‘rversions’, ‘sessioninfo’,
‘devtools’, ‘mockery’
trying URL
'https://cran.rstudio.com/bin/macosx/contrib/4.1/credentials_1.3.1.tgz'
Content type 'application/x-gzip' length 171560 bytes (167 KB)
==================================================
downloaded 167 KB
trying URL
'https://cran.rstudio.com/bin/macosx/contrib/4.1/gitcreds_0.1.1.tgz'
Content type 'application/x-gzip' length 91981 bytes (89 KB)
==================================================
downloaded 89 KB
trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.1/ini_0.3.1.tgz'
Content type 'application/x-gzip' length 13224 bytes (12 KB)
==================================================
downloaded 12 KB
trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.1/gert_1.4.3.tgz'
Content type 'application/x-gzip' length 2084590 bytes (2.0 MB)
==================================================
downloaded 2.0 MB
trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.1/gh_1.3.0.tgz'
Content type 'application/x-gzip' length 137863 bytes (134 KB)
==================================================
downloaded 134 KB
trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.1/whisker_0.4.tgz'
Content type 'application/x-gzip' length 65505 bytes (63 KB)
==================================================
downloaded 63 KB
trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.1/xopen_1.0.0.tgz'
Content type 'application/x-gzip' length 22444 bytes (21 KB)
==================================================
downloaded 21 KB
trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.1/brew_1.0-6.tgz'
Content type 'application/x-gzip' length 106877 bytes (104 KB)
==================================================
downloaded 104 KB
trying URL
'https://cran.rstudio.com/bin/macosx/contrib/4.1/commonmark_1.7.tgz'
Content type 'application/x-gzip' length 310444 bytes (303 KB)
==================================================
downloaded 303 KB
trying URL
'https://cran.rstudio.com/bin/macosx/contrib/4.1/usethis_2.1.3.tgz'
Content type 'application/x-gzip' length 769517 bytes (751 KB)
==================================================
downloaded 751 KB
trying URL
'https://cran.rstudio.com/bin/macosx/contrib/4.1/pkgbuild_1.2.0.tgz'
Content type 'application/x-gzip' length 140834 bytes (137 KB)
==================================================
downloaded 137 KB
trying URL
'https://cran.rstudio.com/bin/macosx/contrib/4.1/rcmdcheck_1.4.0.tgz'
Content type 'application/x-gzip' length 168344 bytes (164 KB)
==================================================
downloaded 164 KB
trying URL
'https://cran.rstudio.com/bin/macosx/contrib/4.1/roxygen2_7.1.2.tgz'
Content type 'application/x-gzip' length 859689 bytes (839 KB)
==================================================
downloaded 839 KB
trying URL
'https://cran.rstudio.com/bin/macosx/contrib/4.1/rversions_2.1.1.tgz'
Content type 'application/x-gzip' length 64526 bytes (63 KB)
==================================================
downloaded 63 KB
trying URL
'https://cran.rstudio.com/bin/macosx/contrib/4.1/sessioninfo_1.2.1.tgz'
Content type 'application/x-gzip' length 185408 bytes (181 KB)
==================================================
downloaded 181 KB
trying URL
'https://cran.rstudio.com/bin/macosx/contrib/4.1/devtools_2.4.2.tgz'
Content type 'application/x-gzip' length 393913 bytes (384 KB)
==================================================
downloaded 384 KB
trying URL
'https://cran.rstudio.com/bin/macosx/contrib/4.1/mockery_0.4.2.tgz'
Content type 'application/x-gzip' length 39570 bytes (38 KB)
==================================================
downloaded 38 KB
trying URL
'https://cran.rstudio.com/bin/macosx/contrib/4.1/githubinstall_0.2.2.tgz'
Content type 'application/x-gzip' length 63322 bytes (61 KB)
==================================================
downloaded 61 KB
The downloaded binary packages are in
/var/folders/jb/p65bzs357js0yj2vw80nz9rc0000gn/T//RtmpvhngYt/downloaded_packages
library(githubinstall)
install.packages("devtools")
Error in install.packages : Updating loaded packages
Restarting R session...
install.packages("devtools")
trying URL
'https://cran.rstudio.com/bin/macosx/contrib/4.1/devtools_2.4.2.tgz'
Content type 'application/x-gzip' length 393913 bytes (384 KB)
==================================================
downloaded 384 KB
The downloaded binary packages are in
/var/folders/jb/p65bzs357js0yj2vw80nz9rc0000gn/T//RtmpjbcT0U/downloaded_packages
library(devtools)
Loading required package: usethis
install_github("https://github.com/ropensci/rnoaa")
Downloading GitHub repo ***@***.***
These packages have more recent versions available.
It is recommended to update all of them.
Which would you like to update?
1: All
2: CRAN packages only
3: None
4: cpp11 (0.4.0 -> 0.4.1) [CRAN]
5: glue (1.4.2 -> 1.5.0) [CRAN]
6: tibble (3.1.5 -> 3.1.6) [CRAN]
Enter one or more numbers, or an empty line to skip updates: 1
cpp11 (0.4.0 -> 0.4.1 ) [CRAN]
glue (1.4.2 -> 1.5.0 ) [CRAN]
tibble (3.1.5 -> 3.1.6 ) [CRAN]
triebeard (NA -> 0.3.0 ) [CRAN]
rjson (NA -> 0.2.20 ) [CRAN]
httpcode (NA -> 0.3.0 ) [CRAN]
urltools (NA -> 1.7.3 ) [CRAN]
hoardr (NA -> 0.5.2 ) [CRAN]
geonames (NA -> 0.999 ) [CRAN]
isdparser (NA -> 0.4.0 ) [CRAN]
XML (NA -> 3.99-0.8) [CRAN]
crul (NA -> 1.2.0 ) [CRAN]
Installing 12 packages: cpp11, glue, tibble, triebeard, rjson, httpcode,
urltools, hoardr, geonames, isdparser, XML, crul
trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.1/cpp11_0.4.1.tgz'
Content type 'application/x-gzip' length 304412 bytes (297 KB)
==================================================
downloaded 297 KB
trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.1/glue_1.5.0.tgz'
Content type 'application/x-gzip' length 145947 bytes (142 KB)
==================================================
downloaded 142 KB
trying URL
'https://cran.rstudio.com/bin/macosx/contrib/4.1/tibble_3.1.6.tgz'
Content type 'application/x-gzip' length 846646 bytes (826 KB)
==================================================
downloaded 826 KB
trying URL
'https://cran.rstudio.com/bin/macosx/contrib/4.1/triebeard_0.3.0.tgz'
Content type 'application/x-gzip' length 1040138 bytes (1015 KB)
==================================================
downloaded 1015 KB
trying URL
'https://cran.rstudio.com/bin/macosx/contrib/4.1/rjson_0.2.20.tgz'
Content type 'application/x-gzip' length 191694 bytes (187 KB)
==================================================
downloaded 187 KB
trying URL
'https://cran.rstudio.com/bin/macosx/contrib/4.1/httpcode_0.3.0.tgz'
Content type 'application/x-gzip' length 32388 bytes (31 KB)
==================================================
downloaded 31 KB
trying URL
'https://cran.rstudio.com/bin/macosx/contrib/4.1/urltools_1.7.3.tgz'
Content type 'application/x-gzip' length 957803 bytes (935 KB)
==================================================
downloaded 935 KB
trying URL
'https://cran.rstudio.com/bin/macosx/contrib/4.1/hoardr_0.5.2.tgz'
Content type 'application/x-gzip' length 359282 bytes (350 KB)
==================================================
downloaded 350 KB
trying URL
'https://cran.rstudio.com/bin/macosx/contrib/4.1/geonames_0.999.tgz'
Content type 'application/x-gzip' length 63398 bytes (61 KB)
==================================================
downloaded 61 KB
trying URL
'https://cran.rstudio.com/bin/macosx/contrib/4.1/isdparser_0.4.0.tgz'
Content type 'application/x-gzip' length 775504 bytes (757 KB)
==================================================
downloaded 757 KB
trying URL
'https://cran.rstudio.com/bin/macosx/contrib/4.1/XML_3.99-0.8.tgz'
Content type 'application/x-gzip' length 3742478 bytes (3.6 MB)
==================================================
downloaded 3.6 MB
trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.1/crul_1.2.0.tgz'
Content type 'application/x-gzip' length 639567 bytes (624 KB)
==================================================
downloaded 624 KB
The downloaded binary packages are in
/var/folders/jb/p65bzs357js0yj2vw80nz9rc0000gn/T//RtmpjbcT0U/downloaded_packages
✓ checking for file
‘/private/var/folders/jb/p65bzs357js0yj2vw80nz9rc0000gn/T/RtmpjbcT0U/remotes1064511d10a5/ropensci-rnoaa-7a3c3c4/DESCRIPTION’
(368ms)
─ preparing ‘rnoaa’: (505ms)
✓ checking DESCRIPTION meta-information ...
─ checking for LF line-endings in source and make files and shell scripts
─ checking for empty or unneeded directories
Removed empty directory ‘rnoaa/vignettes’
─ building ‘rnoaa_1.3.8.tar.gz’
* installing *source* package ‘rnoaa’ ...
** using staged installation
** R
** data
*** moving datasets to lazyload DB
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
*** copying figures
** building package indices
** testing if installed package can be loaded from temporary location
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation
path
* DONE (rnoaa)
library(rnoaa)
…On 11/28/21 7:00 AM, Daniel J. Hocking wrote:
Thanks! What you ran is exactly what I was looking for. Interestingly
and unfortunately the solution doesn’t appear to work on R 3.6 (that’s
the namespace error).
Could you run those two lines on the Catalina system with R version >=
4.0?
Sent from a handheld device.
> On Nov 28, 2021, at 12:36 AM, kjschaudt ***@***.***> wrote:
>
>
> Not sure if I understand what you mean by "outside of any test". I
> assume you meant for me not to make the library(testthat) or not call
> devtools::test("test-errst.R")
>
> Also not sure if I am correctly installing the file from github /
> running the tests you requested. Willing to learn if you can pass
> along specific commands.
>
> Here's my last attempt. starting from a clean Rstudio session in
> Mojave, here are the results.
>
> First, nothing was written in library/cache/r
>
>
> R version 3.6.3 (2020-02-29) -- "Holding the Windsock"
> Copyright (C) 2020 The R Foundation for Statistical Computing
> Platform: x86_64-apple-darwin15.6.0 (64-bit)
>
> R is free software and comes with ABSOLUTELY NO WARRANTY.
> You are welcome to redistribute it under certain conditions.
> Type 'license()' or 'licence()' for distribution details.
>
> Natural language support but running in an English locale
>
> R is a collaborative project with many contributors.
> Type 'contributors()' for more information and
> 'citation()' on how to cite R or R packages in publications.
>
> Type 'demo()' for some demos, 'help()' for on-line help, or
> 'help.start()' for an HTML browser interface to help.
> Type 'q()' to quit R.
>
> >library(githubinstall)
> > library(devtools)
> Loading required package: usethis
> > install_github("https://github.com/ropensci/rnoaa")
> Downloading GitHub repo ***@***.***
> ✓ checking for file
>
‘/private/var/folders/jb/p65bzs357js0yj2vw80nz9rc0000gn/T/Rtmp1z4uZ7/remotes13d11bf00dd1/ropensci-rnoaa-7a3c3c4/DESCRIPTION’
> ...
> ─ preparing ‘rnoaa’: (581ms)
> ✓ checking DESCRIPTION meta-information ...
> ─ checking for LF line-endings in source and make files and shell
scripts
> ─ checking for empty or unneeded directories
> Removed empty directory ‘rnoaa/vignettes’
> ─ looking to see if a ‘data/datalist’ file should be added
> ─ building ‘rnoaa_1.3.8.tar.gz’
>
> * installing *source* package ‘rnoaa’ ...
> ** using staged installation
> ** R
> ** data
> *** moving datasets to lazyload DB
> ** inst
> ** byte-compile and prepare package for lazy loading
> ** help
> *** installing help indices
> *** copying figures
> ** building package indices
> ** testing if installed package can be loaded from temporary location
> ** testing if installed package can be loaded from final location
> ** testing if installed package keeps a record of temporary
installation
> path
> * DONE (rnoaa)
> > library(rnoaa)
> Registered S3 method overwritten by 'hoardr':
> method from
> print.cache_info httr
>
> > tools::R_user_dir("rnoaa")
> Error: 'R_user_dir' is not an exported object from 'namespace:tools'
>
> > tools::R_user_dir("rnoaa", which = "cache")
> Error: 'R_user_dir' is not an exported object from 'namespace:tools'
> >
>
>
>
>
> On 11/27/21 8:31 PM, Daniel J. Hocking wrote:
> >
> > Hmm, interesting. What about just these two lines outside of any test
> > on Catalina?
> >
> > tools::R_user_dir("rnoaa")
> > tools::R_user_dir("rnoaa",which = "cache")
> >
> > —
> > You are receiving this because you were mentioned.
> > Reply to this email directly, view it on GitHub
> >
<#403 (comment)>,
> > or unsubscribe
> >
<https://github.com/notifications/unsubscribe-auth/AFBHLFO44KH3DBWK6GBRHJLUOGH7PANCNFSM5HVZQ7XQ>.
> > Triage notifications on the go with GitHub Mobile for iOS
> >
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
> > or Android
> >
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
> >
> >
> —
> You are receiving this because you modified the open/close state.
> Reply to this email directly, view it on GitHub, or unsubscribe.
> Triage notifications on the go with GitHub Mobile for iOS or Android.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#403 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFBHLFOEAXCEBVAJM773ARLUOIRWDANCNFSM5HVZQ7XQ>.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
One more test log from Catalina follows. Although the default is to
put the user files on the boot drive, I normally have my user files/
desktop / library on an alternate drive. On this Catalina test, I used
the default.
Results from the two requested tools calls follows here and is included
below in sequence in the log.
tools::R_user_dir("rnoaa")
[1] "/Users/schaudt/Library/Application Support/org.R-project.R/R/rnoaa"
tools::R_user_dir("rnoaa", which = "cache")
[1] "/Users/schaudt/Library/Caches/org.R-project.R/R/rnoaa"
I was again unable to use testhat or devtools::test() to run your test
code. *WOULD BE PLEASED TO LEARN HOW TO DO THAT.* Therefore, I pasted
the into my RStudio session and executed it. Results are in the log below.
None of the runs wrote anything to ~/library/cache/R
On 11/28/21 7:00 AM, Daniel J. Hocking wrote:
Thanks! What you ran is exactly what I was looking for. Interestingly
and unfortunately the solution doesn’t appear to work on R 3.6 (that’s
the namespace error).
Could you run those two lines on the Catalina system with R version >=
4.0?
R version 4.1.2 (2021-11-01) -- "Bird Hippie"
Copyright (C) 2021 The R Foundation for Statistical Computing
Platform: x86_64-apple-darwin17.0 (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
Natural language support but running in an English locale
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
install.packages("githubinstall")
trying URL
'https://cran.rstudio.com/bin/macosx/contrib/4.1/githubinstall_0.2.2.tgz'
Content type 'application/x-gzip' length 63322 bytes (61 KB)
==================================================
downloaded 61 KB
The downloaded binary packages are in
/var/folders/jb/p65bzs357js0yj2vw80nz9rc0000gn/T//Rtmpsi85qr/downloaded_packages
install.packages("githubinstall")
trying URL
'https://cran.rstudio.com/bin/macosx/contrib/4.1/githubinstall_0.2.2.tgz'
Content type 'application/x-gzip' length 63322 bytes (61 KB)
==================================================
downloaded 61 KB
The downloaded binary packages are in
/var/folders/jb/p65bzs357js0yj2vw80nz9rc0000gn/T//Rtmpsi85qr/downloaded_packages
library(githubinstall)
install.packages("testthat")
Error in install.packages : Updating loaded packages
Restarting R session...
install.packages("testthat")
trying URL
'https://cran.rstudio.com/bin/macosx/contrib/4.1/testthat_3.1.0.tgz'
Content type 'application/x-gzip' length 2949801 bytes (2.8 MB)
==================================================
downloaded 2.8 MB
The downloaded binary packages are in
/var/folders/jb/p65bzs357js0yj2vw80nz9rc0000gn/T//RtmpCluA6k/downloaded_packages
library(testthat)
install.packages("devtools")
trying URL
'https://cran.rstudio.com/bin/macosx/contrib/4.1/devtools_2.4.2.tgz'
Content type 'application/x-gzip' length 393913 bytes (384 KB)
==================================================
downloaded 384 KB
The downloaded binary packages are in
/var/folders/jb/p65bzs357js0yj2vw80nz9rc0000gn/T//RtmpCluA6k/downloaded_packages
library(devtools)
Loading required package: usethis
Attaching package: ‘devtools’
The following object is masked from ‘package:testthat’:
test_file
install_github("https://github.com/ropensci/rnoaa")
Skipping install of 'rnoaa' from a github remote, the SHA1 (7a3c3c4)
has not changed since last install.
Use `force = TRUE` to force installation
tools::R_user_dir("rnoaa")
[1] "/Users/schaudt/Library/Application Support/org.R-project.R/R/rnoaa"
tools::R_user_dir("rnoaa", which = "cache")
[1] "/Users/schaudt/Library/Caches/org.R-project.R/R/rnoaa"
getwd()
[1] "/Users/schaudt"
setwd("/Volumes/SG8GB/Users/schaudt/R_Projects")
getwd()
[1] "/Volumes/SG8GB/Users/schaudt/R_Projects"
devtools::test(file="test-ersst.R")
Error: Could not find package root. Is your working directory inside a
package?
devtools::test()
Error: Could not find package root. Is your working directory inside a
package?
test()
Error: Could not find package root. Is your working directory inside a
package?
context("ersst")
# delete any cached files
ersst_dir <- tools::R_user_dir("rnoaa/ersst", which = "cache")
unlink(list.files(ersst_dir, full.names = TRUE))
test_that("errst works with valid character and numeric input", {
+ skip_on_cran()
+ skip_if_government_down()
+ vcr::use_cassette("ersst1", {
+ expect_is(ersst(year = 2016, month = 06), "ncdf4")
+ })
+ vcr::use_cassette("ersst2", {
+ expect_is(ersst(year = 2016, month = 7), "ncdf4")
+ })
+ vcr::use_cassette("ersst3", {
+ expect_is(ersst(year = "2016", month = 8), "ncdf4")
+ })
+ vcr::use_cassette("ersst4", {
+ expect_is(ersst(year = "2016", month = "09"), "ncdf4")
+ })
+ })
── Error (Line 3): errst works with valid character and numeric input
─────────────────────
Error in `skip_if_government_down()`: could not find function
"skip_if_government_down"
Error: Test failed
test_that("errst fails well", {
+ skip_on_cran()
+ expect_error(ersst(year = 2016), "argument \"month\" is missing")
+ expect_error(ersst(month = 10), "argument \"year\" is missing")
+ expect_error(ersst(year = 1853, month = 10), "year must be > 1853")
+ expect_error(ersst(year = 2015, month = 100),
+ "month must be a length 1 or 2 month value")
+ expect_error(ersst(year = 2015, month = 13),
+ "month must be a number between 1 and 12")
+ })
── Failure (Line 3): errst fails well
──────────────────────────────────────────
`ersst(year = 2016)` threw an error with unexpected message.
Expected match: "argument \"month\" is missing"
Actual message: "could not find function \"ersst\""
Backtrace:
1. testthat::expect_error(ersst(year = 2016), "argument \"month\" is
missing")
2. testthat:::quasi_capture(...)
5. rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
── Failure (Line 4): errst fails well
──────────────────────────────────────────
`ersst(month = 10)` threw an error with unexpected message.
Expected match: "argument \"year\" is missing"
Actual message: "could not find function \"ersst\""
Backtrace:
1. testthat::expect_error(ersst(month = 10), "argument \"year\" is
missing")
2. testthat:::quasi_capture(...)
5. rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
── Failure (Line 5): errst fails well
──────────────────────────────────────────
`ersst(year = 1853, month = 10)` threw an error with unexpected message.
Expected match: "year must be > 1853"
Actual message: "could not find function \"ersst\""
Backtrace:
1. testthat::expect_error(ersst(year = 1853, month = 10), "year must
be > 1853")
2. testthat:::quasi_capture(...)
5. rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
── Failure (Line 6): errst fails well
──────────────────────────────────────────
`ersst(year = 2015, month = 100)` threw an error with unexpected message.
Expected match: "month must be a length 1 or 2 month value"
Actual message: "could not find function \"ersst\""
Backtrace:
1. testthat::expect_error(ersst(year = 2015, month = 100), "month must
be a length 1 or 2 month value")
2. testthat:::quasi_capture(...)
5. rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
── Failure (Line 8): errst fails well
──────────────────────────────────────────
`ersst(year = 2015, month = 13)` threw an error with unexpected message.
Expected match: "month must be a number between 1 and 12"
Actual message: "could not find function \"ersst\""
Backtrace:
1. testthat::expect_error(ersst(year = 2015, month = 13), "month must
be a number between 1 and 12")
2. testthat:::quasi_capture(...)
5. rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
Error: Test failed
# delete any cached files
ersst_dir <- tools::R_user_dir("rnoaa/ersst", which = "cache")
unlink(list.files(ersst_dir, full.names = TRUE))
test_that("errst works with valid character and numeric input", {
+ skip_on_cran()
+ skip_if_government_down()
+ vcr::use_cassette("ersst1", {
+ expect_is(ersst(year = 2016, month = 06), "ncdf4")
+ })
+ vcr::use_cassette("ersst2", {
+ expect_is(ersst(year = 2016, month = 7), "ncdf4")
+ })
+ vcr::use_cassette("ersst3", {
+ expect_is(ersst(year = "2016", month = 8), "ncdf4")
+ })
+ vcr::use_cassette("ersst4", {
+ expect_is(ersst(year = "2016", month = "09"), "ncdf4")
+ })
+ })
── Error (Line 3): errst works with valid character and numeric input
─────────────────────
Error in `skip_if_government_down()`: could not find function
"skip_if_government_down"
Error: Test failed
test_that("errst fails well", {
+ skip_on_cran()
+ expect_error(ersst(year = 2016), "argument \"month\" is missing")
+ expect_error(ersst(month = 10), "argument \"year\" is missing")
+ expect_error(ersst(year = 1853, month = 10), "year must be > 1853")
+ expect_error(ersst(year = 2015, month = 100),
+ "month must be a length 1 or 2 month value")
+ expect_error(ersst(year = 2015, month = 13),
+ "month must be a number between 1 and 12")
+ })
── Failure (Line 3): errst fails well
──────────────────────────────────────────
`ersst(year = 2016)` threw an error with unexpected message.
Expected match: "argument \"month\" is missing"
Actual message: "could not find function \"ersst\""
Backtrace:
1. testthat::expect_error(ersst(year = 2016), "argument \"month\" is
missing")
2. testthat:::quasi_capture(...)
5. rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
── Failure (Line 4): errst fails well
──────────────────────────────────────────
`ersst(month = 10)` threw an error with unexpected message.
Expected match: "argument \"year\" is missing"
Actual message: "could not find function \"ersst\""
Backtrace:
1. testthat::expect_error(ersst(month = 10), "argument \"year\" is
missing")
2. testthat:::quasi_capture(...)
5. rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
── Failure (Line 5): errst fails well
──────────────────────────────────────────
`ersst(year = 1853, month = 10)` threw an error with unexpected message.
Expected match: "year must be > 1853"
Actual message: "could not find function \"ersst\""
Backtrace:
1. testthat::expect_error(ersst(year = 1853, month = 10), "year must
be > 1853")
2. testthat:::quasi_capture(...)
5. rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
── Failure (Line 6): errst fails well
──────────────────────────────────────────
`ersst(year = 2015, month = 100)` threw an error with unexpected message.
Expected match: "month must be a length 1 or 2 month value"
Actual message: "could not find function \"ersst\""
Backtrace:
1. testthat::expect_error(ersst(year = 2015, month = 100), "month must
be a length 1 or 2 month value")
2. testthat:::quasi_capture(...)
5. rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
── Failure (Line 8): errst fails well
──────────────────────────────────────────
`ersst(year = 2015, month = 13)` threw an error with unexpected message.
Expected match: "month must be a number between 1 and 12"
Actual message: "could not find function \"ersst\""
Backtrace:
1. testthat::expect_error(ersst(year = 2015, month = 13), "month must
be a number between 1 and 12")
2. testthat:::quasi_capture(...)
5. rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
Error: Test failed
|
Thanks for stepping through all this with me. It looks like this solution should work although I think it might require R >= 4.0 for tools >= 4.0 based on the output. I'm going to finish the CRAN checks and do the release. As such, I'm going to close this issue. @kjschaudt wrt:
I think for devtools and testthat to really function as expected, you want to be using RStudio and be in a project and working directory of the package source code. To do this for rnoaa for example, you would
|
Thanks for explaining the steps. Followed them and quickly was able to
complete the tests after remembering to install testthat.
Since I am now running jobs that require Mojave, my initial test ran R
v3.6.3 from RStudio 1.2.5033. The tests generated the following
directory and files in ~/Library/Caches/R'',
Will repeat the tests for Catalina / R 4.x when I reboot.
Test log follows
R version 3.6.3 (2020-02-29) -- "Holding the Windsock"
Copyright (C) 2020 The R Foundation for Statistical Computing
Platform: x86_64-apple-darwin15.6.0 (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
Natural language support but running in an English locale
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
devtools::test()
ℹ Loading rnoaa
Registered S3 method overwritten by 'httr':
method from
print.cache_info hoardr
ℹ Testing rnoaa
✓ | F W S OK | Context
✓ | 27 | arc2 [5.0s]
✓ | 21 | buoy [43.6s]
✓ | 1 | check_response_swdi
x | 3 0 | check_response [1.1s]
───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Failure (test-check_response.r:13:3): check_response works correctly on
bad response content-type
`ncdc(...)` threw an error with unexpected message.
Expected match: "wrong response type, open an issue"
Actual message: "need an API key for NOAA data"
Backtrace:
1. testthat::expect_error(...) test-check_response.r:13:2
6. rnoaa::ncdc(...)
7. rnoaa::check_key(token)
/Volumes/SG8GB/Users/schaudt/R_Projects/rnoaa/R/ncdc.r:191:2
8. base::getOption("noaakey", stop("need an API key for NOAA data"))
/Volumes/SG8GB/Users/schaudt/R_Projects/rnoaa/R/zzz.r:212:2
Error (test-check_response.r:23:3): check_response returns an error
Error in `getOption("noaakey", stop("need an API key for NOAA data"))`:
need an API key for NOAA data
Backtrace:
1. testthat::expect_warning(...) test-check_response.r:23:2
6. rnoaa::ncdc_locs_cats(startdate = "2100-01-01")
7. rnoaa::check_key(token)
/Volumes/SG8GB/Users/schaudt/R_Projects/rnoaa/R/ncdc_locs_cats.r:38:2
8. base::getOption("noaakey", stop("need an API key for NOAA data"))
/Volumes/SG8GB/Users/schaudt/R_Projects/rnoaa/R/zzz.r:212:2
Error (test-check_response.r:40:3): check_response returns the correct
error messages
Error in `getOption("noaakey", stop("need an API key for NOAA data"))`:
need an API key for NOAA data
Backtrace:
1. testthat::expect_warning(...) test-check_response.r:40:2
6. rnoaa::ncdc_locs_cats(startdate = "2100-01-01")
7. rnoaa::check_key(token)
/Volumes/SG8GB/Users/schaudt/R_Projects/rnoaa/R/ncdc_locs_cats.r:38:2
8. base::getOption("noaakey", stop("need an API key for NOAA data"))
/Volumes/SG8GB/Users/schaudt/R_Projects/rnoaa/R/zzz.r:212:2
───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
✓ | 12 | coops [1.2s]
✓ | 31 | cpc_prcp [0.8s]
✓ | 8 | defunct
x | 1 0 | ersst
───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Error (test-ersst.R:4:1): (code run outside of `test_that()`)
Error: 'R_user_dir' is not an exported object from 'namespace:tools'
Backtrace:
1. tools::R_user_dir test-ersst.R:4:0
2. base::getExportedValue(pkg, name)
───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
✓ | 11 | ghcnd_splitvars [3.1s]
✓ | 50 | ghcnd [18.0s]
✓ | 16 | homr [35.7s]
✓ | 8 | isd_read [6.4s]
✓ | 45 | isd_stations [1.5s]
✓ | 5 | isd [14.0s]
✓ | 14 | lcd [3.0s]
✓ | 10 | meteo [16.3s]
x | 2 0 | ncdc_datacats [0.1s]
───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Error (test-ncdc_datacats.r:6:3): ncdc_datacats returns the correct ...
Error in `getOption("noaakey", stop("need an API key for NOAA data"))`:
need an API key for NOAA data
Backtrace:
1. vcr::use_cassette(...) test-ncdc_datacats.r:6:2
3. rnoaa::ncdc_datacats() test-ncdc_datacats.r:7:4
4. rnoaa::check_key(token)
/Volumes/SG8GB/Users/schaudt/R_Projects/rnoaa/R/ncdc_datacats.r:46:2
5. base::getOption("noaakey", stop("need an API key for NOAA data"))
/Volumes/SG8GB/Users/schaudt/R_Projects/rnoaa/R/zzz.r:212:2
Failure (test-ncdc_datacats.r:36:3): ncdc_datacats fails well
`ncdc_datacats(datacategoryid = "ANNAGR")` threw an error with
unexpected message.
Expected match: "lexical error"
Actual message: "need an API key for NOAA data"
Backtrace:
1. testthat::expect_error(...) test-ncdc_datacats.r:36:2
6. rnoaa::ncdc_datacats(datacategoryid = "ANNAGR")
7. rnoaa::check_key(token)
/Volumes/SG8GB/Users/schaudt/R_Projects/rnoaa/R/ncdc_datacats.r:46:2
8. base::getOption("noaakey", stop("need an API key for NOAA data"))
/Volumes/SG8GB/Users/schaudt/R_Projects/rnoaa/R/zzz.r:212:2
───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
x | 2 0 | ncdc_datasets [0.2s]
───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Error (test-ncdc_datasets.r:6:3): ncdc_datasets returns the correct class
Error in `getOption("noaakey", stop("need an API key for NOAA data"))`:
need an API key for NOAA data
Backtrace:
1. vcr::use_cassette(...) test-ncdc_datasets.r:6:2
3. rnoaa::ncdc_datasets() test-ncdc_datasets.r:7:4
4. rnoaa::check_key(token)
/Volumes/SG8GB/Users/schaudt/R_Projects/rnoaa/R/ncdc_datasets.r:50:2
5. base::getOption("noaakey", stop("need an API key for NOAA data"))
/Volumes/SG8GB/Users/schaudt/R_Projects/rnoaa/R/zzz.r:212:2
Failure (test-ncdc_datasets.r:36:3): ncdc_datasets fails well
`ncdc_datasets(datasetid = "ANNUAL")` threw an error with unexpected
message.
Expected match: "lexical error"
Actual message: "need an API key for NOAA data"
Backtrace:
1. testthat::expect_error(ncdc_datasets(datasetid = "ANNUAL"),
"lexical error") test-ncdc_datasets.r:36:2
6. rnoaa::ncdc_datasets(datasetid = "ANNUAL")
7. rnoaa::check_key(token)
/Volumes/SG8GB/Users/schaudt/R_Projects/rnoaa/R/ncdc_datasets.r:50:2
8. base::getOption("noaakey", stop("need an API key for NOAA data"))
/Volumes/SG8GB/Users/schaudt/R_Projects/rnoaa/R/zzz.r:212:2
───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
x | 2 0 | ncdc_datatypes [0.1s]
───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Error (test-ncdc_datatypes.r:6:3): ncdc_datatypes returns the correct class
Error in `getOption("noaakey", stop("need an API key for NOAA data"))`:
need an API key for NOAA data
Backtrace:
1. vcr::use_cassette(...) test-ncdc_datatypes.r:6:2
3. rnoaa::ncdc_datatypes(datasetid = "ANNUAL") test-ncdc_datatypes.r:7:4
4. rnoaa::check_key(token)
/Volumes/SG8GB/Users/schaudt/R_Projects/rnoaa/R/ncdc_datatypes.r:54:2
5. base::getOption("noaakey", stop("need an API key for NOAA data"))
/Volumes/SG8GB/Users/schaudt/R_Projects/rnoaa/R/zzz.r:212:2
Failure (test-ncdc_datatypes.r:30:3): ncdc_datatypes fails well
`ncdc_datatypes(datasetid = "ANNUAL")` threw an error with unexpected
message.
Expected match: "lexical error"
Actual message: "need an API key for NOAA data"
Backtrace:
1. testthat::expect_error(...) test-ncdc_datatypes.r:30:2
6. rnoaa::ncdc_datatypes(datasetid = "ANNUAL")
7. rnoaa::check_key(token)
/Volumes/SG8GB/Users/schaudt/R_Projects/rnoaa/R/ncdc_datatypes.r:54:2
8. base::getOption("noaakey", stop("need an API key for NOAA data"))
/Volumes/SG8GB/Users/schaudt/R_Projects/rnoaa/R/zzz.r:212:2
───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Maximum number of failures exceeded; quitting at end of file.
Increase this number with (e.g.) `Sys.setenv('TESTTHAT_MAX_FAILS' = Inf)`
══ Results
════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
Duration: 150.5 s
[ FAIL 10 | WARN 0 | SKIP 0 | PASS 259 ]
══ Terminated early
═══════════════════════════════════════════════════════════════════════════════════════════════════════════════════
library(testhat)
Error in library(testhat) : there is no package called ‘testhat’
Restarting R session...
install.packages("testthat")
trying URL
'https://cran.rstudio.com/bin/macosx/el-capitan/contrib/3.6/testthat_3.1.0.tgz'
Content type 'application/x-gzip' length 2929156 bytes (2.8 MB)
==================================================
downloaded 2.8 MB
The downloaded binary packages are in
/var/folders/jb/p65bzs357js0yj2vw80nz9rc0000gn/T//RtmpRktCFt/downloaded_packages
devtools::test()
ℹ Loading rnoaa
Registered S3 method overwritten by 'httr':
method from
print.cache_info hoardr
ℹ Testing rnoaa
✓ | F W S OK | Context
✓ | 27 | arc2 [4.8s]
✓ | 21 | buoy [42.6s]
✓ | 1 | check_response_swdi
x | 3 0 | check_response [1.3s]
───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Failure (test-check_response.r:13:3): check_response works correctly on
bad response content-type
`ncdc(...)` threw an error with unexpected message.
Expected match: "wrong response type, open an issue"
Actual message: "need an API key for NOAA data"
Backtrace:
1. testthat::expect_error(...) test-check_response.r:13:2
6. rnoaa::ncdc(...)
7. rnoaa::check_key(token)
/Volumes/SG8GB/Users/schaudt/R_Projects/rnoaa/R/ncdc.r:191:2
8. base::getOption("noaakey", stop("need an API key for NOAA data"))
/Volumes/SG8GB/Users/schaudt/R_Projects/rnoaa/R/zzz.r:212:2
Error (test-check_response.r:23:3): check_response returns an error
Error in `getOption("noaakey", stop("need an API key for NOAA data"))`:
need an API key for NOAA data
Backtrace:
1. testthat::expect_warning(...) test-check_response.r:23:2
6. rnoaa::ncdc_locs_cats(startdate = "2100-01-01")
7. rnoaa::check_key(token)
/Volumes/SG8GB/Users/schaudt/R_Projects/rnoaa/R/ncdc_locs_cats.r:38:2
8. base::getOption("noaakey", stop("need an API key for NOAA data"))
/Volumes/SG8GB/Users/schaudt/R_Projects/rnoaa/R/zzz.r:212:2
Error (test-check_response.r:40:3): check_response returns the correct
error messages
Error in `getOption("noaakey", stop("need an API key for NOAA data"))`:
need an API key for NOAA data
Backtrace:
1. testthat::expect_warning(...) test-check_response.r:40:2
6. rnoaa::ncdc_locs_cats(startdate = "2100-01-01")
7. rnoaa::check_key(token)
/Volumes/SG8GB/Users/schaudt/R_Projects/rnoaa/R/ncdc_locs_cats.r:38:2
8. base::getOption("noaakey", stop("need an API key for NOAA data"))
/Volumes/SG8GB/Users/schaudt/R_Projects/rnoaa/R/zzz.r:212:2
───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
✓ | 12 | coops [1.2s]
✓ | 31 | cpc_prcp [0.8s]
✓ | 8 | defunct
x | 1 0 | ersst
───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Error (test-ersst.R:4:1): (code run outside of `test_that()`)
Error: 'R_user_dir' is not an exported object from 'namespace:tools'
Backtrace:
1. tools::R_user_dir test-ersst.R:4:0
2. base::getExportedValue(pkg, name)
───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
✓ | 11 | ghcnd_splitvars [1.0s]
✓ | 50 | ghcnd [6.1s]
✓ | 16 | homr [1.6s]
✓ | 8 | isd_read [5.9s]
✓ | 45 | isd_stations [0.4s]
✓ | 5 | isd [1.2s]
✓ | 14 | lcd [4.5s]
✓ | 10 | meteo [5.5s]
x | 2 0 | ncdc_datacats [0.2s]
───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Error (test-ncdc_datacats.r:6:3): ncdc_datacats returns the correct ...
Error in `getOption("noaakey", stop("need an API key for NOAA data"))`:
need an API key for NOAA data
Backtrace:
1. vcr::use_cassette(...) test-ncdc_datacats.r:6:2
3. rnoaa::ncdc_datacats() test-ncdc_datacats.r:7:4
4. rnoaa::check_key(token)
/Volumes/SG8GB/Users/schaudt/R_Projects/rnoaa/R/ncdc_datacats.r:46:2
5. base::getOption("noaakey", stop("need an API key for NOAA data"))
/Volumes/SG8GB/Users/schaudt/R_Projects/rnoaa/R/zzz.r:212:2
Failure (test-ncdc_datacats.r:36:3): ncdc_datacats fails well
`ncdc_datacats(datacategoryid = "ANNAGR")` threw an error with
unexpected message.
Expected match: "lexical error"
Actual message: "need an API key for NOAA data"
Backtrace:
1. testthat::expect_error(...) test-ncdc_datacats.r:36:2
6. rnoaa::ncdc_datacats(datacategoryid = "ANNAGR")
7. rnoaa::check_key(token)
/Volumes/SG8GB/Users/schaudt/R_Projects/rnoaa/R/ncdc_datacats.r:46:2
8. base::getOption("noaakey", stop("need an API key for NOAA data"))
/Volumes/SG8GB/Users/schaudt/R_Projects/rnoaa/R/zzz.r:212:2
───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
x | 2 0 | ncdc_datasets [0.2s]
───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Error (test-ncdc_datasets.r:6:3): ncdc_datasets returns the correct class
Error in `getOption("noaakey", stop("need an API key for NOAA data"))`:
need an API key for NOAA data
Backtrace:
1. vcr::use_cassette(...) test-ncdc_datasets.r:6:2
3. rnoaa::ncdc_datasets() test-ncdc_datasets.r:7:4
4. rnoaa::check_key(token)
/Volumes/SG8GB/Users/schaudt/R_Projects/rnoaa/R/ncdc_datasets.r:50:2
5. base::getOption("noaakey", stop("need an API key for NOAA data"))
/Volumes/SG8GB/Users/schaudt/R_Projects/rnoaa/R/zzz.r:212:2
Failure (test-ncdc_datasets.r:36:3): ncdc_datasets fails well
`ncdc_datasets(datasetid = "ANNUAL")` threw an error with unexpected
message.
Expected match: "lexical error"
Actual message: "need an API key for NOAA data"
Backtrace:
1. testthat::expect_error(ncdc_datasets(datasetid = "ANNUAL"),
"lexical error") test-ncdc_datasets.r:36:2
6. rnoaa::ncdc_datasets(datasetid = "ANNUAL")
7. rnoaa::check_key(token)
/Volumes/SG8GB/Users/schaudt/R_Projects/rnoaa/R/ncdc_datasets.r:50:2
8. base::getOption("noaakey", stop("need an API key for NOAA data"))
/Volumes/SG8GB/Users/schaudt/R_Projects/rnoaa/R/zzz.r:212:2
───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
x | 2 0 | ncdc_datatypes [0.5s]
───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Error (test-ncdc_datatypes.r:6:3): ncdc_datatypes returns the correct class
Error in `getOption("noaakey", stop("need an API key for NOAA data"))`:
need an API key for NOAA data
Backtrace:
1. vcr::use_cassette(...) test-ncdc_datatypes.r:6:2
3. rnoaa::ncdc_datatypes(datasetid = "ANNUAL") test-ncdc_datatypes.r:7:4
4. rnoaa::check_key(token)
/Volumes/SG8GB/Users/schaudt/R_Projects/rnoaa/R/ncdc_datatypes.r:54:2
5. base::getOption("noaakey", stop("need an API key for NOAA data"))
/Volumes/SG8GB/Users/schaudt/R_Projects/rnoaa/R/zzz.r:212:2
Failure (test-ncdc_datatypes.r:30:3): ncdc_datatypes fails well
`ncdc_datatypes(datasetid = "ANNUAL")` threw an error with unexpected
message.
Expected match: "lexical error"
Actual message: "need an API key for NOAA data"
Backtrace:
1. testthat::expect_error(...) test-ncdc_datatypes.r:30:2
6. rnoaa::ncdc_datatypes(datasetid = "ANNUAL")
7. rnoaa::check_key(token)
/Volumes/SG8GB/Users/schaudt/R_Projects/rnoaa/R/ncdc_datatypes.r:54:2
8. base::getOption("noaakey", stop("need an API key for NOAA data"))
/Volumes/SG8GB/Users/schaudt/R_Projects/rnoaa/R/zzz.r:212:2
───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Maximum number of failures exceeded; quitting at end of file.
Increase this number with (e.g.) `Sys.setenv('TESTTHAT_MAX_FAILS' = Inf)`
══ Results
════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
Duration: 77.9 s
[ FAIL 10 | WARN 0 | SKIP 0 | PASS 259 ]
══ Terminated earl
|
Daniel,
Here is a run with Catalina, RStudio and R v4.x. The text files have
the run log. the PNG shows the items wrote to Library/cache/R
Thanks for the instructions on setting up a test run.
R version 4.1.2 (2021-11-01) -- "Bird Hippie"
Copyright (C) 2021 The R Foundation for Statistical Computing
Platform: x86_64-apple-darwin17.0 (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
Natural language support but running in an English locale
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
geetwd()
Error in geetwd() : could not find function "geetwd"
getwd()
[1] "/Volumes/SG8GB/Users/schaudt/R_Projects/rnoaa"
devtools::test()
ℹ Loading rnoaa
Registered S3 method overwritten by 'httr':
method from
print.cache_info hoardr
ℹ Testing rnoaa
✓ | F W S OK | Context
✓ | 27 | arc2 [5.6s]
✓ | 21 | buoy [41.9s]
✓ | 1 | check_response_swdi
x | 3 0 | check_response [1.2s]
─────────────────────────────────────────────────────────────────────────────────
Failure (test-check_response.r:13:3): check_response works correctly on bad response content-type
`ncdc(...)` threw an error with unexpected message.
Expected match: "wrong response type, open an issue"
Actual message: "need an API key for NOAA data"
Backtrace:
1. testthat::expect_error(...) test-check_response.r:13:2
6. rnoaa::ncdc(...)
7. rnoaa::check_key(token) /Volumes/SG8GB/Users/schaudt/R_Projects/rnoaa/R/ncdc.r:191:2
8. base::getOption("noaakey", stop("need an API key for NOAA data")) /Volumes/SG8GB/Users/schaudt/R_Projects/rnoaa/R/zzz.r:212:2
Error (test-check_response.r:23:3): check_response returns an error
Error in `getOption("noaakey", stop("need an API key for NOAA data"))`: need an API key for NOAA data
Backtrace:
1. testthat::expect_warning(...) test-check_response.r:23:2
6. rnoaa::ncdc_locs_cats(startdate = "2100-01-01")
7. rnoaa::check_key(token) /Volumes/SG8GB/Users/schaudt/R_Projects/rnoaa/R/ncdc_locs_cats.r:38:2
8. base::getOption("noaakey", stop("need an API key for NOAA data")) /Volumes/SG8GB/Users/schaudt/R_Projects/rnoaa/R/zzz.r:212:2
Error (test-check_response.r:40:3): check_response returns the correct error messages
Error in `getOption("noaakey", stop("need an API key for NOAA data"))`: need an API key for NOAA data
Backtrace:
1. testthat::expect_warning(...) test-check_response.r:40:2
6. rnoaa::ncdc_locs_cats(startdate = "2100-01-01")
7. rnoaa::check_key(token) /Volumes/SG8GB/Users/schaudt/R_Projects/rnoaa/R/ncdc_locs_cats.r:38:2
8. base::getOption("noaakey", stop("need an API key for NOAA data")) /Volumes/SG8GB/Users/schaudt/R_Projects/rnoaa/R/zzz.r:212:2
─────────────────────────────────────────────────────────────────────────────────
✓ | 12 | coops [1.5s]
✓ | 31 | cpc_prcp [0.9s]
✓ | 8 | defunct
✓ | 9 | ersst [1.5s]
✓ | 11 | ghcnd_splitvars [3.1s]
✓ | 50 | ghcnd [18.1s]
✓ | 16 | homr [1.7s]
✓ | 8 | isd_read [7.6s]
✓ | 45 | isd_stations [1.7s]
✓ | 5 | isd [17.6s]
✓ | 14 | lcd [3.3s]
✓ | 10 | meteo [16.5s]
x | 2 0 | ncdc_datacats [0.6s]
─────────────────────────────────────────────────────────────────────────────────
Error (test-ncdc_datacats.r:6:3): ncdc_datacats returns the correct ...
Error in `getOption("noaakey", stop("need an API key for NOAA data"))`: need an API key for NOAA data
Backtrace:
1. vcr::use_cassette(...) test-ncdc_datacats.r:6:2
3. rnoaa::ncdc_datacats() test-ncdc_datacats.r:7:4
4. rnoaa::check_key(token) /Volumes/SG8GB/Users/schaudt/R_Projects/rnoaa/R/ncdc_datacats.r:46:2
5. base::getOption("noaakey", stop("need an API key for NOAA data")) /Volumes/SG8GB/Users/schaudt/R_Projects/rnoaa/R/zzz.r:212:2
Failure (test-ncdc_datacats.r:36:3): ncdc_datacats fails well
`ncdc_datacats(datacategoryid = "ANNAGR")` threw an error with unexpected message.
Expected match: "lexical error"
Actual message: "need an API key for NOAA data"
Backtrace:
1. testthat::expect_error(...) test-ncdc_datacats.r:36:2
6. rnoaa::ncdc_datacats(datacategoryid = "ANNAGR")
7. rnoaa::check_key(token) /Volumes/SG8GB/Users/schaudt/R_Projects/rnoaa/R/ncdc_datacats.r:46:2
8. base::getOption("noaakey", stop("need an API key for NOAA data")) /Volumes/SG8GB/Users/schaudt/R_Projects/rnoaa/R/zzz.r:212:2
─────────────────────────────────────────────────────────────────────────────────
x | 2 0 | ncdc_datasets [0.2s]
─────────────────────────────────────────────────────────────────────────────────
Error (test-ncdc_datasets.r:6:3): ncdc_datasets returns the correct class
Error in `getOption("noaakey", stop("need an API key for NOAA data"))`: need an API key for NOAA data
Backtrace:
1. vcr::use_cassette(...) test-ncdc_datasets.r:6:2
3. rnoaa::ncdc_datasets() test-ncdc_datasets.r:7:4
4. rnoaa::check_key(token) /Volumes/SG8GB/Users/schaudt/R_Projects/rnoaa/R/ncdc_datasets.r:50:2
5. base::getOption("noaakey", stop("need an API key for NOAA data")) /Volumes/SG8GB/Users/schaudt/R_Projects/rnoaa/R/zzz.r:212:2
Failure (test-ncdc_datasets.r:36:3): ncdc_datasets fails well
`ncdc_datasets(datasetid = "ANNUAL")` threw an error with unexpected message.
Expected match: "lexical error"
Actual message: "need an API key for NOAA data"
Backtrace:
1. testthat::expect_error(ncdc_datasets(datasetid = "ANNUAL"), "lexical error") test-ncdc_datasets.r:36:2
6. rnoaa::ncdc_datasets(datasetid = "ANNUAL")
7. rnoaa::check_key(token) /Volumes/SG8GB/Users/schaudt/R_Projects/rnoaa/R/ncdc_datasets.r:50:2
8. base::getOption("noaakey", stop("need an API key for NOAA data")) /Volumes/SG8GB/Users/schaudt/R_Projects/rnoaa/R/zzz.r:212:2
─────────────────────────────────────────────────────────────────────────────────
x | 2 0 | ncdc_datatypes [0.2s]
─────────────────────────────────────────────────────────────────────────────────
Error (test-ncdc_datatypes.r:6:3): ncdc_datatypes returns the correct class
Error in `getOption("noaakey", stop("need an API key for NOAA data"))`: need an API key for NOAA data
Backtrace:
1. vcr::use_cassette(...) test-ncdc_datatypes.r:6:2
3. rnoaa::ncdc_datatypes(datasetid = "ANNUAL") test-ncdc_datatypes.r:7:4
4. rnoaa::check_key(token) /Volumes/SG8GB/Users/schaudt/R_Projects/rnoaa/R/ncdc_datatypes.r:54:2
5. base::getOption("noaakey", stop("need an API key for NOAA data")) /Volumes/SG8GB/Users/schaudt/R_Projects/rnoaa/R/zzz.r:212:2
Failure (test-ncdc_datatypes.r:30:3): ncdc_datatypes fails well
`ncdc_datatypes(datasetid = "ANNUAL")` threw an error with unexpected message.
Expected match: "lexical error"
Actual message: "need an API key for NOAA data"
Backtrace:
1. testthat::expect_error(...) test-ncdc_datatypes.r:30:2
6. rnoaa::ncdc_datatypes(datasetid = "ANNUAL")
7. rnoaa::check_key(token) /Volumes/SG8GB/Users/schaudt/R_Projects/rnoaa/R/ncdc_datatypes.r:54:2
8. base::getOption("noaakey", stop("need an API key for NOAA data")) /Volumes/SG8GB/Users/schaudt/R_Projects/rnoaa/R/zzz.r:212:2
─────────────────────────────────────────────────────────────────────────────────
✓ | 1 0 | ncdc_legacy
─────────────────────────────────────────────────────────────────────────────────
Skip (test-ncdc_legacy.R:4:3): basic functionality works
Reason: Skipping ncdc_legacy for now
─────────────────────────────────────────────────────────────────────────────────
x | 2 0 | ncdc_locs_cats [0.1s]
─────────────────────────────────────────────────────────────────────────────────
Error (test-ncdc_locs_cats.r:6:3): ncdc_locs_cats returns the correct ...
Error in `getOption("noaakey", stop("need an API key for NOAA data"))`: need an API key for NOAA data
Backtrace:
1. vcr::use_cassette(...) test-ncdc_locs_cats.r:6:2
3. rnoaa::ncdc_locs_cats() test-ncdc_locs_cats.r:7:4
4. rnoaa::check_key(token) /Volumes/SG8GB/Users/schaudt/R_Projects/rnoaa/R/ncdc_locs_cats.r:38:2
5. base::getOption("noaakey", stop("need an API key for NOAA data")) /Volumes/SG8GB/Users/schaudt/R_Projects/rnoaa/R/zzz.r:212:2
Failure (test-ncdc_locs_cats.r:43:3): ncdc_locs fails well
`ncdc_locs_cats(startdate = "1970-01-01")` threw an error with unexpected message.
Expected match: "lexical error"
Actual message: "need an API key for NOAA data"
Backtrace:
1. testthat::expect_error(...) test-ncdc_locs_cats.r:43:2
6. rnoaa::ncdc_locs_cats(startdate = "1970-01-01")
7. rnoaa::check_key(token) /Volumes/SG8GB/Users/schaudt/R_Projects/rnoaa/R/ncdc_locs_cats.r:38:2
8. base::getOption("noaakey", stop("need an API key for NOAA data")) /Volumes/SG8GB/Users/schaudt/R_Projects/rnoaa/R/zzz.r:212:2
─────────────────────────────────────────────────────────────────────────────────
Maximum number of failures exceeded; quitting at end of file.
Increase this number with (e.g.) `Sys.setenv('TESTTHAT_MAX_FAILS' = Inf)`
══ Results ══════════════════════════════════════════════════════════════════════
Duration: 123.7 s
── Skipped tests ───────────────────────────────────────────────────────────────
• Skipping ncdc_legacy for now (1)
[ FAIL 11 | WARN 0 | SKIP 1 | PASS 268 ]
══ Terminated early ═════════════════════════════════════════════════════════════
… |
The CRAN policy only allows writing in file areas via
tools::R_user_dir() (which differ by OS). On macOS, ~/Library/Caches/R
is not one of those, yet we see there
drwxr-xr-x 5 ripley staff 160 8 Nov 23:35 ftdoi/
drwxr-xr-x 6 ripley staff 192 8 Nov 23:35 fulltext_storr/
drwxr-xr-x 2 ripley staff 64 8 Nov 06:54 noaa_ersst/
drwxr-xr-x 4 ripley staff 128 8 Nov 06:54 rdryad/
from
fulltext (also suppdata via fulltext)
ditto
rnoaa
mvSLOUCH via rdryad (which does not create this in its own checks).
respectively. NB: rappdirs does not comply with the policy.
This makes it much harder to sweep up after you.
These need to be corrected before 2021-11-23 to retain the package on CRAN.
The text was updated successfully, but these errors were encountered: