Bioconductor / GoogleGenomics

[DEPRECATED] An R package for Google Genomics API queries.
Apache License 2.0
44 stars 23 forks source link

getting started confusion #20

Closed cassiedoll closed 10 years ago

cassiedoll commented 10 years ago

I just tried to setup the new R code on my local system and ran into the following error after following the README's code block:

Error in authorizer(authorize_url, is_interactive) : 
  httpuv package required to capture OAuth credentials.

We should fix the readme instructions so that this doesn't happen.

pgrosu commented 10 years ago

Are you sure? I just ran my tests about an hour ago and didn't get that error or requirement. What steps did you perform to get that error? I wanted to check on my end.

Thx, ~p

cassiedoll commented 10 years ago

I installed a brand new version of R, copy and pasted this chunk of code from the readme:

  source("http://bioconductor.org/biocLite.R")
  biocLite()
  options(repos=biocinstallRepos())
  install.packages("devtools")
  devtools::install_github("googlegenomics/api-client-r")
  library(GoogleGenomics)

And then ran the authenticate line:

GoogleGenomics::authenticate(file="/Users/doll/googlegenomics/api-client-java/client_secrets.json")
Use a local file to cache OAuth access credentials between R sessions?
1: Yes
2: No

Selection: 2
Error in authorizer(authorize_url, is_interactive) : 
  httpuv package required to capture OAuth credentials.
cassiedoll commented 10 years ago

(Oh and install.packages("httpuv") fixes the issue for me - but I opened this issue to be sure that this was the right solution :)

siddharthab commented 10 years ago

It's because of this: https://github.com/googlegenomics/api-client-r/commit/ed61487645ddfc7c567a59b0cbaba84b3f4a2724#diff-35ba4a2677442e210c23a00a5601aba3L18

httpuv and jsonlite are needed by httr. httr expects users to install these packages if prompted.

cassiedoll commented 10 years ago

Ah so, maybe those 2 dependencies should come back to the package as they are actually required?

siddharthab commented 10 years ago

Yes. Doing right now.

pgrosu commented 10 years ago

Cassie - Yup.

Hey Sid, let me know when it's merged. I'm installing a fresh instance of R to test this.

siddharthab commented 10 years ago

See https://github.com/googlegenomics/api-client-r/commit/136abaf6a1f8335a8d49dfe421c21bc7da6dc766

cassiedoll commented 10 years ago

Thanks guys!

deflaux commented 10 years ago

@siddharthab sorry about that. Thanks for fixing my breakage!

siddharthab commented 10 years ago

My fault. I should have added comments explaining why they were there. So I tried to do that this time, BUT the file syntax does not allow for comments and so I broke Travis. Fixed now, but sorry could not help better.

pgrosu commented 10 years ago

Yup, now it works :)

Cassie - glad to help :) Sid - thanks for fixing it.

Regarding travis, maybe updating http://raw.github.com/craigcitro/r-travis/master/scripts/travis-tool.sh might help...

...
> devtools::install_github("googlegenomics/api-client-r")
WARNING: Rtools is required to build R packages, but is not currently installed.
...

trying URL 'http://cran.fhcrc.org/bin/windows/contrib/3.1/httpuv_1.3.2.zip'
Content type 'application/zip' length 869817 bytes (849 Kb)
opened URL
downloaded 849 Kb
...
package ‘httpuv’ successfully unpacked and MD5 sums checked
...
> GoogleGenomics::authenticate(file="client_secrets.json")
[1] "Configured OAuth token."
> 
pgrosu commented 10 years ago

Sorry updated my comment with the working version. Sid, all is good man :)