Skip to content

Commit

Permalink
Merge pull request #68 from molgenis/chore/fix-release
Browse files Browse the repository at this point in the history
fix: update and fix vignettes
  • Loading branch information
marikaris authored Oct 27, 2023
2 parents 20d2584 + dfdba94 commit 6268336
Show file tree
Hide file tree
Showing 8 changed files with 848 additions and 360 deletions.
2 changes: 1 addition & 1 deletion R/ArmadilloResult.R
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ methods::setClass("ArmadilloResult",
#'
#' @return The result information. This should include the R expression
#' being executed (`expression`) and if the query is complete
#' (`{ "status" = "COMPLETED" }`).
#' (`\{ "status" = "COMPLETED" \}`).
#'
#' @importMethodsFrom DSI dsGetInfo
#' @export
Expand Down
2 changes: 1 addition & 1 deletion cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## 2.0.4 Bugfix for update in armadillo
## 2.0.5 Bugfix for update in armadillo
* Bugfix to enable armadillo update (N.B. this version of DSMolgenisArmadillo
should be used when using armadillo 3.5)

Expand Down
195 changes: 103 additions & 92 deletions vignettes/DSMolgenisArmadillo.Rmd

Large diffs are not rendered by default.

37 changes: 20 additions & 17 deletions vignettes/DSMolgenisArmadillo.Rmd.orig
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ library(dsBaseClient)
library(DSMolgenisArmadillo)

# specify server url
armadillo_url <- "https://armadillo.dev.molgenis.org"
armadillo_url <- "https://armadillo-demo.molgenis.net"

# get token from central authentication server
token <- armadillo.get_token(armadillo_url)
Expand All @@ -38,16 +38,19 @@ The important part is to specify the driver. This should be `ArmadilloDriver`.
```{r, login}
# build the login dataframe
builder <- DSI::newDSLoginBuilder()
builder$append(server = "armadillo",
url = armadillo_url,
token = token,
driver = "ArmadilloDriver")
builder$append(
server = "armadillo",
url = armadillo_url,
token = token,
driver = "ArmadilloDriver",
profile = "xenon",
)

# create loginframe
logindata <- builder$build()
login_data <- builder$build()

# login into server
conns <- datashield.login(logins = logindata, assign = FALSE)
conns <- DSI::datashield.login(logins = login_data, assign = FALSE)
```

> You can append multiple servers to the login frame to perform an analysis
Expand Down Expand Up @@ -98,20 +101,20 @@ login.
```{r, assign data during login}
# build the login dataframe
builder <- DSI::newDSLoginBuilder()
builder$append(server = "armadillo",
url = armadillo_url,
token = token,
driver = "ArmadilloDriver",
table = "gecko/2_1-core-1_0/nonrep")
builder$append(
server = "armadillo",
url = armadillo_url,
token = token,
driver = "ArmadilloDriver",
table = "gecko/2_1-core-1_0/nonrep",
profile = "xenon",
)

# create loginframe
logindata <- builder$build()
login_data <- builder$build()

# login into server
conns <- datashield.login(
logins = logindata,
assign = TRUE,
symbol = "core_nonrep")
conns <- DSI::datashield.login(logins = login_data, assign = TRUE, symbol="core_nonrep")
```

### Subsetting data
Expand Down
894 changes: 678 additions & 216 deletions vignettes/development.Rmd

Large diffs are not rendered by default.

24 changes: 14 additions & 10 deletions vignettes/development.Rmd.orig
Original file line number Diff line number Diff line change
Expand Up @@ -63,19 +63,23 @@ You can login with basic auth when you are developing. The default credentials a
```{r, login frame with basic authentication}
library(DSMolgenisArmadillo)

armadillo_url <- "https://armadillo.dev.molgenis.org"
armadillo_url <- "https://armadillo-demo.molgenis.net"

builder <- DSI::newDSLoginBuilder()
builder$append(server = "armadillo",
url = armadillo_url,
user = "admin",
password = "admin",
table = "gecko/2_1-core-1_0/nonrep",
driver = "ArmadilloDriver")

logindata <- builder$build()
builder$append(
server = "armadillo",
url = armadillo_url,
user = "admin",
password = "password",
driver = "ArmadilloDriver",
table = "gecko/2_1-core-1_0/nonrep",
profile = "xenon",
)

conns <- datashield.login(login = logindata, assign = TRUE)
login_data <- builder$build()

conns <- DSI::datashield.login(logins = login_data, assign = TRUE)
```

#### Version of the package
Expand Down Expand Up @@ -112,7 +116,7 @@ In DataSHIELD you can use a variety of methods and packages. To check which are
The available packages displayed by the method, are the serverside R-packages. Which means the packages available on the Armadillo.

```{r, check packages}
conns <- datashield.login(logins = logindata, assign = F)
conns <- DSI::datashield.login(logins = login_data, assign = F)
dsListPackages(conns$armadillo)
```

Expand Down
46 changes: 27 additions & 19 deletions vignettes/workspaces.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ library(dsBaseClient)
library(DSMolgenisArmadillo)

# specify server url
armadillo_url <- "https://armadillo.dev.molgenis.org"
armadillo_url <- "https://armadillo-demo.molgenis.net/"

# get token from central authentication server
token <- armadillo.get_token(armadillo_url)
```

```
## [1] "We're opening a browser so you can log in with code QR4XJ9"
## [1] "We're opening a browser so you can log in with code R8VPYX"
```

```r
Expand All @@ -41,7 +41,7 @@ builder$append(server = "armadillo",
# create loginframe
logindata <- builder$build()

conns <- datashield.login(login = logindata)
conns <- DSI::datashield.login(login = logindata)
```

```
Expand All @@ -50,7 +50,7 @@ conns <- datashield.login(login = logindata)
```

```
## Logged in all servers [================================================================] 100% / 0s
## [-------------------------------------------------------------------------------------] 0% / 0s Login armadillo [==================================>-----------------------------------] 50% / 0s Logged in all servers [================================================================] 100% / 0s
```

```r
Expand All @@ -61,20 +61,27 @@ datashield.assign.table(conns = conns,
```

```
## Assigned all table (J <- ...) [========================================================] 100% / 0s
## [-------------------------------------------------------------------------------------] 0% / 0s Checking armadillo (J <- `gecko/2_1-core-1_0/nonrep`) [--------------------------------] 0% / 0s Waiting... (J <- ...) [---------------------------------------------------------------] 0% / 0s Checking armadillo (J <- `gecko/2_1-core-1_0/nonrep`) [--------------------------------] 0% / 0s Waiting... (J <- ...) [---------------------------------------------------------------] 0% / 0s Checking armadillo (J <- `gecko/2_1-core-1_0/nonrep`) [--------------------------------] 0% / 0s Waiting... (J <- ...) [---------------------------------------------------------------] 0% / 0s Checking armadillo (J <- `gecko/2_1-core-1_0/nonrep`) [--------------------------------] 0% / 0s Waiting... (J <- ...) [---------------------------------------------------------------] 0% / 0s Checking armadillo (J <- `gecko/2_1-core-1_0/nonrep`) [--------------------------------] 0% / 0s Finalizing assignment armadillo (J <- `gecko/2_1-core-1_0/nonrep`) [=========>---------] 50% / 0s Assigned all table (J <- ...) [========================================================] 100% / 0s
```

```r
datashield.logout(conns, save = "my-workspace")
```

conns <- datashield.login(logins = logindata,
```
## [-------------------------------------------------------------------------------------] 0% / 0s Logout armadillo [=================================>-----------------------------------] 50% / 0s Logged out from all servers [==========================================================] 100% / 0s
```

```r
conns <- DSI::datashield.login(logins = logindata,
assign = FALSE,
restore = "my-workspace")
```

```
##
## Logging into the collaborating servers
## [-------------------------------------------------------------------------------------] 0% / 0s Login armadillo [==================================>-----------------------------------] 50% / 0s Logged in all servers [================================================================] 100% / 0s
```

```r
Expand All @@ -98,16 +105,17 @@ datashield.logout(conns)
```

```
## Logged out from all servers [==========================================================] 100% / 1s
## [-------------------------------------------------------------------------------------] 0% / 0s Logout armadillo [=================================>-----------------------------------] 50% / 0s Logged out from all servers [==========================================================] 100% / 0s
```

```r
conns <- datashield.login(logins = logindata)
conns <- DSI::datashield.login(logins = logindata)
```

```
##
## Logging into the collaborating servers
## [-------------------------------------------------------------------------------------] 0% / 0s Login armadillo [==================================>-----------------------------------] 50% / 0s Logged in all servers [================================================================] 100% / 0s
```

```r
Expand All @@ -117,7 +125,7 @@ datashield.assign.table(conns = conns,
```

```
## Assigned all table (H <- ...) [========================================================] 100% / 0s
## [-------------------------------------------------------------------------------------] 0% / 0s Checking armadillo (H <- `gecko/2_1-core-1_0/nonrep`) [--------------------------------] 0% / 0s Waiting... (H <- ...) [---------------------------------------------------------------] 0% / 0s Checking armadillo (H <- `gecko/2_1-core-1_0/nonrep`) [--------------------------------] 0% / 0s Waiting... (H <- ...) [---------------------------------------------------------------] 0% / 0s Checking armadillo (H <- `gecko/2_1-core-1_0/nonrep`) [--------------------------------] 0% / 0s Waiting... (H <- ...) [---------------------------------------------------------------] 0% / 0s Checking armadillo (H <- `gecko/2_1-core-1_0/nonrep`) [--------------------------------] 0% / 0s Waiting... (H <- ...) [---------------------------------------------------------------] 0% / 0s Checking armadillo (H <- `gecko/2_1-core-1_0/nonrep`) [--------------------------------] 0% / 0s Finalizing assignment armadillo (H <- `gecko/2_1-core-1_0/nonrep`) [=========>---------] 50% / 0s Assigned all table (H <- ...) [========================================================] 100% / 0s
```

```r
Expand All @@ -133,10 +141,10 @@ datashield.workspaces(conns$armadillo)
```

```
## lastAccessDate ETag name size user
## 1 2020-09-08T10:14:42.345Z "79ea8e26a41a0f43716040c5f09466c0" armadillo:my-workspace-overwritten 172072
## 2 2020-09-08T10:14:40.907Z "7de51b96e6d15e9ab13b9ef52fe3547f" armadillo:my-workspace-version-2 3610
## 3 2020-09-08T10:14:40.524Z "7de51b96e6d15e9ab13b9ef52fe3547f" armadillo:my-workspace 3610
## name size lastAccessDate user
## 1 armadillo:my-workspace-overwritten 172073 2023-10-24T09:22:41.747Z
## 2 armadillo:my-workspace 3611 2023-10-24T09:22:40.615Z
## 3 armadillo:my-workspace-version-2 3611 2023-10-24T09:22:40.847Z
```

Remove workspaces.
Expand All @@ -148,10 +156,10 @@ datashield.workspaces(conns)
```

```
## server name..armadillo.my.workspace.version.2. name..armadillo.my.workspace. user
## 1 armadillo armadillo:my-workspace-version-2 armadillo:my-workspace
## 2 armadillo armadillo:my-workspace-version-2 armadillo:my-workspace
## lastAccessDate..2020.09.08T10.14.40.907Z. lastAccessDate..2020.09.08T10.14.40.524Z. size.3610L size.3610L.1
## 1 2020-09-08T10:14:40.907Z 2020-09-08T10:14:40.524Z 3610 3610
## 2 2020-09-08T10:14:40.907Z 2020-09-08T10:14:40.524Z 3610 3610
## server name..armadillo.my.workspace. name..armadillo.my.workspace.version.2. user
## 1 armadillo armadillo:my-workspace armadillo:my-workspace-version-2
## 2 armadillo armadillo:my-workspace armadillo:my-workspace-version-2
## lastAccessDate..2023.10.24T09.22.40.615Z. lastAccessDate..2023.10.24T09.22.40.847Z. size.3611L size.3611L.1
## 1 2023-10-24T09:22:40.615Z 2023-10-24T09:22:40.847Z 3611 3611
## 2 2023-10-24T09:22:40.615Z 2023-10-24T09:22:40.847Z 3611 3611
```
Expand Down
8 changes: 4 additions & 4 deletions vignettes/workspaces.Rmd.orig
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ library(dsBaseClient)
library(DSMolgenisArmadillo)

# specify server url
armadillo_url <- "https://armadillo.dev.molgenis.org"
armadillo_url <- "https://armadillo-demo.molgenis.net/"

# get token from central authentication server
token <- armadillo.get_token(armadillo_url)
Expand All @@ -36,7 +36,7 @@ builder$append(server = "armadillo",
# create loginframe
logindata <- builder$build()

conns <- datashield.login(login = logindata)
conns <- DSI::datashield.login(login = logindata)

datashield.assign.table(conns = conns,
table = "gecko/2_1-core-1_0/nonrep",
Expand All @@ -45,7 +45,7 @@ datashield.assign.table(conns = conns,

datashield.logout(conns, save = "my-workspace")

conns <- datashield.login(logins = logindata,
conns <- DSI::datashield.login(logins = logindata,
assign = FALSE,
restore = "my-workspace")

Expand All @@ -57,7 +57,7 @@ You can overwrite workspaces using the same name again when saving the workspace

```{r, overwrite using the same name}
datashield.logout(conns)
conns <- datashield.login(logins = logindata)
conns <- DSI::datashield.login(logins = logindata)

datashield.assign.table(conns = conns,
table = "gecko/2_1-core-1_0/nonrep",
Expand Down

0 comments on commit 6268336

Please sign in to comment.