Skip to content

Conversation

@wangyum
Copy link
Member

@wangyum wangyum commented Jun 12, 2017

What changes were proposed in this pull request?

Update Running R Tests dependence packages to:

R -e "install.packages(c('knitr', 'rmarkdown', 'testthat', 'e1071', 'survival'), repos='http://cran.us.r-project.org')"

How was this patch tested?

manual tests

@SparkQA
Copy link

SparkQA commented Jun 12, 2017

Test build #77907 has finished for PR 18271 at commit 5643ab9.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@wangyum wangyum changed the title [MINOR][DOCS] Improve docs to Running R Tests [MINOR][DOCS] Improve Running R Tests docs Jun 12, 2017

To run the SparkR tests you will need to install the R package `testthat`
(run `install.packages(testthat)` from R shell). You can run just the SparkR tests using
(run `install.packages("testthat")` from R shell). You can run just the SparkR tests using
Copy link
Member

@HyukjinKwon HyukjinKwon Jun 12, 2017

Choose a reason for hiding this comment

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

Mind updating this contents to be consistent with the unit test part -
https://github.com/apache/spark/blob/7e0cd1d9b168286386f15e9b55988733476ae2bb/R/README.md#examples-unit-tests if it sounds making sense to you?

This also looks including specifying the mirror from where to download the package.

@SparkQA
Copy link

SparkQA commented Jun 12, 2017

Test build #77911 has finished for PR 18271 at commit d715ae8.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@srowen
Copy link
Member

srowen commented Jun 12, 2017

From trying to run the tests last week, I think more packages are actually needed. The DESCRIPTION file names: knitr, rmarkdown, testthat, e1071, survival
Let's suggest installing all of those.

To run the SparkR tests you will need to install the R package `testthat`
(run `install.packages(testthat)` from R shell). You can run just the SparkR tests using
the command:
To run the SparkR tests you will need to install the [testthat](http://cran.r-project.org/web/packages/testthat/index.html) package first:
Copy link
Member

Choose a reason for hiding this comment

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

use https://cran.r-project.org/package=testthat instead

@felixcheung
Copy link
Member

@SparkQA
Copy link

SparkQA commented Jun 13, 2017

Test build #77977 has finished for PR 18271 at commit 926137b.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

R/README.md Outdated
./bin/spark-submit examples/src/main/r/dataframe.R
```
You can also run the unit tests for SparkR by running. You need to install the [testthat](http://cran.r-project.org/web/packages/testthat/index.html) package first:
You can also run the unit tests for SparkR by running. You need to install the [knitr](https://cran.r-project.org/package=knitr), [rmarkdown](https://cran.r-project.org/package=rmarkdown), [testthat](https://cran.r-project.org/package=testthat), [e1071](https://cran.r-project.org/package=e1071) and [survival](https://cran.r-project.org/package=survival) packages first:
Copy link
Member

Choose a reason for hiding this comment

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

Rather than duplicate this information, I wonder if you can just link to http://spark.apache.org/docs/latest/building-spark.html#running-r-tests here ?

@SparkQA
Copy link

SparkQA commented Jun 13, 2017

Test build #77995 has finished for PR 18271 at commit a2fd28a.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

R/README.md Outdated
R -e 'install.packages("testthat", repos="http://cran.us.r-project.org")'
./R/run-tests.sh
```
You can run the unit tests following [running-r-tests](http://spark.apache.org/docs/latest/building-spark.html#running-r-tests).
Copy link
Member

Choose a reason for hiding this comment

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

I think this will look funny; you want something like "You can run R unit tests by following the instructions under Running R Tests"

the command:
To run the SparkR tests you will need to install the [knitr](https://cran.r-project.org/package=knitr), [rmarkdown](https://cran.r-project.org/package=rmarkdown), [testthat](https://cran.r-project.org/package=testthat), [e1071](https://cran.r-project.org/package=e1071) and [survival](https://cran.r-project.org/package=survival) packages first:

R -e 'install.packages(c("knitr", "rmarkdown", "testthat", "e1071", "survival"), repos="http://cran.us.r-project.org")'
Copy link
Contributor

Choose a reason for hiding this comment

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

what about a more global mirror? (e.g. https://cloud.r-project.org/)

R -e 'install.packages("testthat", repos="http://cran.us.r-project.org")'
./R/run-tests.sh
```
You can run R unit tests by following the instructions under [Running R Tests](http://spark.apache.org/docs/latest/building-spark.html#running-r-tests).
Copy link
Member

Choose a reason for hiding this comment

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

@SparkQA
Copy link

SparkQA commented Jun 14, 2017

Test build #78013 has finished for PR 18271 at commit 0da2f5b.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@HyukjinKwon
Copy link
Member

For me, it looks good. I assume we consider #18271 (comment) but it looks fine as is too.

@SparkQA
Copy link

SparkQA commented Jun 14, 2017

Test build #78021 has finished for PR 18271 at commit 4bc320e.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

R/WINDOWS.md Outdated
4. Set the environment variable `HADOOP_HOME` to the full path to the newly created `hadoop` directory.

5. Run unit tests for SparkR by running the command below. You need to install the [testthat](http://cran.r-project.org/web/packages/testthat/index.html) package first:
5. Run unit tests for SparkR by running the command below. You need to install the [knitr](https://cran.r-project.org/package=knitr), [rmarkdown](https://cran.r-project.org/package=rmarkdown), [testthat](https://cran.r-project.org/package=testthat), [e1071](https://cran.r-project.org/package=e1071) and [survival](https://cran.r-project.org/package=survival) packages first:
Copy link
Member

Choose a reason for hiding this comment

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

OK, but again why duplicate this information? are there more locations this is repeated? we should just point to one location where these details are listed, to make sure they don't get out of sync

Copy link
Member Author

Choose a reason for hiding this comment

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

Windows is a little diffrence from Linux, so only link dependency package.
Linux:

R -e 'install.packages(c("knitr", "rmarkdown", "testthat", "e1071", "survival"), repos="http://cran.us.r-project.org")'

Windows:

R -e "install.packages(c('knitr', 'rmarkdown', 'testthat', 'e1071', 'survival'), repos='http://cran.us.r-project.org')"

@SparkQA
Copy link

SparkQA commented Jun 14, 2017

Test build #78048 has finished for PR 18271 at commit 75cf0d8.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@felixcheung
Copy link
Member

felixcheung commented Jun 14, 2017 via email

@SparkQA
Copy link

SparkQA commented Jun 15, 2017

Test build #78096 has finished for PR 18271 at commit ff6415f.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@wangyum
Copy link
Member Author

wangyum commented Jun 16, 2017

Removed the duplicating. It works both for Windows and linux:

R -e "install.packages(c('knitr', 'rmarkdown', 'testthat', 'e1071', 'survival'), repos='http://cran.us.r-project.org')"

@srowen
Copy link
Member

srowen commented Jun 16, 2017

Merged to master/2.2

asfgit pushed a commit that referenced this pull request Jun 16, 2017
## What changes were proposed in this pull request?

Update Running R Tests dependence packages to:
```bash
R -e "install.packages(c('knitr', 'rmarkdown', 'testthat', 'e1071', 'survival'), repos='http://cran.us.r-project.org')"
```

## How was this patch tested?
manual tests

Author: Yuming Wang <[email protected]>

Closes #18271 from wangyum/building-spark.

(cherry picked from commit 45824fb)
Signed-off-by: Sean Owen <[email protected]>
@asfgit asfgit closed this in 45824fb Jun 16, 2017
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.

6 participants