Skip to content

Conversation

@terrytangyuan
Copy link
Member

@terrytangyuan terrytangyuan commented Dec 9, 2018

  • Set up R package structure
  • Set up testing infrastructure and added a couple test utility functions

This is part of #6

@yongtang
Copy link
Member

Not familiar with R, though I am wondering if there is a command we could run to invoke the test?

@terrytangyuan
Copy link
Member Author

terrytangyuan commented Dec 10, 2018

@yongtang It's devtools::test("path_to_r_package"). I'll prepare a Docker image and write up some instructions in a follow-up PR.

@@ -0,0 +1,38 @@
Package: tfio
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wondering if for cosmetic reasons is it possible to change it to tensorflow-io to match python package?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

R package name cannot contain dashes. Also I was trying to be consistent with other existing R interfaces to TF components:

@yongtang
Copy link
Member

I tried to install devtools from the default r-base (with DockerHub's r-base (https://hub.docker.com/_/r-base/). After invoking install.packages("devtools", dependencies = TRUE), the dependency fails with:

ERROR: dependencies ‘curl’, ‘httr’, ‘rvest’, ‘xml2’ are not available for package ‘foghorn’
* removing ‘/usr/local/lib/R/site-library/foghorn’
ERROR: dependencies ‘httr’, ‘whoami’ are not available for package ‘rhub’
* removing ‘/usr/local/lib/R/site-library/rhub’
ERROR: dependency ‘xml2’ is not available for package ‘roxygen2’
* removing ‘/usr/local/lib/R/site-library/roxygen2’
ERROR: dependencies ‘git2r’, ‘httr’, ‘usethis’ are not available for package ‘devtools’
* removing ‘/usr/local/lib/R/site-library/devtools’
ERROR: dependencies ‘httr’, ‘openssl’, ‘roxygen2’, ‘rsconnect’, ‘xml2’ are not available for package ‘pkgdown’
* removing ‘/usr/local/lib/R/site-library/pkgdown’

is there any other ways of install devtools?

@terrytangyuan
Copy link
Member Author

@yongtang ERROR: dependencies ‘curl’, ‘httr’, ‘rvest’, ‘xml2’ are not available - this indicates that there are several system dependencies needed. Try installing these before installing devtools: sudo apt-get install build-essential libcurl4-gnutls-dev libxml2-dev libssl-dev.

@yongtang
Copy link
Member

Thanks! After installed devtools and testthat, thentensorflow, the devtools::test() worked from R interface.

Copy link
Member

@yongtang yongtang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@yongtang
Copy link
Member

It looks like Travis CI also support R. I will take to see if it is possible to invoke R test with Travis CI.

@yongtang yongtang merged commit 5173045 into tensorflow:master Dec 11, 2018
@terrytangyuan terrytangyuan deleted the r-pkg branch December 11, 2018 15:53
@terrytangyuan
Copy link
Member Author

Yes, Travis is very friendly with R. If you encounter any issues, let me know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants