[ARVADOS] updated: 1.1.3-266-g473f350
Git user
git at public.curoverse.com
Mon Apr 16 09:17:58 EDT 2018
Summary of changes:
sdk/R/R/Arvados.R | 60 +++++++++++++-
sdk/R/R/autoGenAPI.R | 94 ++++++++++++++++++----
sdk/R/man/Arvados.Rd | 6 +-
sdk/R/man/{groups.create.Rd => projects.create.Rd} | 10 +--
sdk/R/man/{groups.delete.Rd => projects.delete.Rd} | 10 +--
sdk/R/man/{groups.get.Rd => projects.get.Rd} | 10 +--
sdk/R/man/{groups.contents.Rd => projects.list.Rd} | 10 +--
sdk/R/man/projects.update.Rd | 19 +++++
8 files changed, 176 insertions(+), 43 deletions(-)
copy sdk/R/man/{groups.create.Rd => projects.create.Rd} (50%)
copy sdk/R/man/{groups.delete.Rd => projects.delete.Rd} (51%)
copy sdk/R/man/{groups.get.Rd => projects.get.Rd} (54%)
copy sdk/R/man/{groups.contents.Rd => projects.list.Rd} (68%)
create mode 100644 sdk/R/man/projects.update.Rd
via 473f35037f801449b4f3f0880826edfccfdfbc21 (commit)
from 6eeb2b1a7b30e356514f1f842c5d7ecafd126732 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit 473f35037f801449b4f3f0880826edfccfdfbc21
Author: Fuad Muhic <muhic.fuad at gmail.com>
Date: Mon Apr 16 15:16:47 2018 +0200
Added documentation for hardcoded Arvados class project methods.
Arvados-DCO-1.1-Signed-off-by: Fuad Muhic <fmuhic at capeannenterprises.com>
diff --git a/sdk/R/R/Arvados.R b/sdk/R/R/Arvados.R
index 368ca52..35703df 100644
--- a/sdk/R/R/Arvados.R
+++ b/sdk/R/R/Arvados.R
@@ -1593,9 +1593,63 @@ NULL
#' @name user_agreements.new
NULL
+#' projects.get is equivalent to groups.get method.
+#'
+#' @usage arv$projects.get(uuid)
+#' @param uuid The UUID of the Group in question.
+#' @return Group object.
+#' @name projects.get
+NULL
+
+#' projects.create wrapps groups.create method by setting group_class attribute to "project".
+#'
+#' @usage arv$projects.create(group, ensure_unique_name = "false")
+#' @param group Group object.
+#' @param ensure_unique_name Adjust name to ensure uniqueness instead of returning an error on (owner_uuid, name) collision.
+#' @return Group object.
+#' @name projects.create
+NULL
+
+#' projects.update wrapps groups.update method by setting group_class attribute to "project".
+#'
+#' @usage arv$projects.update(group, uuid)
+#' @param group Group object.
+#' @param uuid The UUID of the Group in question.
+#' @return Group object.
+#' @name projects.update
+NULL
+
+#' projects.delete is equivalent to groups.delete method.
+#'
+#' @usage arv$project.delete(uuid)
+#' @param uuid The UUID of the Group in question.
+#' @return Group object.
+#' @name projects.delete
+NULL
+
+#' projects.list wrapps groups.list method by setting group_class attribute to "project".
+#'
+#' @usage arv$projects.list(filters = NULL,
+#' where = NULL, order = NULL, distinct = NULL,
+#' limit = "100", offset = "0", count = "exact",
+#' include_trash = NULL, uuid = NULL, recursive = NULL)
+#' @param filters
+#' @param where
+#' @param order
+#' @param distinct
+#' @param limit
+#' @param offset
+#' @param count
+#' @param include_trash Include items whose is_trashed attribute is true.
+#' @param uuid
+#' @param recursive Include contents from child groups recursively.
+#' @return Group object.
+#' @name projects.list
+NULL
+
#' Arvados
#'
-#' Arvados class gives users ability to manipulate collections and projects.
+#' Arvados class gives users ability to access Arvados REST API.
#'
#' @section Usage:
#' \preformatted{arv = Arvados$new(authToken = NULL, hostName = NULL, numRetries = 0)}
@@ -1783,8 +1837,8 @@ NULL
#'
#' deletedCollection <- arv$collections.delete("uuid")
#'
-#' updatedCollection <- arv$collections.update(list(name = "New name", description = "New description")
-#' "uuid")
+#' updatedCollection <- arv$collections.update(list(name = "New name", description = "New description"),
+#' "uuid")
#'
#' createdCollection <- arv$collections.create(list(name = "Example",
#' description = "This is a test collection"))
diff --git a/sdk/R/R/autoGenAPI.R b/sdk/R/R/autoGenAPI.R
index e0ad551..4fa410c 100644
--- a/sdk/R/R/autoGenAPI.R
+++ b/sdk/R/R/autoGenAPI.R
@@ -15,12 +15,12 @@ generateAPI <- function()
methodResources <- discoveryDocument$resources
resourceNames <- names(methodResources)
- methodDoc <- generateMethodsDocumentation(methodResources, resourceNames)
- classDoc <- generateAPIClassDocumentation(methodResources, resourceNames)
- arvadosAPIHeader <- generateAPIClassHeader()
- arvadosProjectMethods <- generateProjectMethods()
- arvadosClassMethods <- generateClassContent(methodResources, resourceNames)
- arvadosAPIFooter <- generateAPIClassFooter()
+ methodDoc <- genMethodsDoc(methodResources, resourceNames)
+ classDoc <- genAPIClassDoc(methodResources, resourceNames)
+ arvadosAPIHeader <- genAPIClassHeader()
+ arvadosProjectMethods <- genProjectMethods()
+ arvadosClassMethods <- genClassContent(methodResources, resourceNames)
+ arvadosAPIFooter <- genAPIClassFooter()
arvadosClass <- c(methodDoc,
classDoc,
@@ -35,7 +35,7 @@ generateAPI <- function()
NULL
}
-generateAPIClassHeader <- function()
+genAPIClassHeader <- function()
{
c("Arvados <- R6::R6Class(",
"",
@@ -69,7 +69,7 @@ generateAPIClassHeader <- function()
"\t\t},\n")
}
-generateProjectMethods <- function()
+genProjectMethods <- function()
{
c("\t\tprojects.get = function(uuid)",
"\t\t{",
@@ -105,7 +105,7 @@ generateProjectMethods <- function()
"")
}
-generateClassContent <- function(methodResources, resourceNames)
+genClassContent <- function(methodResources, resourceNames)
{
arvadosMethods <- Map(function(resource, resourceName)
{
@@ -131,7 +131,7 @@ generateClassContent <- function(methodResources, resourceNames)
arvadosMethods
}
-generateAPIClassFooter <- function()
+genAPIClassFooter <- function()
{
c("\t\tgetHostName = function() private$host,",
"\t\tgetToken = function() private$token,",
@@ -315,8 +315,7 @@ getReturnObject <- function()
#NOTE: Arvados class documentation:
-
-generateMethodsDocumentation <- function(methodResources, resourceNames)
+genMethodsDoc <- function(methodResources, resourceNames)
{
methodsDoc <- unlist(unname(Map(function(resource, resourceName)
{
@@ -331,22 +330,24 @@ generateMethodsDocumentation <- function(methodResources, resourceNames)
return(NULL)
methodName <- paste0(resourceName, ".", methodName)
- getMethodDocumentation(methodName, methodMetaData)
+ getMethodDoc(methodName, methodMetaData)
}, resource$methods, methodNames)
unlist(unname(methodDoc))
}, methodResources, resourceNames)))
+
+ projectDoc <- genProjectMethodsDoc()
- methodsDoc
+ c(methodsDoc, projectDoc)
}
-generateAPIClassDocumentation <- function(methodResources, resourceNames)
+genAPIClassDoc <- function(methodResources, resourceNames)
{
c("#' Arvados",
"#'",
- "#' Arvados class gives users ability to manipulate collections and projects.",
+ "#' Arvados class gives users ability to access Arvados REST API.",
"#'" ,
"#' @section Usage:",
"#' \\preformatted{arv = Arvados$new(authToken = NULL, hostName = NULL, numRetries = 0)}",
@@ -402,7 +403,7 @@ getAPIClassMethodList <- function(methodResources, resourceNames)
paste0("#' \t\\item{}{\\code{\\link{", sort(c(methodList, hardcodedMethods)), "}}}")
}
-getMethodDocumentation <- function(methodName, methodMetaData)
+getMethodDoc <- function(methodName, methodMetaData)
{
name <- paste("#' @name", methodName)
usage <- getMethodUsage(methodName, methodMetaData)
@@ -456,6 +457,65 @@ getMethodDescription <- function(methodMetaData)
c(requestDoc, argsDoc)
}
+genProjectMethodsDoc <- function()
+{
+ #TODO: Manually update this documentation to reflect changes in discovery document.
+ c("#' projects.get is equivalent to groups.get method.",
+ "#' ",
+ "#' @usage arv$projects.get(uuid)",
+ "#' @param uuid The UUID of the Group in question.",
+ "#' @return Group object.",
+ "#' @name projects.get",
+ "NULL",
+ "",
+ "#' projects.create wrapps groups.create method by setting group_class attribute to \"project\".",
+ "#' ",
+ "#' @usage arv$projects.create(group, ensure_unique_name = \"false\")",
+ "#' @param group Group object.",
+ "#' @param ensure_unique_name Adjust name to ensure uniqueness instead of returning an error on (owner_uuid, name) collision.",
+ "#' @return Group object.",
+ "#' @name projects.create",
+ "NULL",
+ "",
+ "#' projects.update wrapps groups.update method by setting group_class attribute to \"project\".",
+ "#' ",
+ "#' @usage arv$projects.update(group, uuid)",
+ "#' @param group Group object.",
+ "#' @param uuid The UUID of the Group in question.",
+ "#' @return Group object.",
+ "#' @name projects.update",
+ "NULL",
+ "",
+ "#' projects.delete is equivalent to groups.delete method.",
+ "#' ",
+ "#' @usage arv$project.delete(uuid)",
+ "#' @param uuid The UUID of the Group in question.",
+ "#' @return Group object.",
+ "#' @name projects.delete",
+ "NULL",
+ "",
+ "#' projects.list wrapps groups.list method by setting group_class attribute to \"project\".",
+ "#' ",
+ "#' @usage arv$projects.list(filters = NULL,",
+ "#' where = NULL, order = NULL, distinct = NULL,",
+ "#' limit = \"100\", offset = \"0\", count = \"exact\",",
+ "#' include_trash = NULL, uuid = NULL, recursive = NULL)",
+ "#' @param filters ",
+ "#' @param where ",
+ "#' @param order ",
+ "#' @param distinct ",
+ "#' @param limit ",
+ "#' @param offset ",
+ "#' @param count ",
+ "#' @param include_trash Include items whose is_trashed attribute is true.",
+ "#' @param uuid ",
+ "#' @param recursive Include contents from child groups recursively.",
+ "#' @return Group object.",
+ "#' @name projects.list",
+ "NULL",
+ "")
+}
+
#NOTE: Utility functions:
# This function is used to split very long lines of code into smaller chunks.
diff --git a/sdk/R/man/Arvados.Rd b/sdk/R/man/Arvados.Rd
index 0128173..95a2e55 100644
--- a/sdk/R/man/Arvados.Rd
+++ b/sdk/R/man/Arvados.Rd
@@ -4,7 +4,7 @@
\alias{Arvados}
\title{Arvados}
\description{
-Arvados class gives users ability to manipulate collections and projects.
+Arvados class gives users ability to access Arvados REST API.
}
\section{Usage}{
@@ -197,8 +197,8 @@ collectionList <- listAll(arv$collections.list, list(list("name", "like", "Test\
deletedCollection <- arv$collections.delete("uuid")
-updatedCollection <- arv$collections.update(list(name = "New name", description = "New description")
- "uuid")
+updatedCollection <- arv$collections.update(list(name = "New name", description = "New description"),
+ "uuid")
createdCollection <- arv$collections.create(list(name = "Example",
description = "This is a test collection"))
diff --git a/sdk/R/man/projects.create.Rd b/sdk/R/man/projects.create.Rd
new file mode 100644
index 0000000..1ed8fa8
--- /dev/null
+++ b/sdk/R/man/projects.create.Rd
@@ -0,0 +1,19 @@
+% Generated by roxygen2: do not edit by hand
+% Please edit documentation in R/Arvados.R
+\name{projects.create}
+\alias{projects.create}
+\title{projects.create wrapps groups.create method by setting group_class attribute to "project".}
+\usage{
+arv$projects.create(group, ensure_unique_name = "false")
+}
+\arguments{
+\item{group}{Group object.}
+
+\item{ensure_unique_name}{Adjust name to ensure uniqueness instead of returning an error on (owner_uuid, name) collision.}
+}
+\value{
+Group object.
+}
+\description{
+projects.create wrapps groups.create method by setting group_class attribute to "project".
+}
diff --git a/sdk/R/man/projects.delete.Rd b/sdk/R/man/projects.delete.Rd
new file mode 100644
index 0000000..e1815b8
--- /dev/null
+++ b/sdk/R/man/projects.delete.Rd
@@ -0,0 +1,17 @@
+% Generated by roxygen2: do not edit by hand
+% Please edit documentation in R/Arvados.R
+\name{projects.delete}
+\alias{projects.delete}
+\title{projects.delete is equivalent to groups.delete method.}
+\usage{
+arv$project.delete(uuid)
+}
+\arguments{
+\item{uuid}{The UUID of the Group in question.}
+}
+\value{
+Group object.
+}
+\description{
+projects.delete is equivalent to groups.delete method.
+}
diff --git a/sdk/R/man/projects.get.Rd b/sdk/R/man/projects.get.Rd
new file mode 100644
index 0000000..eec078a
--- /dev/null
+++ b/sdk/R/man/projects.get.Rd
@@ -0,0 +1,17 @@
+% Generated by roxygen2: do not edit by hand
+% Please edit documentation in R/Arvados.R
+\name{projects.get}
+\alias{projects.get}
+\title{projects.get is equivalent to groups.get method.}
+\usage{
+arv$projects.get(uuid)
+}
+\arguments{
+\item{uuid}{The UUID of the Group in question.}
+}
+\value{
+Group object.
+}
+\description{
+projects.get is equivalent to groups.get method.
+}
diff --git a/sdk/R/man/projects.list.Rd b/sdk/R/man/projects.list.Rd
new file mode 100644
index 0000000..e88e261
--- /dev/null
+++ b/sdk/R/man/projects.list.Rd
@@ -0,0 +1,38 @@
+% Generated by roxygen2: do not edit by hand
+% Please edit documentation in R/Arvados.R
+\name{projects.list}
+\alias{projects.list}
+\title{projects.list wrapps groups.list method by setting group_class attribute to "project".}
+\usage{
+arv$projects.list(filters = NULL,
+ where = NULL, order = NULL, distinct = NULL,
+ limit = "100", offset = "0", count = "exact",
+ include_trash = NULL, uuid = NULL, recursive = NULL)
+}
+\arguments{
+\item{filters}{}
+
+\item{where}{}
+
+\item{order}{}
+
+\item{distinct}{}
+
+\item{limit}{}
+
+\item{offset}{}
+
+\item{count}{}
+
+\item{include_trash}{Include items whose is_trashed attribute is true.}
+
+\item{uuid}{}
+
+\item{recursive}{Include contents from child groups recursively.}
+}
+\value{
+Group object.
+}
+\description{
+projects.list wrapps groups.list method by setting group_class attribute to "project".
+}
diff --git a/sdk/R/man/projects.update.Rd b/sdk/R/man/projects.update.Rd
new file mode 100644
index 0000000..7833134
--- /dev/null
+++ b/sdk/R/man/projects.update.Rd
@@ -0,0 +1,19 @@
+% Generated by roxygen2: do not edit by hand
+% Please edit documentation in R/Arvados.R
+\name{projects.update}
+\alias{projects.update}
+\title{projects.update wrapps groups.update method by setting group_class attribute to "project".}
+\usage{
+arv$projects.update(group, uuid)
+}
+\arguments{
+\item{group}{Group object.}
+
+\item{uuid}{The UUID of the Group in question.}
+}
+\value{
+Group object.
+}
+\description{
+projects.update wrapps groups.update method by setting group_class attribute to "project".
+}
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list