Skip to content
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

Update proofr.Rmd #21

Merged
merged 4 commits into from
Aug 5, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 13 additions & 8 deletions vignettes/proofr.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ library(proofr)

## Authenticate with the PROOF API

Run the function `proof_authenticate()`, which calls the PROOF API with your username and password, and returns an API token (an alphanumeric string).
Run the function `proof_authenticate()`, which calls the PROOF API with your username and password, and returns an API token (an alphanumeric string). A new token is created when a new PROOF server is created, thus this API token will need to be reset.
Copy link
Contributor

Choose a reason for hiding this comment

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

This is not what happens. The token does not change. We can/should discuss whether it should, but currently it does not.

Copy link
Member

Choose a reason for hiding this comment

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

@vortexing can you undo this text change, or change the wording to explain that the same token is returned when calling proof_authenticate



```r
Expand All @@ -29,23 +29,25 @@ my_proof_token

(note: the above token is not a real token)

On your computer, save your API token as an environment variable named `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.

If you've saved your `PROOF_TOKEN` env var, then you can use the other `proofr` functions.

Otherwise, you can pass your PROOF token to the `proofr` functions. If you pass your token to the functions, only do so by passing the call to `Sys.getenv` like `proof_status(token = Sys.getenv("MY_TOKEN"))`.
```r
Sys.setenv("PROOF_TOKEN" = proof_authenticate("username", "password"))
```


## Start a Cromwell Server
## Start a PROOF Server

Start the server
Start a PROOF server


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


Get the URL, using `wait=TRUE` so that it doesn't return data until the server is fully ready to use
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
Expand All @@ -54,6 +56,9 @@ cromwell_url <- metadata$cromwellUrl
cromwell_url
```




## rcromwell setup

Load `rcromwell`
Expand Down
Loading