From: Fuad Muhic Date: Tue, 27 Mar 2018 12:31:57 +0000 (+0200) Subject: Updated README and removed debug prints X-Git-Tag: 1.2.0~202^2~7 X-Git-Url: https://git.arvados.org/arvados.git/commitdiff_plain/6521f0212a0086a59630e91c3db89bfd8ff1cab6 Updated README and removed debug prints Arvados-DCO-1.1-Signed-off-by: Fuad Muhic --- diff --git a/sdk/R/R/Arvados.R b/sdk/R/R/Arvados.R index 94d5fb0851..66e2794c7e 100644 --- a/sdk/R/R/Arvados.R +++ b/sdk/R/R/Arvados.R @@ -1625,24 +1625,24 @@ Arvados <- R6::R6Class( }, - project.get = function(uuid) + projects.get = function(uuid) { self$groups.get(uuid) }, - project.create = function(group, ensure_unique_name = "false") + projects.create = function(group, ensure_unique_name = "false") { group <- c("group_class" = "project", group) self$groups.create(group, ensure_unique_name) }, - project.update = function(group, uuid) + projects.update = function(group, uuid) { group <- c("group_class" = "project", group) self$groups.update(group, uuid) }, - project.list = function(filters = NULL, where = NULL, + projects.list = function(filters = NULL, where = NULL, order = NULL, select = NULL, distinct = NULL, limit = "100", offset = "0", count = "exact", include_trash = NULL) @@ -1652,7 +1652,7 @@ Arvados <- R6::R6Class( limit, offset, count, include_trash) }, - project.delete = function(uuid) + projects.delete = function(uuid) { self$groups.delete(uuid) }, diff --git a/sdk/R/R/HttpRequest.R b/sdk/R/R/HttpRequest.R index 149ec0db7a..bc6b4d406d 100644 --- a/sdk/R/R/HttpRequest.R +++ b/sdk/R/R/HttpRequest.R @@ -28,7 +28,6 @@ HttpRequest <- R6::R6Class( if(toString(Sys.getenv("ARVADOS_API_HOST_INSECURE") == "TRUE")) config$options = list(ssl_verifypeer = FALSE) - print(config) # times = 1 regular call + numberOfRetries response <- httr::RETRY(verb, url = url, body = body, config = config, times = retryTimes + 1) diff --git a/sdk/R/R/autoGenAPI.R b/sdk/R/R/autoGenAPI.R index ba74f9828a..849875204d 100644 --- a/sdk/R/R/autoGenAPI.R +++ b/sdk/R/R/autoGenAPI.R @@ -70,24 +70,24 @@ generateAPIClassHeader <- function() generateProjectMethods <- function() { - c("\t\tproject.get = function(uuid)", + c("\t\tprojects.get = function(uuid)", "\t\t{", "\t\t\tself$groups.get(uuid)", "\t\t},", "", - "\t\tproject.create = function(group, ensure_unique_name = \"false\")", + "\t\tprojects.create = function(group, ensure_unique_name = \"false\")", "\t\t{", "\t\t\tgroup <- c(\"group_class\" = \"project\", group)", "\t\t\tself$groups.create(group, ensure_unique_name)", "\t\t},", "", - "\t\tproject.update = function(group, uuid)", + "\t\tprojects.update = function(group, uuid)", "\t\t{", "\t\t\tgroup <- c(\"group_class\" = \"project\", group)", "\t\t\tself$groups.update(group, uuid)", "\t\t},", "", - "\t\tproject.list = function(filters = NULL, where = NULL,", + "\t\tprojects.list = function(filters = NULL, where = NULL,", "\t\t\torder = NULL, select = NULL, distinct = NULL,", "\t\t\tlimit = \"100\", offset = \"0\", count = \"exact\",", "\t\t\tinclude_trash = NULL)", @@ -97,7 +97,7 @@ generateProjectMethods <- function() "\t\t\t limit, offset, count, include_trash)", "\t\t},", "", - "\t\tproject.delete = function(uuid)", + "\t\tprojects.delete = function(uuid)", "\t\t{", "\t\t\tself$groups.delete(uuid)", "\t\t},", diff --git a/sdk/R/README.Rmd b/sdk/R/README.Rmd index 098bfe19a5..65c7979861 100644 --- a/sdk/R/README.Rmd +++ b/sdk/R/README.Rmd @@ -56,16 +56,16 @@ knitr::opts_chunk$set(eval = FALSE) * Get a collection: ```{r} - collection <- arv$getCollection("uuid") + collection <- arv$collections.get("uuid") ``` * List collections: ```{r} # offset of 0 and default limit of 100 - collectionList <- arv$listCollections(list(list("name", "like", "Test%"))) + collectionList <- arv$collections.list(list(list("name", "like", "Test%"))) - collectionList <- arv$listCollections(list(list("name", "like", "Test%")), limit = 10, offset = 2) + collectionList <- arv$collections.list(list(list("name", "like", "Test%")), limit = 10, offset = 2) ``` ```{r} @@ -79,25 +79,25 @@ knitr::opts_chunk$set(eval = FALSE) * List all collections even if the number of items is greater than maximum API limit: ```{r} - collectionList <- arv$listAllCollections(list(list("name", "like", "Test%"))) + collectionList <- listAll(arv$collections.list, list(list("name", "like", "Test%"))) ``` * Delete a collection: ```{r} - deletedCollection <- arv$deleteCollection("uuid") + deletedCollection <- arv$collections.delete("uuid") ``` * Update a collection's metadata: ```{r} - updatedCollection <- arv$updateCollection("uuid", list(name = "New name", description = "New description")) + updatedCollection <- arv$collections.update(list(name = "New name", description = "New description"), "uuid") ``` * Create collection: ```{r} - createdCollection <- arv$createCollection(list(name = "Example", description = "This is a test collection")) + newCollection <- arv$collections.create(list(name = "Example", description = "This is a test collection")) ``` @@ -252,41 +252,50 @@ knitr::opts_chunk$set(eval = FALSE) * Get a project: ```{r} - project <- arv$getProject("uuid") + project <- arv$projects.get("uuid") ``` * List projects: ```{r} # list subprojects of a project - projects <- arv$listProjects(list(list("owner_uuid", "=", "aaaaa-j7d0g-ccccccccccccccc"))) + projects <- arv$projects.list(list(list("owner_uuid", "=", "aaaaa-j7d0g-ccccccccccccccc"))) # list projects which have names beginning with Example - arv$listProjects(list(list("name","like","Example%"))) + examples <- arv$projects.list(list(list("name","like","Example%"))) ``` * List all projects even if the number of items is greater than maximum API limit: ```{r} - collectionList <- arv$listAllProjects(list(list("name","like","Example%"))) + projects <- listAll(arv$projects.list, list(list("name","like","Example%"))) ``` * Delete a project: ```{r} - deletedProject <- arv$deleteProject("uuid") + deletedProject <- arv$projects.delete("uuid") ``` * Update project: ```{r} - updatedProject <- arv$updateProject("uuid", list(name = "new_name", description = "new description")) + updatedProject <- arv$projects.update(list(name = "new_name", description = "new description"), "uuid") ``` * Create project: ```{r} - createdProject <- arv$createProject(list(name = "project_name", description = "project description")) + newProject <- arv$projects.update(list(name = "project_name", description = "project description")) + ``` + +#### Help + +* View help page of any method defined in Arvados class by puting ? before method name: + + ```{r} + ?collections.update + ?jobs.get ``` ### Building the ArvadosR package