From 8ee91ce54036feb8a44f31891d831a782beea9b1 Mon Sep 17 00:00:00 2001 From: Thomas Yu Date: Sun, 4 Feb 2024 02:00:38 -0800 Subject: [PATCH] Fix github actions and update to 2.0.0 synapser to use 4.0.0 python client (#328) * Fix actions * Bump macos-13 * Setup python * Update actions * Pin version * Update to 2.0.0 * only use mac * Try to install miniconda * Add in remotes installation * Install remotes and reticulate * Install synapser and rebuild documentation * Update vignettes and authors * Add to news and fix markdown * Update test dockerfile * Add ubuntu and linux back in the mix * Revise and add in all documentation --- .github/workflows/build.yml | 15 +- DESCRIPTION | 5 +- NEWS.md | 9 + R/PythonPkgWrapperUtils.R | 1 - R/shared.R | 3 +- R/zzz.R | 9 +- auto-man/Activity-class.Rd | 23 +- auto-man/Activity.Rd | 27 +- auto-man/Column-class.Rd | 34 +- auto-man/Column.Rd | 55 ++- auto-man/Dataset-class.Rd | 80 +++- auto-man/Dataset.Rd | 50 +-- auto-man/DockerRepository-class.Rd | 26 +- auto-man/DockerRepository.Rd | 34 +- auto-man/EntityViewSchema-class.Rd | 76 +++- auto-man/EntityViewSchema.Rd | 79 ++-- auto-man/Evaluation-class.Rd | 9 +- auto-man/Evaluation.Rd | 19 +- auto-man/File-class.Rd | 53 ++- auto-man/File.Rd | 82 ++-- auto-man/Folder-class.Rd | 15 +- auto-man/Folder.Rd | 29 +- auto-man/Link-class.Rd | 18 +- auto-man/Link.Rd | 35 +- auto-man/MaterializedViewSchema-class.Rd | 35 +- auto-man/MaterializedViewSchema.Rd | 37 +- auto-man/PartialRowset-class.Rd | 4 + auto-man/PartialRowset.Rd | 9 +- auto-man/Permissions-class.Rd | 49 +++ auto-man/Permissions.Rd | 70 +++ auto-man/Project-class.Rd | 14 +- auto-man/Project.Rd | 25 +- auto-man/Row-class.Rd | 8 +- auto-man/Row.Rd | 17 +- auto-man/RowSet-class.Rd | 14 +- auto-man/RowSet.Rd | 29 +- auto-man/Schema-class.Rd | 34 +- auto-man/Schema.Rd | 32 +- auto-man/Submission-class.Rd | 11 +- auto-man/Submission.Rd | 21 +- auto-man/SubmissionStatus-class.Rd | 20 +- auto-man/SubmissionStatus.Rd | 23 +- auto-man/SubmissionViewSchema-class.Rd | 52 ++- auto-man/SubmissionViewSchema.Rd | 63 +-- auto-man/Table.Rd | 36 +- auto-man/Team-class.Rd | 10 +- auto-man/Team.Rd | 18 +- auto-man/TeamMember-class.Rd | 12 +- auto-man/TeamMember.Rd | 18 +- auto-man/UserGroupHeader-class.Rd | 13 +- auto-man/UserGroupHeader.Rd | 25 +- auto-man/UserProfile-class.Rd | 23 +- auto-man/UserProfile.Rd | 56 +-- auto-man/Wiki-class.Rd | 17 +- auto-man/Wiki.Rd | 25 +- auto-man/build_table.Rd | 23 +- auto-man/synCreateColumns.Rd | 12 +- auto-man/synCreateExternalS3FileHandle.Rd | 34 +- auto-man/synCreateS3StorageLocation.Rd | 35 +- auto-man/synCreateSnapshotVersion.Rd | 30 +- auto-man/synCreateStorageLocationSetting.Rd | 47 +- auto-man/synDelete.Rd | 11 +- auto-man/synDeleteProvenance.Rd | 5 +- auto-man/synDownloadTableColumns.Rd | 31 +- auto-man/synFindEntityId.Rd | 14 +- auto-man/synGet.Rd | 58 ++- auto-man/synGetAcl.Rd | 38 ++ auto-man/synGetAnnotations.Rd | 13 +- auto-man/synGetAvailableServices.Rd | 3 + auto-man/synGetChildren.Rd | 24 +- auto-man/synGetColumn.Rd | 19 +- auto-man/synGetColumns.Rd | 20 +- auto-man/synGetConfigFile.Rd | 10 +- auto-man/synGetDownloadList.Rd | 10 +- auto-man/synGetDownloadListManifest.Rd | 5 +- auto-man/synGetEvaluation.Rd | 17 +- auto-man/synGetEvaluationByContentSource.Rd | 11 +- auto-man/synGetEvaluationByName.Rd | 10 +- auto-man/synGetMembershipStatus.Rd | 18 +- auto-man/synGetMyStorageLocationSetting.Rd | 12 +- auto-man/synGetPermissions.Rd | 20 +- auto-man/synGetProjectSetting.Rd | 18 +- auto-man/synGetProvenance.Rd | 19 +- auto-man/synGetStsStorageToken.Rd | 37 +- auto-man/synGetSubmission.Rd | 17 +- auto-man/synGetSubmissionBundles.Rd | 51 +-- auto-man/synGetSubmissionStatus.Rd | 10 +- auto-man/synGetSubmissions.Rd | 57 +-- auto-man/synGetTableColumns.Rd | 10 +- auto-man/synGetTeam.Rd | 10 +- auto-man/synGetTeamMembers.Rd | 10 +- auto-man/synGetTeamOpenInvitations.Rd | 13 +- auto-man/synGetUserProfile.Rd | 18 +- auto-man/synGetUserProfileById.Rd | 34 ++ auto-man/synGetUserProfileByUsername.Rd | 34 ++ auto-man/synGetWiki.Rd | 20 +- auto-man/synGetWikiAttachments.Rd | 10 +- auto-man/synGetWikiHeaders.Rd | 10 +- auto-man/synInvalidateAPIKey.Rd | 9 + auto-man/synInviteToTeam.Rd | 34 +- auto-man/synIsCertified.Rd | 8 +- auto-man/synIsSynapseId.Rd | 6 + auto-man/synLogin.Rd | 49 +-- auto-man/synLogout.Rd | 8 +- auto-man/synMd5Query.Rd | 10 +- auto-man/synMove.Rd | 21 +- auto-man/synOnweb.Rd | 12 +- auto-man/synPrintEntity.Rd | 12 +- auto-man/synRemoveFromDownloadList.Rd | 8 +- auto-man/synRestDELETE.Rd | 23 +- auto-man/synRestGET.Rd | 28 +- auto-man/synRestPOST.Rd | 32 +- auto-man/synRestPUT.Rd | 32 +- auto-man/synSendMembershipInvitation.Rd | 24 +- auto-man/synSendMessage.Rd | 24 +- auto-man/synService.Rd | 3 + auto-man/synSetAnnotations.Rd | 29 -- auto-man/synSetEndpoints.Rd | 21 +- auto-man/synSetPermissions.Rd | 48 +-- auto-man/synSetProvenance.Rd | 14 +- auto-man/synSetStorageLocation.Rd | 16 +- auto-man/synStore.Rd | 71 +-- auto-man/synSubmit.Rd | 59 +-- auto-man/synTableQuery.Rd | 57 ++- auto-man/synUpdateActivity.Rd | 10 +- auto-man/synUploadFileHandle.Rd | 46 +- docs/404.html | 7 +- docs/ISSUE_TEMPLATE.html | 7 +- docs/LICENSE-text.html | 7 +- docs/articles/docker.html | 9 +- docs/articles/index.html | 9 +- docs/articles/installation.html | 278 ++++++++++++ docs/articles/manageSynapseCredentials.html | 59 +-- docs/articles/synapser.html | 268 +++++++----- docs/articles/synapser_final.png | Bin 0 -> 662845 bytes docs/articles/synapser_options.png | Bin 0 -> 716950 bytes docs/articles/synapser_py_env.png | Bin 0 -> 561677 bytes docs/articles/synapser_python.png | Bin 0 -> 651076 bytes docs/articles/synapser_select_py.png | Bin 0 -> 595425 bytes docs/articles/systemDependencies.html | 12 +- docs/articles/tables.html | 32 +- docs/articles/troubleshooting.html | 15 +- docs/articles/upload.html | 12 +- docs/articles/views.html | 61 ++- docs/authors.html | 21 +- docs/index.html | 10 +- docs/news/index.html | 26 +- docs/pkgdown.yml | 5 +- docs/reference/Activity-class.html | 7 +- docs/reference/Activity.html | 7 +- docs/reference/Column-class.html | 7 +- docs/reference/Column.html | 7 +- docs/reference/Dataset-class.html | 7 +- docs/reference/Dataset.html | 7 +- docs/reference/DockerRepository-class.html | 7 +- docs/reference/DockerRepository.html | 7 +- docs/reference/EntityViewSchema-class.html | 7 +- docs/reference/EntityViewSchema.html | 7 +- docs/reference/Evaluation-class.html | 7 +- docs/reference/Evaluation.html | 7 +- docs/reference/File-class.html | 7 +- docs/reference/File.html | 7 +- docs/reference/Folder-class.html | 7 +- docs/reference/Folder.html | 7 +- docs/reference/Link-class.html | 7 +- docs/reference/Link.html | 7 +- .../MaterializedViewSchema-class.html | 7 +- docs/reference/MaterializedViewSchema.html | 7 +- docs/reference/PartialRowset-class.html | 7 +- docs/reference/PartialRowset.html | 7 +- docs/reference/Project-class.html | 7 +- docs/reference/Project.html | 7 +- docs/reference/Row-class.html | 7 +- docs/reference/Row.html | 7 +- docs/reference/RowSet-class.html | 7 +- docs/reference/RowSet.html | 7 +- docs/reference/Schema-class.html | 7 +- docs/reference/Schema.html | 7 +- docs/reference/Submission-class.html | 7 +- docs/reference/Submission.html | 7 +- docs/reference/SubmissionStatus-class.html | 7 +- docs/reference/SubmissionStatus.html | 7 +- .../reference/SubmissionViewSchema-class.html | 7 +- docs/reference/SubmissionViewSchema.html | 7 +- docs/reference/Table.html | 7 +- docs/reference/Team-class.html | 7 +- docs/reference/Team.html | 7 +- docs/reference/TeamMember-class.html | 7 +- docs/reference/TeamMember.html | 7 +- docs/reference/UserGroupHeader-class.html | 7 +- docs/reference/UserGroupHeader.html | 7 +- docs/reference/UserProfile-class.html | 7 +- docs/reference/UserProfile.html | 7 +- docs/reference/Wiki-class.html | 7 +- docs/reference/Wiki.html | 7 +- docs/reference/as.list.html | 7 +- docs/reference/index.html | 11 +- docs/reference/nextElem.html | 7 +- docs/reference/synBuildTable.html | 7 +- docs/reference/synClearDownloadList.html | 7 +- docs/reference/synCreateColumn.html | 7 +- docs/reference/synCreateColumns.html | 7 +- .../synCreateExternalS3FileHandle.html | 7 +- .../reference/synCreateS3StorageLocation.html | 7 +- docs/reference/synCreateSnapshotVersion.html | 7 +- .../synCreateStorageLocationSetting.html | 7 +- docs/reference/synDelete.html | 7 +- docs/reference/synDeleteProvenance.html | 7 +- docs/reference/synDownloadTableColumns.html | 7 +- docs/reference/synFindEntityId.html | 7 +- docs/reference/synGet.html | 7 +- docs/reference/synGetAnnotations.html | 7 +- docs/reference/synGetChildren.html | 7 +- docs/reference/synGetColumn.html | 7 +- docs/reference/synGetColumns.html | 7 +- docs/reference/synGetConfigFile.html | 7 +- docs/reference/synGetDownloadList.html | 7 +- .../reference/synGetDownloadListManifest.html | 7 +- docs/reference/synGetEvaluation.html | 7 +- .../synGetEvaluationByContentSource.html | 7 +- docs/reference/synGetEvaluationByName.html | 7 +- docs/reference/synGetMembershipStatus.html | 7 +- .../synGetMyStorageLocationSetting.html | 7 +- docs/reference/synGetPermissions.html | 7 +- docs/reference/synGetProjectSetting.html | 7 +- docs/reference/synGetProvenance.html | 7 +- docs/reference/synGetStsStorageToken.html | 7 +- docs/reference/synGetSubmission.html | 7 +- docs/reference/synGetSubmissionBundles.html | 7 +- docs/reference/synGetSubmissionStatus.html | 7 +- docs/reference/synGetSubmissions.html | 7 +- docs/reference/synGetTableColumns.html | 7 +- docs/reference/synGetTeam.html | 7 +- docs/reference/synGetTeamMembers.html | 7 +- docs/reference/synGetTeamOpenInvitations.html | 7 +- docs/reference/synGetUserProfile.html | 7 +- docs/reference/synGetWiki.html | 7 +- docs/reference/synGetWikiAttachments.html | 7 +- docs/reference/synGetWikiHeaders.html | 7 +- docs/reference/synInvalidateAPIKey.html | 7 +- docs/reference/synInviteToTeam.html | 7 +- docs/reference/synIsCertified.html | 7 +- docs/reference/synLogin.html | 7 +- docs/reference/synLogout.html | 7 +- docs/reference/synMd5Query.html | 7 +- docs/reference/synMove.html | 7 +- docs/reference/synOnweb.html | 7 +- docs/reference/synPrintEntity.html | 7 +- docs/reference/synRemoveFromDownloadList.html | 7 +- docs/reference/synRestDELETE.html | 7 +- docs/reference/synRestGET.html | 7 +- docs/reference/synRestPOST.html | 7 +- docs/reference/synRestPUT.html | 7 +- .../synSendMembershipInvitation.html | 7 +- docs/reference/synSendMessage.html | 7 +- docs/reference/synSetAnnotations.html | 7 +- docs/reference/synSetEndpoints.html | 7 +- docs/reference/synSetPermissions.html | 7 +- docs/reference/synSetProvenance.html | 7 +- docs/reference/synSetStorageLocation.html | 7 +- docs/reference/synStore.html | 7 +- docs/reference/synSubmit.html | 7 +- docs/reference/synTableQuery.html | 7 +- docs/reference/synUpdateActivity.html | 7 +- docs/reference/synUploadFileHandle.html | 7 +- docs/reference/synapser-package.html | 7 +- docs/sitemap.xml | 405 ++++++++++++++++++ tools/installPythonClient.R | 11 +- vignettes/installation.Rmd | 89 ++++ vignettes/manageSynapseCredentials.Rmd | 35 +- vignettes/synapser.Rmd | 25 +- vignettes/synapser_final.png | Bin 0 -> 662845 bytes vignettes/synapser_options.png | Bin 0 -> 716950 bytes vignettes/synapser_py_env.png | Bin 0 -> 561677 bytes vignettes/synapser_python.png | Bin 0 -> 651076 bytes vignettes/synapser_select_py.png | Bin 0 -> 595425 bytes vignettes/systemDependencies.Rmd | 2 +- vignettes/tables.Rmd | 6 +- vignettes/troubleshooting.Rmd | 5 +- vignettes/upload.Rmd | 2 +- vignettes/views.Rmd | 8 +- 281 files changed, 3839 insertions(+), 1645 deletions(-) create mode 100644 auto-man/Permissions-class.Rd create mode 100644 auto-man/Permissions.Rd create mode 100644 auto-man/synGetAcl.Rd create mode 100644 auto-man/synGetUserProfileById.Rd create mode 100644 auto-man/synGetUserProfileByUsername.Rd delete mode 100644 auto-man/synSetAnnotations.Rd create mode 100644 docs/articles/installation.html create mode 100644 docs/articles/synapser_final.png create mode 100644 docs/articles/synapser_options.png create mode 100644 docs/articles/synapser_py_env.png create mode 100644 docs/articles/synapser_python.png create mode 100644 docs/articles/synapser_select_py.png create mode 100644 docs/sitemap.xml create mode 100644 vignettes/installation.Rmd create mode 100644 vignettes/synapser_final.png create mode 100644 vignettes/synapser_options.png create mode 100644 vignettes/synapser_py_env.png create mode 100644 vignettes/synapser_python.png create mode 100644 vignettes/synapser_select_py.png diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 98df9e6f..fc242440 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -27,7 +27,6 @@ jobs: strategy: matrix: - # os: [ubuntu-22.04, macos-12, macos-13, windows-2022] os: [ubuntu-22.04, macos-13, windows-2022] r: [4.1.3, 4.2.3, 4.3.1] @@ -35,6 +34,11 @@ jobs: - name: checkout uses: actions/checkout@v4 + - name: Set up Python Version + uses: actions/setup-python@v4 + with: + python-version: '3.10' + - name: setup-r uses: r-lib/actions/setup-r@v2 with: @@ -92,8 +96,8 @@ jobs: echo "package_version=$PACKAGE_VERSION" >> $GITHUB_OUTPUT echo "r_minor_version=$R_MINOR_VERSION" >> $GITHUB_OUTPUT - - name: setup-r-mac-12 - if: ${{matrix.os == 'macos-12'}} + - name: setup-r-mac-13 + if: ${{matrix.os == 'macos-13'}} run: | R_LIBS_USER=${GITHUB_WORKSPACE}/R_LIBS rm -rf R_LIBS_USER @@ -102,6 +106,7 @@ jobs: echo "R=R" >> $GITHUB_ENV + - name: install-test-config shell: bash run: | @@ -140,6 +145,10 @@ jobs: - name: mac-build-package if: ${{runner.os == 'macOS'}} run: | + Rscript -e "install.packages(c('remotes', 'reticulate'))" + Rscript -e "reticulate::install_miniconda()" + echo "options(reticulate.conda_binary = reticulate:::miniconda_conda())" >> .Rprofile + Rscript -e "reticulate::conda_create('r-reticulate', packages = c('python==3.10'))" R CMD build ./ R CMD INSTALL --build ${PACKAGE_NAME}_${PACKAGE_VERSION}.tar.gz --library=$R_LIBS_USER --no-test-load diff --git a/DESCRIPTION b/DESCRIPTION index 587a7987..a9b1eea1 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,10 +1,11 @@ Package: synapser Type: Package Title: R Language Bindings for Synapse API -Version: 1.3.0 +Version: 2.0.0 Date: 2022-01-18 Authors@R: c( - person("Bruce", "Hoff", role = c("aut", "cre"), email = "bruce.hoff@sagebase.org"), + person("Tom", "Yu", role = c("cre"), email = "thomas.yu@sagebase.org"), + person("Bruce", "Hoff", role = c("aut"), email = "bruce.hoff@sagebase.org"), person("Sage Bionetworks", role = c("cph")) ) Maintainer: Bruce Hoff diff --git a/NEWS.md b/NEWS.md index 11abd66d..e296af27 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,12 @@ +## synapser 2.0.0 + +### Improvements + +* Python synapsePythonClient dependency updated to 4.0.0 +* You can only login via a Synapse Personal Access token now. All other forms of authentication have been disabled for security purposes. +* `synSetAnnotations` removed as it is not working as expected due to implementation in the Python API. +* For more changes, please view the 3.2.0 and 4.0.0 changes on the [Python client documentation](https://python-docs.synapse.org/news/). + ## synapser 1.3.0 ### Improvements diff --git a/R/PythonPkgWrapperUtils.R b/R/PythonPkgWrapperUtils.R index 668a26f0..51b02010 100644 --- a/R/PythonPkgWrapperUtils.R +++ b/R/PythonPkgWrapperUtils.R @@ -265,7 +265,6 @@ getFunctionInfo <- function(pyPkg, } # scrub the nulls functionInfo <- removeNulls(functionInfo) - functionContainerName <- module if (!is.null(pySingletonName)) { functionContainerName <- pySingletonName diff --git a/R/shared.R b/R/shared.R index fc0aa9ec..bbeba4b0 100644 --- a/R/shared.R +++ b/R/shared.R @@ -45,8 +45,7 @@ "putACLURI", "keys", "has_key", - "set_annotations", - "get_annotations" + "set_annotations" ) .synapseClientClassFilter <- function(x) { diff --git a/R/zzz.R b/R/zzz.R index afa9c726..3bd29ee7 100644 --- a/R/zzz.R +++ b/R/zzz.R @@ -12,16 +12,17 @@ # Ideally we would source tools/installPythonClient.R to not # have to duplicate the synapseclient install code # system2(paste("Rscript ", getwd(), "/tools/installPythonClient.R ", getwd(), sep="")) - PYTHON_CLIENT_VERSION <- '3.1.1' - reticulate::virtualenv_create('r-reticulate') - reticulate::use_virtualenv('r-reticulate') + PYTHON_CLIENT_VERSION <- '4.0.0' + # reticulate::virtualenv_create('r-reticulate') + # reticulate::use_virtualenv('r-reticulate') reticulate::py_install(c("requests<3", "pandas~=2.0.0", "pysftp", "jinja2", "markupsafe")) reticulate::py_install(c(paste("synapseclient==", PYTHON_CLIENT_VERSION, sep="")), pip=T) + reticulate::py_run_string("import synapseclient") } ) reticulate::py_run_string(sprintf("synapserVersion = 'synapser/%s' ", utils::packageVersion("synapser"))) - reticulate::py_run_string("synapseclient.USER_AGENT['User-Agent'] = synapserVersion + synapseclient.USER_AGENT['User-Agent']") + reticulate::py_run_string("synapseclient.USER_AGENT['User-Agent'] = synapserVersion + ' '+ synapseclient.USER_AGENT['User-Agent']") reticulate::py_run_string("synapseclient.core.config.single_threaded = True") reticulate::py_run_string("syn=synapseclient.Synapse(skip_checks=True)") # make syn available in the global environment diff --git a/auto-man/Activity-class.Rd b/auto-man/Activity-class.Rd index 9db12a93..84e1b403 100644 --- a/auto-man/Activity-class.Rd +++ b/auto-man/Activity-class.Rd @@ -12,12 +12,25 @@ Activity \format{An R6 class object.} \description{ Represents the provenance of a Synapse Entity. + +Parameters: + name: Name of the Activity + description: A short text description of the Activity + used: Either a list of: + + - [reference objects](https://rest-docs.synapse.org/rest/org/sagebionetworks/repo/model/Reference.html) (e.g. [{'targetId':'syn123456', 'targetVersionNumber':1}]) + - a list of Synapse Entities or Entity IDs + - a list of URL's + executed: A code resource that was executed to generate the Entity. + data: A dictionary representation of an Activity, with fields 'name', 'description' and 'used' (a list of reference objects) + +See also: The [W3C's provenance ontology](http://www.w3.org/TR/prov-o/) } \section{Methods}{ \itemize{ \item \code{Activity(name=NULL, description=NULL, used=NULL, executed=NULL, data=list())}: Constructor for \code{\link{Activity}} \item \code{executed(target=NULL, targetVersion=NULL, url=NULL, name=NULL)}: Add a code resource that was executed during the activity.\cr -See synapseclient.activity.Activity.used +See [synapseclient.activity.Activity.used][] \item \code{used(target=NULL, targetVersion=NULL, wasExecuted=NULL, url=NULL, name=NULL)}: Add a resource used by the activity.\cr \cr This method tries to be as permissive as possible. It accepts a string which might be a synapse ID or a URL,\cr @@ -31,11 +44,11 @@ It is an error to specify both target/targetVersion parameters and url/name para To add multiple UsedEntities and UsedURLs, make a separate call for each or pass in a list.\cr \cr In case of conflicting settings for wasExecuted both inside an object and with a parameter, the parameter wins.\cr -For example, this UsedURL will have wasExecuted set to False::\cr +For example, this UsedURL will have wasExecuted set to False:\cr \cr activity.used({'url':'http://google.com', 'name':'Goog', 'wasExecuted':True}, wasExecuted=False)\cr \cr -Entity examples::\cr +Entity examples:\cr \cr activity.used('syn12345')\cr activity.used(entity)\cr @@ -43,14 +56,14 @@ Entity examples::\cr activity.used(codeEntity, wasExecuted=True)\cr activity.used({'reference':{'target':'syn12345', 'targetVersion':1}, 'wasExecuted':False})\cr \cr -URL examples::\cr +URL examples:\cr \cr activity.used('http://mydomain.com/my/awesome/data.RData')\cr activity.used(url='http://mydomain.com/my/awesome/data.RData', name='Awesome Data')\cr activity.used(url='https://github.com/joe_hacker/code_repo', name='Gnarly hacks', wasExecuted=True)\cr activity.used({'url':'https://github.com/joe_hacker/code_repo', 'name':'Gnarly hacks'}, wasExecuted=True)\cr \cr -List example::\cr +List example:\cr \cr activity.used(['syn12345', 'syn23456', entity, {'reference':{'target':'syn100009', 'targetVersion':2}, 'wasExecuted':True}, 'http://mydomain.com/my/awesome/data.RData']) } diff --git a/auto-man/Activity.Rd b/auto-man/Activity.Rd index 7b0d2380..0e988c69 100644 --- a/auto-man/Activity.Rd +++ b/auto-man/Activity.Rd @@ -11,20 +11,29 @@ Constructor for objects of type Activity } \description{ Represents the provenance of a Synapse Entity. + +Parameters: + name: Name of the Activity + description: A short text description of the Activity + used: Either a list of: + + - [reference objects](https://rest-docs.synapse.org/rest/org/sagebionetworks/repo/model/Reference.html) (e.g. [{'targetId':'syn123456', 'targetVersionNumber':1}]) + - a list of Synapse Entities or Entity IDs + - a list of URL's + executed: A code resource that was executed to generate the Entity. + data: A dictionary representation of an Activity, with fields 'name', 'description' and 'used' (a list of reference objects) + +See also: The [W3C's provenance ontology](http://www.w3.org/TR/prov-o/) } \usage{ Activity(name=NULL, description=NULL, used=NULL, executed=NULL, data=list()) } \arguments{ -\item{name}{ name of the Activity\cr -} -\item{description}{ a short text description of the Activity\cr -} -\item{used}{ Either a list of:} -\item{executed}{ A code resource that was executed to generate the Entity.\cr -} -\item{data}{ A dictionary representation of an Activity, with fields 'name', 'description' and 'used'\cr - (a list of reference objects)} +\item{name}{} +\item{description}{} +\item{used}{} +\item{executed}{} +\item{data}{} } \value{ An object of type Activity diff --git a/auto-man/Column-class.Rd b/auto-man/Column-class.Rd index 88d5740a..808a3c8f 100644 --- a/auto-man/Column-class.Rd +++ b/auto-man/Column-class.Rd @@ -11,12 +11,40 @@ Column } \format{An R6 class object.} \description{ -Defines a column to be used in a table Schema -EntityViewSchema. +Defines a column to be used in a table [Schema][synapseclient.table.Schema] +[EntityViewSchema][synapseclient.table.EntityViewSchema]. + +Attributes: + id: An immutable ID issued by the platform + columnType: The column type determines the type of data that can be stored in a column. It can be any + of: + + - `STRING` + - `DOUBLE` + - `INTEGER` + - `BOOLEAN` + - `DATE` + - `FILEHANDLEID` + - `ENTITYID` + - `LINK` + - `LARGETEXT` + - `USERID` + + For more information, please see: + + maximumSize: A parameter for columnTypes with a maximum size. For example, ColumnType.STRINGs have a + default maximum size of 50 characters, but can be set to a `maximumSize` of 1 to 1000 + characters. + maximumListLength: Required if using a columnType with a "_LIST" suffix. Describes the maximum number of + values that will appear in that list. Value range 1-100 inclusive. Default 100 + name: The display name of the column + enumValues: Columns type of STRING can be constrained to an enumeration values set on this list. + defaultValue: The default value for this column. Columns of type FILEHANDLEID and ENTITYID are not + allowed to have default values. } \section{Methods}{ \itemize{ -\item \code{Column(id=NULL, columnType=NULL, maximumSize=NULL, maximumListLength=NULL, name=NULL, enumValues=NULL, defaultValue=NULL)}: Constructor for \code{\link{Column}} +\item \code{Column()}: Constructor for \code{\link{Column}} } } diff --git a/auto-man/Column.Rd b/auto-man/Column.Rd index b574e9a8..95468c50 100644 --- a/auto-man/Column.Rd +++ b/auto-man/Column.Rd @@ -10,33 +10,42 @@ Constructor for objects of type Column } \description{ -Defines a column to be used in a table Schema -EntityViewSchema. +Defines a column to be used in a table [Schema][synapseclient.table.Schema] +[EntityViewSchema][synapseclient.table.EntityViewSchema]. + +Attributes: + id: An immutable ID issued by the platform + columnType: The column type determines the type of data that can be stored in a column. It can be any + of: + + - `STRING` + - `DOUBLE` + - `INTEGER` + - `BOOLEAN` + - `DATE` + - `FILEHANDLEID` + - `ENTITYID` + - `LINK` + - `LARGETEXT` + - `USERID` + + For more information, please see: + + maximumSize: A parameter for columnTypes with a maximum size. For example, ColumnType.STRINGs have a + default maximum size of 50 characters, but can be set to a `maximumSize` of 1 to 1000 + characters. + maximumListLength: Required if using a columnType with a "_LIST" suffix. Describes the maximum number of + values that will appear in that list. Value range 1-100 inclusive. Default 100 + name: The display name of the column + enumValues: Columns type of STRING can be constrained to an enumeration values set on this list. + defaultValue: The default value for this column. Columns of type FILEHANDLEID and ENTITYID are not + allowed to have default values. } \usage{ -Column(id=NULL, columnType=NULL, maximumSize=NULL, maximumListLength=NULL, name=NULL, enumValues=NULL, defaultValue=NULL) +Column() } \arguments{ -\item{id}{optional named parameter: An immutable ID issued by the platform\cr -} -\item{columnType}{optional named parameter: The column type determines the type of data that can be stored in a column. It can be any\cr - of: "STRING", "DOUBLE", "INTEGER", "BOOLEAN", "DATE", "FILEHANDLEID", "ENTITYID", "LINK",\cr - "LARGETEXT", "USERID". For more information, please see:\cr - https://rest-docs.synapse.org/rest/org/sagebionetworks/repo/model/table/ColumnType.html\cr -} -\item{maximumSize}{optional named parameter: A parameter for columnTypes with a maximum size. For example, ColumnType.STRINGs have a\cr - default maximum size of 50 characters, but can be set to a maximumSize of 1 to 1000\cr - characters.\cr -} -\item{maximumListLength}{optional named parameter: Required if using a columnType with a "_LIST" suffix. Describes the maximum number of\cr - values that will appear in that list. Value range 1-100 inclusive. Default 100\cr -} -\item{name}{optional named parameter: The display name of the column\cr -} -\item{enumValues}{optional named parameter: Columns type of STRING can be constrained to an enumeration values set on this list.\cr -} -\item{defaultValue}{optional named parameter: The default value for this column. Columns of type FILEHANDLEID and ENTITYID are not\cr - allowed to have default values.} + } \value{ An object of type Column diff --git a/auto-man/Dataset-class.Rd b/auto-man/Dataset-class.Rd index d787b99f..190faa13 100644 --- a/auto-man/Dataset-class.Rd +++ b/auto-man/Dataset-class.Rd @@ -11,24 +11,80 @@ Dataset } \format{An R6 class object.} \description{ -A Dataset is an Entity that defines a +A Dataset is an [Entity][synapseclient.entity.Entity] that defines a flat list of entities as a tableview (a.k.a. a "dataset"). + +Attributes: + name: The name for the Dataset object + description: User readable description of the schema + columns: A list of [Column][synapseclient.table.Column] objects or their IDs + parent: The Synapse Project to which this Dataset belongs + properties: A map of Synapse properties + annotations: A map of user defined annotations + dataset_items: A list of items characterized by entityId and versionNumber + folder: A list of Folder IDs + local_state: Internal use only } \section{Methods}{ \itemize{ -\item \code{Dataset(name=NULL, columns=NULL, parent=NULL, properties=NULL, addDefaultViewColumns=TRUE, addAnnotationColumns=TRUE, ignoredAnnotationColumnNames=list(), annotations=NULL, local_state=NULL, dataset_items=NULL, folders=NULL, force=FALSE, description=NULL, folder=NULL)}: Constructor for \code{\link{Dataset}} -\item \code{addColumn(column)}: -\item \code{addColumns(columns)}: -\item \code{add_folder(folder, force=TRUE)}: -\item \code{add_folders(folders, force=TRUE)}: -\item \code{add_item(dataset_item, force=TRUE)}: -\item \code{add_items(dataset_items, force=TRUE)}: -\item \code{add_scope(entities)}: +\item \code{Dataset(name=NULL, columns=NULL, parent=NULL, properties=NULL, addDefaultViewColumns=TRUE, addAnnotationColumns=TRUE, ignoredAnnotationColumnNames=list(), annotations=NULL, local_state=NULL, dataset_items=NULL, folders=NULL, force=FALSE)}: Constructor for \code{\link{Dataset}} +\item \code{addColumn(column)}: Store the column\cr +\cr +Arguments:\cr + column: A column object or its ID\cr +\cr +Raises:\cr + ValueError: If the given column is not a string, integer or [Column][synapseclient.table.Column] object +\item \code{addColumns(columns)}: Add columns\cr +\cr +Arguments:\cr + columns: A list of column objects or their ID +\item \code{add_folder(folder, force=TRUE)}: Add a folder\cr +\cr +Arguments:\cr + folder: A single Synapse Folder ID\cr + force: Force add items from folder +\item \code{add_folders(folders, force=TRUE)}: Add folders\cr +\cr +Arguments:\cr + folders: A list of Synapse Folder IDs\cr + force: Force add items from folders +\item \code{add_item(dataset_item, force=TRUE)}: Add a dataset item\cr +\cr +Arguments:\cr + dataset_item: A single dataset item\cr + force: Force add item\cr +\cr +Raises:\cr + ValueError: If duplicate item is found\cr + ValueError: The item is not a DatasetItem +\item \code{add_items(dataset_items, force=TRUE)}: Add items\cr +\cr +Arguments:\cr + dataset_items: A list of dataset items\cr + force: Force add items +\item \code{add_scope(entities)}: Add scope\cr +\cr +Arguments:\cr + entities: A [Project][synapseclient.entity.Project], [Folder][synapseclient.entity.Folder],\cr + [Evaluation][synapseclient.evaluation.Evaluation] object or its ID, can also be a list of them \item \code{empty()}: \item \code{has_columns()}: Does this schema have columns specified? -\item \code{has_item(item_id)}: -\item \code{removeColumn(column)}: -\item \code{remove_item(item_id)}: +\item \code{has_item(item_id)}: Check if has dataset item\cr +\cr +Arguments:\cr + item_id: A single dataset item Synapse ID +\item \code{removeColumn(column)}: Remove column\cr +\cr +Arguments:\cr + column: A column object or its ID\cr +\cr +Raises:\cr + ValueError: If the given column is not a string, integer or [Column][synapseclient.table.Column] object +\item \code{remove_item(item_id)}: Remove item\cr +\cr +Arguments:\cr + item_id: A single dataset item Synapse ID } } diff --git a/auto-man/Dataset.Rd b/auto-man/Dataset.Rd index 95e9b87f..ac83e48d 100644 --- a/auto-man/Dataset.Rd +++ b/auto-man/Dataset.Rd @@ -10,47 +10,39 @@ Constructor for objects of type Dataset } \description{ -A Dataset is an Entity that defines a +A Dataset is an [Entity][synapseclient.entity.Entity] that defines a flat list of entities as a tableview (a.k.a. a "dataset"). + +Attributes: + name: The name for the Dataset object + description: User readable description of the schema + columns: A list of [Column][synapseclient.table.Column] objects or their IDs + parent: The Synapse Project to which this Dataset belongs + properties: A map of Synapse properties + annotations: A map of user defined annotations + dataset_items: A list of items characterized by entityId and versionNumber + folder: A list of Folder IDs + local_state: Internal use only } \usage{ -Dataset(name=NULL, columns=NULL, parent=NULL, properties=NULL, addDefaultViewColumns=TRUE, addAnnotationColumns=TRUE, ignoredAnnotationColumnNames=list(), annotations=NULL, local_state=NULL, dataset_items=NULL, folders=NULL, force=FALSE, description=NULL, folder=NULL) +Dataset(name=NULL, columns=NULL, parent=NULL, properties=NULL, addDefaultViewColumns=TRUE, addAnnotationColumns=TRUE, ignoredAnnotationColumnNames=list(), annotations=NULL, local_state=NULL, dataset_items=NULL, folders=NULL, force=FALSE) } \arguments{ -\item{name}{ The name for the Dataset object\cr -} -\item{columns}{ A list of Column objects or their IDs\cr -} -\item{parent}{ The Synapse Project to which this Dataset belongs\cr -} -\item{properties}{ A map of Synapse properties\cr -} +\item{name}{} +\item{columns}{} +\item{parent}{} +\item{properties}{} \item{addDefaultViewColumns}{} \item{addAnnotationColumns}{} \item{ignoredAnnotationColumnNames}{} -\item{annotations}{ A map of user defined annotations\cr -} -\item{local_state}{ Internal use only} -\item{dataset_items}{ A list of items characterized by entityId and versionNumber\cr -} +\item{annotations}{} +\item{local_state}{} +\item{dataset_items}{} \item{folders}{} \item{force}{} -\item{description}{optional named parameter: User readable description of the schema\cr -} -\item{folder}{optional named parameter: A list of Folder IDs\cr -} } \value{ An object of type Dataset } - -\examples{ -%\dontrun{ -% syn = synapseclient.login() -% syn.create_snapshot_version( -% dataset.id, -% label="v1.0", -% comment="This is version 1") -%} -} + diff --git a/auto-man/DockerRepository-class.Rd b/auto-man/DockerRepository-class.Rd index d6c24bc7..2b39836b 100644 --- a/auto-man/DockerRepository-class.Rd +++ b/auto-man/DockerRepository-class.Rd @@ -13,15 +13,31 @@ DockerRepository \description{ A Docker repository is a lightweight virtual machine image. -NOTE: store()-ing a DockerRepository created in the Python client will always result in it being treated as a -reference to an external Docker repository that is not managed by synapse. -To upload a docker image that is managed by Synapse please use the official Docker client and read -https://help.synapse.org/docs/Synapse-Docker-Registry.2011037752.html for instructions on uploading a Docker Image to Synapse +NOTE: [store()][synapseclient.Synapse.store]-ing a DockerRepository created in the Python client will always result +in it being treated as a reference to an external Docker repository that is not +managed by synapse. To upload a docker image that is managed by Synapse please use the official +Docker client and read +for instructions on uploading a Docker Image to Synapse + +Attributes: + repositoryName: The name of the Docker Repository. Usually in the format: [host[:port]/]path. + If host is not set, it will default to that of DockerHub. + port can only be specified if the host is also specified. + parent: The parent project or folder + properties: A map of Synapse properties + annotations: A map of user defined annotations + local_state: Internal use only } \section{Methods}{ \itemize{ \item \code{DockerRepository(repositoryName=NULL, parent=NULL, properties=NULL, annotations=NULL, local_state=NULL)}: Constructor for \code{\link{DockerRepository}} -\item \code{local_state(state=NULL)}: Set or get the object's internal state, excluding properties, or annotations. +\item \code{local_state(state=NULL)}: Set or get the object's internal state, excluding properties, or annotations.\cr +\cr +Arguments:\cr + state: A dictionary containing the object's internal state.\cr +\cr +Returns:\cr + result: The object's internal state, excluding properties, or annotations. } } diff --git a/auto-man/DockerRepository.Rd b/auto-man/DockerRepository.Rd index c97929ce..bcec81a8 100644 --- a/auto-man/DockerRepository.Rd +++ b/auto-man/DockerRepository.Rd @@ -12,26 +12,30 @@ Constructor for objects of type DockerRepository \description{ A Docker repository is a lightweight virtual machine image. -NOTE: store()-ing a DockerRepository created in the Python client will always result in it being treated as a -reference to an external Docker repository that is not managed by synapse. -To upload a docker image that is managed by Synapse please use the official Docker client and read -https://help.synapse.org/docs/Synapse-Docker-Registry.2011037752.html for instructions on uploading a Docker Image to Synapse +NOTE: [store()][synapseclient.Synapse.store]-ing a DockerRepository created in the Python client will always result +in it being treated as a reference to an external Docker repository that is not +managed by synapse. To upload a docker image that is managed by Synapse please use the official +Docker client and read +for instructions on uploading a Docker Image to Synapse + +Attributes: + repositoryName: The name of the Docker Repository. Usually in the format: [host[:port]/]path. + If host is not set, it will default to that of DockerHub. + port can only be specified if the host is also specified. + parent: The parent project or folder + properties: A map of Synapse properties + annotations: A map of user defined annotations + local_state: Internal use only } \usage{ DockerRepository(repositoryName=NULL, parent=NULL, properties=NULL, annotations=NULL, local_state=NULL) } \arguments{ -\item{repositoryName}{ the name of the Docker Repository. Usually in the format: [host[:port]/]path.\cr - If host is not set, it will default to that of DockerHub. port can only be specified\cr - if the host is also specified.\cr -} -\item{parent}{ the parent project for the Docker repository\cr -} -\item{properties}{ A map of Synapse properties\cr -} -\item{annotations}{ A map of user defined annotations\cr -} -\item{local_state}{ Internal use only} +\item{repositoryName}{} +\item{parent}{} +\item{properties}{} +\item{annotations}{} +\item{local_state}{} } \value{ An object of type DockerRepository diff --git a/auto-man/EntityViewSchema-class.Rd b/auto-man/EntityViewSchema-class.Rd index 63305cc6..7a4a5509 100644 --- a/auto-man/EntityViewSchema-class.Rd +++ b/auto-man/EntityViewSchema-class.Rd @@ -11,18 +11,80 @@ EntityViewSchema } \format{An R6 class object.} \description{ -A EntityViewSchema is a Entity that displays all files/projects -(depending on user choice) within a given set of scopes +A EntityViewSchema is a [Entity][synapseclient.entity.Entity] that displays all files/projects +(depending on user choice) within a given set of scopes. + +Attributes: + name: The name of the Entity View Table object + columns: (Optional) A list of [Column][synapseclient.table.Column] objects or their IDs. + parent: The project in Synapse to which this table belongs + scopes: A list of Projects/Folders or their ids + type: This field is deprecated. Please use `includeEntityTypes` + includeEntityTypes: A list of entity types to include in the view. Supported entity types are: + + - `EntityViewType.FILE` + - `EntityViewType.PROJECT` + - `EntityViewType.TABLE` + - `EntityViewType.FOLDER` + - `EntityViewType.VIEW` + - `EntityViewType.DOCKER` + + If none is provided, the view will default to include `EntityViewType.FILE`. + addDefaultViewColumns: If true, adds all default columns (e.g. name, createdOn, modifiedBy etc.) + Defaults to True. + The default columns will be added after a call to + [store][synapseclient.Synapse.store]. + addAnnotationColumns: If true, adds columns for all annotation keys defined across all Entities in + the EntityViewSchema's scope. Defaults to True. + The annotation columns will be added after a call to + [store][synapseclient.Synapse.store]. + ignoredAnnotationColumnNames: A list of strings representing annotation names. + When addAnnotationColumns is True, the names in this list will not be + automatically added as columns to the EntityViewSchema if they exist in any + of the defined scopes. + properties: A map of Synapse properties + annotations: A map of user defined annotations + local_state: Internal use only } \section{Methods}{ \itemize{ \item \code{EntityViewSchema(name=NULL, columns=NULL, parent=NULL, scopes=NULL, type=NULL, includeEntityTypes=NULL, addDefaultViewColumns=TRUE, addAnnotationColumns=TRUE, ignoredAnnotationColumnNames=list(), properties=NULL, annotations=NULL, local_state=NULL)}: Constructor for \code{\link{EntityViewSchema}} -\item \code{addColumn(column)}: -\item \code{addColumns(columns)}: -\item \code{add_scope(entities)}: +\item \code{addColumn(column)}: Store the column\cr +\cr +Arguments:\cr + column: A column object or its ID\cr +\cr +Raises:\cr + ValueError: If the given column is not a string, integer or [Column][synapseclient.table.Column] object +\item \code{addColumns(columns)}: Add columns\cr +\cr +Arguments:\cr + columns: A list of column objects or their ID +\item \code{add_scope(entities)}: Add scope\cr +\cr +Arguments:\cr + entities: A [Project][synapseclient.entity.Project], [Folder][synapseclient.entity.Folder],\cr + [Evaluation][synapseclient.evaluation.Evaluation] object or its ID, can also be a list of them \item \code{has_columns()}: Does this schema have columns specified? -\item \code{removeColumn(column)}: -\item \code{set_entity_types(includeEntityTypes)}: +\item \code{removeColumn(column)}: Remove column\cr +\cr +Arguments:\cr + column: A column object or its ID\cr +\cr +Raises:\cr + ValueError: If the given column is not a string, integer or [Column][synapseclient.table.Column] object +\item \code{set_entity_types(includeEntityTypes)}: Set entity types\cr +\cr +Arguments:\cr + includeEntityTypes: A list of entity types to include in the view. This list will replace the previous\cr + settings. Supported entity types are:\cr +\cr + - `EntityViewType.FILE`\cr + - `EntityViewType.PROJECT`\cr + - `EntityViewType.TABLE`\cr + - `EntityViewType.FOLDER`\cr + - `EntityViewType.VIEW`\cr + - `EntityViewType.DOCKER` } } diff --git a/auto-man/EntityViewSchema.Rd b/auto-man/EntityViewSchema.Rd index 17792d18..864bca2c 100644 --- a/auto-man/EntityViewSchema.Rd +++ b/auto-man/EntityViewSchema.Rd @@ -10,44 +10,57 @@ Constructor for objects of type EntityViewSchema } \description{ -A EntityViewSchema is a Entity that displays all files/projects -(depending on user choice) within a given set of scopes +A EntityViewSchema is a [Entity][synapseclient.entity.Entity] that displays all files/projects +(depending on user choice) within a given set of scopes. + +Attributes: + name: The name of the Entity View Table object + columns: (Optional) A list of [Column][synapseclient.table.Column] objects or their IDs. + parent: The project in Synapse to which this table belongs + scopes: A list of Projects/Folders or their ids + type: This field is deprecated. Please use `includeEntityTypes` + includeEntityTypes: A list of entity types to include in the view. Supported entity types are: + + - `EntityViewType.FILE` + - `EntityViewType.PROJECT` + - `EntityViewType.TABLE` + - `EntityViewType.FOLDER` + - `EntityViewType.VIEW` + - `EntityViewType.DOCKER` + + If none is provided, the view will default to include `EntityViewType.FILE`. + addDefaultViewColumns: If true, adds all default columns (e.g. name, createdOn, modifiedBy etc.) + Defaults to True. + The default columns will be added after a call to + [store][synapseclient.Synapse.store]. + addAnnotationColumns: If true, adds columns for all annotation keys defined across all Entities in + the EntityViewSchema's scope. Defaults to True. + The annotation columns will be added after a call to + [store][synapseclient.Synapse.store]. + ignoredAnnotationColumnNames: A list of strings representing annotation names. + When addAnnotationColumns is True, the names in this list will not be + automatically added as columns to the EntityViewSchema if they exist in any + of the defined scopes. + properties: A map of Synapse properties + annotations: A map of user defined annotations + local_state: Internal use only } \usage{ EntityViewSchema(name=NULL, columns=NULL, parent=NULL, scopes=NULL, type=NULL, includeEntityTypes=NULL, addDefaultViewColumns=TRUE, addAnnotationColumns=TRUE, ignoredAnnotationColumnNames=list(), properties=NULL, annotations=NULL, local_state=NULL) } \arguments{ -\item{name}{ the name of the Entity View Table object\cr -} -\item{columns}{ a list of Column objects or their IDs. These are optional.\cr -} -\item{parent}{ the project in Synapse to which this table belongs\cr -} -\item{scopes}{ a list of Projects/Folders or their ids\cr -} -\item{type}{ This field is deprecated. Please use `includeEntityTypes`\cr -} -\item{includeEntityTypes}{ a list of entity types to include in the view. Supported entity types are:} -\item{addDefaultViewColumns}{ If true, adds all default columns (e.g. name, createdOn, modifiedBy etc.)\cr - Defaults to True.\cr - The default columns will be added after a call to\cr - synapseclient.Synapse.store.\cr -} -\item{addAnnotationColumns}{ If true, adds columns for all annotation keys defined across all Entities in\cr - the EntityViewSchema's scope. Defaults to True.\cr - The annotation columns will be added after a call to\cr - synapseclient.Synapse.store.\cr -} -\item{ignoredAnnotationColumnNames}{ A list of strings representing annotation names.\cr - When addAnnotationColumns is True, the names in this list will not be\cr - automatically added as columns to the EntityViewSchema if they exist in any\cr - of the defined scopes.\cr -} -\item{properties}{ A map of Synapse properties\cr -} -\item{annotations}{ A map of user defined annotations\cr -} -\item{local_state}{ Internal use only} +\item{name}{} +\item{columns}{} +\item{parent}{} +\item{scopes}{} +\item{type}{} +\item{includeEntityTypes}{} +\item{addDefaultViewColumns}{} +\item{addAnnotationColumns}{} +\item{ignoredAnnotationColumnNames}{} +\item{properties}{} +\item{annotations}{} +\item{local_state}{} } \value{ An object of type EntityViewSchema diff --git a/auto-man/Evaluation-class.Rd b/auto-man/Evaluation-class.Rd index c86b0260..c2000a05 100644 --- a/auto-man/Evaluation-class.Rd +++ b/auto-man/Evaluation-class.Rd @@ -12,10 +12,17 @@ Evaluation \format{An R6 class object.} \description{ An Evaluation Submission queue, allowing submissions, retrieval and scoring. + +Arguments: + name: Name of the evaluation + description: A short description of the evaluation + contentSource: Synapse Project associated with the evaluation + submissionReceiptMessage: Message to display to users upon submission + submissionInstructionsMessage: Message to display to users detailing acceptable formatting for submissions. } \section{Methods}{ \itemize{ -\item \code{Evaluation(name=NULL, description=NULL, contentSource=NULL, submissionReceiptMessage=NULL, submissionInstructionsMessage=NULL)}: Constructor for \code{\link{Evaluation}} +\item \code{Evaluation()}: Constructor for \code{\link{Evaluation}} } } diff --git a/auto-man/Evaluation.Rd b/auto-man/Evaluation.Rd index 24593b83..06043088 100644 --- a/auto-man/Evaluation.Rd +++ b/auto-man/Evaluation.Rd @@ -11,20 +11,19 @@ Constructor for objects of type Evaluation } \description{ An Evaluation Submission queue, allowing submissions, retrieval and scoring. + +Arguments: + name: Name of the evaluation + description: A short description of the evaluation + contentSource: Synapse Project associated with the evaluation + submissionReceiptMessage: Message to display to users upon submission + submissionInstructionsMessage: Message to display to users detailing acceptable formatting for submissions. } \usage{ -Evaluation(name=NULL, description=NULL, contentSource=NULL, submissionReceiptMessage=NULL, submissionInstructionsMessage=NULL) +Evaluation() } \arguments{ -\item{name}{optional named parameter: Name of the evaluation\cr -} -\item{description}{optional named parameter: A short description of the evaluation\cr -} -\item{contentSource}{optional named parameter: Synapse Project associated with the evaluation\cr -} -\item{submissionReceiptMessage}{optional named parameter: Message to display to users upon submission\cr -} -\item{submissionInstructionsMessage}{optional named parameter: Message to display to users detailing acceptable formatting for submissions.} + } \value{ An object of type Evaluation diff --git a/auto-man/File-class.Rd b/auto-man/File-class.Rd index e774ce73..efd1a48c 100644 --- a/auto-man/File-class.Rd +++ b/auto-man/File-class.Rd @@ -13,14 +13,57 @@ File \description{ Represents a file in Synapse. -When a File object is stored, the associated local file or its URL will be stored in Synapse. A File must have a -path (or URL) and a parent. By default, the name of the file in Synapse matches the filename, but by specifying -the `name` attribute, the File Entity name can be different. +When a File object is stored, the associated local file or its URL will be stored in Synapse. +A File must have a path (or URL) and a parent. By default, the name of the file in Synapse +matches the filename, but by specifying the `name` attribute, the File Entity name can be different. + +## Changing File Names + +A Synapse File Entity has a name separate from the name of the actual file it represents. +When a file is uploaded to Synapse, its filename is fixed, even though the name of the entity +can be changed at any time. Synapse provides a way to change this filename and the +content-type of the file for future downloads by creating a new version of the file +with a modified copy of itself. This can be done with the +[synapseutils.copy_functions.changeFileMetaData][] function. + + import synapseutils + e = syn.get(synid) + print(os.path.basename(e.path)) ## prints, e.g., "my_file.txt" + e = synapseutils.changeFileMetaData(syn, e, "my_newname_file.txt") + +Setting *fileNameOverride* will **not** change the name of a copy of the +file that's already downloaded into your local cache. Either rename the +local copy manually or remove it from the cache and re-download.: + + syn.cache.remove(e.dataFileHandleId) + e = syn.get(e) + print(os.path.basename(e.path)) ## prints "my_newname_file.txt" + +Parameters: + path: Location to be represented by this File + name: Name of the file in Synapse, not to be confused with the name within the path + parent: Project or Folder where this File is stored + synapseStore: Whether the File should be uploaded or if only the path should + be stored when [synapseclient.Synapse.store][] is called on the File object. + contentType: Manually specify Content-type header, for example "application/png" or + "application/json; charset=UTF-8" + dataFileHandleId: Defining an existing dataFileHandleId will use the existing dataFileHandleId + The creator of the file must also be the owner of the dataFileHandleId + to have permission to store the file. + properties: A map of Synapse properties + annotations: A map of user defined annotations + local_state: Internal use only } \section{Methods}{ \itemize{ -\item \code{File(path=NULL, parent=NULL, synapseStore=TRUE, properties=NULL, annotations=NULL, local_state=NULL, name=NULL, contentType=NULL, dataFileHandleId=NULL)}: Constructor for \code{\link{File}} -\item \code{local_state(state=NULL)}: Set or get the object's internal state, excluding properties, or annotations. +\item \code{File(path=NULL, parent=NULL, synapseStore=TRUE, properties=NULL, annotations=NULL, local_state=NULL)}: Constructor for \code{\link{File}} +\item \code{local_state(state=NULL)}: Set or get the object's internal state, excluding properties, or annotations.\cr +\cr +Arguments:\cr + state: A dictionary containing the object's internal state.\cr +\cr +Returns:\cr + result: The object's internal state, excluding properties, or annotations. } } diff --git a/auto-man/File.Rd b/auto-man/File.Rd index 7fea385e..8d8b33be 100644 --- a/auto-man/File.Rd +++ b/auto-man/File.Rd @@ -12,46 +12,60 @@ Constructor for objects of type File \description{ Represents a file in Synapse. -When a File object is stored, the associated local file or its URL will be stored in Synapse. A File must have a -path (or URL) and a parent. By default, the name of the file in Synapse matches the filename, but by specifying -the `name` attribute, the File Entity name can be different. +When a File object is stored, the associated local file or its URL will be stored in Synapse. +A File must have a path (or URL) and a parent. By default, the name of the file in Synapse +matches the filename, but by specifying the `name` attribute, the File Entity name can be different. + +## Changing File Names + +A Synapse File Entity has a name separate from the name of the actual file it represents. +When a file is uploaded to Synapse, its filename is fixed, even though the name of the entity +can be changed at any time. Synapse provides a way to change this filename and the +content-type of the file for future downloads by creating a new version of the file +with a modified copy of itself. This can be done with the +[synapseutils.copy_functions.changeFileMetaData][] function. + + import synapseutils + e = syn.get(synid) + print(os.path.basename(e.path)) ## prints, e.g., "my_file.txt" + e = synapseutils.changeFileMetaData(syn, e, "my_newname_file.txt") + +Setting *fileNameOverride* will **not** change the name of a copy of the +file that's already downloaded into your local cache. Either rename the +local copy manually or remove it from the cache and re-download.: + + syn.cache.remove(e.dataFileHandleId) + e = syn.get(e) + print(os.path.basename(e.path)) ## prints "my_newname_file.txt" + +Parameters: + path: Location to be represented by this File + name: Name of the file in Synapse, not to be confused with the name within the path + parent: Project or Folder where this File is stored + synapseStore: Whether the File should be uploaded or if only the path should + be stored when [synapseclient.Synapse.store][] is called on the File object. + contentType: Manually specify Content-type header, for example "application/png" or + "application/json; charset=UTF-8" + dataFileHandleId: Defining an existing dataFileHandleId will use the existing dataFileHandleId + The creator of the file must also be the owner of the dataFileHandleId + to have permission to store the file. + properties: A map of Synapse properties + annotations: A map of user defined annotations + local_state: Internal use only } \usage{ -File(path=NULL, parent=NULL, synapseStore=TRUE, properties=NULL, annotations=NULL, local_state=NULL, name=NULL, contentType=NULL, dataFileHandleId=NULL) +File(path=NULL, parent=NULL, synapseStore=TRUE, properties=NULL, annotations=NULL, local_state=NULL) } \arguments{ -\item{path}{ Location to be represented by this File\cr -} -\item{parent}{ Project or Folder where this File is stored\cr -} -\item{synapseStore}{ Whether the File should be uploaded or if only the path should be stored when\cr - synapseclient.Synapse.store is called on the File object.\cr - Defaults to True (file should be uploaded)\cr -} -\item{properties}{ A map of Synapse properties\cr -} -\item{annotations}{ A map of user defined annotations\cr -} -\item{local_state}{ Internal use only} -\item{name}{optional named parameter: Name of the file in Synapse, not to be confused with the name within the path\cr -} -\item{contentType}{optional named parameter: Manually specify Content-type header, for example "application/png" or\cr - "application/json; charset=UTF-8"\cr -} -\item{dataFileHandleId}{optional named parameter: Defining an existing dataFileHandleId will use the existing dataFileHandleId\cr - The creator of the file must also be the owner of the dataFileHandleId to have\cr - permission to store the file\cr -} +\item{path}{} +\item{parent}{} +\item{synapseStore}{} +\item{properties}{} +\item{annotations}{} +\item{local_state}{} } \value{ An object of type File } - -\examples{ -%\dontrun{ -% # The Entity name is derived from the path and is 'data.xyz' -% data = File('/path/to/file/data.xyz', parent=folder) -% data = syn.store(data) -%} -} + diff --git a/auto-man/Folder-class.Rd b/auto-man/Folder-class.Rd index 2414c797..e159da43 100644 --- a/auto-man/Folder-class.Rd +++ b/auto-man/Folder-class.Rd @@ -14,11 +14,24 @@ Folder Represents a folder in Synapse. Folders must have a name and a parent and can optionally have annotations. + +Attributes: + name: The name of the folder + parent: The parent project or folder + properties: A map of Synapse properties + annotations: A map of user defined annotations + local_state: Internal use only } \section{Methods}{ \itemize{ \item \code{Folder(name=NULL, parent=NULL, properties=NULL, annotations=NULL, local_state=NULL)}: Constructor for \code{\link{Folder}} -\item \code{local_state(state=NULL)}: Set or get the object's internal state, excluding properties, or annotations. +\item \code{local_state(state=NULL)}: Set or get the object's internal state, excluding properties, or annotations.\cr +\cr +Arguments:\cr + state: A dictionary containing the object's internal state.\cr +\cr +Returns:\cr + result: The object's internal state, excluding properties, or annotations. } } diff --git a/auto-man/Folder.Rd b/auto-man/Folder.Rd index bf35a971..36bb01ef 100644 --- a/auto-man/Folder.Rd +++ b/auto-man/Folder.Rd @@ -13,29 +13,26 @@ Constructor for objects of type Folder Represents a folder in Synapse. Folders must have a name and a parent and can optionally have annotations. + +Attributes: + name: The name of the folder + parent: The parent project or folder + properties: A map of Synapse properties + annotations: A map of user defined annotations + local_state: Internal use only } \usage{ Folder(name=NULL, parent=NULL, properties=NULL, annotations=NULL, local_state=NULL) } \arguments{ -\item{name}{ The name of the folder\cr -} -\item{parent}{ The parent project or folder\cr -} -\item{properties}{ A map of Synapse properties\cr -} -\item{annotations}{ A map of user defined annotations\cr -} -\item{local_state}{ Internal use only} +\item{name}{} +\item{parent}{} +\item{properties}{} +\item{annotations}{} +\item{local_state}{} } \value{ An object of type Folder } - -\examples{ -%\dontrun{ -% folder = Folder('my data', parent=project) -% folder = syn.store(folder) -%} -} + diff --git a/auto-man/Link-class.Rd b/auto-man/Link-class.Rd index 38ca4ef0..2575734d 100644 --- a/auto-man/Link-class.Rd +++ b/auto-man/Link-class.Rd @@ -13,13 +13,27 @@ Link \description{ Represents a link in Synapse. -Links must have a target ID and a parent. When you do synapseclient.Synapse.get on a Link object, +Links must have a target ID and a parent. When you do [synapseclient.Synapse.get][] on a Link object, the Link object is returned. If the target is desired, specify followLink=True in synapseclient.Synapse.get. + +Attributes: + targetId: The ID of the entity to be linked + targetVersion: The version of the entity to be linked + parent: The parent project or folder + properties: A map of Synapse properties + annotations: A map of user defined annotations + local_state: Internal use only } \section{Methods}{ \itemize{ \item \code{Link(targetId=NULL, targetVersion=NULL, parent=NULL, properties=NULL, annotations=NULL, local_state=NULL)}: Constructor for \code{\link{Link}} -\item \code{local_state(state=NULL)}: Set or get the object's internal state, excluding properties, or annotations. +\item \code{local_state(state=NULL)}: Set or get the object's internal state, excluding properties, or annotations.\cr +\cr +Arguments:\cr + state: A dictionary containing the object's internal state.\cr +\cr +Returns:\cr + result: The object's internal state, excluding properties, or annotations. } } diff --git a/auto-man/Link.Rd b/auto-man/Link.Rd index 25fa331d..12b9b0b0 100644 --- a/auto-man/Link.Rd +++ b/auto-man/Link.Rd @@ -12,33 +12,30 @@ Constructor for objects of type Link \description{ Represents a link in Synapse. -Links must have a target ID and a parent. When you do synapseclient.Synapse.get on a Link object, +Links must have a target ID and a parent. When you do [synapseclient.Synapse.get][] on a Link object, the Link object is returned. If the target is desired, specify followLink=True in synapseclient.Synapse.get. + +Attributes: + targetId: The ID of the entity to be linked + targetVersion: The version of the entity to be linked + parent: The parent project or folder + properties: A map of Synapse properties + annotations: A map of user defined annotations + local_state: Internal use only } \usage{ Link(targetId=NULL, targetVersion=NULL, parent=NULL, properties=NULL, annotations=NULL, local_state=NULL) } \arguments{ -\item{targetId}{ The ID of the entity to be linked\cr -} -\item{targetVersion}{ The version of the entity to be linked\cr -} -\item{parent}{ The parent project or folder\cr -} -\item{properties}{ A map of Synapse properties\cr -} -\item{annotations}{ A map of user defined annotations\cr -} -\item{local_state}{ Internal use only} +\item{targetId}{} +\item{targetVersion}{} +\item{parent}{} +\item{properties}{} +\item{annotations}{} +\item{local_state}{} } \value{ An object of type Link } - -\examples{ -%\dontrun{ -% link = Link('targetID', parent=folder) -% link = syn.store(link) -%} -} + diff --git a/auto-man/MaterializedViewSchema-class.Rd b/auto-man/MaterializedViewSchema-class.Rd index 2b52c897..3c695cdd 100644 --- a/auto-man/MaterializedViewSchema-class.Rd +++ b/auto-man/MaterializedViewSchema-class.Rd @@ -11,16 +11,41 @@ MaterializedViewSchema } \format{An R6 class object.} \description{ -A MaterializedViewSchema is an Entity that defines a set of columns in a +A MaterializedViewSchema is an [Entity][synapseclient.entity.Entity] that defines a set of columns in a materialized view along with the SQL statement. + +Attributes: + name: The name for the Materialized View Schema object + description: User readable description of the schema + definingSQL: The synapse SQL statement that defines the data in the materialized view. The SQL contain JOIN clauses on multiple tables. + columns: A list of [Column][synapseclient.table.Column] objects or their IDs + parent: The project in Synapse to which this Materialized View belongs + properties: A map of Synapse properties + annotations: A map of user defined annotations + local_state: Internal use only } \section{Methods}{ \itemize{ -\item \code{MaterializedViewSchema(name=NULL, columns=NULL, parent=NULL, definingSQL=NULL, properties=NULL, annotations=NULL, local_state=NULL, description=NULL)}: Constructor for \code{\link{MaterializedViewSchema}} -\item \code{addColumn(column)}: -\item \code{addColumns(columns)}: +\item \code{MaterializedViewSchema(name=NULL, columns=NULL, parent=NULL, definingSQL=NULL, properties=NULL, annotations=NULL, local_state=NULL)}: Constructor for \code{\link{MaterializedViewSchema}} +\item \code{addColumn(column)}: Store the column\cr +\cr +Arguments:\cr + column: A column object or its ID\cr +\cr +Raises:\cr + ValueError: If the given column is not a string, integer or [Column][synapseclient.table.Column] object +\item \code{addColumns(columns)}: Add columns\cr +\cr +Arguments:\cr + columns: A list of column objects or their ID \item \code{has_columns()}: Does this schema have columns specified? -\item \code{removeColumn(column)}: +\item \code{removeColumn(column)}: Remove column\cr +\cr +Arguments:\cr + column: A column object or its ID\cr +\cr +Raises:\cr + ValueError: If the given column is not a string, integer or [Column][synapseclient.table.Column] object } } diff --git a/auto-man/MaterializedViewSchema.Rd b/auto-man/MaterializedViewSchema.Rd index d0b555ba..4d0e38bb 100644 --- a/auto-man/MaterializedViewSchema.Rd +++ b/auto-man/MaterializedViewSchema.Rd @@ -10,29 +10,30 @@ Constructor for objects of type MaterializedViewSchema } \description{ -A MaterializedViewSchema is an Entity that defines a set of columns in a +A MaterializedViewSchema is an [Entity][synapseclient.entity.Entity] that defines a set of columns in a materialized view along with the SQL statement. + +Attributes: + name: The name for the Materialized View Schema object + description: User readable description of the schema + definingSQL: The synapse SQL statement that defines the data in the materialized view. The SQL contain JOIN clauses on multiple tables. + columns: A list of [Column][synapseclient.table.Column] objects or their IDs + parent: The project in Synapse to which this Materialized View belongs + properties: A map of Synapse properties + annotations: A map of user defined annotations + local_state: Internal use only } \usage{ -MaterializedViewSchema(name=NULL, columns=NULL, parent=NULL, definingSQL=NULL, properties=NULL, annotations=NULL, local_state=NULL, description=NULL) +MaterializedViewSchema(name=NULL, columns=NULL, parent=NULL, definingSQL=NULL, properties=NULL, annotations=NULL, local_state=NULL) } \arguments{ -\item{name}{ the name for the Materialized View Schema object\cr -} -\item{columns}{ a list of Column objects or their IDs\cr -} -\item{parent}{ the project in Synapse to which this Materialized View belongs\cr -} -\item{definingSQL}{ The synapse SQL statement that defines the data in the materialized view. The SQL may\cr - contain JOIN clauses on multiple tables.\cr -} -\item{properties}{ A map of Synapse properties\cr -} -\item{annotations}{ A map of user defined annotations\cr -} -\item{local_state}{ Internal use only} -\item{description}{optional named parameter: User readable description of the schema\cr -} +\item{name}{} +\item{columns}{} +\item{parent}{} +\item{definingSQL}{} +\item{properties}{} +\item{annotations}{} +\item{local_state}{} } \value{ An object of type MaterializedViewSchema diff --git a/auto-man/PartialRowset-class.Rd b/auto-man/PartialRowset-class.Rd index 6ae30060..e4813241 100644 --- a/auto-man/PartialRowset-class.Rd +++ b/auto-man/PartialRowset-class.Rd @@ -14,6 +14,10 @@ PartialRowset A set of Partial Rows used for updating cells of a table. PartialRowsets allow you to push only the individual cells you wish to change instead of pushing entire rows with many unchanged cells. + +Attributes: + schema: The [Schema][synapseclient.table.Schema] of the table to update or its tableId as a string + rows: A list of PartialRows } \section{Methods}{ \itemize{ diff --git a/auto-man/PartialRowset.Rd b/auto-man/PartialRowset.Rd index 13e2c8c9..c7cbbc25 100644 --- a/auto-man/PartialRowset.Rd +++ b/auto-man/PartialRowset.Rd @@ -13,14 +13,17 @@ Constructor for objects of type PartialRowset A set of Partial Rows used for updating cells of a table. PartialRowsets allow you to push only the individual cells you wish to change instead of pushing entire rows with many unchanged cells. + +Attributes: + schema: The [Schema][synapseclient.table.Schema] of the table to update or its tableId as a string + rows: A list of PartialRows } \usage{ PartialRowset(schema, rows) } \arguments{ -\item{schema}{ The Schema of the table to update or its tableId as a string\cr -} -\item{rows}{ A list of PartialRows} +\item{schema}{} +\item{rows}{} } \value{ An object of type PartialRowset diff --git a/auto-man/Permissions-class.Rd b/auto-man/Permissions-class.Rd new file mode 100644 index 00000000..29fb7a77 --- /dev/null +++ b/auto-man/Permissions-class.Rd @@ -0,0 +1,49 @@ +% +% Auto-generated file, do not modify. +% Instead, copy this file to the man/ folder, remove this warning, and edit freely. +% Use Git to identify changes in this file which suggest where to change your edited copy. +% +\name{Permissions-class} +\alias{Permissions-class} +\docType{class} +\title{ +Permissions +} +\format{An R6 class object.} +\description{ +The permission a user has for a given Entity. The set of permissoins is a calculation +based several factors including the permission granted by the Entity's ACL and the +User's group membership. + + +Attributes: + can_view : Can the user view this entity? + can_edit : Can the user edit this entity? + can_move : (Read Only) Can the user move this entity by changing its parentId? + can_add_child : Can the user add a child entity to this entity? + can_certified_user_edit : (Read Only) Can the user edit this entity once they become a Certified User? + can_certified_user_add_child : (Read Only) Can the user add a child entity to this entity once they become + a Certified User? + is_certified_user : (Read Only) True, if the user has passed the user certification quiz. + can_change_permissions : Can the user change the permissions of this entity? + can_change_settings : Can the user change the settings of this entity? + can_delete : Can the user delete this entity? + can_download : Are there any access requirements precluding the user from downloading this entity? + can_upload : (Read Only) Are there any access requirements precluding the user from uploading into this entity + (folder or project)? + can_enable_inheritance : (Read Only) Can the user delete the entity's access control list (so it inherits + settings from an ancestor)? + owner_principal_id : (Read Only) The principal ID of the entity's owner (i.e. the entity's 'createdBy'). + can_public_read : (Read Only) Is this entity considered public? + can_moderate : Can the user moderate the forum associated with this entity? + Note that only project entity has forum. + is_certification_required : (Read Only) Is the certification requirement enabled for the project of the entity? + is_entity_open_data : (Read Only) Returns true if the Entity's DateType equals 'OPEN_DATA', indicating that the + data is safe to be released to the public. +} +\section{Methods}{ +\itemize{ +\item \code{Permissions(can_view=NULL, can_edit=NULL, can_move=NULL, can_add_child=NULL, can_certified_user_edit=NULL, can_certified_user_add_child=NULL, is_certified_user=NULL, can_change_permissions=NULL, can_change_settings=NULL, can_delete=NULL, can_download=NULL, can_upload=NULL, can_enable_inheritance=NULL, owner_principal_id=NULL, can_public_read=NULL, can_moderate=NULL, is_certification_required=NULL, is_entity_open_data=NULL)}: Constructor for \code{\link{Permissions}} +} +} + diff --git a/auto-man/Permissions.Rd b/auto-man/Permissions.Rd new file mode 100644 index 00000000..3edaf280 --- /dev/null +++ b/auto-man/Permissions.Rd @@ -0,0 +1,70 @@ +% +% Auto-generated file, do not modify. +% Instead, copy this file to the man/ folder, remove this warning, and edit freely. +% Use Git to identify changes in this file which suggest where to change your edited copy. +% +\name{Permissions} +\alias{Permissions} +\docType{methods} +\title{ +Constructor for objects of type Permissions +} +\description{ +The permission a user has for a given Entity. The set of permissoins is a calculation +based several factors including the permission granted by the Entity's ACL and the +User's group membership. + + +Attributes: + can_view : Can the user view this entity? + can_edit : Can the user edit this entity? + can_move : (Read Only) Can the user move this entity by changing its parentId? + can_add_child : Can the user add a child entity to this entity? + can_certified_user_edit : (Read Only) Can the user edit this entity once they become a Certified User? + can_certified_user_add_child : (Read Only) Can the user add a child entity to this entity once they become + a Certified User? + is_certified_user : (Read Only) True, if the user has passed the user certification quiz. + can_change_permissions : Can the user change the permissions of this entity? + can_change_settings : Can the user change the settings of this entity? + can_delete : Can the user delete this entity? + can_download : Are there any access requirements precluding the user from downloading this entity? + can_upload : (Read Only) Are there any access requirements precluding the user from uploading into this entity + (folder or project)? + can_enable_inheritance : (Read Only) Can the user delete the entity's access control list (so it inherits + settings from an ancestor)? + owner_principal_id : (Read Only) The principal ID of the entity's owner (i.e. the entity's 'createdBy'). + can_public_read : (Read Only) Is this entity considered public? + can_moderate : Can the user moderate the forum associated with this entity? + Note that only project entity has forum. + is_certification_required : (Read Only) Is the certification requirement enabled for the project of the entity? + is_entity_open_data : (Read Only) Returns true if the Entity's DateType equals 'OPEN_DATA', indicating that the + data is safe to be released to the public. +} +\usage{ +Permissions(can_view=NULL, can_edit=NULL, can_move=NULL, can_add_child=NULL, can_certified_user_edit=NULL, can_certified_user_add_child=NULL, is_certified_user=NULL, can_change_permissions=NULL, can_change_settings=NULL, can_delete=NULL, can_download=NULL, can_upload=NULL, can_enable_inheritance=NULL, owner_principal_id=NULL, can_public_read=NULL, can_moderate=NULL, is_certification_required=NULL, is_entity_open_data=NULL) +} +\arguments{ +\item{can_view}{} +\item{can_edit}{} +\item{can_move}{} +\item{can_add_child}{} +\item{can_certified_user_edit}{} +\item{can_certified_user_add_child}{} +\item{is_certified_user}{} +\item{can_change_permissions}{} +\item{can_change_settings}{} +\item{can_delete}{} +\item{can_download}{} +\item{can_upload}{} +\item{can_enable_inheritance}{} +\item{owner_principal_id}{} +\item{can_public_read}{} +\item{can_moderate}{} +\item{is_certification_required}{} +\item{is_entity_open_data}{} +} +\value{ +An object of type Permissions +} + + diff --git a/auto-man/Project-class.Rd b/auto-man/Project-class.Rd index d1012359..f9b00108 100644 --- a/auto-man/Project-class.Rd +++ b/auto-man/Project-class.Rd @@ -15,11 +15,23 @@ Represents a project in Synapse. Projects in Synapse must be uniquely named. Trying to create a project with a name that's already taken, say 'My project', will result in an error + +Attributes: + name: The name of the project + properties: A map of Synapse properties + annotations: A map of user defined annotations + local_state: Internal use only } \section{Methods}{ \itemize{ \item \code{Project(name=NULL, properties=NULL, annotations=NULL, local_state=NULL)}: Constructor for \code{\link{Project}} -\item \code{local_state(state=NULL)}: Set or get the object's internal state, excluding properties, or annotations. +\item \code{local_state(state=NULL)}: Set or get the object's internal state, excluding properties, or annotations.\cr +\cr +Arguments:\cr + state: A dictionary containing the object's internal state.\cr +\cr +Returns:\cr + result: The object's internal state, excluding properties, or annotations. } } diff --git a/auto-man/Project.Rd b/auto-man/Project.Rd index daa450a2..5d8bc377 100644 --- a/auto-man/Project.Rd +++ b/auto-man/Project.Rd @@ -14,27 +14,24 @@ Represents a project in Synapse. Projects in Synapse must be uniquely named. Trying to create a project with a name that's already taken, say 'My project', will result in an error + +Attributes: + name: The name of the project + properties: A map of Synapse properties + annotations: A map of user defined annotations + local_state: Internal use only } \usage{ Project(name=NULL, properties=NULL, annotations=NULL, local_state=NULL) } \arguments{ -\item{name}{ The name of the project\cr -} -\item{properties}{ A map of Synapse properties\cr -} -\item{annotations}{ A map of user defined annotations\cr -} -\item{local_state}{ Internal use only} +\item{name}{} +\item{properties}{} +\item{annotations}{} +\item{local_state}{} } \value{ An object of type Project } - -\examples{ -%\dontrun{ -% project = Project('Foobarbat project') -% project = syn.store(project) -%} -} + diff --git a/auto-man/Row-class.Rd b/auto-man/Row-class.Rd index f3e2af83..8f4e67df 100644 --- a/auto-man/Row-class.Rd +++ b/auto-man/Row-class.Rd @@ -11,7 +11,13 @@ Row } \format{An R6 class object.} \description{ -A \href{https://rest-docs.synapse.org/rest/org/sagebionetworks/repo/model/table/Row.html}{row} in a Table. +A [row](https://rest-docs.synapse.org/rest/org/sagebionetworks/repo/model/table/Row.html) in a Table. + +Attributes: + values: A list of values + rowId: The immutable ID issued to a new row + versionNumber: The version number of this row. Each row version is immutable, so when a row is updated a + new version is created. } \section{Methods}{ \itemize{ diff --git a/auto-man/Row.Rd b/auto-man/Row.Rd index 2c2a38b3..abaf5cb3 100644 --- a/auto-man/Row.Rd +++ b/auto-man/Row.Rd @@ -10,18 +10,21 @@ Constructor for objects of type Row } \description{ -A \href{https://rest-docs.synapse.org/rest/org/sagebionetworks/repo/model/table/Row.html}{row} in a Table. +A [row](https://rest-docs.synapse.org/rest/org/sagebionetworks/repo/model/table/Row.html) in a Table. + +Attributes: + values: A list of values + rowId: The immutable ID issued to a new row + versionNumber: The version number of this row. Each row version is immutable, so when a row is updated a + new version is created. } \usage{ Row(values, rowId=NULL, versionNumber=NULL, etag=NULL) } \arguments{ -\item{values}{ A list of values\cr -} -\item{rowId}{ The immutable ID issued to a new row\cr -} -\item{versionNumber}{ The version number of this row. Each row version is immutable, so when a row is updated a\cr - new version is created.} +\item{values}{} +\item{rowId}{} +\item{versionNumber}{} \item{etag}{} } \value{ diff --git a/auto-man/RowSet-class.Rd b/auto-man/RowSet-class.Rd index a2e555f7..0f4f1766 100644 --- a/auto-man/RowSet-class.Rd +++ b/auto-man/RowSet-class.Rd @@ -11,11 +11,21 @@ RowSet } \format{An R6 class object.} \description{ -A Synapse object of type \href{https://rest-docs.synapse.org/rest/org/sagebionetworks/repo/model/table/RowSet.html}{org.sagebionetworks.repo.model.table.RowSet }. +A Synapse object of type [org.sagebionetworks.repo.model.table.RowSet](https://rest-docs.synapse.org/rest/org/sagebionetworks/repo/model/table/RowSet.html). + +Attributes: + schema: A [Schema][synapseclient.table.Schema] object that will be used to set the tableId + headers: The list of SelectColumn objects that describe the fields in each row. + columns: An alternative to 'headers', a list of column objects that describe the fields in each row. + tableId: The ID of the TableEntity that owns these rows + rows: The [Row][synapseclient.table.Row] s of this set. The index of each row value aligns with the + index of each header. + etag: Any RowSet returned from Synapse will contain the current etag of the change set. To update any + rows from a RowSet the etag must be provided with the POST. } \section{Methods}{ \itemize{ -\item \code{RowSet(columns=NULL, schema=NULL, headers=NULL, tableId=NULL, rows=NULL, etag=NULL)}: Constructor for \code{\link{RowSet}} +\item \code{RowSet(columns=NULL, schema=NULL)}: Constructor for \code{\link{RowSet}} } } diff --git a/auto-man/RowSet.Rd b/auto-man/RowSet.Rd index 0e1b9f8f..21d6b4a0 100644 --- a/auto-man/RowSet.Rd +++ b/auto-man/RowSet.Rd @@ -10,25 +10,24 @@ Constructor for objects of type RowSet } \description{ -A Synapse object of type \href{https://rest-docs.synapse.org/rest/org/sagebionetworks/repo/model/table/RowSet.html}{org.sagebionetworks.repo.model.table.RowSet }. +A Synapse object of type [org.sagebionetworks.repo.model.table.RowSet](https://rest-docs.synapse.org/rest/org/sagebionetworks/repo/model/table/RowSet.html). + +Attributes: + schema: A [Schema][synapseclient.table.Schema] object that will be used to set the tableId + headers: The list of SelectColumn objects that describe the fields in each row. + columns: An alternative to 'headers', a list of column objects that describe the fields in each row. + tableId: The ID of the TableEntity that owns these rows + rows: The [Row][synapseclient.table.Row] s of this set. The index of each row value aligns with the + index of each header. + etag: Any RowSet returned from Synapse will contain the current etag of the change set. To update any + rows from a RowSet the etag must be provided with the POST. } \usage{ -RowSet(columns=NULL, schema=NULL, headers=NULL, tableId=NULL, rows=NULL, etag=NULL) +RowSet(columns=NULL, schema=NULL) } \arguments{ -\item{columns}{ An alternative to 'headers', a list of column objects that describe the fields in each row.\cr -} -\item{schema}{ A Schema object that will be used to set the tableId\cr -} -\item{headers}{optional named parameter: The list of SelectColumn objects that describe the fields in each row.\cr -} -\item{tableId}{optional named parameter: The ID of the TableEntity that owns these rows\cr -} -\item{rows}{optional named parameter: The Row s of this set. The index of each row value aligns with the\cr - index of each header.\cr -} -\item{etag}{optional named parameter: Any RowSet returned from Synapse will contain the current etag of the change set. To update any\cr - rows from a RowSet the etag must be provided with the POST.} +\item{columns}{} +\item{schema}{} } \value{ An object of type RowSet diff --git a/auto-man/Schema-class.Rd b/auto-man/Schema-class.Rd index 55a0352a..8b654c7b 100644 --- a/auto-man/Schema-class.Rd +++ b/auto-man/Schema-class.Rd @@ -11,15 +11,39 @@ Schema } \format{An R6 class object.} \description{ -A Schema is an Entity that defines a set of columns in a table. +A Schema is an [Entity][synapseclient.entity.Entity] that defines a set of columns in a table. + +Attributes: + name: The name for the Table Schema object + description: User readable description of the schema + columns: A list of [Column][synapseclient.table.Column] objects or their IDs + parent: The project in Synapse to which this table belongs + properties: A map of Synapse properties + annotations: A map of user defined annotations + local_state: Internal use only } \section{Methods}{ \itemize{ -\item \code{Schema(name=NULL, columns=NULL, parent=NULL, properties=NULL, annotations=NULL, local_state=NULL, description=NULL)}: Constructor for \code{\link{Schema}} -\item \code{addColumn(column)}: -\item \code{addColumns(columns)}: +\item \code{Schema(name=NULL, columns=NULL, parent=NULL, properties=NULL, annotations=NULL, local_state=NULL)}: Constructor for \code{\link{Schema}} +\item \code{addColumn(column)}: Store the column\cr +\cr +Arguments:\cr + column: A column object or its ID\cr +\cr +Raises:\cr + ValueError: If the given column is not a string, integer or [Column][synapseclient.table.Column] object +\item \code{addColumns(columns)}: Add columns\cr +\cr +Arguments:\cr + columns: A list of column objects or their ID \item \code{has_columns()}: Does this schema have columns specified? -\item \code{removeColumn(column)}: +\item \code{removeColumn(column)}: Remove column\cr +\cr +Arguments:\cr + column: A column object or its ID\cr +\cr +Raises:\cr + ValueError: If the given column is not a string, integer or [Column][synapseclient.table.Column] object } } diff --git a/auto-man/Schema.Rd b/auto-man/Schema.Rd index 80444acd..699cad34 100644 --- a/auto-man/Schema.Rd +++ b/auto-man/Schema.Rd @@ -10,25 +10,27 @@ Constructor for objects of type Schema } \description{ -A Schema is an Entity that defines a set of columns in a table. +A Schema is an [Entity][synapseclient.entity.Entity] that defines a set of columns in a table. + +Attributes: + name: The name for the Table Schema object + description: User readable description of the schema + columns: A list of [Column][synapseclient.table.Column] objects or their IDs + parent: The project in Synapse to which this table belongs + properties: A map of Synapse properties + annotations: A map of user defined annotations + local_state: Internal use only } \usage{ -Schema(name=NULL, columns=NULL, parent=NULL, properties=NULL, annotations=NULL, local_state=NULL, description=NULL) +Schema(name=NULL, columns=NULL, parent=NULL, properties=NULL, annotations=NULL, local_state=NULL) } \arguments{ -\item{name}{ the name for the Table Schema object\cr -} -\item{columns}{ a list of Column objects or their IDs\cr -} -\item{parent}{ the project in Synapse to which this table belongs\cr -} -\item{properties}{ A map of Synapse properties\cr -} -\item{annotations}{ A map of user defined annotations\cr -} -\item{local_state}{ Internal use only} -\item{description}{optional named parameter: User readable description of the schema\cr -} +\item{name}{} +\item{columns}{} +\item{parent}{} +\item{properties}{} +\item{annotations}{} +\item{local_state}{} } \value{ An object of type Schema diff --git a/auto-man/Submission-class.Rd b/auto-man/Submission-class.Rd index 11088095..d7901a96 100644 --- a/auto-man/Submission-class.Rd +++ b/auto-man/Submission-class.Rd @@ -11,11 +11,18 @@ Submission } \format{An R6 class object.} \description{ -Builds an Synapse submission object. +Builds a Synapse submission object. + +Arguments: + name: Name of submission + entityId: Synapse ID of the Entity to submit + evaluationId: ID of the Evaluation to which the Entity is to be submitted + versionNumber: Version number of the submitted Entity + submitterAlias: A pseudonym or team name for a challenge entry } \section{Methods}{ \itemize{ -\item \code{Submission(name=NULL, entityId=NULL, evaluationId=NULL, versionNumber=NULL, submitterAlias=NULL)}: Constructor for \code{\link{Submission}} +\item \code{Submission()}: Constructor for \code{\link{Submission}} } } diff --git a/auto-man/Submission.Rd b/auto-man/Submission.Rd index d693a737..a152a825 100644 --- a/auto-man/Submission.Rd +++ b/auto-man/Submission.Rd @@ -10,21 +10,20 @@ Constructor for objects of type Submission } \description{ -Builds an Synapse submission object. +Builds a Synapse submission object. + +Arguments: + name: Name of submission + entityId: Synapse ID of the Entity to submit + evaluationId: ID of the Evaluation to which the Entity is to be submitted + versionNumber: Version number of the submitted Entity + submitterAlias: A pseudonym or team name for a challenge entry } \usage{ -Submission(name=NULL, entityId=NULL, evaluationId=NULL, versionNumber=NULL, submitterAlias=NULL) +Submission() } \arguments{ -\item{name}{optional named parameter: Name of submission\cr -} -\item{entityId}{optional named parameter: Synapse ID of the Entity to submit\cr -} -\item{evaluationId}{optional named parameter: ID of the Evaluation to which the Entity is to be submitted\cr -} -\item{versionNumber}{optional named parameter: Version number of the submitted Entity\cr -} -\item{submitterAlias}{optional named parameter: A pseudonym or team name for a challenge entry} + } \value{ An object of type Submission diff --git a/auto-man/SubmissionStatus-class.Rd b/auto-man/SubmissionStatus-class.Rd index 3c7ba203..df23ebfc 100644 --- a/auto-man/SubmissionStatus-class.Rd +++ b/auto-man/SubmissionStatus-class.Rd @@ -12,13 +12,27 @@ SubmissionStatus \format{An R6 class object.} \description{ Builds an Synapse submission status object. -https://rest-docs.synapse.org/rest/org/sagebionetworks/evaluation/model/SubmissionStatus.html + + +Arguments: + id: Unique immutable Synapse Id of the Submission + status: Status can be one of + . + submissionAnnotations: synapseclient.Annotations to store annotations of submission + canCancel: Can this submission be cancelled? + cancelRequested: Has user requested to cancel this submission? } \section{Methods}{ \itemize{ -\item \code{SubmissionStatus(id, etag, status=NULL, submissionAnnotations=NULL, canCancel=NULL, cancelRequested=NULL)}: Constructor for \code{\link{SubmissionStatus}} +\item \code{SubmissionStatus(id, etag)}: Constructor for \code{\link{SubmissionStatus}} \item \code{json(ensure_ascii=TRUE)}: Overloaded json function, turning submissionAnnotations into\cr -synapse style annotations +synapse style annotations.\cr +\cr +Arguments:\cr + ensure_ascii: (default = True) If false, then the return value can contain non-ASCII\cr + characters. Otherwise, all such characters are escaped in JSON strings.\cr +Returns:\cr + A Synapse-style JSON dictionary of annotations. } } diff --git a/auto-man/SubmissionStatus.Rd b/auto-man/SubmissionStatus.Rd index a34cc01b..075ebbc4 100644 --- a/auto-man/SubmissionStatus.Rd +++ b/auto-man/SubmissionStatus.Rd @@ -11,23 +11,22 @@ Constructor for objects of type SubmissionStatus } \description{ Builds an Synapse submission status object. -https://rest-docs.synapse.org/rest/org/sagebionetworks/evaluation/model/SubmissionStatus.html + + +Arguments: + id: Unique immutable Synapse Id of the Submission + status: Status can be one of + . + submissionAnnotations: synapseclient.Annotations to store annotations of submission + canCancel: Can this submission be cancelled? + cancelRequested: Has user requested to cancel this submission? } \usage{ -SubmissionStatus(id, etag, status=NULL, submissionAnnotations=NULL, canCancel=NULL, cancelRequested=NULL) +SubmissionStatus(id, etag) } \arguments{ -\item{id}{ Unique immutable Synapse Id of the Submission\cr -} +\item{id}{} \item{etag}{} -\item{status}{optional named parameter: Status can be one of\cr - https://rest-docs.synapse.org/rest/org/sagebionetworks/evaluation/model/SubmissionStatusEnum.html.\cr -} -\item{submissionAnnotations}{optional named parameter: synapseclient.Annotations to store annotations of submission\cr -} -\item{canCancel}{optional named parameter: Can this submission be cancelled?\cr -} -\item{cancelRequested}{optional named parameter: Has user requested to cancel this submission?} } \value{ An object of type SubmissionStatus diff --git a/auto-man/SubmissionViewSchema-class.Rd b/auto-man/SubmissionViewSchema-class.Rd index 30978ec4..1aa56146 100644 --- a/auto-man/SubmissionViewSchema-class.Rd +++ b/auto-man/SubmissionViewSchema-class.Rd @@ -11,17 +11,57 @@ SubmissionViewSchema } \format{An R6 class object.} \description{ -A SubmissionViewSchema is a Entity that displays all files/projects -(depending on user choice) within a given set of scopes +A SubmissionViewSchema is a [Entity][synapseclient.entity.Entity] that displays all files/projects +(depending on user choice) within a given set of scopes. + +Attributes: + name: The name of the Entity View Table object + columns: A list of [Column][synapseclient.table.Column] objects or their IDs. These are optional. + parent: The project in Synapse to which this table belongs + scopes: A list of Evaluation Queues or their ids + addDefaultViewColumns: If true, adds all default columns (e.g. name, createdOn, modifiedBy etc.) + Defaults to True. + The default columns will be added after a call to + [store][synapseclient.Synapse.store]. + addAnnotationColumns: If true, adds columns for all annotation keys defined across all Entities in + the SubmissionViewSchema's scope. Defaults to True. + The annotation columns will be added after a call to + [store][synapseclient.Synapse.store]. + ignoredAnnotationColumnNames: A list of strings representing annotation names. + When addAnnotationColumns is True, the names in this list will not be + automatically added as columns to the SubmissionViewSchema if they exist in + any of the defined scopes. + properties: A map of Synapse properties + annotations: A map of user defined annotations + local_state: Internal use only } \section{Methods}{ \itemize{ \item \code{SubmissionViewSchema(name=NULL, columns=NULL, parent=NULL, scopes=NULL, addDefaultViewColumns=TRUE, addAnnotationColumns=TRUE, ignoredAnnotationColumnNames=list(), properties=NULL, annotations=NULL, local_state=NULL)}: Constructor for \code{\link{SubmissionViewSchema}} -\item \code{addColumn(column)}: -\item \code{addColumns(columns)}: -\item \code{add_scope(entities)}: +\item \code{addColumn(column)}: Store the column\cr +\cr +Arguments:\cr + column: A column object or its ID\cr +\cr +Raises:\cr + ValueError: If the given column is not a string, integer or [Column][synapseclient.table.Column] object +\item \code{addColumns(columns)}: Add columns\cr +\cr +Arguments:\cr + columns: A list of column objects or their ID +\item \code{add_scope(entities)}: Add scope\cr +\cr +Arguments:\cr + entities: A [Project][synapseclient.entity.Project], [Folder][synapseclient.entity.Folder],\cr + [Evaluation][synapseclient.evaluation.Evaluation] object or its ID, can also be a list of them \item \code{has_columns()}: Does this schema have columns specified? -\item \code{removeColumn(column)}: +\item \code{removeColumn(column)}: Remove column\cr +\cr +Arguments:\cr + column: A column object or its ID\cr +\cr +Raises:\cr + ValueError: If the given column is not a string, integer or [Column][synapseclient.table.Column] object } } diff --git a/auto-man/SubmissionViewSchema.Rd b/auto-man/SubmissionViewSchema.Rd index 0050eeef..cb969cff 100644 --- a/auto-man/SubmissionViewSchema.Rd +++ b/auto-man/SubmissionViewSchema.Rd @@ -10,41 +10,44 @@ Constructor for objects of type SubmissionViewSchema } \description{ -A SubmissionViewSchema is a Entity that displays all files/projects -(depending on user choice) within a given set of scopes +A SubmissionViewSchema is a [Entity][synapseclient.entity.Entity] that displays all files/projects +(depending on user choice) within a given set of scopes. + +Attributes: + name: The name of the Entity View Table object + columns: A list of [Column][synapseclient.table.Column] objects or their IDs. These are optional. + parent: The project in Synapse to which this table belongs + scopes: A list of Evaluation Queues or their ids + addDefaultViewColumns: If true, adds all default columns (e.g. name, createdOn, modifiedBy etc.) + Defaults to True. + The default columns will be added after a call to + [store][synapseclient.Synapse.store]. + addAnnotationColumns: If true, adds columns for all annotation keys defined across all Entities in + the SubmissionViewSchema's scope. Defaults to True. + The annotation columns will be added after a call to + [store][synapseclient.Synapse.store]. + ignoredAnnotationColumnNames: A list of strings representing annotation names. + When addAnnotationColumns is True, the names in this list will not be + automatically added as columns to the SubmissionViewSchema if they exist in + any of the defined scopes. + properties: A map of Synapse properties + annotations: A map of user defined annotations + local_state: Internal use only } \usage{ SubmissionViewSchema(name=NULL, columns=NULL, parent=NULL, scopes=NULL, addDefaultViewColumns=TRUE, addAnnotationColumns=TRUE, ignoredAnnotationColumnNames=list(), properties=NULL, annotations=NULL, local_state=NULL) } \arguments{ -\item{name}{ the name of the Entity View Table object\cr -} -\item{columns}{ a list of Column objects or their IDs. These are optional.\cr -} -\item{parent}{ the project in Synapse to which this table belongs\cr -} -\item{scopes}{ a list of Evaluation Queues or their ids\cr -} -\item{addDefaultViewColumns}{ If true, adds all default columns (e.g. name, createdOn, modifiedBy etc.)\cr - Defaults to True.\cr - The default columns will be added after a call to\cr - synapseclient.Synapse.store.\cr -} -\item{addAnnotationColumns}{ If true, adds columns for all annotation keys defined across all Entities in\cr - the SubmissionViewSchema's scope. Defaults to True.\cr - The annotation columns will be added after a call to\cr - synapseclient.Synapse.store.\cr -} -\item{ignoredAnnotationColumnNames}{ A list of strings representing annotation names.\cr - When addAnnotationColumns is True, the names in this list will not be\cr - automatically added as columns to the SubmissionViewSchema if they exist in\cr - any of the defined scopes.\cr -} -\item{properties}{ A map of Synapse properties\cr -} -\item{annotations}{ A map of user defined annotations\cr -} -\item{local_state}{ Internal use only} +\item{name}{} +\item{columns}{} +\item{parent}{} +\item{scopes}{} +\item{addDefaultViewColumns}{} +\item{addAnnotationColumns}{} +\item{ignoredAnnotationColumnNames}{} +\item{properties}{} +\item{annotations}{} +\item{local_state}{} } \value{ An object of type SubmissionViewSchema diff --git a/auto-man/Table.Rd b/auto-man/Table.Rd index 6f69a945..70e1e6eb 100644 --- a/auto-man/Table.Rd +++ b/auto-man/Table.Rd @@ -12,22 +12,40 @@ Table \description{ Combine a table schema and a set of values into some type of Table object depending on what type of values are given. + +Arguments: + schema: A table [Schema][synapseclient.table.Schema] object or Synapse Id of Table. + values: An object that holds the content of the tables + + - A [RowSet][synapseclient.table.RowSet] + - A list of lists (or tuples) where each element is a row + - A string holding the path to a CSV file + - A [Pandas DataFrame](http://pandas.pydata.org/pandas-docs/stable/api.html#dataframe) + - A dict which will be wrapped by a [Pandas DataFrame](http://pandas.pydata.org/pandas-docs/stable/api.html#dataframe) + +Returns: + A Table object suitable for storing + +Usually, the immediate next step after creating a Table object is to store it: + + table = syn.store(Table(schema, values)) + +End users should not need to know the details of these Table subclasses: + +- [TableAbstractBaseClass][synapseclient.table.TableAbstractBaseClass] +- [RowSetTable][synapseclient.table.RowSetTable] +- [TableQueryResult][synapseclient.table.TableQueryResult] +- [CsvFileTable][synapseclient.table.CsvFileTable] } \usage{ Table(schema, values) } \arguments{ -\item{schema}{ a table Schema object or Synapse Id of Table.\cr -} -\item{values}{ an object that holds the content of the tables\cr - - a RowSet\cr - - a list of lists (or tuples) where each element is a row\cr - - a string holding the path to a CSV file\cr - - a Pandas \href{http://pandas.pydata.org/pandas-docs/stable/api.html#dataframe}{DataFrame}\cr - - a dict which will be wrapped by a Pandas \href{http://pandas.pydata.org/pandas-docs/stable/api.html#dataframe}{DataFrame}} +\item{schema}{} +\item{values}{} } \value{ - a Table object suitable for storing + } diff --git a/auto-man/Team-class.Rd b/auto-man/Team-class.Rd index 2005a6ab..f467ba5b 100644 --- a/auto-man/Team-class.Rd +++ b/auto-man/Team-class.Rd @@ -11,12 +11,18 @@ Team } \format{An R6 class object.} \description{ -Represents a \href{https://rest-docs.synapse.org/rest/org/sagebionetworks/repo/model/Team.html}{Synapse Team}. +Represents a [Synapse Team](https://rest-docs.synapse.org/rest/org/sagebionetworks/repo/model/Team.html). User definable fields are: + +Attributes: + icon: The fileHandleId for icon image of the Team + description: A short description of this Team. + name: The name of the Team. + canPublicJoin: true for teams which members can join without an invitation or approval } \section{Methods}{ \itemize{ -\item \code{Team(icon=NULL, description=NULL, name=NULL, canPublicJoin=NULL)}: Constructor for \code{\link{Team}} +\item \code{Team()}: Constructor for \code{\link{Team}} } } diff --git a/auto-man/Team.Rd b/auto-man/Team.Rd index ae48a34a..094c6084 100644 --- a/auto-man/Team.Rd +++ b/auto-man/Team.Rd @@ -10,20 +10,20 @@ Constructor for objects of type Team } \description{ -Represents a \href{https://rest-docs.synapse.org/rest/org/sagebionetworks/repo/model/Team.html}{Synapse Team}. +Represents a [Synapse Team](https://rest-docs.synapse.org/rest/org/sagebionetworks/repo/model/Team.html). User definable fields are: + +Attributes: + icon: The fileHandleId for icon image of the Team + description: A short description of this Team. + name: The name of the Team. + canPublicJoin: true for teams which members can join without an invitation or approval } \usage{ -Team(icon=NULL, description=NULL, name=NULL, canPublicJoin=NULL) +Team() } \arguments{ -\item{icon}{optional named parameter: fileHandleId for icon image of the Team\cr -} -\item{description}{optional named parameter: A short description of this Team.\cr -} -\item{name}{optional named parameter: The name of the Team.\cr -} -\item{canPublicJoin}{optional named parameter: true for teams which members can join without an invitation or approval} + } \value{ An object of type Team diff --git a/auto-man/TeamMember-class.Rd b/auto-man/TeamMember-class.Rd index e07d7cc2..f69048df 100644 --- a/auto-man/TeamMember-class.Rd +++ b/auto-man/TeamMember-class.Rd @@ -11,12 +11,18 @@ TeamMember } \format{An R6 class object.} \description{ -Contains information about a user's membership in a Team. In practice the constructor is not called directly by - the client. +Contains information about a user's membership in a Team. +In practice the constructor is not called directly by the client. + +Attributes: + teamId: The ID of the team + member: An object of type [org.sagebionetworks.repo.model.UserGroupHeader](https://rest-docs.synapse.org/rest/org/sagebionetworks/repo/model/UserGroupHeader.html) + describing the member + isAdmin: Whether the given member is an administrator of the team } \section{Methods}{ \itemize{ -\item \code{TeamMember(teamId=NULL, member=NULL, isAdmin=NULL)}: Constructor for \code{\link{TeamMember}} +\item \code{TeamMember()}: Constructor for \code{\link{TeamMember}} } } diff --git a/auto-man/TeamMember.Rd b/auto-man/TeamMember.Rd index 3ddbf977..9e75e6e6 100644 --- a/auto-man/TeamMember.Rd +++ b/auto-man/TeamMember.Rd @@ -10,18 +10,20 @@ Constructor for objects of type TeamMember } \description{ -Contains information about a user's membership in a Team. In practice the constructor is not called directly by - the client. +Contains information about a user's membership in a Team. +In practice the constructor is not called directly by the client. + +Attributes: + teamId: The ID of the team + member: An object of type [org.sagebionetworks.repo.model.UserGroupHeader](https://rest-docs.synapse.org/rest/org/sagebionetworks/repo/model/UserGroupHeader.html) + describing the member + isAdmin: Whether the given member is an administrator of the team } \usage{ -TeamMember(teamId=NULL, member=NULL, isAdmin=NULL) +TeamMember() } \arguments{ -\item{teamId}{optional named parameter: the ID of the team\cr -} -\item{member}{optional named parameter: An object of type UserGroupHeader describing the member\cr -} -\item{isAdmin}{optional named parameter: Whether the given member is an administrator of the team} + } \value{ An object of type TeamMember diff --git a/auto-man/UserGroupHeader-class.Rd b/auto-man/UserGroupHeader-class.Rd index 0e4cb1dd..8c017221 100644 --- a/auto-man/UserGroupHeader-class.Rd +++ b/auto-man/UserGroupHeader-class.Rd @@ -11,11 +11,20 @@ UserGroupHeader } \format{An R6 class object.} \description{ -Select metadata about a Synapse principal. In practice the constructor is not called directly by the client. +Select metadata about a Synapse principal. +In practice the constructor is not called directly by the client. + +Attributes: + ownerId A foreign key to the ID of the 'principal' object for the user. + firstName: First Name + lastName: Last Name + userName: A name chosen by the user that uniquely identifies them. + email: User's current email address + isIndividual: True if this is a user, false if it is a group } \section{Methods}{ \itemize{ -\item \code{UserGroupHeader(ownerId=NULL, firstName=NULL, lastName=NULL, userName=NULL, email=NULL, isIndividual=NULL)}: Constructor for \code{\link{UserGroupHeader}} +\item \code{UserGroupHeader()}: Constructor for \code{\link{UserGroupHeader}} } } diff --git a/auto-man/UserGroupHeader.Rd b/auto-man/UserGroupHeader.Rd index 9c9f0567..1f5239b7 100644 --- a/auto-man/UserGroupHeader.Rd +++ b/auto-man/UserGroupHeader.Rd @@ -10,23 +10,22 @@ Constructor for objects of type UserGroupHeader } \description{ -Select metadata about a Synapse principal. In practice the constructor is not called directly by the client. +Select metadata about a Synapse principal. +In practice the constructor is not called directly by the client. + +Attributes: + ownerId A foreign key to the ID of the 'principal' object for the user. + firstName: First Name + lastName: Last Name + userName: A name chosen by the user that uniquely identifies them. + email: User's current email address + isIndividual: True if this is a user, false if it is a group } \usage{ -UserGroupHeader(ownerId=NULL, firstName=NULL, lastName=NULL, userName=NULL, email=NULL, isIndividual=NULL) +UserGroupHeader() } \arguments{ -\item{ownerId}{optional named parameter: A foreign key to the ID of the 'principal' object for the user.\cr -} -\item{firstName}{optional named parameter: First Name\cr -} -\item{lastName}{optional named parameter: Last Name\cr -} -\item{userName}{optional named parameter: A name chosen by the user that uniquely identifies them.\cr -} -\item{email}{optional named parameter: User's current email address\cr -} -\item{isIndividual}{optional named parameter: True if this is a user, false if it is a group} + } \value{ An object of type UserGroupHeader diff --git a/auto-man/UserProfile-class.Rd b/auto-man/UserProfile-class.Rd index da3418ef..624d3fd5 100644 --- a/auto-man/UserProfile-class.Rd +++ b/auto-man/UserProfile-class.Rd @@ -12,10 +12,31 @@ UserProfile \format{An R6 class object.} \description{ Information about a Synapse user. In practice the constructor is not called directly by the client. + +Attributes: + ownerId: A foreign key to the ID of the 'principal' object for the user. + uri: The Uniform Resource Identifier (URI) for this entity. + etag: Synapse employs an Optimistic Concurrency Control (OCC) scheme to handle concurrent updates. + Since the E-Tag changes every time an entity is updated it is + used to detect when a client's current representation + of an entity is out-of-date. + firstName: This person's given name (forename) + lastName: This person's family name (surname) + emails: The list of user email addresses registered to this user. + userName: A name chosen by the user that uniquely identifies them. + summary: A summary description about this person + position: This person's current position title + location: This person's location + industry: The industry/discipline that this person is associated with + company: This person's current affiliation + profilePicureFileHandleId: The File Handle ID of the user's profile picture. + url: A link to more information about this person + notificationSettings: An object of type [org.sagebionetworks.repo.model.message.Settings](https://rest-docs.synapse.org/rest/org/sagebionetworks/repo/model/message/Settings.html) + containing the user's preferences regarding when email notifications should be sent } \section{Methods}{ \itemize{ -\item \code{UserProfile(ownerId=NULL, uri=NULL, etag=NULL, firstName=NULL, lastName=NULL, emails=NULL, userName=NULL, summary=NULL, position=NULL, location=NULL, industry=NULL, company=NULL, profilePicureFileHandleId=NULL, url=NULL, notificationSettings=NULL)}: Constructor for \code{\link{UserProfile}} +\item \code{UserProfile()}: Constructor for \code{\link{UserProfile}} } } diff --git a/auto-man/UserProfile.Rd b/auto-man/UserProfile.Rd index 5048599d..9cbc48b2 100644 --- a/auto-man/UserProfile.Rd +++ b/auto-man/UserProfile.Rd @@ -11,43 +11,33 @@ Constructor for objects of type UserProfile } \description{ Information about a Synapse user. In practice the constructor is not called directly by the client. + +Attributes: + ownerId: A foreign key to the ID of the 'principal' object for the user. + uri: The Uniform Resource Identifier (URI) for this entity. + etag: Synapse employs an Optimistic Concurrency Control (OCC) scheme to handle concurrent updates. + Since the E-Tag changes every time an entity is updated it is + used to detect when a client's current representation + of an entity is out-of-date. + firstName: This person's given name (forename) + lastName: This person's family name (surname) + emails: The list of user email addresses registered to this user. + userName: A name chosen by the user that uniquely identifies them. + summary: A summary description about this person + position: This person's current position title + location: This person's location + industry: The industry/discipline that this person is associated with + company: This person's current affiliation + profilePicureFileHandleId: The File Handle ID of the user's profile picture. + url: A link to more information about this person + notificationSettings: An object of type [org.sagebionetworks.repo.model.message.Settings](https://rest-docs.synapse.org/rest/org/sagebionetworks/repo/model/message/Settings.html) + containing the user's preferences regarding when email notifications should be sent } \usage{ -UserProfile(ownerId=NULL, uri=NULL, etag=NULL, firstName=NULL, lastName=NULL, emails=NULL, userName=NULL, summary=NULL, position=NULL, location=NULL, industry=NULL, company=NULL, profilePicureFileHandleId=NULL, url=NULL, notificationSettings=NULL) +UserProfile() } \arguments{ -\item{ownerId}{optional named parameter: A foreign key to the ID of the 'principal' object for the user.\cr -} -\item{uri}{optional named parameter: The Uniform Resource Identifier (URI) for this entity.\cr -} -\item{etag}{optional named parameter: Synapse employs an Optimistic Concurrency Control (OCC) scheme to handle concurrent updates.\cr - Since the E-Tag changes every time an entity is updated it is used to detect when a client's current representation\cr - of an entity is out-of-date.\cr -} -\item{firstName}{optional named parameter: This person's given name (forename)\cr -} -\item{lastName}{optional named parameter: This person's family name (surname)\cr -} -\item{emails}{optional named parameter: The list of user email addresses registered to this user.\cr -} -\item{userName}{optional named parameter: A name chosen by the user that uniquely identifies them.\cr -} -\item{summary}{optional named parameter: A summary description about this person\cr -} -\item{position}{optional named parameter: This person's current position title\cr -} -\item{location}{optional named parameter: This person's location\cr -} -\item{industry}{optional named parameter: "The industry/discipline that this person is associated with\cr -} -\item{company}{optional named parameter: This person's current affiliation\cr -} -\item{profilePicureFileHandleId}{optional named parameter: The File Handle ID of the user's profile picture.\cr -} -\item{url}{optional named parameter: A link to more information about this person\cr -} -\item{notificationSettings}{optional named parameter: An object of type Settings\cr - containing the user's preferences regarding when email notifications should be sent} + } \value{ An object of type UserProfile diff --git a/auto-man/Wiki-class.Rd b/auto-man/Wiki-class.Rd index 79409bb6..7b56b9f8 100644 --- a/auto-man/Wiki-class.Rd +++ b/auto-man/Wiki-class.Rd @@ -12,12 +12,25 @@ Wiki \format{An R6 class object.} \description{ Represents a wiki page in Synapse with content specified in markdown. + +Arguments: + title: Title of the Wiki + owner: Parent Entity that the Wiki will belong to + markdown: Content of the Wiki (cannot be defined if markdownFile is defined) + markdownFile: Path to file which contains the Content of Wiki (cannot be defined if markdown is defined) + attachments: List of paths to files to attach + fileHandles: List of file handle IDs representing files to be attached + parentWikiId: (optional) For sub-pages, specify parent wiki page } \section{Methods}{ \itemize{ -\item \code{Wiki(title=NULL, owner=NULL, markdown=NULL, markdownFile=NULL, attachments=NULL, fileHandles=NULL, parentWikiId=NULL)}: Constructor for \code{\link{Wiki}} +\item \code{Wiki()}: Constructor for \code{\link{Wiki}} \item \code{json()}: Returns the JSON representation of the Wiki object. -\item \code{update_markdown(markdown=NULL, markdown_file=NULL)}: Updates the wiki's markdown. Specify only one of markdown or markdown_file +\item \code{update_markdown(markdown=NULL, markdown_file=NULL)}: Updates the wiki's markdown. Specify only one of markdown or markdown_file\cr +\cr +Arguments:\cr + markdown: text that will become the markdown\cr + markdown_file: path to a file. Its contents will be the markdown } } diff --git a/auto-man/Wiki.Rd b/auto-man/Wiki.Rd index 52f1640d..77420c93 100644 --- a/auto-man/Wiki.Rd +++ b/auto-man/Wiki.Rd @@ -11,24 +11,21 @@ Constructor for objects of type Wiki } \description{ Represents a wiki page in Synapse with content specified in markdown. + +Arguments: + title: Title of the Wiki + owner: Parent Entity that the Wiki will belong to + markdown: Content of the Wiki (cannot be defined if markdownFile is defined) + markdownFile: Path to file which contains the Content of Wiki (cannot be defined if markdown is defined) + attachments: List of paths to files to attach + fileHandles: List of file handle IDs representing files to be attached + parentWikiId: (optional) For sub-pages, specify parent wiki page } \usage{ -Wiki(title=NULL, owner=NULL, markdown=NULL, markdownFile=NULL, attachments=NULL, fileHandles=NULL, parentWikiId=NULL) +Wiki() } \arguments{ -\item{title}{optional named parameter: Title of the Wiki\cr -} -\item{owner}{optional named parameter: Parent Entity that the Wiki will belong to\cr -} -\item{markdown}{optional named parameter: Content of the Wiki (cannot be defined if markdownFile is defined)\cr -} -\item{markdownFile}{optional named parameter: Path to file which contains the Content of Wiki (cannot be defined if markdown is defined)\cr -} -\item{attachments}{optional named parameter: List of paths to files to attach\cr -} -\item{fileHandles}{optional named parameter: List of file handle IDs representing files to be attached\cr -} -\item{parentWikiId}{optional named parameter: (optional) For sub-pages, specify parent wiki page} + } \value{ An object of type Wiki diff --git a/auto-man/build_table.Rd b/auto-man/build_table.Rd index 504f1284..e2d8a898 100644 --- a/auto-man/build_table.Rd +++ b/auto-man/build_table.Rd @@ -11,21 +11,28 @@ build_table } \description{ Build a Table object + +Arguments: + name: The name for the Table Schema object + parent: The project in Synapse to which this table belongs + values: An object that holds the content of the tables + + - A string holding the path to a CSV file + - A [Pandas DataFrame](http://pandas.pydata.org/pandas-docs/stable/api.html#dataframe) + +Returns: + A Table object suitable for storing } \usage{ build_table(name, parent, values) } \arguments{ -\item{name}{ the name for the Table Schema object\cr -} -\item{parent}{ the project in Synapse to which this table belongs\cr -} -\item{values}{ an object that holds the content of the tables\cr - - a string holding the path to a CSV file\cr - - a Pandas \href{http://pandas.pydata.org/pandas-docs/stable/api.html#dataframe}{DataFrame}} +\item{name}{} +\item{parent}{} +\item{values}{} } \value{ - a Table object suitable for storing + } diff --git a/auto-man/synCreateColumns.Rd b/auto-man/synCreateColumns.Rd index 54f2ce45..f0a7bbd8 100644 --- a/auto-man/synCreateColumns.Rd +++ b/auto-man/synCreateColumns.Rd @@ -10,16 +10,22 @@ synCreateColumns } \description{ -Creates a batch of Column s within a single request. +Creates a batch of [synapseclient.table.Column][]'s within a single request. + +Arguments: + columns: A list of [synapseclient.table.Column][]'s + +Returns: + A list of [synapseclient.table.Column][]'s that have been created in Synapse } \usage{ synCreateColumns(columns) } \arguments{ -\item{columns}{ a list of Column objects} +\item{columns}{} } \value{ - a list of Column objects that have been created in Synapse + } diff --git a/auto-man/synCreateExternalS3FileHandle.Rd b/auto-man/synCreateExternalS3FileHandle.Rd index 4a3a1e91..574856cb 100644 --- a/auto-man/synCreateExternalS3FileHandle.Rd +++ b/auto-man/synCreateExternalS3FileHandle.Rd @@ -12,25 +12,31 @@ synCreateExternalS3FileHandle \description{ Create an external S3 file handle for e.g. a file that has been uploaded directly to an external S3 storage location. + +Arguments: + bucket_name: Name of the S3 bucket + s3_file_key: S3 key of the uploaded object + file_path: Local path of the uploaded file + parent: Parent entity to create the file handle in, the file handle will be created + in the default storage location of the parent. Mutually exclusive with + storage_location_id + storage_location_id: Explicit storage location id to create the file handle in, mutually exclusive + with parent + mimetype: Mimetype of the file, if known + +Raises: + ValueError: If neither parent nor storage_location_id is specified, or if both are specified. } \usage{ synCreateExternalS3FileHandle(bucket_name, s3_file_key, file_path, parent=NULL, storage_location_id=NULL, mimetype=NULL) } \arguments{ -\item{bucket_name}{ Name of the S3 bucket\cr -} -\item{s3_file_key}{ S3 key of the uploaded object\cr -} -\item{file_path}{ Local path of the uploaded file\cr -} -\item{parent}{ Parent entity to create the file handle in, the file handle will be created\cr - in the default storage location of the parent. Mutually exclusive with\cr - storage_location_id\cr -} -\item{storage_location_id}{ Explicit storage location id to create the file handle in, mutually exclusive\cr - with parent\cr -} -\item{mimetype}{ Mimetype of the file, if known} +\item{bucket_name}{} +\item{s3_file_key}{} +\item{file_path}{} +\item{parent}{} +\item{storage_location_id}{} +\item{mimetype}{} } \value{ diff --git a/auto-man/synCreateS3StorageLocation.Rd b/auto-man/synCreateS3StorageLocation.Rd index 094a5472..6816e913 100644 --- a/auto-man/synCreateS3StorageLocation.Rd +++ b/auto-man/synCreateS3StorageLocation.Rd @@ -15,28 +15,33 @@ folder in that parent with the given name. This will both create a StorageLocati and a ProjectSetting together, optionally creating a new folder in which to locate it, and optionally enabling this storage location for access via STS. If enabling an existing folder for STS, it must be empty. + +Arguments: + parent: The parent in which to locate the storage location (mutually exclusive with folder) + folder_name: The name of a new folder to create (mutually exclusive with folder) + folder: The existing folder in which to create the storage location (mutually exclusive with folder_name) + bucket_name: The name of an S3 bucket, if this is an external storage location, + if None will use Synapse S3 storage + base_key: The base key of within the bucket, None to use the bucket root, + only applicable if bucket_name is passed + sts_enabled: Whether this storage location should be STS enabled + +Returns: + A 3-tuple of the synapse Folder, a the storage location setting, and the project setting dictionaries. } \usage{ synCreateS3StorageLocation(parent=NULL, folder_name=NULL, folder=NULL, bucket_name=NULL, base_key=NULL, sts_enabled=FALSE) } \arguments{ -\item{parent}{ The parent in which to locate the storage location (mutually exclusive with folder)\cr -} -\item{folder_name}{ The name of a new folder to create (mutually exclusive with folder)\cr -} -\item{folder}{ The existing folder in which to create the storage location\cr - (mutually exclusive with folder_name)\cr -} -\item{bucket_name}{ The name of an S3 bucket, if this is an external storage location,\cr - if None will use Synapse S3 storage\cr -} -\item{base_key}{ The base key of within the bucket, None to use the bucket root,\cr - only applicable if bucket_name is passed\cr -} -\item{sts_enabled}{ Whether this storage location should be STS enabled} +\item{parent}{} +\item{folder_name}{} +\item{folder}{} +\item{bucket_name}{} +\item{base_key}{} +\item{sts_enabled}{} } \value{ - a 3-tuple of the synapse Folder, a the storage location setting, and the project setting dictionaries + } diff --git a/auto-man/synCreateSnapshotVersion.Rd b/auto-man/synCreateSnapshotVersion.Rd index 6ffbbe37..26472f10 100644 --- a/auto-man/synCreateSnapshotVersion.Rd +++ b/auto-man/synCreateSnapshotVersion.Rd @@ -11,25 +11,31 @@ synCreateSnapshotVersion } \description{ Create a new Table Version, new View version, or new Dataset version. + +Arguments: + table: The schema of the Table/View, or its ID. + comment: Optional snapshot comment. + label: Optional snapshot label. + activity: Optional activity ID applied to snapshot version. + wait: True if this method should return the snapshot version after waiting for any necessary + asynchronous table updates to complete. If False this method will return + as soon as any updates are initiated. + +Returns: + The snapshot version number if wait=True, None if wait=False } \usage{ synCreateSnapshotVersion(table, comment=NULL, label=NULL, activity=NULL, wait=TRUE) } \arguments{ -\item{table}{ The schema of the Table/View, or its ID.\cr -} -\item{comment}{ Optional snapshot comment.\cr -} -\item{label}{ Optional snapshot label.\cr -} -\item{activity}{ Optional activity ID applied to snapshot version.\cr -} -\item{wait}{ True if this method should return the snapshot version after waiting for any necessary\cr - asynchronous table updates to complete. If False this method will return\cr - as soon as any updates are initiated.} +\item{table}{} +\item{comment}{} +\item{label}{} +\item{activity}{} +\item{wait}{} } \value{ - the snapshot version number if wait=True, None if wait=False + } diff --git a/auto-man/synCreateStorageLocationSetting.Rd b/auto-man/synCreateStorageLocationSetting.Rd index fe2549ce..99494a0d 100644 --- a/auto-man/synCreateStorageLocationSetting.Rd +++ b/auto-man/synCreateStorageLocationSetting.Rd @@ -14,36 +14,43 @@ Creates an IMMUTABLE storage location based on the specified type. For each storage_type, the following kwargs should be specified: -ExternalObjectStorage: (S3-like (e.g. AWS S3 or Openstack) bucket not accessed by Synapse) - - endpointUrl: endpoint URL of the S3 service (for example: 'https://s3.amazonaws.com') - - bucket: the name of the bucket to use +**ExternalObjectStorage**: (S3-like (e.g. AWS S3 or Openstack) bucket not accessed by Synapse) -ExternalS3Storage: (Amazon S3 bucket accessed by Synapse) - - bucket: the name of the bucket to use +- `endpointUrl`: endpoint URL of the S3 service (for example: 'https://s3.amazonaws.com') +- `bucket`: the name of the bucket to use -ExternalStorage: (SFTP or FTP storage location not accessed by Synapse) - - url: the base URL for uploading to the external destination - - supportsSubfolders(optional): does the destination support creating subfolders under the base url - (default: false) +**ExternalS3Storage**: (Amazon S3 bucket accessed by Synapse) -ProxyStorage: (a proxy server that controls access to a storage) - - secretKey: The encryption key used to sign all pre-signed URLs used to communicate with the proxy. - - proxyUrl: The HTTPS URL of the proxy used for upload and download. +- `bucket`: the name of the bucket to use -Optional kwargs for ALL types: - - banner: The optional banner to show every time a file is uploaded - - description: The description to show the user when the user has to choose which upload destination to use +**ExternalStorage**: (SFTP or FTP storage location not accessed by Synapse) + +- `url`: the base URL for uploading to the external destination +- `supportsSubfolders(optional)`: does the destination support creating subfolders under the base url + (default: false) + +**ProxyStorage**: (a proxy server that controls access to a storage) + +- `secretKey`: The encryption key used to sign all pre-signed URLs used to communicate with the proxy. +- `proxyUrl`: The HTTPS URL of the proxy used for upload and download. + +Arguments: + storage_type: The type of the StorageLocationSetting to create + banner: (Optional) The optional banner to show every time a file is uploaded + description: (Optional) The description to show the user when the user has to choose which upload destination to use + kwargs: fields necessary for creation of the specified storage_type + +Returns: + A dict of the created StorageLocationSetting } \usage{ -synCreateStorageLocationSetting(storage_type, kwargs=NULL) +synCreateStorageLocationSetting(storage_type) } \arguments{ -\item{storage_type}{ the type of the StorageLocationSetting to create\cr -} -\item{kwargs}{optional named parameter: fields necessary for creation of the specified storage_type} +\item{storage_type}{} } \value{ - a dict of the created StorageLocationSetting + } diff --git a/auto-man/synDelete.Rd b/auto-man/synDelete.Rd index 01fee28e..1ccaa042 100644 --- a/auto-man/synDelete.Rd +++ b/auto-man/synDelete.Rd @@ -11,16 +11,17 @@ synDelete } \description{ Removes an object from Synapse. + +Arguments: + obj: An existing object stored on Synapse such as Evaluation, File, Project, or Wiki + version: For entities, specify a particular version to delete. } \usage{ synDelete(obj, version=NULL) } \arguments{ -\item{obj}{ An existing object stored on Synapse such as\cr - Evaluation, File, Project, or Wiki\cr -} -\item{version}{ For entities, specify a particular version to\cr - delete.} +\item{obj}{} +\item{version}{} } \value{ diff --git a/auto-man/synDeleteProvenance.Rd b/auto-man/synDeleteProvenance.Rd index d16dfefb..1d74215e 100644 --- a/auto-man/synDeleteProvenance.Rd +++ b/auto-man/synDeleteProvenance.Rd @@ -11,12 +11,15 @@ synDeleteProvenance } \description{ Removes provenance information from an Entity and deletes the associated Activity. + +Arguments: + entity: An Entity or Synapse ID to modify } \usage{ synDeleteProvenance(entity) } \arguments{ -\item{entity}{ An Entity or Synapse ID to modify} +\item{entity}{} } \value{ diff --git a/auto-man/synDownloadTableColumns.Rd b/auto-man/synDownloadTableColumns.Rd index 407c417d..a0ee5913 100644 --- a/auto-man/synDownloadTableColumns.Rd +++ b/auto-man/synDownloadTableColumns.Rd @@ -11,19 +11,38 @@ synDownloadTableColumns } \description{ Bulk download of table-associated files. + +Arguments: + table: Table query result + columns: A list of column names as strings + downloadLocation: Directory into which to download the files + +Returns: + A dictionary from file handle ID to path in the local file system. + +For example, consider a Synapse table whose ID is "syn12345" with two columns of type FILEHANDLEID named 'foo' +and 'bar'. The associated files are JSON encoded, so we might retrieve the files from Synapse and load for the +second 100 of those rows as shown here: + + import json + + results = syn.tableQuery('SELECT * FROM syn12345 LIMIT 100 OFFSET 100') + file_map = syn.downloadTableColumns(results, ['foo', 'bar']) + + for file_handle_id, path in file_map.items(): + with open(path) as f: + data[file_handle_id] = f.read() } \usage{ synDownloadTableColumns(table, columns, downloadLocation=NULL) } \arguments{ -\item{table}{ table query result\cr -} -\item{columns}{ a list of column names as strings\cr -} -\item{downloadLocation}{ directory into which to download the files} +\item{table}{} +\item{columns}{} +\item{downloadLocation}{} } \value{ - a dictionary from file handle ID to path in the local file system. + } diff --git a/auto-man/synFindEntityId.Rd b/auto-man/synFindEntityId.Rd index 16b8d034..50e23350 100644 --- a/auto-man/synFindEntityId.Rd +++ b/auto-man/synFindEntityId.Rd @@ -11,17 +11,23 @@ synFindEntityId } \description{ Find an Entity given its name and parent. + +Arguments: + name: Name of the entity to find + parent: An Entity object or the Id of an entity as a string. Omit if searching for a Project by name + +Returns: + The Entity ID or None if not found } \usage{ synFindEntityId(name, parent=NULL) } \arguments{ -\item{name}{ name of the entity to find\cr -} -\item{parent}{ An Entity object or the Id of an entity as a string. Omit if searching for a Project by name} +\item{name}{} +\item{parent}{} } \value{ - the Entity ID or None if not found + } diff --git a/auto-man/synGet.Rd b/auto-man/synGet.Rd index d05f6df6..6d66c561 100644 --- a/auto-man/synGet.Rd +++ b/auto-man/synGet.Rd @@ -11,44 +11,36 @@ synGet } \description{ Gets a Synapse entity from the repository service. + +Arguments: + entity: A Synapse ID, a Synapse Entity object, a plain dictionary in which 'id' maps to a + Synapse ID or a local file that is stored in Synapse (found by the file MD5) + version: The specific version to get. + Defaults to the most recent version. + downloadFile: Whether associated files(s) should be downloaded. + Defaults to True. + downloadLocation: Directory where to download the Synapse File Entity. + Defaults to the local cache. + followLink: Whether the link returns the target Entity. + Defaults to False. + ifcollision: Determines how to handle file collisions. + May be "overwrite.local", "keep.local", or "keep.both". + Defaults to "keep.both". + limitSearch: A Synanpse ID used to limit the search in Synapse if entity is specified as a local + file. That is, if the file is stored in multiple locations in Synapse only the ones + in the specified folder/project will be returned. + +Returns: + A new Synapse Entity object of the appropriate type. } \usage{ -synGet(entity, version=NULL, downloadFile=NULL, downloadLocation=NULL, followLink=NULL, ifcollision=NULL, limitSearch=NULL) +synGet(entity) } \arguments{ -\item{entity}{ A Synapse ID, a Synapse Entity object, a plain dictionary in which 'id' maps to a\cr - Synapse ID or a local file that is stored in Synapse (found by the file MD5)\cr -} -\item{version}{optional named parameter: The specific version to get.\cr - Defaults to the most recent version.\cr -} -\item{downloadFile}{optional named parameter: Whether associated files(s) should be downloaded.\cr - Defaults to True\cr -} -\item{downloadLocation}{optional named parameter: Directory where to download the Synapse File Entity.\cr - Defaults to the local cache.\cr -} -\item{followLink}{optional named parameter: Whether the link returns the target Entity.\cr - Defaults to False\cr -} -\item{ifcollision}{optional named parameter: Determines how to handle file collisions.\cr - May be "overwrite.local", "keep.local", or "keep.both".\cr - Defaults to "keep.both".\cr -} -\item{limitSearch}{optional named parameter: a Synanpse ID used to limit the search in Synapse if entity is specified as a local\cr - file. That is, if the file is stored in multiple locations in Synapse only the ones\cr - in the specified folder/project will be returned.} +\item{entity}{} } \value{ - A new Synapse Entity object of the appropriate type -} - -\examples{ -%\dontrun{ -% # download file into cache -% entity = syn.get('syn1906479') -% print(entity.name) -% print(entity.path) -%} } + + diff --git a/auto-man/synGetAcl.Rd b/auto-man/synGetAcl.Rd new file mode 100644 index 00000000..d48c5b0e --- /dev/null +++ b/auto-man/synGetAcl.Rd @@ -0,0 +1,38 @@ +% +% Auto-generated file, do not modify. +% Instead, copy this file to the man/ folder, remove this warning, and edit freely. +% Use Git to identify changes in this file which suggest where to change your edited copy. +% +\name{synGetAcl} +\alias{synGetAcl} +\docType{methods} +\title{ +synGetAcl +} +\description{ +Get the [ACL](https://rest-docs.synapse.org/rest/org/ +sagebionetworks/repo/model/ACCESS_TYPE.html) +that a user or group has on an Entity. + +Arguments: + entity: An Entity or Synapse ID to lookup + principal_id: Identifier of a user or group (defaults to PUBLIC users) + +Returns: + An array containing some combination of + ['READ', 'UPDATE', 'CREATE', 'DELETE', 'DOWNLOAD', 'MODERATE', + 'CHANGE_PERMISSIONS', 'CHANGE_SETTINGS'] + or an empty array +} +\usage{ +synGetAcl(entity, principal_id=NULL) +} +\arguments{ +\item{entity}{} +\item{principal_id}{} +} +\value{ + +} + + diff --git a/auto-man/synGetAnnotations.Rd b/auto-man/synGetAnnotations.Rd index 35aa6f4c..ed19bcaa 100644 --- a/auto-man/synGetAnnotations.Rd +++ b/auto-man/synGetAnnotations.Rd @@ -10,10 +10,17 @@ synGetAnnotations } \description{ -deprecated and replaced with get_annotations +Retrieve annotations for an Entity from the Synapse Repository as a Python dict. -.. deprecated:: 2.1.0 - deprecated and replaced with get_annotations +Note that collapsing annotations from the native Synapse format to a Python dict may involve some loss of +information. See `_getRawAnnotations` to get annotations in the native format. + +Arguments: + entity: An Entity or Synapse ID to lookup + version: The version of the Entity to retrieve. + +Returns: + A [synapseclient.annotations.Annotations][] object, a dict that also has id and etag attributes } \usage{ synGetAnnotations(entity, version=NULL) diff --git a/auto-man/synGetAvailableServices.Rd b/auto-man/synGetAvailableServices.Rd index bf43b931..73850641 100644 --- a/auto-man/synGetAvailableServices.Rd +++ b/auto-man/synGetAvailableServices.Rd @@ -12,6 +12,9 @@ synGetAvailableServices \description{ Get available Synapse services This is a beta feature and is subject to change + +Returns: + List of available services } \usage{ synGetAvailableServices() diff --git a/auto-man/synGetChildren.Rd b/auto-man/synGetChildren.Rd index 0028f6f6..93330586 100644 --- a/auto-man/synGetChildren.Rd +++ b/auto-man/synGetChildren.Rd @@ -11,19 +11,31 @@ synGetChildren } \description{ Retrieves all of the entities stored within a parent such as folder or project. + +Arguments: + parent: An id or an object of a Synapse container or None to retrieve all projects + includeTypes: Must be a list of entity types (ie. ["folder","file"]) which can be found [here](http://docs.synapse.org/rest/org/sagebionetworks/repo/model/EntityType.html) + sortBy: How results should be sorted. Can be NAME, or CREATED_ON + sortDirection: The direction of the result sort. Can be ASC, or DESC + +Yields: + An iterator that shows all the children of the container. + +Also see: + +- [synapseutils.walk][] } \usage{ synGetChildren(parent, includeTypes=c("folder", "file", "table", "link", "entityview", "dockerrepo", "submissionview", "dataset", "materializedview"), sortBy=NAME, sortDirection=ASC) } \arguments{ -\item{parent}{ An id or an object of a Synapse container or None to retrieve all projects} -\item{includeTypes}{ Must be a list of entity types (ie. ["folder","file"]) which can be found here:\cr - http://docs.synapse.org/rest/org/sagebionetworks/repo/model/EntityType.html} -\item{sortBy}{ How results should be sorted. Can be NAME, or CREATED_ON} -\item{sortDirection}{ The direction of the result sort. Can be ASC, or DESC} +\item{parent}{} +\item{includeTypes}{} +\item{sortBy}{} +\item{sortDirection}{} } \value{ - An iterator that shows all the children of the container. + } diff --git a/auto-man/synGetColumn.Rd b/auto-man/synGetColumn.Rd index 6c70c94f..cca8a9db 100644 --- a/auto-man/synGetColumn.Rd +++ b/auto-man/synGetColumn.Rd @@ -12,21 +12,22 @@ synGetColumn \description{ Gets a Column object from Synapse by ID. -See: Column +See: [synapseclient.table.Column][] + +Arguments: + id: The ID of the column to retrieve + +Returns: + An object of type [synapseclient.table.Column][] } \usage{ synGetColumn(id) } \arguments{ -\item{id}{ the ID of the column to retrieve} +\item{id}{} } \value{ - an object of type Column -} - -\examples{ -%\dontrun{ -% column = syn.getColumn(123) -%} } + + diff --git a/auto-man/synGetColumns.Rd b/auto-man/synGetColumns.Rd index 544cb567..c745d0b5 100644 --- a/auto-man/synGetColumns.Rd +++ b/auto-man/synGetColumns.Rd @@ -12,20 +12,26 @@ synGetColumns \description{ Get the columns defined in Synapse either (1) corresponding to a set of column headers, (2) those for a given schema, or (3) those whose names start with a given prefix. + +Arguments: + x: A list of column headers, a Table Entity object (Schema/EntityViewSchema), a Table's Synapse ID, or a + string prefix + limit: maximum number of columns to return (pagination parameter) + offset: the index of the first column to return (pagination parameter) + +Yields: + A generator over [synapseclient.table.Column][] objects } \usage{ synGetColumns(x, limit=100, offset=0) } \arguments{ -\item{x}{ a list of column headers, a Table Entity object (Schema/EntityViewSchema), a Table's Synapse ID,\cr - or a string prefix\cr -} -\item{limit}{ maximum number of columns to return (pagination parameter)\cr -} -\item{offset}{ the index of the first column to return (pagination parameter)} +\item{x}{} +\item{limit}{} +\item{offset}{} } \value{ - a generator of Column objects + } diff --git a/auto-man/synGetConfigFile.Rd b/auto-man/synGetConfigFile.Rd index 9fbf2ab5..2ab99674 100644 --- a/auto-man/synGetConfigFile.Rd +++ b/auto-man/synGetConfigFile.Rd @@ -11,15 +11,21 @@ synGetConfigFile } \description{ Retrieves the client configuration information. + +Arguments: + configPath: Path to configuration file on local file system + +Returns: + A RawConfigParser populated with properties from the user's configuration file. } \usage{ synGetConfigFile(configPath) } \arguments{ -\item{configPath}{ Path to configuration file on local file system} +\item{configPath}{} } \value{ - a RawConfigParser populated with properties from the user's configuration file. + } diff --git a/auto-man/synGetDownloadList.Rd b/auto-man/synGetDownloadList.Rd index 21d9dee2..b9d9ce96 100644 --- a/auto-man/synGetDownloadList.Rd +++ b/auto-man/synGetDownloadList.Rd @@ -11,15 +11,21 @@ synGetDownloadList } \description{ Download all files from your Synapse download list + +Arguments: + downloadLocation: Directory to download files to. + +Returns: + Manifest file with file paths } \usage{ synGetDownloadList(downloadLocation=NULL) } \arguments{ -\item{downloadLocation}{ Directory to download files to.} +\item{downloadLocation}{} } \value{ - manifest file with file paths + } diff --git a/auto-man/synGetDownloadListManifest.Rd b/auto-man/synGetDownloadListManifest.Rd index cc0a897a..da6b5043 100644 --- a/auto-man/synGetDownloadListManifest.Rd +++ b/auto-man/synGetDownloadListManifest.Rd @@ -11,6 +11,9 @@ synGetDownloadListManifest } \description{ Get the path of the download list manifest file + +Returns: + Path of download list manifest file } \usage{ synGetDownloadListManifest() @@ -19,7 +22,7 @@ synGetDownloadListManifest() } \value{ - path of download list manifest file + } diff --git a/auto-man/synGetEvaluation.Rd b/auto-man/synGetEvaluation.Rd index 40fcfcde..0f241c44 100644 --- a/auto-man/synGetEvaluation.Rd +++ b/auto-man/synGetEvaluation.Rd @@ -11,20 +11,21 @@ synGetEvaluation } \description{ Gets an Evaluation object from Synapse. + +Arguments: + id: The ID of the [synapseclient.evaluation.Evaluation][] to return. + +Returns: + An [synapseclient.evaluation.Evaluation][] object } \usage{ synGetEvaluation(id) } \arguments{ -\item{id}{ The ID of the Evaluation to return.} +\item{id}{} } \value{ - an Evaluation object -} - -\examples{ -%\dontrun{ -% evaluation = syn.getEvaluation(2005090) -%} } + + diff --git a/auto-man/synGetEvaluationByContentSource.Rd b/auto-man/synGetEvaluationByContentSource.Rd index c23104f6..ac48f6f8 100644 --- a/auto-man/synGetEvaluationByContentSource.Rd +++ b/auto-man/synGetEvaluationByContentSource.Rd @@ -11,16 +11,21 @@ synGetEvaluationByContentSource } \description{ Returns a generator over evaluations that derive their content from the given entity + +Arguments: + entity: The [synapseclient.entity.Project][] whose Evaluations are to be fetched. + +Yields: + A generator over [synapseclient.evaluation.Evaluation][] objects for the given [synapseclient.entity.Project][]. } \usage{ synGetEvaluationByContentSource(entity) } \arguments{ -\item{entity}{ The Project whose Evaluations are to be fetched.} +\item{entity}{} } \value{ - a Generator over the Evaluation objects for the given - Project + } diff --git a/auto-man/synGetEvaluationByName.Rd b/auto-man/synGetEvaluationByName.Rd index dde142fa..6c14dbf2 100644 --- a/auto-man/synGetEvaluationByName.Rd +++ b/auto-man/synGetEvaluationByName.Rd @@ -11,15 +11,21 @@ synGetEvaluationByName } \description{ Gets an Evaluation object from Synapse. + +Arguments: + Name: The name of the [synapseclient.evaluation.Evaluation][] to return. + +Returns: + An [synapseclient.evaluation.Evaluation][] object } \usage{ synGetEvaluationByName(name) } \arguments{ -\item{name}{ The name of the Evaluation to return.} +\item{name}{} } \value{ - an Evaluation object + } diff --git a/auto-man/synGetMembershipStatus.Rd b/auto-man/synGetMembershipStatus.Rd index 2140ae12..62b35046 100644 --- a/auto-man/synGetMembershipStatus.Rd +++ b/auto-man/synGetMembershipStatus.Rd @@ -11,20 +11,24 @@ synGetMembershipStatus } \description{ Retrieve a user's Team Membership Status bundle. -https://rest-docs.synapse.org/rest/GET/team/id/member/principalId/membershipStatus.html + + +Arguments: + user: Synapse user ID + team: A [synapseclient.team.Team][] object or a team's ID. + +Returns: + dict of TeamMembershipStatus } \usage{ -synGetMembershipStatus(userid, team, user=NULL) +synGetMembershipStatus(userid, team) } \arguments{ \item{userid}{} -\item{team}{ A Team object or a\cr - team's ID.} -\item{user}{optional named parameter: Synapse user ID\cr -} +\item{team}{} } \value{ - dict of TeamMembershipStatus + } diff --git a/auto-man/synGetMyStorageLocationSetting.Rd b/auto-man/synGetMyStorageLocationSetting.Rd index c80a80f4..b53d1ecc 100644 --- a/auto-man/synGetMyStorageLocationSetting.Rd +++ b/auto-man/synGetMyStorageLocationSetting.Rd @@ -11,16 +11,22 @@ synGetMyStorageLocationSetting } \description{ Get a StorageLocationSetting by its id. + +Arguments: + storage_location_id: id of the StorageLocationSetting to retrieve. + The corresponding StorageLocationSetting must have been created by this user. + +Returns: + A dict describing the StorageLocationSetting retrieved by its id } \usage{ synGetMyStorageLocationSetting(storage_location_id) } \arguments{ -\item{storage_location_id}{ id of the StorageLocationSetting to retrieve.\cr - The corresponding StorageLocationSetting must have been created by this user.} +\item{storage_location_id}{} } \value{ - a dict describing the StorageLocationSetting retrieved by its id + } diff --git a/auto-man/synGetPermissions.Rd b/auto-man/synGetPermissions.Rd index 0684efd0..bbb98810 100644 --- a/auto-man/synGetPermissions.Rd +++ b/auto-man/synGetPermissions.Rd @@ -10,20 +10,24 @@ synGetPermissions } \description{ -Get the permissions that a user or group has on an Entity. +Get the [permissions](https://rest-docs.synapse.org/rest/org/ +sagebionetworks/repo/model/auth/UserEntityPermissions.html) +that the caller has on an Entity. + +Arguments: + entity: An Entity or Synapse ID to lookup + +Returns: + An Permissions object } \usage{ -synGetPermissions(entity, principalId=NULL) +synGetPermissions(entity) } \arguments{ -\item{entity}{ An Entity or Synapse ID to lookup\cr -} -\item{principalId}{ Identifier of a user or group (defaults to PUBLIC users)} +\item{entity}{} } \value{ - An array containing some combination of - ['READ', 'CREATE', 'UPDATE', 'DELETE', 'CHANGE_PERMISSIONS', 'DOWNLOAD'] - or an empty array + } diff --git a/auto-man/synGetProjectSetting.Rd b/auto-man/synGetProjectSetting.Rd index 3861a11b..4f3b245d 100644 --- a/auto-man/synGetProjectSetting.Rd +++ b/auto-man/synGetProjectSetting.Rd @@ -11,17 +11,27 @@ synGetProjectSetting } \description{ Gets the ProjectSetting for a project. + +Arguments: + project: Project entity or its id as a string + setting_type: Type of setting. Choose from: + + - `upload` + - `external_sync` + - `requester_pays` + +Returns: + The ProjectSetting as a dict or None if no settings of the specified type exist. } \usage{ synGetProjectSetting(project, setting_type) } \arguments{ -\item{project}{ Project entity or its id as a string\cr -} -\item{setting_type}{ type of setting. Choose from: {'upload', 'external_sync', 'requester_pays'}} +\item{project}{} +\item{setting_type}{} } \value{ - The ProjectSetting as a dict or None if no settings of the specified type exist. + } diff --git a/auto-man/synGetProvenance.Rd b/auto-man/synGetProvenance.Rd index 323c6457..6ad12367 100644 --- a/auto-man/synGetProvenance.Rd +++ b/auto-man/synGetProvenance.Rd @@ -11,19 +11,26 @@ synGetProvenance } \description{ Retrieve provenance information for a Synapse Entity. + +Arguments: + entity: An Entity or Synapse ID to lookup + version: The version of the Entity to retrieve. Gets the most recent version if omitted + +Returns: + An Activity object or raises exception if no provenance record exists + +Raises: + SynapseHTTPError: if no provenance record exists } \usage{ synGetProvenance(entity, version=NULL) } \arguments{ -\item{entity}{ An Entity or Synapse ID to lookup\cr -} -\item{version}{ The version of the Entity to retrieve.\cr - Gets the most recent version if omitted} +\item{entity}{} +\item{version}{} } \value{ - An Activity object or - raises exception if no provenance record exists + } diff --git a/auto-man/synGetStsStorageToken.Rd b/auto-man/synGetStsStorageToken.Rd index 00ca92fe..c1827ce6 100644 --- a/auto-man/synGetStsStorageToken.Rd +++ b/auto-man/synGetStsStorageToken.Rd @@ -11,25 +11,34 @@ synGetStsStorageToken } \description{ Get STS credentials for the given entity_id and permission, outputting it in the given format + +Arguments: + entity: The entity or entity id whose credentials are being returned + permission: One of: + + - `read_only` + - `read_write` + + output_format: One of: + + - `json`: the dictionary returned from the Synapse STS API including expiration + - `boto`: a dictionary compatible with a boto session (aws_access_key_id, etc) + - `shell`: output commands for exporting credentials appropriate for the detected shell + - `bash`: output commands for exporting credentials into a bash shell + - `cmd`: output commands for exporting credentials into a windows cmd shell + - `powershell`: output commands for exporting credentials into a windows powershell + + min_remaining_life: The minimum allowable remaining life on a cached token to return. If a cached token + has left than this amount of time left a fresh token will be fetched } \usage{ synGetStsStorageToken(entity, permission, output_format=json, min_remaining_life=NULL) } \arguments{ -\item{entity}{ the entity or entity id whose credentials are being returned\cr -} -\item{permission}{ one of 'read_only' or 'read_write'\cr -} -\item{output_format}{ one of 'json', 'boto', 'shell', 'bash', 'cmd', 'powershell'\cr - json: the dictionary returned from the Synapse STS API including expiration\cr - boto: a dictionary compatible with a boto session (aws_access_key_id, etc)\cr - shell: output commands for exporting credentials appropriate for the detected shell\cr - bash: output commands for exporting credentials into a bash shell\cr - cmd: output commands for exporting credentials into a windows cmd shell\cr - powershell: output commands for exporting credentials into a windows powershell\cr -} -\item{min_remaining_life}{ the minimum allowable remaining life on a cached token to return. if a cached token\cr - has left than this amount of time left a fresh token will be fetched} +\item{entity}{} +\item{permission}{} +\item{output_format}{} +\item{min_remaining_life}{} } \value{ diff --git a/auto-man/synGetSubmission.Rd b/auto-man/synGetSubmission.Rd index a7f50c3a..9a513fb0 100644 --- a/auto-man/synGetSubmission.Rd +++ b/auto-man/synGetSubmission.Rd @@ -10,16 +10,27 @@ synGetSubmission } \description{ -Gets a Submission object by its id. +Gets a [synapseclient.evaluation.Submission][] object by its id. + +Arguments: + id: The id of the submission to retrieve + +Returns: + A [synapseclient.evaluation.Submission][] object + +See: + +- [synapseclient.Synapse.get][] for information + on the *downloadFile*, *downloadLocation*, and *ifcollision* parameters } \usage{ synGetSubmission(id) } \arguments{ -\item{id}{ The id of the submission to retrieve} +\item{id}{} } \value{ - a Submission object + } diff --git a/auto-man/synGetSubmissionBundles.Rd b/auto-man/synGetSubmissionBundles.Rd index 44fbd29d..ffdb1106 100644 --- a/auto-man/synGetSubmissionBundles.Rd +++ b/auto-man/synGetSubmissionBundles.Rd @@ -12,37 +12,38 @@ synGetSubmissionBundles \description{ Retrieve submission bundles (submission and submissions status) for an evaluation queue, optionally filtered by submission status and/or owner. + +Arguments: + evaluation: Evaluation to get submissions from. + status: Optionally filter submissions for a specific status. + One of: + + - `OPEN` + - `CLOSED` + - `SCORED` + - `INVALID` + + myOwn: Determines if only your Submissions should be fetched. + Defaults to False (all Submissions) + limit: Limits the number of submissions coming back from the + service in a single response. + offset: Start iterating at a submission offset from the first submission. + +Yields: + A generator over tuples containing a [synapseclient.evaluation.Submission][] and a [synapseclient.evaluation.SubmissionStatus][]. } \usage{ synGetSubmissionBundles(evaluation, status=NULL, myOwn=FALSE, limit=20, offset=0) } \arguments{ -\item{evaluation}{ Evaluation to get submissions from.\cr -} -\item{status}{ Optionally filter submissions for a specific status.\cr - One of {OPEN, CLOSED, SCORED, INVALID}\cr -} -\item{myOwn}{ Determines if only your Submissions should be fetched.\cr - Defaults to False (all Submissions)\cr -} -\item{limit}{ Limits the number of submissions coming back from the\cr - service in a single response.\cr -} -\item{offset}{ Start iterating at a submission offset from the first\cr - submission.} +\item{evaluation}{} +\item{status}{} +\item{myOwn}{} +\item{limit}{} +\item{offset}{} } \value{ - A generator over tuples containing a Submission - and a SubmissionStatus. -} - -\examples{ -%\dontrun{ -% for submission, status in syn.getSubmissionBundles(evaluation): -% print(submission.name, \ -% submission.submitterAlias, \ -% status.status, \ -% status.score) -%} } + + diff --git a/auto-man/synGetSubmissionStatus.Rd b/auto-man/synGetSubmissionStatus.Rd index 905f183d..6b159f0f 100644 --- a/auto-man/synGetSubmissionStatus.Rd +++ b/auto-man/synGetSubmissionStatus.Rd @@ -11,15 +11,21 @@ synGetSubmissionStatus } \description{ Downloads the status of a Submission. + +Arguments: + submission: The submission to lookup + +Returns: + A [synapseclient.evaluation.SubmissionStatus][] object } \usage{ synGetSubmissionStatus(submission) } \arguments{ -\item{submission}{ The Submission to lookup} +\item{submission}{} } \value{ - A SubmissionStatus object + } diff --git a/auto-man/synGetSubmissions.Rd b/auto-man/synGetSubmissions.Rd index fb1d3ed9..7f7e95ff 100644 --- a/auto-man/synGetSubmissions.Rd +++ b/auto-man/synGetSubmissions.Rd @@ -10,38 +10,45 @@ synGetSubmissions } \description{ +Arguments: + evaluation: Evaluation to get submissions from. + status: Optionally filter submissions for a specific status. + One of: + - `OPEN` + - `CLOSED` + - `SCORED` + - `INVALID` + - `VALIDATED` + - `EVALUATION_IN_PROGRESS` + - `RECEIVED` + - `REJECTED` + - `ACCEPTED` + + myOwn: Determines if only your Submissions should be fetched. + Defaults to False (all Submissions) + limit: Limits the number of submissions in a single response. + Because this method returns a generator and repeatedly + fetches submissions, this argument is limiting the + size of a single request and NOT the number of sub- + missions returned in total. + offset: Start iterating at a submission offset from the first submission. + +Yields: + A generator over [synapseclient.evaluation.Submission][] objects for an Evaluation } \usage{ synGetSubmissions(evaluation, status=NULL, myOwn=FALSE, limit=20, offset=0) } \arguments{ -\item{evaluation}{ Evaluation to get submissions from.\cr -} -\item{status}{ Optionally filter submissions for a specific status.\cr - One of {OPEN, CLOSED, SCORED,INVALID,VALIDATED,\cr - EVALUATION_IN_PROGRESS,RECEIVED, REJECTED, ACCEPTED}\cr -} -\item{myOwn}{ Determines if only your Submissions should be fetched.\cr - Defaults to False (all Submissions)\cr -} -\item{limit}{ Limits the number of submissions in a single response.\cr - Because this method returns a generator and repeatedly\cr - fetches submissions, this argument is limiting the\cr - size of a single request and NOT the number of sub-\cr - missions returned in total.\cr -} -\item{offset}{ Start iterating at a submission offset from the first\cr - submission.} +\item{evaluation}{} +\item{status}{} +\item{myOwn}{} +\item{limit}{} +\item{offset}{} } \value{ - A generator over Submission objects for an Evaluation -} - -\examples{ -%\dontrun{ -% for submission in syn.getSubmissions(1234567): -% print(submission['entityId']) -%} } + + diff --git a/auto-man/synGetTableColumns.Rd b/auto-man/synGetTableColumns.Rd index eb68d8b6..fb680c88 100644 --- a/auto-man/synGetTableColumns.Rd +++ b/auto-man/synGetTableColumns.Rd @@ -11,15 +11,21 @@ synGetTableColumns } \description{ Retrieve the column models used in the given table schema. + +Arguments: + table: The schema of the Table whose columns are to be retrieved + +Yields: + A Generator over the Table's [columns][synapseclient.table.Column] } \usage{ synGetTableColumns(table) } \arguments{ -\item{table}{ the schema of the Table whose columns are to be retrieved} +\item{table}{} } \value{ - a Generator over the Table's columns + } diff --git a/auto-man/synGetTeam.Rd b/auto-man/synGetTeam.Rd index 88023345..5de1e5be 100644 --- a/auto-man/synGetTeam.Rd +++ b/auto-man/synGetTeam.Rd @@ -11,15 +11,21 @@ synGetTeam } \description{ Finds a team with a given ID or name. + +Arguments: + id: The ID or name of the team or a Team object to retrieve. + +Returns: + An object of type [synapseclient.team.Team][] } \usage{ synGetTeam(id) } \arguments{ -\item{id}{ The ID or name of the team or a Team object to retrieve} +\item{id}{} } \value{ - An object of type Team + } diff --git a/auto-man/synGetTeamMembers.Rd b/auto-man/synGetTeamMembers.Rd index cf7b534a..00c3a508 100644 --- a/auto-man/synGetTeamMembers.Rd +++ b/auto-man/synGetTeamMembers.Rd @@ -11,15 +11,21 @@ synGetTeamMembers } \description{ Lists the members of the given team. + +Arguments: + team: A [synapseclient.team.Team][] object or a team's ID. + +Yields: + A generator over [synapseclient.team.TeamMember][] objects. } \usage{ synGetTeamMembers(team) } \arguments{ -\item{team}{ A Team object or a team's ID.} +\item{team}{} } \value{ - a generator over TeamMember objects. + } diff --git a/auto-man/synGetTeamOpenInvitations.Rd b/auto-man/synGetTeamOpenInvitations.Rd index 779ce66b..b019f585 100644 --- a/auto-man/synGetTeamOpenInvitations.Rd +++ b/auto-man/synGetTeamOpenInvitations.Rd @@ -11,17 +11,22 @@ synGetTeamOpenInvitations } \description{ Retrieve the open requests submitted to a Team -https://rest-docs.synapse.org/rest/GET/team/id/openInvitation.html + + +Arguments: + team: A [synapseclient.team.Team][] object or a team's ID. + +Yields: + Generator of MembershipRequest } \usage{ synGetTeamOpenInvitations(team) } \arguments{ -\item{team}{ A Team object or a\cr - team's ID.} +\item{team}{} } \value{ - generator of MembershipRequest + } diff --git a/auto-man/synGetUserProfile.Rd b/auto-man/synGetUserProfile.Rd index b1aaf25a..2ef47364 100644 --- a/auto-man/synGetUserProfile.Rd +++ b/auto-man/synGetUserProfile.Rd @@ -12,19 +12,23 @@ synGetUserProfile \description{ Get the details about a Synapse user. Retrieves information on the current user if 'id' is omitted. + +Arguments: + id: The 'userId' (aka 'ownerId') of a user or the userName + sessionToken: The session token to use to find the user profile + +Returns: + The user profile for the user of interest. } \usage{ -synGetUserProfile(id=NULL, sessionToken=NULL, refresh=FALSE) +synGetUserProfile(id=NULL, sessionToken=NULL) } \arguments{ -\item{id}{ The 'userId' (aka 'ownerId') of a user or the userName\cr -} -\item{sessionToken}{ The session token to use to find the user profile\cr -} -\item{refresh}{ If set to True will always fetch the data from Synape otherwise will use cached information} +\item{id}{} +\item{sessionToken}{} } \value{ - The user profile for the user of interest. + } diff --git a/auto-man/synGetUserProfileById.Rd b/auto-man/synGetUserProfileById.Rd new file mode 100644 index 00000000..2c6f6a0e --- /dev/null +++ b/auto-man/synGetUserProfileById.Rd @@ -0,0 +1,34 @@ +% +% Auto-generated file, do not modify. +% Instead, copy this file to the man/ folder, remove this warning, and edit freely. +% Use Git to identify changes in this file which suggest where to change your edited copy. +% +\name{synGetUserProfileById} +\alias{synGetUserProfileById} +\docType{methods} +\title{ +synGetUserProfileById +} +\description{ +Get the details about a Synapse user. +Retrieves information on the current user if 'id' is omitted. + +Arguments: + id: The ownerId of a user + sessionToken: The session token to use to find the user profile + +Returns: + The user profile for the user of interest. +} +\usage{ +synGetUserProfileById(id=NULL, sessionToken=NULL) +} +\arguments{ +\item{id}{} +\item{sessionToken}{} +} +\value{ + +} + + diff --git a/auto-man/synGetUserProfileByUsername.Rd b/auto-man/synGetUserProfileByUsername.Rd new file mode 100644 index 00000000..67e83a69 --- /dev/null +++ b/auto-man/synGetUserProfileByUsername.Rd @@ -0,0 +1,34 @@ +% +% Auto-generated file, do not modify. +% Instead, copy this file to the man/ folder, remove this warning, and edit freely. +% Use Git to identify changes in this file which suggest where to change your edited copy. +% +\name{synGetUserProfileByUsername} +\alias{synGetUserProfileByUsername} +\docType{methods} +\title{ +synGetUserProfileByUsername +} +\description{ +Get the details about a Synapse user. +Retrieves information on the current user if 'id' is omitted or is empty string. + +Arguments: + username: The userName of a user + sessionToken: The session token to use to find the user profile + +Returns: + The user profile for the user of interest. +} +\usage{ +synGetUserProfileByUsername(username=NULL, sessionToken=NULL) +} +\arguments{ +\item{username}{} +\item{sessionToken}{} +} +\value{ + +} + + diff --git a/auto-man/synGetWiki.Rd b/auto-man/synGetWiki.Rd index bd26cf22..3bdecc42 100644 --- a/auto-man/synGetWiki.Rd +++ b/auto-man/synGetWiki.Rd @@ -10,20 +10,26 @@ synGetWiki } \description{ -Get a Wiki object from Synapse. Uses wiki2 API which supports versioning. +Get a [synapseclient.wiki.Wiki][] object from Synapse. Uses wiki2 API which supports versioning. + +Arguments: + owner: The entity to which the Wiki is attached + subpageId: The id of the specific sub-page or None to get the root Wiki page + version: The version of the page to retrieve or None to retrieve the latest + +Returns: + A [synapseclient.wiki.Wiki][] object } \usage{ synGetWiki(owner, subpageId=NULL, version=NULL) } \arguments{ -\item{owner}{ The entity to which the Wiki is attached\cr -} -\item{subpageId}{ The id of the specific sub-page or None to get the root Wiki page\cr -} -\item{version}{ The version of the page to retrieve or None to retrieve the latest} +\item{owner}{} +\item{subpageId}{} +\item{version}{} } \value{ - a Wiki object + } diff --git a/auto-man/synGetWikiAttachments.Rd b/auto-man/synGetWikiAttachments.Rd index aaa7b8ad..8a9c54e3 100644 --- a/auto-man/synGetWikiAttachments.Rd +++ b/auto-man/synGetWikiAttachments.Rd @@ -11,15 +11,21 @@ synGetWikiAttachments } \description{ Retrieve the attachments to a wiki page. + +Arguments: + wiki: The Wiki object for which the attachments are to be returned. + +Returns: + A list of file handles for the files attached to the Wiki. } \usage{ synGetWikiAttachments(wiki) } \arguments{ -\item{wiki}{ the Wiki object for which the attachments are to be returned.} +\item{wiki}{} } \value{ - A list of file handles for the files attached to the Wiki. + } diff --git a/auto-man/synGetWikiHeaders.Rd b/auto-man/synGetWikiHeaders.Rd index 3cebe19c..9d61074a 100644 --- a/auto-man/synGetWikiHeaders.Rd +++ b/auto-man/synGetWikiHeaders.Rd @@ -11,15 +11,21 @@ synGetWikiHeaders } \description{ Retrieves the headers of all Wikis belonging to the owner (the entity to which the Wiki is attached). + +Arguments: + owner: An Entity + +Returns: + A list of Objects with three fields: id, title and parentId. } \usage{ synGetWikiHeaders(owner) } \arguments{ -\item{owner}{ An Entity} +\item{owner}{} } \value{ - A list of Objects with three fields: id, title and parentId. + } diff --git a/auto-man/synInvalidateAPIKey.Rd b/auto-man/synInvalidateAPIKey.Rd index efd1a3d4..1e5dd327 100644 --- a/auto-man/synInvalidateAPIKey.Rd +++ b/auto-man/synInvalidateAPIKey.Rd @@ -10,7 +10,16 @@ synInvalidateAPIKey } \description{ +**Deprecated with no replacement.** The client does not support API keys for +authentication. Please use a +[personal access token](https://python-docs.synapse.org/tutorials/authentication/) +instead. This method will be removed in a future release. + + Invalidates authentication across all clients. + +Returns: + None } \usage{ synInvalidateAPIKey() diff --git a/auto-man/synInviteToTeam.Rd b/auto-man/synInviteToTeam.Rd index 31f16c83..f0f0532d 100644 --- a/auto-man/synInviteToTeam.Rd +++ b/auto-man/synInviteToTeam.Rd @@ -12,28 +12,30 @@ synInviteToTeam \description{ Invite user to a Synapse team via Synapse username or email (choose one or the other) + +Arguments: + syn: Synapse object + team: A [synapseclient.team.Team][] object or a team's ID. + user: Synapse username or profile id of user + inviteeEmail: Email of user + message: Additional message for the user getting invited to the team. + force: If an open invitation exists for the invitee, the old invite will be cancelled. + +Returns: + MembershipInvitation or None if user is already a member } \usage{ -synInviteToTeam(team, user=NULL, inviteeEmail=NULL, message=NULL, force=FALSE, syn=NULL) +synInviteToTeam(team, user=NULL, inviteeEmail=NULL, message=NULL, force=FALSE) } \arguments{ -\item{team}{ A Team object or a\cr - team's ID.\cr -} -\item{user}{ Synapse username or profile id of user\cr -} -\item{inviteeEmail}{ Email of user\cr -} -\item{message}{ Additional message for the user getting invited to the\cr - team. Default to None.\cr -} -\item{force}{ If an open invitation exists for the invitee,\cr - the old invite will be cancelled. Default to False.} -\item{syn}{optional named parameter: Synapse object\cr -} +\item{team}{} +\item{user}{} +\item{inviteeEmail}{} +\item{message}{} +\item{force}{} } \value{ - MembershipInvitation or None if user is already a member + } diff --git a/auto-man/synIsCertified.Rd b/auto-man/synIsCertified.Rd index c2f356ea..78db54c5 100644 --- a/auto-man/synIsCertified.Rd +++ b/auto-man/synIsCertified.Rd @@ -11,6 +11,12 @@ synIsCertified } \description{ Determines whether a Synapse user is a certified user. + +Arguments: + user: Synapse username or Id + +Returns: + True if the Synapse user is certified } \usage{ synIsCertified(user) @@ -19,7 +25,7 @@ synIsCertified(user) \item{user}{} } \value{ - True if the Synapse user is certified + } diff --git a/auto-man/synIsSynapseId.Rd b/auto-man/synIsSynapseId.Rd index db1e91ce..b783cbe8 100644 --- a/auto-man/synIsSynapseId.Rd +++ b/auto-man/synIsSynapseId.Rd @@ -11,6 +11,12 @@ synIsSynapseId } \description{ Checks if given synID is valid (attached to actual entity?) + +Arguments: + syn_id: A Synapse ID + +Returns: + True if the Synapse ID is valid } \usage{ synIsSynapseId(syn_id) diff --git a/auto-man/synLogin.Rd b/auto-man/synLogin.Rd index 902ad19b..06f8017c 100644 --- a/auto-man/synLogin.Rd +++ b/auto-man/synLogin.Rd @@ -12,50 +12,33 @@ synLogin \description{ Valid combinations of login() arguments: - - email/username and password - - email/username and apiKey (Base64 encoded string) - - authToken - - sessionToken (**DEPRECATED**) +- authToken If no login arguments are provided or only username is provided, login() will attempt to log in using information from these sources (in order of preference): -#. User's personal access token from environment the variable: SYNAPSE_AUTH_TOKEN +1. User defined arguments during a CLI session +2. User's Personal Access Token (aka: Synapse Auth Token) + from the environment variable: SYNAPSE_AUTH_TOKEN +3. .synapseConfig file (in user home folder unless configured otherwise) +4. Retrieves user's authentication token from AWS SSM Parameter store (if configured) -#. .synapseConfig file (in user home folder unless configured otherwise) - -#. cached credentials from previous `login()` where `rememberMe=True` was passed as a parameter +Arguments: + email: Synapse user name (or an email address associated with a Synapse account) + authToken: A bearer authorization token, e.g. a + [personal access token](https://python-docs.synapse.org/tutorials/authentication/). + silent: Defaults to False. Suppresses the "Welcome ...!" message. } \usage{ -synLogin(email=NULL, password=NULL, apiKey=NULL, sessionToken=NULL, rememberMe=FALSE, silent=FALSE, forced=FALSE, authToken=NULL) +synLogin(email=NULL, silent=FALSE, authToken=NULL) } \arguments{ -\item{email}{ Synapse user name (or an email address associated with a Synapse account)\cr -} -\item{password}{ **!!WILL BE DEPRECATED!!** password. Please use authToken (Synapse personal access token)\cr -} -\item{apiKey}{ **!!WILL BE DEPRECATED!!** Base64 encoded Synapse API key\cr -} -\item{sessionToken}{ **!!DEPRECATED FIELD!!** User's current session token. Using this field will ignore the\cr - following fields: email, password, apiKey\cr -} -\item{rememberMe}{ Whether the authentication information should be cached in your operating system's\cr - credential storage.\cr -} -\item{silent}{ Defaults to False. Suppresses the "Welcome ...!" message.\cr -} -\item{forced}{ Defaults to False. Bypass the credential cache if set.} -\item{authToken}{ A bearer authorization token, e.g. a personal access token, can be used in lieu of a\cr - password or apiKey} +\item{email}{} +\item{silent}{} +\item{authToken}{} } \value{ } - -\examples{ -%\dontrun{ -% syn.login('my-username', 'secret-password', rememberMe=True) -% #> Welcome, Me! -%} -} + diff --git a/auto-man/synLogout.Rd b/auto-man/synLogout.Rd index f800caa1..a2cbea88 100644 --- a/auto-man/synLogout.Rd +++ b/auto-man/synLogout.Rd @@ -11,13 +11,15 @@ synLogout } \description{ Removes authentication information from the Synapse client. + +Returns: + None } \usage{ -synLogout(forgetMe=FALSE) +synLogout() } \arguments{ -\item{forgetMe}{ Set as True to clear any local storage of authentication information.\cr - See the flag "rememberMe" in synapseclient.Synapse.login.} + } \value{ diff --git a/auto-man/synMd5Query.Rd b/auto-man/synMd5Query.Rd index 34455a3a..d990f032 100644 --- a/auto-man/synMd5Query.Rd +++ b/auto-man/synMd5Query.Rd @@ -11,15 +11,21 @@ synMd5Query } \description{ Find the Entities which have attached file(s) which have the given MD5 hash. + +Arguments: + md5: The MD5 to query for (hexadecimal string) + +Returns: + A list of Entity headers } \usage{ synMd5Query(md5) } \arguments{ -\item{md5}{ The MD5 to query for (hexadecimal string)} +\item{md5}{} } \value{ - A list of Entity headers + } diff --git a/auto-man/synMove.Rd b/auto-man/synMove.Rd index d82858b5..f8835d0f 100644 --- a/auto-man/synMove.Rd +++ b/auto-man/synMove.Rd @@ -11,22 +11,23 @@ synMove } \description{ Move a Synapse entity to a new container. + +Arguments: + entity: A Synapse ID, a Synapse Entity object, or a local file that is stored in Synapse + new_parent: The new parent container (Folder or Project) to which the entity should be moved. + +Returns: + The Synapse Entity object that has been moved. } \usage{ synMove(entity, new_parent) } \arguments{ -\item{entity}{ A Synapse ID, a Synapse Entity object, or a local file that is stored in Synapse\cr -} -\item{new_parent}{ The new parent container (Folder or Project) to which the entity should be moved.} +\item{entity}{} +\item{new_parent}{} } \value{ - The Synapse Entity object that has been moved. -} - -\examples{ -%\dontrun{ -% entity = syn.move('syn456', 'syn123') -%} } + + diff --git a/auto-man/synOnweb.Rd b/auto-man/synOnweb.Rd index 9403c55b..56b9aa4a 100644 --- a/auto-man/synOnweb.Rd +++ b/auto-man/synOnweb.Rd @@ -11,14 +11,20 @@ synOnweb } \description{ Opens up a browser window to the entity page or wiki-subpage. + +Arguments: + entity: Either an Entity or a Synapse ID + subpageId: (Optional) ID of one of the wiki's sub-pages + +Returns: + None } \usage{ synOnweb(entity, subpageId=NULL) } \arguments{ -\item{entity}{ Either an Entity or a Synapse ID\cr -} -\item{subpageId}{ (Optional) ID of one of the wiki's sub-pages} +\item{entity}{} +\item{subpageId}{} } \value{ diff --git a/auto-man/synPrintEntity.Rd b/auto-man/synPrintEntity.Rd index c31522aa..23792695 100644 --- a/auto-man/synPrintEntity.Rd +++ b/auto-man/synPrintEntity.Rd @@ -11,14 +11,20 @@ synPrintEntity } \description{ Pretty prints an Entity. + +Arguments: + entity: The entity to be printed. + ensure_ascii: If True, escapes all non-ASCII characters + +Returns: + None } \usage{ synPrintEntity(entity, ensure_ascii=TRUE) } \arguments{ -\item{entity}{ The entity to be printed.\cr -} -\item{ensure_ascii}{ If True, escapes all non-ASCII characters} +\item{entity}{} +\item{ensure_ascii}{} } \value{ diff --git a/auto-man/synRemoveFromDownloadList.Rd b/auto-man/synRemoveFromDownloadList.Rd index 216e844e..be66274d 100644 --- a/auto-man/synRemoveFromDownloadList.Rd +++ b/auto-man/synRemoveFromDownloadList.Rd @@ -11,6 +11,12 @@ synRemoveFromDownloadList } \description{ Remove a batch of files from download list + +Arguments: + list_of_files: Array of files in the format of a mapping {fileEntityId: synid, versionNumber: version} + +Returns: + Number of files removed from download list } \usage{ synRemoveFromDownloadList(list_of_files) @@ -19,7 +25,7 @@ synRemoveFromDownloadList(list_of_files) \item{list_of_files}{} } \value{ - Number of files removed from download list + } diff --git a/auto-man/synRestDELETE.Rd b/auto-man/synRestDELETE.Rd index 340e5a36..fac37c4b 100644 --- a/auto-man/synRestDELETE.Rd +++ b/auto-man/synRestDELETE.Rd @@ -11,22 +11,23 @@ synRestDELETE } \description{ Sends an HTTP DELETE request to the Synapse server. + +Arguments: + uri: URI of resource to be deleted + endpoint: Server endpoint, defaults to self.repoEndpoint + headers: Dictionary of headers to use rather than the API-key-signed default set of headers + requests_session: An external [requests.Session object](https://requests.readthedocs.io/en/latest/user/advanced/) to use when making this specific call + kwargs: Any other arguments taken by a [request](http://docs.python-requests.org/en/latest/) method } \usage{ -synRestDELETE(uri, endpoint=NULL, headers=NULL, retryPolicy=list(), requests_session=NULL, kwargs=NULL) +synRestDELETE(uri, endpoint=NULL, headers=NULL, retryPolicy=list(), requests_session=NULL) } \arguments{ -\item{uri}{ URI of resource to be deleted\cr -} -\item{endpoint}{ Server endpoint, defaults to self.repoEndpoint\cr -} -\item{headers}{ Dictionary of headers to use rather than the API-key-signed default set of headers\cr -} +\item{uri}{} +\item{endpoint}{} +\item{headers}{} \item{retryPolicy}{} -\item{requests_session}{ an external requests.session object to use when making this specific call\cr -} -\item{kwargs}{optional named parameter: Any other arguments taken by a\cr - \href{http://docs.python-requests.org/en/latest/}{requests} method} +\item{requests_session}{} } \value{ diff --git a/auto-man/synRestGET.Rd b/auto-man/synRestGET.Rd index c4313c92..26bdc268 100644 --- a/auto-man/synRestGET.Rd +++ b/auto-man/synRestGET.Rd @@ -11,25 +11,29 @@ synRestGET } \description{ Sends an HTTP GET request to the Synapse server. + +Arguments: + uri: URI on which get is performed + endpoint: Server endpoint, defaults to self.repoEndpoint + headers: Dictionary of headers to use rather than the API-key-signed default set of headers + requests_session: An external [requests.Session object](https://requests.readthedocs.io/en/latest/user/advanced/) to use when making this specific call + kwargs: Any other arguments taken by a [request](http://docs.python-requests.org/en/latest/) method + +Returns: + JSON encoding of response } \usage{ -synRestGET(uri, endpoint=NULL, headers=NULL, retryPolicy=list(), requests_session=NULL, kwargs=NULL) +synRestGET(uri, endpoint=NULL, headers=NULL, retryPolicy=list(), requests_session=NULL) } \arguments{ -\item{uri}{ URI on which get is performed\cr -} -\item{endpoint}{ Server endpoint, defaults to self.repoEndpoint\cr -} -\item{headers}{ Dictionary of headers to use rather than the API-key-signed default set of headers\cr -} +\item{uri}{} +\item{endpoint}{} +\item{headers}{} \item{retryPolicy}{} -\item{requests_session}{ an external requests.Session object to use when making this specific call\cr -} -\item{kwargs}{optional named parameter: Any other arguments taken by a\cr - \href{http://docs.python-requests.org/en/latest/}{requests} method} +\item{requests_session}{} } \value{ - JSON encoding of response + } diff --git a/auto-man/synRestPOST.Rd b/auto-man/synRestPOST.Rd index 9040323b..e2d5bb92 100644 --- a/auto-man/synRestPOST.Rd +++ b/auto-man/synRestPOST.Rd @@ -11,27 +11,31 @@ synRestPOST } \description{ Sends an HTTP POST request to the Synapse server. + +Arguments: + uri: URI on which get is performed + endpoint: Server endpoint, defaults to self.repoEndpoint + body: The payload to be delivered + headers: Dictionary of headers to use rather than the API-key-signed default set of headers + requests_session: An external [requests.Session object](https://requests.readthedocs.io/en/latest/user/advanced/) to use when making this specific call + kwargs: Any other arguments taken by a [request](http://docs.python-requests.org/en/latest/) method + +Returns: + JSON encoding of response } \usage{ -synRestPOST(uri, body, endpoint=NULL, headers=NULL, retryPolicy=list(), requests_session=NULL, kwargs=NULL) +synRestPOST(uri, body, endpoint=NULL, headers=NULL, retryPolicy=list(), requests_session=NULL) } \arguments{ -\item{uri}{ URI on which get is performed\cr -} -\item{body}{ The payload to be delivered\cr -} -\item{endpoint}{ Server endpoint, defaults to self.repoEndpoint\cr -} -\item{headers}{ Dictionary of headers to use rather than the API-key-signed default set of headers\cr -} +\item{uri}{} +\item{body}{} +\item{endpoint}{} +\item{headers}{} \item{retryPolicy}{} -\item{requests_session}{ an external requests.Session object to use when making this specific call\cr -} -\item{kwargs}{optional named parameter: Any other arguments taken by a\cr - \href{http://docs.python-requests.org/en/latest/}{requests} method} +\item{requests_session}{} } \value{ - JSON encoding of response + } diff --git a/auto-man/synRestPUT.Rd b/auto-man/synRestPUT.Rd index cd7b7806..74c4895a 100644 --- a/auto-man/synRestPUT.Rd +++ b/auto-man/synRestPUT.Rd @@ -11,27 +11,31 @@ synRestPUT } \description{ Sends an HTTP PUT request to the Synapse server. + +Arguments: + uri: URI on which get is performed + endpoint: Server endpoint, defaults to self.repoEndpoint + body: The payload to be delivered + headers: Dictionary of headers to use rather than the API-key-signed default set of headers + requests_session: An external [requests.Session object](https://requests.readthedocs.io/en/latest/user/advanced/) to use when making this specific call + kwargs: Any other arguments taken by a [request](http://docs.python-requests.org/en/latest/) method + +Returns + JSON encoding of response } \usage{ -synRestPUT(uri, body=NULL, endpoint=NULL, headers=NULL, retryPolicy=list(), requests_session=NULL, kwargs=NULL) +synRestPUT(uri, body=NULL, endpoint=NULL, headers=NULL, retryPolicy=list(), requests_session=NULL) } \arguments{ -\item{uri}{ URI on which get is performed\cr -} -\item{body}{ The payload to be delivered\cr -} -\item{endpoint}{ Server endpoint, defaults to self.repoEndpoint\cr -} -\item{headers}{ Dictionary of headers to use rather than the API-key-signed default set of headers\cr -} +\item{uri}{} +\item{body}{} +\item{endpoint}{} +\item{headers}{} \item{retryPolicy}{} -\item{requests_session}{ an external requests.session object to use when making this specific call\cr -} -\item{kwargs}{optional named parameter: Any other arguments taken by a\cr - \href{http://docs.python-requests.org/en/latest/}{requests} method} +\item{requests_session}{} } \value{ - JSON encoding of response + } diff --git a/auto-man/synSendMembershipInvitation.Rd b/auto-man/synSendMembershipInvitation.Rd index 1d4d142b..774d0936 100644 --- a/auto-man/synSendMembershipInvitation.Rd +++ b/auto-man/synSendMembershipInvitation.Rd @@ -12,22 +12,28 @@ synSendMembershipInvitation \description{ Create a membership invitation and send an email notification to the invitee. + +Arguments: + teamId: Synapse teamId + inviteeId: Synapse username or profile id of user + inviteeEmail: Email of user + message: Additional message for the user getting invited to the + team. + +Returns: + MembershipInvitation } \usage{ synSendMembershipInvitation(teamId, inviteeId=NULL, inviteeEmail=NULL, message=NULL) } \arguments{ -\item{teamId}{ Synapse teamId\cr -} -\item{inviteeId}{ Synapse username or profile id of user\cr -} -\item{inviteeEmail}{ Email of user\cr -} -\item{message}{ Additional message for the user getting invited to the\cr - team. Default to None.} +\item{teamId}{} +\item{inviteeId}{} +\item{inviteeEmail}{} +\item{message}{} } \value{ - MembershipInvitation + } diff --git a/auto-man/synSendMessage.Rd b/auto-man/synSendMessage.Rd index c719947b..2e97e293 100644 --- a/auto-man/synSendMessage.Rd +++ b/auto-man/synSendMessage.Rd @@ -11,22 +11,28 @@ synSendMessage } \description{ send a message via Synapse. + +Arguments: + userIds: A list of user IDs to which the message is to be sent + messageSubject: The subject for the message + messageBody: The body of the message + contentType: optional contentType of message body (default="text/plain") + Should be one of "text/plain" or "text/html" + +Returns: + The metadata of the created message } \usage{ synSendMessage(userIds, messageSubject, messageBody, contentType=text/plain) } \arguments{ -\item{userIds}{ A list of user IDs to which the message is to be sent\cr -} -\item{messageSubject}{ The subject for the message\cr -} -\item{messageBody}{ The body of the message\cr -} -\item{contentType}{ optional contentType of message body (default="text/plain")\cr - Should be one of "text/plain" or "text/html"} +\item{userIds}{} +\item{messageSubject}{} +\item{messageBody}{} +\item{contentType}{} } \value{ - The metadata of the created message + } diff --git a/auto-man/synService.Rd b/auto-man/synService.Rd index daac426e..193bb93a 100644 --- a/auto-man/synService.Rd +++ b/auto-man/synService.Rd @@ -12,6 +12,9 @@ synService \description{ Get available Synapse services This is a beta feature and is subject to change + +Arguments: + service_name: name of the service } \usage{ synService(service_name) diff --git a/auto-man/synSetAnnotations.Rd b/auto-man/synSetAnnotations.Rd deleted file mode 100644 index abad84ba..00000000 --- a/auto-man/synSetAnnotations.Rd +++ /dev/null @@ -1,29 +0,0 @@ -% -% Auto-generated file, do not modify. -% Instead, copy this file to the man/ folder, remove this warning, and edit freely. -% Use Git to identify changes in this file which suggest where to change your edited copy. -% -\name{synSetAnnotations} -\alias{synSetAnnotations} -\docType{methods} -\title{ -synSetAnnotations -} -\description{ -Store annotations for an Entity in the Synapse Repository. -} -\usage{ -synSetAnnotations(entity, annotations=NULL, kwargs=NULL) -} -\arguments{ -\item{entity}{ The Entity or Synapse Entity ID whose annotations are to be updated\cr -} -\item{annotations}{ A dictionary of annotation names and values\cr -} -\item{kwargs}{optional named parameter: annotation names and values} -} -\value{ - the updated annotations for the entity -} - - diff --git a/auto-man/synSetEndpoints.Rd b/auto-man/synSetEndpoints.Rd index 0f98697b..0a946bc4 100644 --- a/auto-man/synSetEndpoints.Rd +++ b/auto-man/synSetEndpoints.Rd @@ -11,20 +11,23 @@ synSetEndpoints } \description{ Sets the locations for each of the Synapse services (mostly useful for testing). + +Arguments: + repoEndpoint: Location of synapse repository + authEndpoint: Location of authentication service + fileHandleEndpoint: Location of file service + portalEndpoint: Location of the website + skip_checks: Skip version and endpoint checks } \usage{ synSetEndpoints(repoEndpoint=NULL, authEndpoint=NULL, fileHandleEndpoint=NULL, portalEndpoint=NULL, skip_checks=FALSE) } \arguments{ -\item{repoEndpoint}{ Location of synapse repository\cr -} -\item{authEndpoint}{ Location of authentication service\cr -} -\item{fileHandleEndpoint}{ Location of file service\cr -} -\item{portalEndpoint}{ Location of the website\cr -} -\item{skip_checks}{ Skip version and endpoint checks} +\item{repoEndpoint}{} +\item{authEndpoint}{} +\item{fileHandleEndpoint}{} +\item{portalEndpoint}{} +\item{skip_checks}{} } \value{ diff --git a/auto-man/synSetPermissions.Rd b/auto-man/synSetPermissions.Rd index e9b04ed0..b195c174 100644 --- a/auto-man/synSetPermissions.Rd +++ b/auto-man/synSetPermissions.Rd @@ -12,37 +12,35 @@ synSetPermissions \description{ Sets permission that a user or group has on an Entity. An Entity may have its own ACL or inherit its ACL from a benefactor. + +Arguments: + entity: An Entity or Synapse ID to modify + principalId: Identifier of a user or group. '273948' is for all registered Synapse users + and '273949' is for public access. + accessType: Type of permission to be granted. One or more of CREATE, READ, DOWNLOAD, UPDATE, + DELETE, CHANGE_PERMISSIONS + modify_benefactor: Set as True when modifying a benefactor's ACL + warn_if_inherits: Set as False, when creating a new ACL. + Trying to modify the ACL of an Entity that inherits its ACL will result in a warning + overwrite: By default this function overwrites existing permissions for the specified user. + Set this flag to False to add new permissions non-destructively. + +Returns: + An Access Control List object } \usage{ synSetPermissions(entity, principalId=NULL, accessType=c("READ", "DOWNLOAD"), modify_benefactor=FALSE, warn_if_inherits=TRUE, overwrite=TRUE) } \arguments{ -\item{entity}{ An Entity or Synapse ID to modify\cr -} -\item{principalId}{ Identifier of a user or group. '273948' is for all registered Synapse users\cr - and '273949' is for public access.\cr -} -\item{accessType}{ Type of permission to be granted. One or more of CREATE, READ, DOWNLOAD, UPDATE,\cr - DELETE, CHANGE_PERMISSIONS\cr -} -\item{modify_benefactor}{ Set as True when modifying a benefactor's ACL\cr -} -\item{warn_if_inherits}{ Set as False, when creating a new ACL.\cr - Trying to modify the ACL of an Entity that inherits its ACL will result in a warning\cr -} -\item{overwrite}{ By default this function overwrites existing permissions for the specified user.\cr - Set this flag to False to add new permissions non-destructively.} +\item{entity}{} +\item{principalId}{} +\item{accessType}{} +\item{modify_benefactor}{} +\item{warn_if_inherits}{} +\item{overwrite}{} } \value{ - an Access Control List object -} - -\examples{ -%\dontrun{ -% # Grant all registered users download access -% syn.setPermissions('syn1234','273948',['READ','DOWNLOAD']) -% # Grant the public view access -% syn.setPermissions('syn1234','273949',['READ']) -%} } + + diff --git a/auto-man/synSetProvenance.Rd b/auto-man/synSetProvenance.Rd index 3080c678..afc12449 100644 --- a/auto-man/synSetProvenance.Rd +++ b/auto-man/synSetProvenance.Rd @@ -11,17 +11,23 @@ synSetProvenance } \description{ Stores a record of the code and data used to derive a Synapse entity. + +Arguments: + entity: An Entity or Synapse ID to modify + activity: A [synapseclient.activity.Activity][] + +Returns: + An updated [synapseclient.activity.Activity][] object } \usage{ synSetProvenance(entity, activity) } \arguments{ -\item{entity}{ An Entity or Synapse ID to modify\cr -} -\item{activity}{ a Activity} +\item{entity}{} +\item{activity}{} } \value{ - An updated Activity object + } diff --git a/auto-man/synSetStorageLocation.Rd b/auto-man/synSetStorageLocation.Rd index 34351a0d..bc4cec95 100644 --- a/auto-man/synSetStorageLocation.Rd +++ b/auto-man/synSetStorageLocation.Rd @@ -11,18 +11,24 @@ synSetStorageLocation } \description{ Sets the storage location for a Project or Folder + +Arguments: + entity: A Project or Folder to which the StorageLocationSetting is set + storage_location_id: A StorageLocation id or a list of StorageLocation ids. Pass in None for the default + Synapse storage. + +Returns: + The created or updated settings as a dict. } \usage{ synSetStorageLocation(entity, storage_location_id) } \arguments{ -\item{entity}{ a Project or Folder to which the StorageLocationSetting is set\cr -} -\item{storage_location_id}{ a StorageLocation id or a list of StorageLocation ids. Pass in None for the default\cr - Synapse storage.} +\item{entity}{} +\item{storage_location_id}{} } \value{ - The created or updated settings as a dict + } diff --git a/auto-man/synStore.Rd b/auto-man/synStore.Rd index 678abd9a..4e195ec3 100644 --- a/auto-man/synStore.Rd +++ b/auto-man/synStore.Rd @@ -11,45 +11,48 @@ synStore } \description{ Creates a new Entity or updates an existing Entity, uploading any files in the process. + +Arguments: + obj: A Synapse Entity, Evaluation, or Wiki + used: The Entity, Synapse ID, or URL used to create the object (can also be a list of these) + executed: The Entity, Synapse ID, or URL representing code executed to create the object + (can also be a list of these) + activity: Activity object specifying the user's provenance. + activityName: Activity name to be used in conjunction with *used* and *executed*. + activityDescription: Activity description to be used in conjunction with *used* and *executed*. + createOrUpdate: Indicates whether the method should automatically perform an update if the 'obj' + conflicts with an existing Synapse object. + forceVersion: Indicates whether the method should increment the version of the object even if nothing + has changed. + versionLabel: Arbitrary string used to label the version. + isRestricted: If set to true, an email will be sent to the Synapse access control team to start the + process of adding terms-of-use or review board approval for this entity. + You will be contacted with regards to the specific data being restricted and the + requirements of access. + opentelemetry_context: OpenTelemetry context to propogate to this function to use for tracing. Used + cases where multi-threaded operations need to be linked to parent spans. + +Returns: + A Synapse Entity, Evaluation, or Wiki } \usage{ -synStore(obj, createOrUpdate=TRUE, forceVersion=TRUE, versionLabel=NULL, isRestricted=FALSE, activity=NULL, used=NULL, executed=NULL, activityName=NULL, activityDescription=NULL) +synStore(obj, createOrUpdate=TRUE, forceVersion=TRUE, versionLabel=NULL, isRestricted=FALSE, activity=NULL, used=NULL, executed=NULL, activityName=NULL, activityDescription=NULL, opentelemetry_context=NULL) } \arguments{ -\item{obj}{ A Synapse Entity, Evaluation, or Wiki\cr -} -\item{createOrUpdate}{ Indicates whether the method should automatically perform an update if the 'obj'\cr - conflicts with an existing Synapse object. Defaults to True.\cr -} -\item{forceVersion}{ Indicates whether the method should increment the version of the object even if\cr - nothing has changed. Defaults to True.\cr -} -\item{versionLabel}{ Arbitrary string used to label the version.\cr -} -\item{isRestricted}{ If set to true, an email will be sent to the Synapse access control team to start\cr - the process of adding terms-of-use or review board approval for this entity.\cr - You will be contacted with regards to the specific data being restricted and the\cr - requirements of access.} -\item{activity}{ Activity object specifying the user's provenance.\cr -} -\item{used}{ The Entity, Synapse ID, or URL used to create the object (can also be a list of\cr - these)\cr -} -\item{executed}{ The Entity, Synapse ID, or URL representing code executed to create the object\cr - (can also be a list of these)\cr -} -\item{activityName}{ Activity name to be used in conjunction with *used* and *executed*.\cr -} -\item{activityDescription}{ Activity description to be used in conjunction with *used* and *executed*.\cr -} +\item{obj}{} +\item{createOrUpdate}{} +\item{forceVersion}{} +\item{versionLabel}{} +\item{isRestricted}{} +\item{activity}{} +\item{used}{} +\item{executed}{} +\item{activityName}{} +\item{activityDescription}{} +\item{opentelemetry_context}{} } \value{ - A Synapse Entity, Evaluation, or Wiki -} - -\examples{ -%\dontrun{ -% from synapseclient import Project -%} } + + diff --git a/auto-man/synSubmit.Rd b/auto-man/synSubmit.Rd index 02b527ef..f1172c1b 100644 --- a/auto-man/synSubmit.Rd +++ b/auto-man/synSubmit.Rd @@ -10,41 +10,42 @@ synSubmit } \description{ -Submit an Entity for \href{Evaluation.html}{evaluation}. +Submit an Entity for [evaluation][synapseclient.evaluation.Evaluation]. + +Arguments: + evalation: Evaluation queue to submit to + entity: The Entity containing the Submissions + name: A name for this submission. In the absent of this parameter, the entity name will be used. + (Optional) A [synapseclient.team.Team][] object, ID or name of a Team that is registered for the challenge + team: (optional) A [synapseclient.team.Team][] object, ID or name of a Team that is registered for the challenge + silent: Set to True to suppress output. + submitterAlias: (optional) A nickname, possibly for display in leaderboards in place of the submitter's name + teamName: (deprecated) A synonym for submitterAlias + dockerTag: (optional) The Docker tag must be specified if the entity is a DockerRepository. + +Returns: + A [synapseclient.evaluation.Submission][] object + + +In the case of challenges, a team can optionally be provided to give credit to members of the team that +contributed to the submission. The team must be registered for the challenge with which the given evaluation is +associated. The caller must be a member of the submitting team. } \usage{ synSubmit(evaluation, entity, name=NULL, team=NULL, silent=FALSE, submitterAlias=NULL, teamName=NULL, dockerTag=latest) } \arguments{ -\item{evaluation}{ Evaluation queue to submit to\cr -} -\item{entity}{ The Entity containing the Submission\cr -} -\item{name}{ A name for this submission.\cr - In the absent of this parameter, the entity name will be used.\cr -} -\item{team}{ (optional) A Team object, ID or name of a Team that is registered for the\cr - challenge\cr -} -\item{silent}{ Set to True to suppress output.\cr -} -\item{submitterAlias}{ (optional) A nickname, possibly for display in leaderboards in place of the submitter's\cr - name\cr -} -\item{teamName}{ (deprecated) A synonym for submitterAlias\cr -} -\item{dockerTag}{ (optional) The Docker tag must be specified if the entity is a DockerRepository.\cr - Defaults to "latest".} +\item{evaluation}{} +\item{entity}{} +\item{name}{} +\item{team}{} +\item{silent}{} +\item{submitterAlias}{} +\item{teamName}{} +\item{dockerTag}{} } \value{ - A Submission object -} - -\examples{ -%\dontrun{ -% evaluation = syn.getEvaluation(123) -% entity = syn.get('syn456') -% submission = syn.submit(evaluation, entity, name='Our Final Answer', team='Blue Team') -%} } + + diff --git a/auto-man/synTableQuery.Rd b/auto-man/synTableQuery.Rd index 3199ec80..599c044f 100644 --- a/auto-man/synTableQuery.Rd +++ b/auto-man/synTableQuery.Rd @@ -11,35 +11,46 @@ synTableQuery } \description{ Query a Synapse Table. + +You can receive query results either as a generator over rows or as a CSV file. For smallish tables, either +method will work equally well. Use of a "rowset" generator allows rows to be processed one at a time and +processing may be stopped before downloading the entire table. + +Optional keyword arguments differ for the two return types of `rowset` or `csv` + +Arguments: + query: Query string in a [SQL-like syntax](https://rest-docs.synapse.org/rest/org/sagebionetworks/repo/web/controller/TableExamples.html), for example: `"SELECT * from syn12345"` + resultsAs: select whether results are returned as a CSV file ("csv") or incrementally downloaded as sets of rows ("rowset") + limit: (rowset only) Specify the maximum number of rows to be returned, defaults to None + offset: (rowset only) Don't return the first n rows, defaults to None + quoteCharacter: (csv only) default double quote + escapeCharacter: (csv only) default backslash + lineEnd: (csv only) defaults to os.linesep + separator: (csv only) defaults to comma + header: (csv only) True by default + includeRowIdAndRowVersion: (csv only) True by default + downloadLocation: (csv only) directory path to download the CSV file to + +Returns: + A [TableQueryResult][synapseclient.table.TableQueryResult] or [CsvFileTable][synapseclient.table.CsvFileTable] object + +NOTE: + When performing queries on frequently updated tables, the table can be inaccessible for a period leading + to a timeout of the query. Since the results are guaranteed to eventually be returned you can change the + max timeout by setting the table_query_timeout variable of the Synapse object: + + # Sets the max timeout to 5 minutes. + syn.table_query_timeout = 300 } \usage{ -synTableQuery(query, resultsAs=csv, offset=NULL, isConsistent=NULL, quoteCharacter=NULL, escapeCharacter=NULL, lineEnd=NULL, separator=NULL, header=NULL, includeRowIdAndRowVersion=NULL, downloadLocation=NULL) +synTableQuery(query, resultsAs=csv) } \arguments{ -\item{query}{ query string in a \href{https://rest-docs.synapse.org/rest/org/sagebionetworks/repo/web/controller/TableExamples.html}{SQL-like syntax }, for example\cr - "SELECT * from syn12345"} -\item{resultsAs}{ select whether results are returned as a CSV file ("csv") or incrementally downloaded as\cr - sets of rows ("rowset").} -\item{offset}{optional named parameter: don't return the first n rows, defaults to None\cr -} -\item{isConsistent}{optional named parameter: (**DEPRECATED**)} -\item{quoteCharacter}{optional named parameter: default double quote\cr -} -\item{escapeCharacter}{optional named parameter: default backslash\cr -} -\item{lineEnd}{optional named parameter: defaults to os.linesep\cr -} -\item{separator}{optional named parameter: defaults to comma\cr -} -\item{header}{optional named parameter: True by default\cr -} -\item{includeRowIdAndRowVersion}{optional named parameter: True by default\cr -} -\item{downloadLocation}{optional named parameter: directory path to download the CSV file to} +\item{query}{} +\item{resultsAs}{} } \value{ - A Table object that serves as a wrapper around a CSV file (or generator over Row objects if - resultsAs="rowset"). + } diff --git a/auto-man/synUpdateActivity.Rd b/auto-man/synUpdateActivity.Rd index 3a5c60bf..d75a5330 100644 --- a/auto-man/synUpdateActivity.Rd +++ b/auto-man/synUpdateActivity.Rd @@ -11,15 +11,21 @@ synUpdateActivity } \description{ Modifies an existing Activity. + +Arguments: + activity: The Activity to be updated. + +Returns: + An updated Activity object } \usage{ synUpdateActivity(activity) } \arguments{ -\item{activity}{ The Activity to be updated.} +\item{activity}{} } \value{ - An updated Activity object + } diff --git a/auto-man/synUploadFileHandle.Rd b/auto-man/synUploadFileHandle.Rd index fab58d01..e27decf7 100644 --- a/auto-man/synUploadFileHandle.Rd +++ b/auto-man/synUploadFileHandle.Rd @@ -12,33 +12,37 @@ synUploadFileHandle \description{ Uploads the file in the provided path (if necessary) to a storage location based on project settings. Returns a new FileHandle as a dict to represent the stored file. + +Arguments: + parent: Parent of the entity to which we upload. + path: File path to the file being uploaded + synapseStore: If False, will not upload the file, but instead create an ExternalFileHandle that references + the file on the local machine. + If True, will upload the file based on StorageLocation determined by the entity_parent_id + mimetype: The MIME type metadata for the uploaded file + md5: The MD5 checksum for the file, if known. Otherwise if the file is a local file, it will be calculated + automatically. + file_size: The size the file, if known. Otherwise if the file is a local file, it will be calculated + automatically. + file_type: The MIME type the file, if known. Otherwise if the file is a local file, it will be calculated + automatically. + +Returns: + A dict of a new FileHandle as a dict that represents the uploaded file } \usage{ -synUploadFileHandle(path, parent, synapseStore=TRUE, mimetype=NULL, md5=NULL, file_size=NULL, file_type=NULL) +synUploadFileHandle(path, parent, synapseStore=TRUE, mimetype=NULL, md5=NULL, file_size=NULL) } \arguments{ -\item{path}{ file path to the file being uploaded\cr -} -\item{parent}{ parent of the entity to which we upload.\cr -} -\item{synapseStore}{ If False, will not upload the file, but instead create an ExternalFileHandle that\cr - references the file on the local machine.\cr - If True, will upload the file based on StorageLocation determined by the\cr - entity_parent_id\cr -} -\item{mimetype}{ The MIME type metadata for the uploaded file\cr -} -\item{md5}{ The MD5 checksum for the file, if known. Otherwise if the file is a local file, it will\cr - be calculated automatically.\cr -} -\item{file_size}{ The size the file, if known. Otherwise if the file is a local file, it will be\cr - calculated automatically.\cr -} -\item{file_type}{optional named parameter: The MIME type the file, if known. Otherwise if the file is a local file, it will be\cr - calculated automatically.} +\item{path}{} +\item{parent}{} +\item{synapseStore}{} +\item{mimetype}{} +\item{md5}{} +\item{file_size}{} } \value{ - a dict of a new FileHandle as a dict that represents the uploaded file + } diff --git a/docs/404.html b/docs/404.html index 34bc5deb..755784f7 100644 --- a/docs/404.html +++ b/docs/404.html @@ -32,7 +32,7 @@ synapser - 1.2.0 + 2.0.0 @@ -54,6 +54,9 @@
  • Docker
  • +
  • + Installation +
  • Manage Synapse Credentials
  • @@ -116,7 +119,7 @@

    Page not found (404)