[ARVADOS] updated: 1.1.1-173-gaba085a
Git user
git at public.curoverse.com
Thu Dec 7 12:21:09 EST 2017
Summary of changes:
sdk/R/R/Arvados.R | 8 +++++--
sdk/R/R/Collection.R | 5 ++--
sdk/R/README | 66 +++++++++++++++++++++++++++++++++++++++++++++++++++-
3 files changed, 74 insertions(+), 5 deletions(-)
via aba085a3abd65bc86075839298526ab2f686117c (commit)
from c88643983aeb511eca21e1d9e36b919a63482fb8 (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 aba085a3abd65bc86075839298526ab2f686117c
Author: Fuad Muhic <fmuhic at capeannenterprises.com>
Date: Thu Dec 7 18:18:33 2017 +0100
Updated README and did some minor fixes to Arvados.R and Collection.R
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 a546f85..82f3aba 100644
--- a/sdk/R/R/Arvados.R
+++ b/sdk/R/R/Arvados.R
@@ -19,9 +19,11 @@ Arvados <- setRefClass(
getToken = "function",
getHostName = "function",
- #Todo(Fudo): These are hardcoded and for debug only. Remove them later on.
+ #Todo(Fudo): This is for debug only. Remove it.
getWebDavToken = "function",
getWebDavHostName = "function",
+ setWebDavToken = "function",
+ setWebDavHostName = "function",
collection_get = "function",
collection_list = "function",
@@ -32,7 +34,7 @@ Arvados <- setRefClass(
methods = list(
- initialize = function(auth_token = NULL, host_name = NULL, webDavToken = NULL, webDavHostName = NULL)
+ initialize = function(auth_token = NULL, host_name = NULL)
{
# Private state
if(!is.null(host_name))
@@ -57,6 +59,8 @@ Arvados <- setRefClass(
#Todo(Fudo): Hardcoded credentials to WebDAV server. Remove them later
getWebDavToken <<- function() { webDavToken }
getWebDavHostName <<- function() { webDavHostName }
+ setWebDavToken <<- function(token) { webDavToken <<- token }
+ setWebDavHostName <<- function(hostName) { webDavHostName <<- hostName }
collection_get <<- function(uuid)
{
diff --git a/sdk/R/R/Collection.R b/sdk/R/R/Collection.R
index e261a25..bd6bd3f 100644
--- a/sdk/R/R/Collection.R
+++ b/sdk/R/R/Collection.R
@@ -39,6 +39,7 @@ Collection <- setRefClass(
fields = list(uuid = "ANY",
items = "ANY",
+ fileContent = "ANY",
etag = "ANY",
owner_uuid = "ANY",
created_at = "ANY",
@@ -216,8 +217,8 @@ Collection <- setRefClass(
"java/test/observable.java",
"csharp/this.cs", "csharp/is.cs",
"csharp/dummy.cs", "csharp/file.cs")
- #items <<- getCollectionContent()
- items <<- .createCollectionContentTree(testFileStructure)
+ items <<- getCollectionContent()
+ fileContent <<- .createCollectionContentTree(testFileStructure)
}
)
)
diff --git a/sdk/R/README b/sdk/R/README
index 0d954b6..0117358 100644
--- a/sdk/R/README
+++ b/sdk/R/README
@@ -1 +1,65 @@
-R SDK for Arvados
\ No newline at end of file
+R SDK for Arvados
+
+Examples of usage:
+
+--------------------------------------------------------------------------------------------------------------------------------
+
+Get collection:
+
+arv <- Arvados("insert_token", "insert_host_name")
+arv$collection_get("uuid")
+
+--------------------------------------------------------------------------------------------------------------------------------
+
+List collections:
+
+collectionList <- arv$collection_list(list("uuid", "=" "aaaaa-bbbbb-ccccccccccccccc"), limit = 10, offset = 2)
+
+--------------------------------------------------------------------------------------------------------------------------------
+
+Delete collection:
+
+deletedCollection <- arv$collection_delete("uuid")
+
+--------------------------------------------------------------------------------------------------------------------------------
+
+Update collection:
+
+updatedCollection <- arv$collection_update("uuid", list(collection = list(name = "new_name", description = "new_desciption")))
+
+--------------------------------------------------------------------------------------------------------------------------------
+
+Create collection:
+
+updatedCollection <- arv$collection_update("uuid", list(collection = list(name = "new_name", description = "new_desciption")))
+
+--------------------------------------------------------------------------------------------------------------------------------
+
+--------------------------------------------------------------------------------------------------------------------------------
+
+Things I'm currently working on and are not finished.
+
+Collection manipulation:
+
+arv <- Arvados("insert_token", "insert_host_name")
+
+//This will be removed
+arv$setWebDavToken("webdav_token")
+arv$setWebDavHostName("full_path_to_the_collection_on_webdav_server")
+
+collection <- Collection(arv, "uuid")
+--------------------------------------------------------------------------------------------------------------------------------
+This will return all files in collection as character vector.
+
+listOfFilesInCollection <- collection$items
+--------------------------------------------------------------------------------------------------------------------------------
+
+This will return ArvadosFile or Subcollection from internal tree-like structure.
+
+collection <- Collection(arv, "uuid")
+
+arvadosFile <- collection.get("location/to/my/file.exe")
+arvadosSubcollection <- collection.get("location/to/my/directory/")
+
+
+--------------------------------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list