Skip to content

Commit

Permalink
keyring consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
khufkens committed Aug 28, 2024
1 parent 3d8fe8c commit 1d3b4f9
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 14 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@ Imports:
httr,
memoise,
getPass,
R6
R6,
keyring
License: AGPL-3
ByteCompile: true
RoxygenNote: 7.3.1
Suggests:
keyring,
rmarkdown,
covr,
xml2,
Expand Down
12 changes: 0 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -285,18 +285,6 @@ password, unlocking all `ecmwfr` credentials for this session. Should
you ever forget the password just delete the file at:
`~/.config/r-keyring/ecmwfr.keyring` and re-enter all your credentials.

Alternatively, you can set an environmental variable containing your Personal Access Token.

```r
Sys.setenv(ecmwfr_PAT="abcd1234-foo-bar-98765431-XXXXXXXXXX")
```

This will need to be set at the beginning of each setting or added to the user
`.Renviron` file. Overall, this is considered insecure, but might be the only
option on some legacy or HPC systems to get full `ecmwfr` functionality. A good
blog post on why you should not do this is
provided by [Maëlle Salmon](https://blog.r-hub.io/2024/02/28/key-advantages-of-using-keyring/).

## Date specification

For those familiar with the old ECMWF *mars* syntax: CDS/ADS/CEMS does not accept
Expand Down
14 changes: 14 additions & 0 deletions vignettes/advanced_vignette.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -146,3 +146,17 @@ files <- wf_request_batch(

For those familiar to ECMWF _mars_ syntax: CDS/ADS does not
accept `date = "2000-01-01/to/2000-12-31"` specifications at the moment. It is possible to specify one specific date via `date = "2000-01-01"` or multiple days via `date = ["2000-01-01","2000-01-02","2000-10-20"]` or `date = "YYYY-MM-DD/YYYY-MM-DD"` but not via `".../to/..."`.

## Environmental variables

Alternatively, you can set an environmental variable containing your Personal Access Token.

```{r eval=FALSE}
Sys.setenv(ecmwfr_PAT="abcd1234-foo-bar-98765431-XXXXXXXXXX")
```

This will need to be set at the beginning of each setting or added to the user
`.Renviron` file. Overall, this is considered insecure, but might be the only
option on some legacy or HPC systems to get full `ecmwfr` functionality. A good
blog post on why you should not do this is
provided by [Maëlle Salmon](https://blog.r-hub.io/2024/02/28/key-advantages-of-using-keyring/).

0 comments on commit 1d3b4f9

Please sign in to comment.