Skip to content

Commit

Permalink
fix #22 fix install line for rcromwell
Browse files Browse the repository at this point in the history
  • Loading branch information
sckott committed Aug 27, 2024
1 parent 5de3e90 commit e8212c3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
22 changes: 11 additions & 11 deletions vignettes/proofr.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ vignette: >
Load `proofr`


```r
``` r
library(proofr)
```

Expand All @@ -21,7 +21,7 @@ library(proofr)
Run the function `proof_authenticate()`, which calls the PROOF API with your username and password, and returns an API token (an alphanumeric string).


```r
``` r
my_proof_token <- proof_authenticate("username", "password")
my_proof_token
#> xyGKibGctQ92rmMKKb39q43XgPxGCmrWoX7NZtamTjDP
Expand All @@ -32,7 +32,7 @@ my_proof_token
Alternatively, save your API token directly as an environment variable named `PROOF_TOKEN` so that it can be used by other `proofr` functions without exposing your token in your code. To do so, run the following:


```r
``` r
Sys.setenv("PROOF_TOKEN" = proof_authenticate("username", "password"))
```

Expand All @@ -41,15 +41,15 @@ Sys.setenv("PROOF_TOKEN" = proof_authenticate("username", "password"))
Start a PROOF server using the `proof_start()` function:


```r
``` r
proof_start()
```
Note: `proofr` assumes you only have one server running; if you've started a server using the app, you'll need to stop that server before starting one in R via `proofr`.

Get metadata about the PROOF server you have started, including the URL of the API, using `wait=TRUE` so that it doesn't return data until the server is fully ready to use.


```r
``` r
metadata <- proof_status(wait = TRUE)
cromwell_url <- metadata$cromwellUrl
cromwell_url
Expand All @@ -60,10 +60,10 @@ cromwell_url
Load `rcromwell`


```r
``` r
if (!requireNamespace("rcromwell", quietly=TRUE)) {
install.packages("pak")
pak::pak("rcromwell")
pak::pak("getwilds/rcromwell")
}
library(rcromwell)
library(httr)
Expand All @@ -74,21 +74,21 @@ There are two options for setting the URL in `rcromwell`.
The first option is to set the Cromwell server URL to be recognized by `rcromwell` with `cromwell_config`


```r
``` r
cromwell_config(cromwell_url)
```

The other option is to pass the url to each function, for example:


```r
``` r
cromwell_jobs(url = cromwell_url)
```

In addition to setting the Cromwell URL, your PROOF API token is also required for HTTP requests to your server. After getting your PROOF token you can set it as the env var `PROOF_TOKEN`, or pass it to the `rcromwell` functions, for example:


```r
``` r
cromwell_jobs(url = cromwell_url, token = my_proof_token)
```

Expand All @@ -98,7 +98,7 @@ cromwell_jobs(url = cromwell_url, token = my_proof_token)
As an example, `cromwell_version()` checks the version of your Cromwell server


```r
``` r
cromwell_version()
#> $cromwell
#> [1] "84"
Expand Down
2 changes: 1 addition & 1 deletion vignettes/proofr.Rmd.og
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ Load `rcromwell`
```{r setup-rcromwell}
if (!requireNamespace("rcromwell", quietly=TRUE)) {
install.packages("pak")
pak::pak("rcromwell")
pak::pak("getwilds/rcromwell")
}
library(rcromwell)
library(httr)
Expand Down

0 comments on commit e8212c3

Please sign in to comment.